.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: box-shadow 0.3s;
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 18px;
    transition: opacity 0.2s;
    z-index: 1001;
    margin-right: 48px;
}

.brand:hover {
    opacity: 0.8;
}

.logo-icon {
    font-size: 24px;
    line-height: 1;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
}

/* Theme-specific colors for airplane icon in header */
[data-theme="light"] header .logo-icon {
    color: #000;
}

[data-theme="dark"] header .logo-icon {
    color: #fff;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.nav-link.active {
    color: var(--accent-color);
    background: var(--bg-secondary);
}

.nav-link.has-dropdown::after {
    content: '';
    display: inline-block;
    margin-left: 6px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform 0.2s;
}

.nav-item:hover .nav-link.has-dropdown::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

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

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding-left: 24px;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 8px;
}

.theme-toggle:hover {
    border-color: var(--accent-color);
    transform: rotate(20deg) scale(1.1);
}

.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
    z-index: 1001;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
    border-radius: 2px;
}

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

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

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

/* Social Links */
.social-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding-right: 16px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    transition: all 0.2s;
    text-decoration: none;
}

.social-link:hover {
    color: var(--text-primary);
    background: var(--accent-color);
    transform: translateY(-2px);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 16px;
    font-size: 14px;
    font-weight: 600;
}

.lang-icon {
    font-size: 16px;
    margin-right: 4px;
}

.lang-link {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.2s;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.lang-link:hover {
    color: var(--text-primary);
}

.lang-link.active {
    color: var(--accent-color);
    font-weight: 700;
}

.lang-divider {
    color: var(--border-color);
    font-weight: 400;
}

@media (max-width: 768px) {
    .social-links {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: var(--header-height);
        right: 0;
        width: 280px;
        max-width: 80vw;
        height: calc(100vh - var(--header-height));
        background: var(--bg-primary);
        border-left: 1px solid var(--border-color);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 20px 0;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav-item {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link {
        padding: 16px 24px;
        border-radius: 0;
    }

    .nav-link.has-dropdown {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-link.has-dropdown::after {
        margin-left: auto;
        transform: rotate(-90deg);
    }

    .nav-item.dropdown-open .nav-link.has-dropdown::after {
        transform: rotate(0deg);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
        background: var(--bg-secondary);
    }

    .nav-item.dropdown-open .dropdown-menu {
        max-height: 300px;
    }

    .dropdown-item {
        padding: 12px 24px 12px 40px;
    }

    .theme-toggle {
        margin: 16px 24px 0;
    }

    .lang-switcher {
        display: none;
        /* Hide in header, maybe move to nav if needed later, but for now simplify mobile */
    }

    .nav .lang-switcher {
        display: flex;
        justify-content: center;
        margin-top: 20px;
        padding: 0;
        margin-left: 0;
    }
}