/* ============================================================
   HEADER - LocalMinds Pre-Launch Design
   Clean, Minimal, Professional
   ============================================================ */

#ai_header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    border-bottom: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

/* Header shrinks on scroll */
#ai_header.scrolled {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}


#ai_header .header-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-large);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#ai_header .header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 120px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shrink header on scroll */
#ai_header.scrolled .header-grid {
    height: 80px;
}

/* Logo */
#ai_header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#ai_header .logo:hover {
    opacity: 0.9;
}

#ai_header .logo-image {
    height: 72px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shrink logo on scroll */
#ai_header.scrolled .logo-image {
    height: 48px;
}

#ai_header .logo-text {
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#ai_header .logo-title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shrink logo text on scroll */
#ai_header.scrolled .logo-title {
    font-size: 1.5rem;
}

#ai_header .logo-tagline {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shrink logo tagline on scroll */
#ai_header.scrolled .logo-tagline {
    font-size: 0.65rem;
}

/* Navigation */
#ai_header .nav {
    display: none;
    gap: var(--space-comfortable);
    align-items: center;
}

@media (min-width: 768px) {
    #ai_header .nav {
        display: flex;
    }
}

/* Language selector: active locale first, alternate locale second. */
#ai_header .locale-control {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    padding: 0.45rem 0.65rem;
    border: none;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#ai_header .locale-control .lang-icon {
    color: white;
    width: 1rem;
    height: 1rem;
    margin-right: 0.15rem;
}

#ai_header .lang-current {
    padding: 0.2rem 0.1rem;
    border-bottom: 2px solid currentColor;
    font-weight: 700;
}

#ai_header .lang-separator {
    opacity: 0.55;
}

#ai_header .lang-switcher {
    padding: 0.2rem 0.1rem;
    color: inherit;
    text-decoration: none;
    opacity: 0.78;
    transition: opacity 0.2s ease;
}

#ai_header .lang-switcher:hover,
#ai_header .lang-switcher:focus-visible {
    color: inherit;
    opacity: 1;
}

#ai_header .nav-link {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: var(--font-medium);
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    padding: var(--space-tight) var(--space-small);
    position: relative;
    transition: color 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

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

#ai_header .nav-link:hover {
    color: white;
}

#ai_header .nav-link:hover::after {
    width: 100%;
}

#ai_header .nav-cta {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#ai_header .nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

#ai_header .nav-icon {
    width: 1.1rem;
    height: 1.1rem;
}

#ai_header .nav-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
}

/* Mobile Menu Toggle */
#ai_header .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

@media (min-width: 768px) {
    #ai_header .mobile-menu-toggle {
        display: none;
    }
}

#ai_header .mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

#ai_header .mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#ai_header .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

#ai_header .mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu */
#ai_header .mobile-nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: var(--space-large);
    flex-direction: column;
    gap: var(--space-medium);
}

#ai_header .mobile-nav.active {
    display: flex;
}

@media (min-width: 768px) {
    #ai_header .mobile-nav {
        display: none !important;
    }
}

#ai_header .mobile-nav-link {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
    text-decoration: none;
    padding: var(--space-small) 0;
    border-bottom: 1px solid var(--color-border);
    transition: color 0.3s ease;
}

#ai_header .mobile-nav-link:hover {
    color: var(--brand-primary);
}

#ai_header .mobile-nav-cta {
    padding: 1rem 2rem;
    background: var(--brand-primary);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

#ai_header .mobile-nav-cta:hover {
    background: var(--brand-dark);
    color: white;
}

/* Language selector in mobile menu */
#ai_header .mobile-nav .locale-control {
    justify-content: center;
    color: var(--brand-primary);
    padding: 0.75rem 1rem;
    border: 1px solid rgba(91, 111, 230, 0.2);
    border-radius: 8px;
    background: var(--brand-light);
    text-shadow: none;
}

#ai_header .mobile-nav .lang-switcher,
#ai_header .mobile-nav .lang-current {
    color: var(--brand-primary);
}

/* Responsive */
@media (max-width: 767px) {
    #ai_header {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(12px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    #ai_header .header-wrapper {
        padding: 0 var(--space-medium);
    }

    #ai_header .header-grid {
        height: 90px;
    }

    #ai_header.scrolled .header-grid {
        height: 70px;
    }

    #ai_header .logo-image {
        height: 54px;
    }

    #ai_header.scrolled .logo-image {
        height: 40px;
    }

    #ai_header .logo-title {
        font-size: 1.5rem;
    }

    #ai_header.scrolled .logo-title {
        font-size: 1.25rem;
    }

    #ai_header .logo-tagline {
        font-size: 0.7rem;
    }

    #ai_header.scrolled .logo-tagline {
        font-size: 0.6rem;
    }
}

/* Tablet Portrait */
@media (max-width: 1024px) and (orientation: portrait) {
    #ai_header {
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(12px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
}
