/* ===== Header Default Styles ===== */

        /* ===== TRANSPARENT MODE (Default - shows on hero) ===== */
        .header-transparent .nav-link {
            position: relative;
            color: rgba(255, 255, 255, 0.9);
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .header-transparent .nav-link:hover {
            color: white;
        }

        .header-transparent .nav-link::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 0;
            height: 2px;
            background: white;
            transition: width 0.3s ease;
        }

        .header-transparent .nav-link:hover::after {
            width: 100%;
        }

        /* ===== TEXT COLOR MODE ===== */
        /* IMPORTANT: Text color mode settings only apply in LIGHT mode */
        /* In dark mode, colors are always controlled by dark mode variables */

        /* ===== TEXT COLOR MODE: LIGHT (white text - for dark hero backgrounds) - LIGHT MODE ONLY ===== */
        /* Only applies when NOT scrolled and NOT in dark mode */
        body:not(.dark) .header-transparent.header-text-light:not(.header-scrolled) .nav-link,
        body:not(.dark) .header-transparent.header-text-light:not(.header-scrolled) .header-logo-text,
        body:not(.dark) .header-transparent.header-text-light:not(.header-scrolled) .header-phone-icon,
        body:not(.dark) .header-transparent.header-text-light:not(.header-scrolled) .header-lang-btn,
        body:not(.dark) .header-transparent.header-text-light:not(.header-scrolled) .header-mobile-btn,
        body:not(.dark) .header-transparent.header-text-light:not(.header-scrolled) .theme-toggle {
            color: rgba(255, 255, 255, 0.9) !important;
        }

        body:not(.dark) .header-transparent.header-text-light:not(.header-scrolled) .nav-link:hover,
        body:not(.dark) .header-transparent.header-text-light:not(.header-scrolled) .header-logo-text:hover {
            color: white !important;
        }

        body:not(.dark) .header-transparent.header-text-light:not(.header-scrolled) .nav-link::after {
            background: white !important;
        }

        body:not(.dark) .header-transparent.header-text-light:not(.header-scrolled) .header-lang-btn:hover,
        body:not(.dark) .header-transparent.header-text-light:not(.header-scrolled) .header-mobile-btn:hover,
        body:not(.dark) .header-transparent.header-text-light:not(.header-scrolled) .theme-toggle:hover {
            background: rgba(255, 255, 255, 0.1) !important;
            color: white !important;
        }

        /* ===== TEXT COLOR MODE: DARK (black text - for light hero backgrounds) - LIGHT MODE ONLY ===== */
        /* Only applies when NOT scrolled and NOT in dark mode */
        body:not(.dark) .header-transparent.header-text-dark:not(.header-scrolled) .nav-link,
        body:not(.dark) .header-transparent.header-text-dark:not(.header-scrolled) .header-logo-text,
        body:not(.dark) .header-transparent.header-text-dark:not(.header-scrolled) .header-phone-icon,
        body:not(.dark) .header-transparent.header-text-dark:not(.header-scrolled) .header-lang-btn,
        body:not(.dark) .header-transparent.header-text-dark:not(.header-scrolled) .header-mobile-btn,
        body:not(.dark) .header-transparent.header-text-dark:not(.header-scrolled) .theme-toggle {
            color: var(--color-gray-800) !important;
        }

        body:not(.dark) .header-transparent.header-text-dark:not(.header-scrolled) .nav-link:hover,
        body:not(.dark) .header-transparent.header-text-dark:not(.header-scrolled) .header-logo-text:hover {
            color: var(--color-gray-900) !important;
        }

        body:not(.dark) .header-transparent.header-text-dark:not(.header-scrolled) .nav-link::after {
            background: var(--color-gray-900) !important;
        }

        body:not(.dark) .header-transparent.header-text-dark:not(.header-scrolled) .header-lang-btn:hover,
        body:not(.dark) .header-transparent.header-text-dark:not(.header-scrolled) .header-mobile-btn:hover,
        body:not(.dark) .header-transparent.header-text-dark:not(.header-scrolled) .theme-toggle:hover {
            background: rgba(0, 0, 0, 0.05) !important;
            color: var(--color-gray-900) !important;
        }

        /* ===== SOLID MODE (Non-transparent header) ===== */
        .header-solid {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .header-solid .nav-link {
            position: relative;
            color: var(--color-gray-700);
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .header-solid .nav-link:hover {
            color: var(--color-primary-600);
        }

        .header-solid .nav-link::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 0;
            height: 2px;
            background: var(--color-primary-600);
            transition: width 0.3s ease;
        }

        .header-solid .nav-link:hover::after {
            width: 100%;
        }

        .header-solid .header-logo-text {
            color: var(--color-gray-900);
        }

        .header-solid .header-phone-icon {
            color: var(--color-gray-600);
        }

        .header-solid .header-phone-icon:hover {
            color: var(--color-primary-600);
        }

        .header-solid .header-lang-btn {
            color: var(--color-gray-600);
        }

        .header-solid .header-lang-btn:hover {
            color: var(--color-primary-600);
            background: var(--color-gray-100);
        }

        .header-solid .header-mobile-btn {
            color: var(--color-gray-900);
        }

        .header-solid .header-mobile-btn:hover {
            background: var(--color-gray-100);
        }

        .header-solid .theme-toggle {
            color: var(--color-text-secondary);
        }

        .header-solid .theme-toggle:hover {
            background: var(--color-bg-tertiary);
            color: var(--color-text-primary);
        }

        /* Dark mode - Solid header */
        body.dark .header-solid,
        body.dark #header.header-solid {
            background: #0f172a !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
        }

        body.dark .header-solid .nav-link {
            color: rgba(255, 255, 255, 0.8) !important;
        }

        body.dark .header-solid .nav-link:hover {
            color: var(--color-primary-400) !important;
        }

        body.dark .header-solid .nav-link::after {
            background: var(--color-primary-400) !important;
        }

        body.dark .header-solid .header-logo-text {
            color: #ffffff !important;
        }

        body.dark .header-solid .header-phone-icon {
            color: rgba(255, 255, 255, 0.7) !important;
        }

        body.dark .header-solid .header-phone-icon:hover {
            color: var(--color-primary-400) !important;
        }

        body.dark .header-solid .header-lang-btn {
            color: rgba(255, 255, 255, 0.7) !important;
        }

        body.dark .header-solid .header-lang-btn:hover {
            color: var(--color-primary-400) !important;
            background: rgba(255, 255, 255, 0.1) !important;
        }

        body.dark .header-solid .header-mobile-btn {
            color: #ffffff !important;
        }

        body.dark .header-solid .header-mobile-btn:hover {
            background: rgba(255, 255, 255, 0.1) !important;
        }

        body.dark .header-solid .theme-toggle {
            color: rgba(255, 255, 255, 0.8) !important;
        }

        body.dark .header-solid .theme-toggle:hover {
            background: rgba(255, 255, 255, 0.1) !important;
            color: #ffffff !important;
        }

        /* Dark mode for ANY header when scrolled (both transparent and solid) */
        /* This ensures dark background is maintained when scrolling */
        .dark #header.header-scrolled,
        .dark .header-solid.header-scrolled,
        .dark .header-transparent.header-scrolled {
            background: var(--color-bg-primary) !important;
            border-bottom-color: var(--color-border) !important;
            box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3) !important;
        }

        .dark .header-transparent.header-scrolled .nav-link {
            color: var(--color-text-secondary) !important;
        }

        .dark .header-transparent.header-scrolled .nav-link:hover {
            color: var(--color-primary-400) !important;
        }

        .dark .header-transparent.header-scrolled .nav-link::after {
            background: var(--color-primary-400) !important;
        }

        .dark .header-transparent.header-scrolled .header-logo-text {
            color: var(--color-text-primary) !important;
        }

        .dark .header-transparent.header-scrolled .header-phone-icon {
            color: var(--color-text-tertiary) !important;
        }

        .dark .header-transparent.header-scrolled .header-phone-icon:hover {
            color: var(--color-primary-400) !important;
        }

        .dark .header-transparent.header-scrolled .header-lang-btn {
            color: var(--color-text-tertiary) !important;
        }

        .dark .header-transparent.header-scrolled .header-lang-btn:hover {
            color: var(--color-primary-400) !important;
            background: var(--color-bg-tertiary) !important;
        }

        .dark .header-transparent.header-scrolled .header-mobile-btn {
            color: var(--color-text-primary) !important;
        }

        .dark .header-transparent.header-scrolled .header-mobile-btn:hover {
            background: var(--color-bg-tertiary) !important;
        }

        /* Navigation when header is scrolled (transparent mode only) */
        .header-transparent.header-scrolled .nav-link {
            color: var(--color-gray-700);
        }

        .header-transparent.header-scrolled .nav-link:hover {
            color: var(--color-primary-600);
        }

        .header-transparent.header-scrolled .nav-link::after {
            background: var(--color-primary-600);
        }

        /* More Dropdown */
        .nav-more-dropdown {
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }

        .nav-more-dropdown::before {
            content: '';
            position: absolute;
            top: -6px;
            left: 50%;
            transform: translateX(-50%);
            border-left: 6px solid transparent;
            border-right: 6px solid transparent;
            border-bottom: 6px solid white;
        }

        .dark .nav-more-dropdown::before {
            border-bottom-color: var(--color-gray-800);
        }

        .nav-more-item:hover span:first-child {
            opacity: 1;
        }

        /* Mobile Menu */
        .mobile-menu {
            position: fixed;
            inset: 0;
            background: white;
            z-index: 9999;
            transform: translateX(100%);
            transition: transform 0.3s ease;
        }

        .mobile-menu.active {
            transform: translateX(0);
        }

        /* Header Scroll Effect (Transparent mode only) */
        .header-transparent.header-scrolled {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        /* Header Elements - Transparent mode (on hero) */
        .header-transparent .header-logo-text {
            color: white;
            transition: color 0.3s ease;
        }

        .header-transparent .header-phone-icon {
            color: rgba(255, 255, 255, 0.9);
        }

        .header-transparent .header-phone-icon:hover {
            color: white;
        }

        .header-transparent .header-lang-btn {
            color: rgba(255, 255, 255, 0.9);
        }

        .header-transparent .header-lang-btn:hover {
            color: white;
            background: rgba(255, 255, 255, 0.1);
        }

        .header-transparent .header-mobile-btn {
            color: white;
        }

        .header-transparent .header-mobile-btn:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        /* Header Elements - Transparent mode when scrolled */
        .header-transparent.header-scrolled .header-logo-text {
            color: var(--color-gray-900);
        }

        .header-transparent.header-scrolled .header-phone-icon {
            color: var(--color-gray-600);
        }

        .header-transparent.header-scrolled .header-phone-icon:hover {
            color: var(--color-primary-600);
        }

        .header-transparent.header-scrolled .header-lang-btn {
            color: var(--color-gray-600);
        }

        .header-transparent.header-scrolled .header-lang-btn:hover {
            color: var(--color-primary-600);
            background: var(--color-gray-100);
        }

        .header-transparent.header-scrolled .header-mobile-btn {
            color: var(--color-gray-900);
        }

        .header-transparent.header-scrolled .header-mobile-btn:hover {
            background: var(--color-gray-100);
        }

        /* ===== Dark Mode Header Styles ===== */

        /* Header scrolled state in dark mode */
        .dark .header-scrolled {
            background: rgba(15, 23, 42, 0.95);
        }

        .dark .header-scrolled .header-logo-text {
            color: var(--color-text-primary);
        }

        .dark .header-scrolled .nav-link {
            color: var(--color-text-secondary);
        }

        .dark .header-scrolled .nav-link:hover {
            color: var(--color-primary-400);
        }

        .dark .header-scrolled .header-phone-icon {
            color: var(--color-text-tertiary);
        }

        .dark .header-scrolled .header-phone-icon:hover {
            color: var(--color-primary-400);
        }

        .dark .header-scrolled .header-lang-btn {
            color: var(--color-text-tertiary);
        }

        .dark .header-scrolled .header-lang-btn:hover {
            color: var(--color-primary-400);
            background: var(--color-bg-tertiary);
        }

        .dark .header-scrolled .header-mobile-btn {
            color: var(--color-text-primary);
        }

        .dark .header-scrolled .header-mobile-btn:hover {
            background: var(--color-bg-tertiary);
        }

        /* Mobile menu */
        .dark .mobile-menu {
            background: var(--color-bg-primary);
        }

        .dark .mobile-menu .border-b {
            border-color: var(--color-border);
        }

        /* Theme toggle button */
        .theme-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.5rem;
            cursor: pointer;
            transition: all 0.3s ease;
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.9);
        }

        .theme-toggle:hover {
            background: rgba(255, 255, 255, 0.1);
            color: white;
        }

        .header-scrolled .theme-toggle {
            color: var(--color-text-secondary);
        }

        .header-scrolled .theme-toggle:hover {
            background: var(--color-bg-tertiary);
            color: var(--color-text-primary);
        }

        .dark .header-scrolled .theme-toggle:hover {
            background: var(--color-bg-tertiary);
        }

        /* Sun and moon icons */
        .theme-toggle .sun-icon {
            display: none;
        }

        .theme-toggle .moon-icon {
            display: block;
        }

        .dark .theme-toggle .sun-icon {
            display: block;
        }

        .dark .theme-toggle .moon-icon {
            display: none;
        }

        /* ===== CTA Button ===== */
        .header-cta-btn {
            align-items: center;
            justify-content: center;
            padding: 0.625rem 1.25rem;
            border-radius: 0.5rem;
            font-weight: 600;
            font-size: 0.875rem;
            background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
            color: white;
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
            transition: all 300ms;
            white-space: nowrap;
        }

        .header-cta-btn:hover {
            background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800));
            box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
            transform: translateY(-2px);
        }

        /* ===== Mobile CTA Button ===== */
        .header-mobile-cta {
            width: 100%;
            padding: 0.75rem 1.5rem;
            border-radius: 0.5rem;
            font-weight: 600;
            background: linear-gradient(to right, var(--color-primary-600), var(--color-primary-700));
            color: white;
            box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.25);
            transition: all 300ms;
        }

        .header-mobile-cta:hover {
            background: linear-gradient(to right, var(--color-primary-700), var(--color-primary-800));
        }

        /* ===== RTL Support for Header ===== */

        /* Navigation link underline animation for RTL */
        [dir="rtl"] .nav-link::after {
            left: auto;
            right: 0;
        }

        /* Mobile menu slide direction for RTL */
        [dir="rtl"] .mobile-menu {
            transform: translateX(-100%);
        }

        [dir="rtl"] .mobile-menu.active {
            transform: translateX(0);
        }

        /* Header phone icon spacing for RTL */
        [dir="rtl"] .header-phone-icon {
            margin-right: 0;
        }