/* ==========================================================================
   Премиальная Шапка (Десктопные стили по умолчанию)
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(5,5,5,0.95), rgba(5,5,5,0));
    backdrop-filter: blur(8px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.logo-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.logo-left img {
    max-height: 42px;
    width: auto;
    object-fit: contain;
    display: block;
}

.brand-name-left {
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 10px;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1;
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav a {
    color: #8c8c8c;
    text-decoration: none;
    margin-left: 30px;
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: color 0.4s, letter-spacing 0.4s;
}

nav a:hover, nav a.active {
    color: #d4af37;
    letter-spacing: 4px;
}

/* Переключатель языков */
.lang-switch {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 15px;
    font-size: 12px;
    color: #444;
}

.lang-switch span {
    margin: 0 6px;
    font-weight: 300;
    user-select: none;
}

.lang-btn {
    background: none;
    border: none;
    color: #8c8c8c;
    font-size: 12px;
    letter-spacing: 2px;
    cursor: pointer;
    text-transform: uppercase;
    font-family: inherit;
    transition: color 0.4s, transform 0.4s;
    padding: 0;
}

.lang-btn.active {
    color: #d4af37;
    font-weight: bold;
}

.lang-btn:hover {
    color: #ffffff;
}

/* Подвал (Footer) */
footer {
    padding: 80px 60px;
    background: #000;
    text-align: center;
    border-top: 1px solid rgba(214,175,55,0.1);
    color: #444;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ==========================================================================
   Адаптивный Хедер для Мобильных Устройств (до 768px)
   ========================================================================== */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
        background: rgba(5, 5, 5, 0.95);
    }

    .brand-name-left {
        font-size: 20px;
        letter-spacing: 5px;
    }

    .logo-left img {
        max-height: 32px;
    }

    .logo-left {
        gap: 12px;
    }

    /* Кнопка гамбургера */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 26px;
        height: 18px;
        cursor: pointer;
        z-index: 2000;
        position: relative;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 1px;
        background-color: #ffffff;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        transform-origin: left center;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(2px, -2px);
        background-color: #d4af37;
    }

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

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(2px, 2px);
        background-color: #d4af37;
    }

    /* Мобильное выпадающее меню */
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: #050505;
        
        display: flex !important;
        flex-direction: column !important; 
        justify-content: center !important;
        align-items: center !important;
        
        gap: 35px;
        transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1500;
        padding: 40px;
    }

    nav.active {
        right: 0;
    }

    nav a {
        margin-left: 0;
        font-size: 16px;
        letter-spacing: 4px;
    }

    /* Исправленный переключатель языков внутри мобильного меню */
    .lang-switch {
        margin-left: 0;
        margin-top: 20px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-left: 0;
        padding-top: 20px;
        width: auto; /* Сбрасываем жесткую ширину */
        display: inline-flex !important;
        flex-direction: row !important; /* Гарантируем горизонтальную строку */
        justify-content: center !important;
    }
}

/* Десктопный фикс */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}