/* =====================================================================
   HEADER - BOLD, GLOWING, ENERGETIC, GLASSMORPHISM
   ===================================================================== */

/* Header CSS Variables */
:root {
    --header-bg-light: rgba(255, 255, 255, 0.75);
    --header-bg-dark: rgba(10, 15, 26, 0.85);
    --header-border-light: rgba(255, 255, 255, 0.3);
    --header-border-dark: rgba(0, 255, 136, 0.25);
    --header-glow-light: rgba(0, 255, 136, 0.1);
    --header-glow-dark: rgba(0, 255, 136, 0.15);
    --header-nav-spacing: 32px;
    --header-link-gap: 8px;
}

.nav-glass {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: calc(var(--max-width, 1200px) + 60px);
    height: var(--header-height, 64px);
    /* Premium Glassmorphism */
    background: var(--header-bg-dark);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--header-border-dark);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 60px var(--header-glow-dark),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: all 300ms cubic-bezier(0.22, 1, 0.36, 1);
    overflow: visible;
}

/* Light mode header - Premium Glassmorphism */
:not(.dark) .nav-glass {
    background: var(--header-bg-light);
    border-color: var(--header-border-light);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 40px var(--header-glow-light);
}

.dark .nav-glass {
    background: var(--header-bg-dark);
    border-color: var(--header-border-dark);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 80px var(--header-glow-dark),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* CRITICAL: Give header solid background when mobile menu is open to hide dark page content behind */
body.mobile-menu-open .nav-glass,
body.mobile-menu-open .nav-glass:hover {
    box-shadow: none !important;
    border-color: transparent !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
}

/* Dark mode: solid dark background for header when menu is open */
body.mobile-menu-open.dark .nav-glass,
body.mobile-menu-open.dark .nav-glass:hover,
.dark body.mobile-menu-open .nav-glass,
.dark body.mobile-menu-open .nav-glass:hover {
    background: #1a1f2c !important;
}

/* Hover glow effect */
.nav-glass:hover {
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 100px rgba(0, 255, 136, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* No backdrop-filter fallback */
@supports not (backdrop-filter: blur(20px)) {
    .nav-glass { background: var(--bg-primary, #030712); }
    :not(.dark) .nav-glass { background: #ffffff; }
}

/* Header Inner Container - Centered with even spacing */
.nav-glass .max-w-7xl {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    max-width: 100%;
    overflow: visible;
}

/* Header row layout - ensures flex items are on single line with space-between */
.nav-glass .max-w-7xl > div[class*="flex"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    flex-wrap: nowrap;
}

/* Logo - NEVER shrink or wrap */
.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 100%;
    min-width: max-content;
    white-space: nowrap;
}

.logo-container a {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.logo-image {
    height: 32px;
    width: auto;
    max-width: none;
    flex-shrink: 0;
    transition: all 300ms ease;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.3));
}

.logo-image:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.5));
}

.logo-light { display: block; }
.logo-dark { display: none; }
.dark .logo-light { display: none; }
.dark .logo-dark { display: block; }

/* Navigation - Prevent overflow */
.nav-glass nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 1;
    min-width: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    transition: all 200ms ease;
    white-space: nowrap;
    position: relative;
    flex-shrink: 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary, #00FF88), transparent);
    transition: all 200ms ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--primary, #00FF88);
    background: rgba(0, 255, 136, 0.1);
}

.nav-link:hover::after {
    width: 60%;
}

/* Light mode nav links */
:not(.dark) .nav-link {
    color: #334155;
}

:not(.dark) .nav-link::after {
    background: linear-gradient(90deg, transparent, #00b464, transparent);
}

:not(.dark) .nav-link:hover {
    color: #00b464;
    background: rgba(0, 180, 100, 0.1);
}

/* Dark mode nav links */
.dark .nav-link {
    color: rgba(255, 255, 255, 0.75);
}

.dark .nav-link:hover {
    color: var(--primary);
    background: rgba(0, 255, 136, 0.12);
}

.dark .nav-link::after {
    background: linear-gradient(90deg, transparent, var(--primary, #00FF88), transparent);
}

.nav-link svg {
    width: 16px;
    height: 16px;
    transition: transform 200ms ease;
}

/* Products Dropdown - BOLD */
.dropdown-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 240px;
    background: var(--bg-card, #0f172a);
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 255, 136, 0.1);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: all 200ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 9999;
}

.dropdown-container:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

:not(.dark) .dropdown-menu {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.dark .dropdown-menu {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(0, 255, 136, 0.25);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #f8fafc);
    border-radius: 12px;
    transition: all 200ms ease;
}

.dropdown-item:hover {
    background: rgba(0, 255, 136, 0.12);
    color: var(--primary);
    transform: translateX(4px);
}

:not(.dark) .dropdown-item {
    color: #0f172a;
}

.dropdown-item svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 12px;
    transition: all 200ms ease;
}

.login-link:hover {
    color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
}

.dark .login-link {
    color: rgba(255, 255, 255, 0.7);
}

.login-link svg {
    width: 20px;
    height: 20px;
}

.cta-button {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary, #00FF88), #00e87a);
    color: #0a0f1a;
    border-radius: 12px;
    transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3), 0 0 30px rgba(0, 255, 136, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.4), 0 0 50px rgba(0, 255, 136, 0.3);
}

/* Theme Toggle - GLOWING with Correct Icon Display */
.theme-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--text-secondary);
    transition: all 200ms ease;
    border: 2px solid transparent;
    background: rgba(0, 255, 136, 0.05);
}

.theme-toggle:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.4);
    color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.dark .theme-toggle {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}
.dark .theme-toggle:hover {
    background: rgba(0, 255, 136, 0.15);
    color: var(--primary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Theme Icons - Show the CURRENT theme state (standard UX pattern) */
/* In light mode, show sun (represents current light theme) */
/* In dark mode, show moon (represents current dark theme) */
.theme-toggle .sun-icon {
    display: block;
}
.theme-toggle .moon-icon {
    display: none;
}
.dark .theme-toggle .sun-icon {
    display: none;
}
.dark .theme-toggle .moon-icon {
    display: block;
}

/* Legacy class names - using same pattern as above for consistency */
.theme-icon-light { display: block; }
.theme-icon-dark { display: none; }
.dark .theme-icon-light { display: none; }
.dark .theme-icon-dark { display: block; }

/* Mobile Menu Button - Hidden on desktop by default */
.mobile-menu-button {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 12px;
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 200ms ease;
}

.mobile-menu-button:hover {
    color: var(--primary);
    border-color: rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.1);
}

.mobile-menu-button svg {
    width: 24px;
    height: 24px;
}

.dark .mobile-menu-button {
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile Header Controls - shown only on mobile */
.mobile-header-controls {
    display: none;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* Mobile Get Started CTA - Elegant compact pill */
.mobile-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, var(--primary, #00FF88), #00e87a);
    color: #0a0f1a;
    border-radius: 20px;
    transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 2px 10px rgba(0, 255, 136, 0.25);
    white-space: nowrap;
    border: none;
    text-decoration: none;
    text-transform: uppercase;
}

.mobile-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 255, 136, 0.35);
}

/* Light mode mobile CTA */
:not(.dark) .mobile-cta-btn {
    background: linear-gradient(135deg, #00c96f, #00b464);
    box-shadow: 0 2px 10px rgba(0, 180, 100, 0.25);
}

:not(.dark) .mobile-cta-btn:hover {
    box-shadow: 0 4px 14px rgba(0, 180, 100, 0.35);
}

/* Mobile Theme Toggle - Beautiful glowing perfectly circular button */
.mobile-theme-toggle {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary);
    transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
    border: 2px solid rgba(0, 255, 136, 0.3);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 255, 136, 0.05));
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.15);
    flex-shrink: 0;
    flex-grow: 0;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    padding: 0;
}

.mobile-theme-toggle:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.1));
    border-color: rgba(0, 255, 136, 0.5);
    transform: scale(1.08) rotate(15deg);
    box-shadow: 
        0 4px 16px rgba(0, 255, 136, 0.25),
        0 0 20px rgba(0, 255, 136, 0.15);
}

/* Light mode theme toggle */
:not(.dark) .mobile-theme-toggle {
    color: #00b464;
    border-color: rgba(0, 180, 100, 0.3);
    background: linear-gradient(135deg, rgba(0, 180, 100, 0.12), rgba(0, 180, 100, 0.06));
    box-shadow: 0 2px 8px rgba(0, 180, 100, 0.12);
}

:not(.dark) .mobile-theme-toggle:hover {
    background: linear-gradient(135deg, rgba(0, 180, 100, 0.18), rgba(0, 180, 100, 0.1));
    border-color: rgba(0, 180, 100, 0.5);
    box-shadow: 
        0 4px 16px rgba(0, 180, 100, 0.2),
        0 0 20px rgba(0, 180, 100, 0.1);
}

.dark .mobile-theme-toggle {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.12), rgba(0, 255, 136, 0.06));
    border-color: rgba(0, 255, 136, 0.35);
    box-shadow: 0 2px 10px rgba(0, 255, 136, 0.2);
}

.dark .mobile-theme-toggle:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.22), rgba(0, 255, 136, 0.12));
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 
        0 4px 20px rgba(0, 255, 136, 0.3),
        0 0 25px rgba(0, 255, 136, 0.2);
}

.mobile-theme-toggle svg,
.mobile-theme-toggle i {
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Theme Icons - Show current theme state */
.mobile-theme-toggle .sun-icon {
    display: block;
}
.mobile-theme-toggle .moon-icon {
    display: none;
}
.dark .mobile-theme-toggle .sun-icon {
    display: none;
}
.dark .mobile-theme-toggle .moon-icon {
    display: block;
}

/* Desktop Nav Container - Logo left, nav center with space-between, controls right */
.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
    margin-left: var(--header-nav-spacing, 32px);
}

.desktop-nav > nav,
.desktop-nav > .nav-links {
    display: flex;
    align-items: center;
    gap: var(--header-link-gap, 8px);
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--header-link-gap, 8px);
}

.desktop-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Products Dropdown - BOLD */
.products-dropdown {
    position: relative;
}

.products-button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    border-radius: 12px;
    transition: all 200ms ease;
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
}

.products-button:hover,
.products-button.active {
    color: var(--primary);
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
}

/* Light mode products button */
:not(.dark) .products-button {
    color: #334155;
}

:not(.dark) .products-button:hover,
:not(.dark) .products-button.active {
    color: #00b464;
    background: rgba(0, 180, 100, 0.1);
    border-color: rgba(0, 180, 100, 0.3);
}

/* Dark mode products button */
.dark .products-button {
    color: rgba(255, 255, 255, 0.75);
}

.dark .products-button:hover,
.dark .products-button.active {
    color: var(--primary);
    background: rgba(0, 255, 136, 0.12);
    border-color: rgba(0, 255, 136, 0.3);
}

.products-button svg {
    width: 16px;
    height: 16px;
    transition: transform 200ms ease;
}

.products-button svg.rotate-180 {
    transform: rotate(180deg);
}

.products-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 260px;
    background: #ffffff;
    border: 2px solid rgba(0, 180, 100, 0.2);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1), 0 0 40px rgba(0, 180, 100, 0.05);
    padding: 12px;
    z-index: 9999;
    /* CSS fallback for when Alpine.js doesn't load */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 200ms ease;
}

/* CSS hover fallback - works without Alpine.js */
.products-dropdown:hover .products-menu,
.products-dropdown:focus-within .products-menu,
.products-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* When Alpine.js is working, it controls visibility */
.products-menu[x-show] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dark .products-menu {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(0, 255, 136, 0.25);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 255, 136, 0.1);
}

.products-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    border-radius: 12px;
    transition: all 200ms ease;
}

.products-item:hover {
    background: rgba(0, 255, 136, 0.12);
    color: var(--primary);
    transform: translateX(4px);
}

:not(.dark) .products-item {
    color: #0f172a;
}

.dark .products-item {
    color: #f8fafc;
}

.product-price {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--bg-secondary);
}

.product-price.web {
    background: rgba(0, 255, 136, 0.2);
    color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

.product-price.domain {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.3);
}

.product-price.wordpress {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.product-price.game {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Login Button - BOLD */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--text-secondary);
    transition: all 200ms ease;
    border: 2px solid transparent;
}

.login-btn:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: var(--primary);
}

.dark .login-btn {
    color: rgba(255, 255, 255, 0.7);
}

.dark .login-btn:hover {
    background: rgba(0, 255, 136, 0.12);
    color: var(--primary);
}

.login-btn svg {
    width: 22px;
    height: 22px;
}

/* Get Started Button - GLOWING */
.get-started-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary, #00FF88), #00e87a);
    color: #0a0f1a;
    border-radius: 12px;
    transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3), 0 0 30px rgba(0, 255, 136, 0.2);
    white-space: nowrap;
    border: none;
}

.get-started-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.4), 0 0 50px rgba(0, 255, 136, 0.3);
}

/* Language Selector - BOLD */
.lang-selector {
    position: relative;
}

.lang-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 10px;
    transition: all 200ms ease;
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
}

.lang-button:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.2);
}

.dark .lang-button {
    color: rgba(255, 255, 255, 0.7);
}

.dark .lang-button:hover {
    background: rgba(0, 255, 136, 0.12);
}

.lang-button svg {
    width: 14px;
    height: 14px;
    transition: transform 200ms ease;
}

.lang-button svg.rotate-180 {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 150px;
    max-height: 300px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 4px;
    z-index: 9999;
    /* CSS fallback for when Alpine.js doesn't load */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 200ms ease;
}

/* CSS hover fallback - works without Alpine.js */
.lang-selector:hover .lang-dropdown,
.lang-selector:focus-within .lang-dropdown,
.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dark .lang-dropdown {
    background: var(--bg-card, #132238);
    border-color: var(--border-color, #1e3a5f);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text-primary);
    border-radius: 6px;
    transition: all 150ms ease;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
}
.lang-option:hover {
    background: rgba(1, 252, 131, 0.08);
}
.lang-option.active {
    background: rgba(1, 252, 131, 0.12);
    color: var(--primary);
}

.lang-flag {
    width: 18px;
    height: 14px;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
}

/* =====================================================================
   MOBILE MENU - BEAUTIFUL DROPDOWN CONTINUATION OF HEADER
   ===================================================================== */

/* Mobile Overlay - Subtle backdrop (starts below header to avoid black box at top) */
.mobile-overlay {
    position: fixed;
    top: calc(var(--header-height, 64px) + 16px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1002;
    display: none;
    opacity: 0;
    transition: opacity 200ms ease;
}

/* Show overlay when mobile menu is open */
.mobile-overlay[x-show="true"],
.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* x-cloak hides elements until Alpine loads */
[x-cloak] {
    display: none !important;
}

/* Override x-cloak when active class is added by JS fallback */
.mobile-overlay.active[x-cloak],
.mobile-menu.active[x-cloak] {
    display: block !important;
}

/* Mobile Menu - Drops down as a beautiful rounded extension of the header */
.mobile-menu {
    position: fixed;
    top: calc(var(--header-height, 56px) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: calc(100% - 16px);
    max-width: 400px;
    max-height: calc(100vh - var(--header-height, 56px) - 40px);
    overflow-y: auto;
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 20px;
    padding: 20px;
    z-index: 1003;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(0, 255, 136, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* When menu is shown */
.mobile-menu[x-show="true"],
.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Light theme mobile menu */
:not(.dark) .mobile-menu {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(0, 180, 100, 0.2);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.12),
        0 0 30px rgba(0, 180, 100, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dark .mobile-menu {
    background: rgba(10, 15, 26, 0.95);
    border-color: rgba(0, 255, 136, 0.2);
}

/* Mobile Menu Close Button - Elegant integrated design */
.mobile-menu-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 200ms ease;
    z-index: 10;
}

.mobile-menu-close:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.3);
    color: var(--primary);
    transform: rotate(90deg);
}

.mobile-menu-close svg {
    width: 18px;
    height: 18px;
}

:not(.dark) .mobile-menu-close {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #64748b;
}

:not(.dark) .mobile-menu-close:hover {
    background: rgba(0, 180, 100, 0.1);
    border-color: rgba(0, 180, 100, 0.3);
    color: #00b464;
}

/* Mobile Menu Sections */
.mobile-menu-section {
    margin-bottom: 20px;
}

.mobile-menu-section:last-child {
    margin-bottom: 0;
}

.mobile-menu-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 10px;
    padding: 0 8px;
    opacity: 0.8;
    line-height: 1.4;
    overflow: visible;
}

:not(.dark) .mobile-menu-section-title {
    color: #00b464;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Mobile Menu Links - Refined elegant design */
.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    transition: all 200ms ease;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
    text-decoration: none;
}

:not(.dark) .mobile-menu-link {
    color: #334155;
}

.mobile-menu-link:hover {
    background: rgba(0, 255, 136, 0.08);
    color: #fff;
}

/* Dark mode hover - keep white text */
.dark .mobile-menu-link:hover {
    background: rgba(0, 255, 136, 0.1);
    color: #fff;
}

:not(.dark) .mobile-menu-link:hover {
    background: rgba(0, 180, 100, 0.06);
    color: #0f172a;
}

.mobile-menu-link.active {
    background: rgba(0, 255, 136, 0.12);
    color: var(--primary);
}

:not(.dark) .mobile-menu-link.active {
    background: rgba(0, 180, 100, 0.08);
    color: #00b464;
}

.mobile-menu-link svg,
.mobile-icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

:not(.dark) .mobile-menu-link svg,
:not(.dark) .mobile-icon {
    color: #00b464;
}

.mobile-menu-link .toggle-arrow {
    margin-left: auto;
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.dark .mobile-menu-link {
    color: rgba(255, 255, 255, 0.85);
}

.mobile-menu-dropdown {
    padding-left: 28px;
    margin-top: 2px;
    border-left: 2px solid rgba(0, 255, 136, 0.15);
    margin-left: 18px;
}

:not(.dark) .mobile-menu-dropdown {
    border-left-color: rgba(0, 180, 100, 0.15);
}

/* Mobile menu CTA buttons at bottom */
.mobile-menu .login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: auto;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 8px;
}

:not(.dark) .mobile-menu .login-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #334155;
}

.mobile-menu .get-started-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary, #00FF88), #00e87a);
    color: #0a0f1a;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.25);
}

/* =====================================================================
   RESPONSIVE HEADER - PREMIUM MULTI-BREAKPOINT DESIGN
   ===================================================================== */

/* Ultra-wide screens (1600px+) */
@media (min-width: 1600px) {
    .nav-glass {
        max-width: 1500px;
        height: 72px;
        border-radius: 24px;
    }
    
    .nav-glass .max-w-7xl {
        padding: 0 40px;
    }
    
    .logo-image {
        height: 40px;
    }
    
    .nav-link {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .get-started-btn {
        padding: 14px 32px;
        font-size: 16px;
    }
    
    .products-menu {
        min-width: 320px;
        padding: 16px;
    }
    
    .products-item {
        padding: 16px 20px;
        font-size: 16px;
    }
}

/* Large desktop screens (1200px - 1599px) */
@media (min-width: 1200px) and (max-width: 1599px) {
    .nav-glass {
        height: 68px;
    }
    
    .logo-image {
        height: 36px;
    }
    
    .nav-link {
        padding: 11px 20px;
    }
}

/* Medium desktop screens (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .nav-glass {
        max-width: calc(100% - 48px);
        height: 64px;
    }
    
    .nav-glass .max-w-7xl {
        padding: 0 20px;
        gap: 16px;
    }
    
    .logo-image {
        height: 30px;
    }
    
    .nav-link {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .get-started-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .desktop-nav {
        gap: 24px;
    }
    
    .desktop-controls {
        gap: 8px;
    }
}

/* Tablet landscape (769px - 991px) - HYBRID LAYOUT */
@media (min-width: 769px) and (max-width: 991px) {
    .nav-glass {
        top: 12px;
        width: calc(100% - 24px);
        height: 60px;
        border-radius: 18px;
    }
    
    .nav-glass .max-w-7xl {
        padding: 0 16px;
        gap: 12px;
    }
    
    .logo-image {
        height: 28px;
    }
    
    /* Simplified nav for tablet */
    .desktop-nav {
        gap: 16px;
    }
    
    .desktop-nav nav {
        gap: 4px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .nav-link::after {
        bottom: 4px;
    }
    
    .desktop-controls {
        gap: 6px;
    }
    
    .login-btn {
        width: 40px;
        height: 40px;
    }
    
    .theme-toggle {
        width: 40px;
        height: 40px;
    }
    
    .get-started-btn {
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    .products-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .products-menu {
        min-width: 220px;
        padding: 10px;
    }
    
    .products-item {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .product-price {
        font-size: 11px;
        padding: 3px 10px;
    }
}

/* Tablet portrait and mobile (max 768px) */
@media (max-width: 768px) {
    /* Header bar - elegant floating pill */
    .nav-glass {
        top: 10px;
        width: calc(100% - 20px);
        height: 54px;
        padding: 0;
        border-radius: 27px;
        z-index: 1000; /* Base z-index, overlay and menu will be above */
    }
    
    /* Remove ALL header glow/shadow when mobile menu is open */
    .nav-glass.menu-open,
    .nav-glass:has(+ .mobile-overlay.active),
    body.mobile-menu-open .nav-glass {
        box-shadow: none !important;
        border-color: transparent !important;
    }
    
    /* Also disable hover effects when menu is open */
    body.mobile-menu-open .nav-glass:hover {
        box-shadow: none !important;
        border-color: transparent !important;
    }
    
    .nav-glass .max-w-7xl {
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .desktop-nav {
        display: none !important;
    }
    
    /* Logo */
    .logo-image {
        height: 24px;
    }
    
    /* Mobile header controls - elegant centered layout */
    .mobile-header-controls {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
    }
    
    /* Mobile menu button - Beautiful glowing perfectly circular hamburger */
    .mobile-menu-button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
        padding: 0;
        border-radius: 50%;
        background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 255, 136, 0.05));
        border: 2px solid rgba(0, 255, 136, 0.3);
        cursor: pointer;
        transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow: 0 2px 8px rgba(0, 255, 136, 0.15);
        flex-shrink: 0;
        flex-grow: 0;
        aspect-ratio: 1 / 1;
        box-sizing: border-box;
    }
    
    .mobile-menu-button span {
        display: none;
    }
    
    .nav-glass .mobile-menu-button svg,
    .nav-glass .mobile-menu-button i {
        width: 18px;
        height: 18px;
        font-size: 18px;
        line-height: 1;
        color: var(--primary);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu-button:hover,
    .mobile-menu-button:focus {
        background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.1));
        border-color: rgba(0, 255, 136, 0.5);
        transform: scale(1.08);
        box-shadow: 
            0 4px 16px rgba(0, 255, 136, 0.25),
            0 0 20px rgba(0, 255, 136, 0.15);
    }
    
    /* Light mode mobile menu button */
    :not(.dark) .mobile-menu-button {
        background: linear-gradient(135deg, rgba(0, 180, 100, 0.12), rgba(0, 180, 100, 0.06));
        border-color: rgba(0, 180, 100, 0.3);
        box-shadow: 0 2px 8px rgba(0, 180, 100, 0.12);
    }
    
    :not(.dark) .mobile-menu-button svg,
    :not(.dark) .mobile-menu-button i {
        color: #00b464;
    }
    
    :not(.dark) .mobile-menu-button:hover,
    :not(.dark) .mobile-menu-button:focus {
        background: linear-gradient(135deg, rgba(0, 180, 100, 0.18), rgba(0, 180, 100, 0.1));
        border-color: rgba(0, 180, 100, 0.5);
        box-shadow: 
            0 4px 16px rgba(0, 180, 100, 0.2),
            0 0 20px rgba(0, 180, 100, 0.1);
    }
    
    /* Mobile overlay should be hidden by default, shown only when active */
    .mobile-overlay {
        z-index: 1002;
    }
    
    /* Mobile menu - dropdown below header */
    .mobile-menu {
        --header-height: 54px;
        top: calc(54px + 20px);
        width: calc(100% - 20px);
        max-width: none;
        padding: 16px;
        border-radius: 20px;
        border: 1px solid rgba(0, 255, 136, 0.2);
        z-index: 1003;
    }
    
    :not(.dark) .mobile-menu {
        border-color: rgba(0, 180, 100, 0.15);
    }
    
    /* Hide close button on mobile - click outside to close */
    .mobile-menu-close {
        display: none;
    }
    
    .mobile-menu-section {
        margin-bottom: 16px;
    }
    
    .mobile-menu-section-title {
        font-size: 9px;
        letter-spacing: 1.2px;
        margin-bottom: 8px;
        padding: 0 6px;
    }
    
    .mobile-menu-link {
        padding: 11px 12px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .mobile-menu-link:hover,
    .mobile-menu-link:focus {
        background: rgba(0, 255, 136, 0.08);
    }
    
    :not(.dark) .mobile-menu-link:hover,
    :not(.dark) .mobile-menu-link:focus {
        background: rgba(0, 180, 100, 0.06);
    }
    
    .mobile-menu-link svg,
    .mobile-icon {
        width: 16px;
        height: 16px;
    }
    
    .mobile-menu-dropdown {
        padding-left: 24px;
        margin-left: 14px;
    }
    
    /* Mobile CTA buttons - compact elegant */
    .mobile-menu .login-btn {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 10px;
        margin-bottom: 6px;
    }
    
    .mobile-menu .get-started-btn {
        padding: 12px 18px;
        font-size: 13px;
        border-radius: 10px;
    }
}

/* Small mobile (max 480px) */
@media (max-width: 480px) {
    .nav-glass {
        top: 8px;
        width: calc(100% - 16px);
        height: 50px;
        border-radius: 25px;
    }
    
    .nav-glass .max-w-7xl {
        padding: 0 12px;
    }
    
    .logo-image {
        height: 22px;
    }
    
    .mobile-header-controls {
        gap: 8px;
    }
    
    .mobile-theme-toggle {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        max-width: 36px;
        max-height: 36px;
    }
    
    .mobile-theme-toggle svg,
    .mobile-theme-toggle i {
        width: 16px;
        height: 16px;
        font-size: 16px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-cta-btn {
        padding: 7px 12px;
        font-size: 11px;
        border-radius: 16px;
    }
    
    .mobile-menu-button {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        max-width: 36px;
        max-height: 36px;
    }
    
    .nav-glass .mobile-menu-button svg,
    .nav-glass .mobile-menu-button i {
        width: 16px;
        height: 16px;
        font-size: 16px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Mobile menu adjustments */
    .mobile-menu {
        top: calc(50px + 16px);
        width: calc(100% - 16px);
        padding: 14px;
        border-radius: 18px;
    }
    
    .mobile-menu-section {
        margin-bottom: 14px;
    }
    
    .mobile-menu-link {
        padding: 10px 10px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .mobile-menu-link svg,
    .mobile-icon {
        width: 15px;
        height: 15px;
    }
    
    .mobile-menu .login-btn {
        padding: 9px 12px;
        font-size: 12px;
    }
    
    .mobile-menu .get-started-btn {
        padding: 11px 16px;
        font-size: 12px;
    }
}

/* Very small screens (max 380px) */
@media (max-width: 380px) {
    .nav-glass {
        top: 6px;
        width: calc(100% - 12px);
        height: 46px;
        border-radius: 23px;
    }
    
    .nav-glass .max-w-7xl {
        padding: 0 10px;
    }
    
    .logo-image {
        height: 20px;
    }
    
    .mobile-header-controls {
        gap: 6px;
    }
    
    .mobile-theme-toggle {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        max-width: 34px;
        max-height: 34px;
    }
    
    .mobile-theme-toggle svg,
    .mobile-theme-toggle i {
        width: 14px;
        height: 14px;
        font-size: 14px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-cta-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .mobile-menu-button {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
        max-width: 34px;
        max-height: 34px;
    }
    
    .nav-glass .mobile-menu-button svg,
    .nav-glass .mobile-menu-button i {
        width: 14px;
        height: 14px;
        font-size: 14px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu {
        top: calc(46px + 14px);
        width: calc(100% - 12px);
        padding: 12px;
        border-radius: 16px;
    }
    
    .mobile-menu-link {
        padding: 9px 8px;
        font-size: 12px;
    }
    
    .mobile-menu .login-btn {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .mobile-menu .get-started-btn {
        padding: 10px 14px;
        font-size: 11px;
    }
}

/* Landscape mobile orientation */
@media (max-width: 896px) and (max-height: 500px) and (orientation: landscape) {
    .nav-glass {
        top: 4px;
        height: 48px;
    }
    
    .mobile-menu {
        padding-top: 16px;
        padding-bottom: 16px;
    }
    
    .mobile-menu-section {
        margin-bottom: 16px;
    }
    
    .mobile-menu-link {
        padding: 10px 12px;
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .nav-glass {
        border-width: 1px;
    }
    
    .logo-image {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* =====================================================================
   NO-JAVASCRIPT FALLBACK STYLES
   ===================================================================== */

/* When x-cloak is present but JS hasn't run, hide elements */
[x-cloak] {
    display: none !important;
}

/* Fallback: If JS is disabled, use pure CSS hover for dropdowns */
@media (hover: hover) {
    .products-dropdown:hover .products-menu,
    .lang-selector:hover .lang-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* =====================================================================
   ENHANCED CSS-ONLY DROPDOWN FALLBACKS
   When Alpine.js doesn't load, these ensure dropdowns still work
   ===================================================================== */

/* Remove x-cloak hiding for dropdown menus to allow CSS hover */
.products-menu[x-cloak],
.lang-dropdown[x-cloak] {
    display: block !important;
}

/* Ensure dropdowns are still hidden by default but can be shown on hover */
.products-menu,
.lang-dropdown {
    pointer-events: auto;
}

/* Make dropdowns accessible on focus (keyboard navigation) */
.products-dropdown:focus .products-menu,
.products-dropdown:focus-within .products-menu,
.products-button:focus + .products-menu,
.products-button:focus-within + .products-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-selector:focus .lang-dropdown,
.lang-selector:focus-within .lang-dropdown,
.lang-button:focus + .lang-dropdown,
.lang-button:focus-within + .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Keep dropdown open when hovering over it */
.products-menu:hover,
.lang-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Force dropdown visibility on parent hover - override x-cloak */
.products-dropdown:hover .products-menu[x-cloak],
.products-dropdown:focus-within .products-menu[x-cloak],
.lang-selector:hover .lang-dropdown[x-cloak],
.lang-selector:focus-within .lang-dropdown[x-cloak] {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}
