/* ============================================
   МОБИЛЬНОЕ МЕНЮ С АНИМАЦИЕЙ (≤768px)
   ============================================ */

/* Скрываем мобильные элементы на десктопе */
@media (min-width: 769px) {

    .mobile-menu,
    .mobile-menu-overlay,
    .mobile-footer {
        display: none !important;
    }
}

@media (max-width: 768px) {

    /* Гамбургер кнопка */
    .mobile-menu-toggle {
        position: relative;
        width: 28px;
        height: 24px;
        cursor: pointer;
        z-index: 10001;
        background: transparent;
        border: none;
        padding: 0;
    }

    .mobile-menu-toggle span {
        display: block;
        position: absolute;
        height: 3px;
        width: 100%;
        background: #111;
        border-radius: 2px;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-menu-toggle span:nth-child(1) {
        top: 0px;
    }

    .mobile-menu-toggle span:nth-child(2) {
        top: 10px;
    }

    .mobile-menu-toggle span:nth-child(3) {
        top: 20px;
    }

    /* Анимация превращения в X */
    .mobile-menu-toggle.active span:nth-child(1) {
        top: 10px;
        transform: rotate(135deg);
    }

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

    .mobile-menu-toggle.active span:nth-child(3) {
        top: 10px;
        transform: rotate(-135deg);
    }

    /* Overlay для закрытия меню - убран, т.к. меню на весь экран */
    .mobile-menu-overlay {
        display: none;
    }

    /* Само меню */
    .mobile-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: #f5f5f5;
        z-index: 9999;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-direction: column;
    }

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

    /* Заголовок меню */
    .mobile-menu__header {
        padding: 20px 24px;
        border-bottom: 1px solid #e5e5e5;
        background: #f5f5f5;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        position: relative;
    }

    .mobile-menu__header-left {
        flex: 1;
        padding-right: 80px;
    }

    .mobile-menu__logo {
        width: 60vw;
        height: auto;
        margin-bottom: 20px;
        display: block;
    }

    .mobile-menu__subtitle {
        font-size: 11px;
        color: #999;
        font-weight: 400;
        margin-bottom: 16px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-menu__lang-separator {
        width: 100%;
        height: 1px;
        background: #e5e5e5;
        margin-bottom: 12px;
    }

    .mobile-menu__lang-inline {
        display: flex;
        gap: 12px;
    }

    .mobile-menu__lang-btn-inline {
        width: 52px;
        height: 52px;
        padding: 0;
        border: 2px solid transparent;
        border-radius: 12px;
        background: #fff;
        color: #3a3f47;
        font-weight: 700;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .mobile-menu__lang-btn-inline:active {
        transform: scale(0.95);
    }

    .mobile-menu__lang-btn-inline.active {
        background: #2269F2;
        border-color: #2269F2;
        color: #fff;
        box-shadow: 0 4px 12px rgba(34, 105, 242, 0.35);
        transform: translateY(-1px);
    }

    .mobile-menu__close-wrapper {
        position: absolute;
        top: 0;
        right: 0;
        width: 60px;
        height: 100vh;
        background: #1a1a1a;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: 20px;
        z-index: 500;
    }

    .mobile-menu__close {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        color: #fff;
        padding: 0;
        transition: all 0.2s ease;
    }

    .mobile-menu__close:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .mobile-menu__close svg {
        margin-top: -10px;
        width: 32px;
        height: 32px;
    }

    /* Основной контент меню */
    .mobile-menu__content {
        padding: 0;
        padding-right: 60px;
        flex: 1;
        overflow-y: auto;
        background: #f5f5f5;
    }

    /* Навигационные ссылки */
    .mobile-menu__nav {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-menu__nav-item {
        border-bottom: 1px solid #e5e5e5;
        transform: translateX(40px);
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        background: #fff;
    }

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

    .mobile-menu.active .mobile-menu__nav-item:nth-child(1) {
        transition-delay: 0.1s;
    }

    .mobile-menu.active .mobile-menu__nav-item:nth-child(2) {
        transition-delay: 0.15s;
    }

    .mobile-menu.active .mobile-menu__nav-item:nth-child(3) {
        transition-delay: 0.2s;
    }

    .mobile-menu.active .mobile-menu__nav-item:nth-child(4) {
        transition-delay: 0.25s;
    }

    .mobile-menu.active .mobile-menu__nav-item:nth-child(5) {
        transition-delay: 0.25s;
    }

    .mobile-menu.active .mobile-menu__nav-item:nth-child(6) {
        transition-delay: 0.3s;
    }

    .mobile-menu.active .mobile-menu__nav-item {
        transform: translateX(0);
        opacity: 1;
    }

    .mobile-menu__nav-link {
        display: flex;
        align-items: center;
        padding: 18px 24px 18px 24px;
        color: #111;
        text-decoration: none;
        font-weight: 600;
        font-size: 16px;
        letter-spacing: 0.2px;
        transition: all 0.2s ease;
        position: relative;
    }

    .mobile-menu__nav-link::before {
        content: "";
        display: inline-block;
        flex-shrink: 0;
        width: 7px;
        height: 12px;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="7" height="12" viewBox="0 0 7 12" fill="none"><path d="M1 10.3999L5.5 5.8999L1.5 1.3999" stroke="%23359EFD" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
        background-size: contain;
        background-repeat: no-repeat;
        margin-right: 12px;
    }

    .mobile-menu__nav-link:active,
    .mobile-menu__nav-link:hover {
        background: #f5f5f5;
    }

    .mobile-menu__nav-link span {
        display: block;
    }

    /* Футер меню */
    .mobile-menu__footer {
        padding: 20px 24px;
        padding-right: 80px;
        border-top: 1px solid #f0f0f0;
        margin-top: auto;
        background: #f5f5f5;
    }

    .mobile-menu__footer-text {
        font-size: 13px;
        color: #999;
    }

    .mobile-menu__footer-label {
        color: #999;
        font-weight: 400;
    }

    .mobile-menu__footer-brand {
        color: #2269F2;
        font-weight: 600;
    }

    /* Блокировка прокрутки body при открытом меню */
    body.mobile-menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    /* Замена старой иконки меню */
    .header-close.mob-v img {
        display: none !important;
    }

    .header-close.mob-v {
        cursor: pointer;
        position: relative;
        width: 28px;
        height: 24px;
    }

    /* Создаем гамбургер через псевдоэлементы */
    .header-close.mob-v::before,
    .header-close.mob-v::after {
        content: '';
        position: absolute;
        height: 3px;
        width: 100%;
        background: #111;
        border-radius: 2px;
        left: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .header-close.mob-v::before {
        top: 0px;
        box-shadow: 0 10px 0 #111;
    }

    .header-close.mob-v::after {
        bottom: 0px;
    }

    /* Анимация в X */
    .header-close.mob-v.active::before {
        top: 10px;
        transform: rotate(45deg);
        box-shadow: none;
    }

    .header-close.mob-v.active::after {
        bottom: 11px;
        transform: rotate(-45deg);
    }
}