/* ========================================
   RATLIK.ORG — HEADER.CSS
   Стили шапки сайта
   ======================================== */

.site-header {
    display: block;
    width: 100%;
}

/* ========================================
   НОВОЕ ДЕСКТОПНОЕ МЕНЮ (ДВЕ СТРОКИ)
   ======================================== */
.menu-desktop {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    padding: 8px 20px 12px;
    margin-bottom: 30px;
    border-radius: 0 0 24px 24px;
    border-bottom: 2px solid #bfa466;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 50;
}

.menu-row {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4px 0;
}

.menu-row-secondary {
    gap: 24px;
    padding-top: 2px;
    border-top: 1px solid rgba(191, 164, 102, 0.15);
}

/* Ссылки в меню — без фона */
.menu-link {
    display: inline-block;
    text-decoration: none;
    color: #ffffff;
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 6px 12px;
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
    background: transparent !important;
}

/* Подчёркивание — золотая линия */
.menu-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #bfa466, #f9b400);
    transition: width 0.3s ease;
}

/* При наведении — цвет и лёгкий подъём, без фона */
.menu-link:hover {
    color: #f9b400;
    transform: translateY(-2px);
    background: transparent !important;
}

.menu-link:hover::after {
    width: 70%;
}

/* Активный пункт — золотой, с линией, без фона */
.menu-link.active {
    color: #f9b400;
    transform: translateY(-2px);
    background: transparent !important;
}

.menu-link.active::after {
    width: 70%;
}

/* ========================================
   ВЫПАДАЮЩИЕ МЕНЮ (ДРОПДАУН)
   ======================================== */
.menu-dropdown {
    position: relative;
    display: inline-block;
}

.menu-dropdown .menu-link {
    cursor: pointer;
}

.menu-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 15, 20, 0.97);
    backdrop-filter: blur(12px);
    min-width: 220px;
    padding: 8px 0;
    border-radius: 16px;
    border: 1px solid rgba(191, 164, 102, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.menu-dropdown-content a {
    display: block;
    color: #d0d0d0;
    text-decoration: none;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    padding: 8px 24px;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: transparent !important;
}

.menu-dropdown-content a:hover {
    color: #f9b400;
    background: transparent !important;
}

.menu-dropdown:hover .menu-dropdown-content {
    display: block;
}

/* ========================================
   БУРГЕР-КНОПКА
   ======================================== */
.menu-burger {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.2rem;
    cursor: pointer;
    padding: 12px 20px;
    z-index: 1001;
    position: relative;
    transition: color 0.3s ease;
}

.menu-burger:hover {
    color: #f9b400;
}

/* ========================================
   МОБИЛЬНОЕ МЕНЮ (АККОРДЕОН)
   ======================================== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(8px);
    z-index: 9998;
    padding: 60px 30px 40px;
    overflow-y: auto;
    box-sizing: border-box;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.mobile-menu-close:hover {
    color: #f9b400;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list li {
    margin-bottom: 6px;
}

.mobile-menu-list a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-menu-list a:hover {
    color: #f9b400;
    padding-left: 6px;
}

.mobile-menu-list details {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-list details summary {
    color: #f9b400;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    transition: color 0.2s ease;
}

.mobile-menu-list details summary::-webkit-details-marker {
    display: none;
}

.mobile-menu-list details summary::after {
    content: '▶';
    font-size: 0.7rem;
    color: #bfa466;
    transition: transform 0.3s ease;
}

.mobile-menu-list details[open] summary::after {
    transform: rotate(90deg);
}

.mobile-menu-list details ul {
    list-style: none;
    padding: 0 0 10px 18px;
    margin: 0;
}

.mobile-menu-list details ul a {
    font-size: 1rem;
    color: #c0c0c0;
    padding: 8px 0;
    border-bottom: none;
}

.mobile-menu-list details ul a:hover {
    color: #f9b400;
    padding-left: 6px;
}

.mobile-menu-list .menu-home {
    color: #f9b400;
    font-weight: 600;
    border-bottom: 1px solid rgba(249, 180, 0, 0.2);
}

/* ========================================
   АДАПТАЦИЯ ПОД ПЛАНШЕТЫ (≤1024px)
   ======================================== */
@media (max-width: 1024px) {
    .menu-row {
        gap: 12px;
    }
    .menu-link {
        font-size: 0.95rem;
        letter-spacing: 1px;
        padding: 4px 10px;
    }
    .menu-dropdown-content {
        min-width: 180px;
    }
}

/* ========================================
   АДАПТАЦИЯ ПОД МОБИЛЬНЫЕ (≤900px)
   ======================================== */
@media (max-width: 900px) {
    .menu-desktop {
        display: none;
    }

    .menu-burger {
        display: block;
    }

    .site-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 10px;
    }
}

@media (max-width: 600px) {
    .menu-burger {
        font-size: 1.8rem;
        padding: 8px 14px;
    }

    .mobile-menu {
        padding: 50px 20px 30px;
    }

    .mobile-menu-list a {
        font-size: 1rem;
        padding: 8px 0;
    }

    .mobile-menu-list details summary {
        font-size: 1.1rem;
        padding: 10px 0;
    }
}

@media (max-width: 400px) {
    .menu-burger {
        font-size: 1.5rem;
        padding: 6px 10px;
    }

    .mobile-menu {
        padding: 40px 16px 20px;
    }

    .mobile-menu-list a {
        font-size: 0.9rem;
        padding: 6px 0;
    }

    .mobile-menu-list details summary {
        font-size: 1rem;
        padding: 8px 0;
    }
}