/* ===== HEADER STYLES ===== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    padding: 0;
    height: auto;
}

.header.scrolled {
    background: rgba(0, 0, 0, 0.98);
    border-bottom-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo::before {
    content: '🚘';
    font-size: 1.25rem;
}

/* ===== DESKTOP NAVIGATION ===== */
.desktop-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.desktop-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--text-primary);
}

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

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
    width: 100%;
}

/* ===== NAV ACTIONS ===== */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-switcher {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 60px;
    text-align: center;
}

.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.cta-button.desktop-book-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button.desktop-book-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 132, 255, 0.3);
}

/* ===== MOBILE MENU OVERLAY ===== */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== MOBILE MENU ===== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: -10px 0 60px rgba(0, 0, 0, 0.4);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

.mobile-nav-header .logo {
    font-size: 1.25rem;
}

.mobile-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

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

.mobile-nav-links {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(5px);
}

.mobile-nav-link svg {
    transition: transform 0.3s ease;
}

.mobile-nav-link:hover svg {
    transform: translateX(3px);
}

.mobile-nav-actions {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-actions .lang-switcher {
    width: 100%;
    justify-content: center;
}

.mobile-nav-actions .cta-button {
    width: 100%;
    justify-content: center;
}

.mobile-nav-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.mobile-copyright {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* ===== BURGER MENU BUTTON ===== */
.mobile-menu-toggle {
    display: none; /* По умолчанию скрыта */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle .burger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.mobile-menu-toggle .burger-line:nth-child(1) {
    margin-bottom: 5px;
}

.mobile-menu-toggle .burger-line:nth-child(3) {
    margin-top: 5px;
}

/* Анимация в крестик */
.mobile-menu-toggle.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-toggle.active .burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Когда меню открыто - стиль кнопки */
body.menu-open .mobile-menu-toggle {
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* ===== MEDIA QUERIES ===== */

/* Mobile (до 768px) */
@media (max-width: 768px) {
    .header {
        height: 60px;
    }
    
    .nav {
        padding: 0.75rem 1rem;
        height: 60px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    /* Скрываем десктопную навигацию */
    .desktop-nav {
        display: none !important;
    }
    
    .nav-actions .desktop-book-btn {
        display: none !important;
    }
    
    .nav-actions .lang-switcher {
        display: flex !important;  /* ✅ ПОКАЗЫВАЕМ ПЕРЕКЛЮЧАТЕЛЬ */
        min-width: 50px;
        height: 36px;
        padding: 0.5rem;
        font-size: 0.85rem;
        margin-right: 0.5rem;
    }
    
    /* Показываем мобильную кнопку */
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    /* Уменьшаем мобильное меню на очень маленьких экранах */
    @media (max-width: 480px) {
        .mobile-nav {
            width: 280px;
        }
        
        .mobile-menu-toggle {
            width: 40px;
            height: 40px;
        }
        
        .mobile-menu-toggle .burger-line {
            width: 18px;
        }
    }
}

/* Desktop (от 769px) */
@media (min-width: 769px) {
    /* Скрываем мобильное меню */
    .mobile-nav,
    .mobile-menu-overlay,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    /* Показываем десктопную навигацию */
    .desktop-nav {
        display: flex !important;
    }
    
    .nav-actions {
        display: flex !important;
    }
}

/* Large Desktop (от 1024px) */
@media (min-width: 1024px) {
    .nav {
        padding: 1rem 2rem;
    }
    
    .desktop-nav {
        gap: 2.5rem;
    }
    
    .desktop-nav a {
        font-size: 1rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mobile-nav.active .mobile-nav-link {
    animation: slideInRight 0.4s ease forwards;
}

.mobile-nav.active .mobile-nav-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-nav.active .mobile-nav-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-nav.active .mobile-nav-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-nav.active .mobile-nav-link:nth-child(4) { animation-delay: 0.25s; }

/* Состояние когда меню открыто */
body.menu-open {
    overflow: hidden;
}

/* ===== ACCESSIBILITY ===== */
.mobile-menu-toggle:focus-visible,
.mobile-close-btn:focus-visible,
.mobile-nav-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== DARK MODE ENHANCEMENTS ===== */
@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(10, 10, 10, 0.95);
    }
    
    .mobile-nav {
        background: rgba(15, 15, 15, 0.98);
    }
    
    .mobile-menu-toggle {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* Скрыть кнопку в мобильной версии */
@media (max-width: 768px) {
    .desktop-book-btn {
        display: none !important;
    }
}

.mobile-overlay,
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 90;
}

.mobile-overlay.active,
.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
