/* ============================================================
   Бургер-меню — мобильная навигация
   ============================================================ */

/* Кнопка скрыта на десктопе */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    z-index: 200;
    flex-shrink: 0;
}

.burger:hover {
    background: var(--bg, #f3f4f6);
}

/* Три полоски */
.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text, #1f2937);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Анимация → крестик */
.burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- Мобильные стили ---- */
@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    /* Навигация — скрыта по умолчанию */
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        z-index: 100;
        padding: 80px 20px 40px;
        list-style: none;
        animation: none;
    }

    /* Открытое меню */
    .nav-menu.open {
        display: flex;
        animation: menuFadeIn 0.25s ease;
    }

    @keyframes menuFadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border, #e5e7eb);
    }

    .nav-menu li:last-child {
        border-bottom: none;
        margin-top: 12px;
    }

    .nav-menu a {
        display: block;
        padding: 18px 20px;
        font-size: 18px;
        font-weight: 600;
        color: var(--text, #1f2937);
        text-decoration: none;
        transition: color 0.2s;
    }

    .nav-menu a:hover {
        color: var(--primary, #4f46e5);
    }

    /* CTA-кнопка в меню */
    .nav-menu .nav-cta {
        display: inline-block;
        margin-top: 4px;
        padding: 14px 28px;
        background: linear-gradient(135deg, var(--primary, #4f46e5), var(--secondary, #7c3aed));
        color: #fff !important;
        border-radius: 10px;
        font-size: 16px;
    }

    /* Блокировка прокрутки body при открытом меню */
    body.menu-open {
        overflow: hidden;
    }
}
