/* NEI Header — matches mockup site-hug-refresh.lovable.app */

.nei-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--nei-border);
    font-family: var(--nei-font-sans);
}
.nei-header *,
.nei-header a,
.nei-header button {
    font-family: var(--nei-font-sans);
}

.nei-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

/* Logo */
.nei-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.nei-logo-img {
    height: 40px;
    width: auto;
}

/* Desktop Nav */
.nei-desktop-nav {
    display: none;
}
@media (min-width: 1024px) {
    .nei-desktop-nav {
        display: flex;
        align-items: center;
        gap: 4px;
    }
}

.nei-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nei-nav,
.nei-nav > ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Nav Items */
.nei-nav-item {
    position: relative;
    list-style: none;
}
.nei-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--nei-gray-600);
    text-decoration: none;
    border-radius: var(--nei-radius-md);
    transition: color 0.15s, background-color 0.15s;
}
.nei-nav-link:hover {
    color: var(--nei-text);
    background: var(--nei-gray-50);
}
/* Parent nav triggers (non-clickable, dropdown-only) */
.nei-nav-trigger {
    cursor: default;
    user-select: none;
}
.nei-chevron {
    transition: transform 0.2s;
}

/* Dropdown */
.nei-dropdown {
    position: absolute;
    left: 0;
    top: 100%;
    padding-top: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 50;
}
.nei-nav-item.has-dropdown:hover > .nei-dropdown {
    opacity: 1;
    visibility: visible;
}
.nei-nav-item.has-dropdown:hover > a .nei-chevron {
    transform: rotate(180deg);
}
.nei-dropdown-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border: 1px solid var(--nei-border);
    border-radius: var(--nei-radius-lg);
    box-shadow: var(--nei-shadow-lg);
    padding: 8px 0;
    min-width: 200px;
    list-style: none;
    margin: 0;
    text-align: left !important;
}
.nei-dropdown-menu li {
    text-align: left !important;
}
.nei-dropdown-item {
    list-style: none;
}
.nei-dropdown-link {
    display: block;
    padding: 8px 16px;
    font-size: 0.875rem;
    color: var(--nei-gray-600);
    text-decoration: none;
    text-align: left !important;
    white-space: nowrap;
    transition: color 0.15s, background-color 0.15s;
}
.nei-dropdown-link:hover {
    color: var(--nei-text);
    background: var(--nei-gray-50);
}

/* Header Right */
.nei-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Language Selector */
.nei-lang-selector {
    position: relative;
}
.nei-lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 0.875rem;
    color: var(--nei-gray-600);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--nei-radius-md);
    transition: color 0.15s, background-color 0.15s;
}
.nei-lang-toggle:hover {
    color: var(--nei-text);
    background: var(--nei-gray-50);
}
.nei-globe-icon {
    flex-shrink: 0;
}
.nei-lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: #fff;
    border: 1px solid var(--nei-border);
    border-radius: var(--nei-radius-lg);
    box-shadow: var(--nei-shadow-lg);
    padding: 4px 0;
    min-width: 140px;
    z-index: 50;
}
.nei-lang-selector.open .nei-lang-dropdown {
    display: block;
}
.nei-lang-option {
    display: block;
    padding: 8px 16px;
    font-size: 0.875rem;
    color: var(--nei-gray-600);
    text-decoration: none;
    transition: background-color 0.15s;
}
.nei-lang-option:hover {
    background: var(--nei-gray-50);
}
.nei-lang-option.active {
    color: var(--nei-primary);
    font-weight: 500;
}

/* Sign In & Try Free */
.nei-sign-in {
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--nei-gray-600);
    text-decoration: none;
    transition: color 0.15s;
}
.nei-sign-in:hover {
    color: var(--nei-text);
}
.nei-try-free {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: var(--nei-primary);
    border-radius: var(--nei-radius-full);
    text-decoration: none;
    transition: background-color 0.15s, box-shadow 0.15s;
    box-shadow: var(--nei-shadow-sm);
}
.nei-try-free:hover {
    background: var(--nei-primary-dark);
    box-shadow: var(--nei-shadow-md);
    color: #fff;
}
@media (min-width: 640px) {
    .nei-sign-in {
        display: inline-flex;
    }
    .nei-try-free {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
}

/* Hamburger */
.nei-hamburger {
    display: flex;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--nei-gray-600);
}
.nei-hamburger:hover {
    color: var(--nei-text);
}
@media (min-width: 1024px) {
    .nei-hamburger {
        display: none;
    }
}

/* Mobile Menu */
.nei-mobile-menu {
    display: none;
    position: fixed;
    inset: 64px 0 0 0;
    background: #fff;
    overflow-y: auto;
    z-index: 9999;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 32px));
}
.nei-mobile-menu.open {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
}
@media (min-width: 1024px) {
    .nei-mobile-menu {
        display: none !important;
    }
}

.nei-mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.nei-mobile-nav .nei-nav-item {
    list-style: none;
}
.nei-mobile-nav .nei-nav-link {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--nei-text);
    border-radius: var(--nei-radius-md);
}
.nei-mobile-nav .nei-nav-link:hover {
    background: var(--nei-gray-50);
}
.nei-mobile-nav .nei-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    padding-top: 0;
}
.nei-mobile-nav .nei-dropdown-menu {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: auto;
}
.nei-mobile-nav .nei-dropdown-link {
    padding: 8px 16px 8px 32px;
    font-size: 0.875rem;
}

/* Mobile Language */
.nei-mobile-lang {
    border-top: 1px solid var(--nei-border);
    margin-top: 16px;
    padding-top: 16px;
}
.nei-mobile-lang-label {
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--nei-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.nei-mobile-lang-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 16px;
    font-size: 0.875rem;
    color: var(--nei-gray-600);
    text-decoration: none;
    border-radius: var(--nei-radius-md);
}
.nei-mobile-lang-option:hover {
    background: var(--nei-gray-50);
}
.nei-mobile-lang-option.active {
    color: var(--nei-primary);
    font-weight: 500;
    background: var(--nei-primary-light);
}

/* Mobile CTAs */
.nei-mobile-cta {
    border-top: 1px solid var(--nei-border);
    margin-top: 16px;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 16px;
    padding-right: 16px;
}
.nei-mobile-sign-in {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--nei-gray-600);
    border: 1px solid var(--nei-border);
    border-radius: var(--nei-radius-full);
    text-decoration: none;
}
.nei-mobile-try-free {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #fff;
    background: var(--nei-primary);
    border-radius: var(--nei-radius-full);
    text-decoration: none;
}
