/* По умолчанию скрываем мобильное меню */
._menu._mobile {
    display: none;
}

/* Планшеты и мобильные (до 1062px) */
@media (max-width: 1062px) {
    ._menu._desktop {
        display: none !important; /* Скрываем десктоп */
    }

    ._menu._mobile {
        display: block; /* Показываем мобильное */
    }

    /* Опционально: коррекция паддингов хедера */
    .uheader {
        padding: 10px 0;
    }
}

._mobile.mobile-menu {
    box-shadow: inset 0 5px 5px -5px rgba(0, 0, 0, 0.20);
    height: calc(100dvh - 50px);
}

._mobile ._mmenu-list {
    padding-top: 20px;
}

._mobile ._mmenu-list .mmenu-list {
    gap: 20px;
}

._mobile ._mmenu-list .menu-item {
    width: 100%;
}

._mobile ._mmenu-list .menu-item > a {
    font-weight: 400;
    font-size: 17px;
    line-height: 1.3;
    color: #000;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

._mobile ._mmenu-list .mmenu-list .menu-item-has-children > a {
    margin: 0;
    font-weight: 500;
    font-size: 19px;
    color: #0c2990;
    text-transform: none;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

._mobile ._mmenu-list .menu-item-has-children > a:after {
    content: "";
    display: block;
    width: 15px;
    height: 15px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url("data:image/svg+xml,%3Csvg width='9' height='15' viewBox='0 0 9 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.676392 14.2035L7.43996 7.43993L0.676392 0.676359' stroke='%230C2990' stroke-width='1.35271' stroke-linecap='round' /%3E%3C/svg%3E");
    transform: translateY(35%);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

._mobile ._mmenu-list .mmenu-list > li > a {
    margin: 0;
    font-size: 16px;
    text-transform: none;
}

._mobile ._mmenu-list {
    text-align: left;
}

._mobile ._mtop-line {
    margin-bottom: 20px;
}

._mobile ._mcontacts {
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 5px;
}

._mobile .header__language {
    display: flex;
    gap: 5px;
}

._mobile .header__language a.active {
    text-decoration: none;
}


/* Контейнер меню: относительное позиционирование для абсолютных панелей */
._mobile ._mmenu-list {
    position: relative;
    overflow: hidden; /* Скрываем панели, выходящие за границы */
    min-height: calc(100dvh - 100px); /* Гарантируем место для анимации */
}

/* Панель уровня меню (базовое состояние: скрыта справа) */
._mobile ._mmenu-list .drilldown-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding-top: 0; /* Отступы берём из вашего CSS */
    background: #fff; /* Или inherit, если фон задан выше */
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Активная панель: видима и на своём месте */
._mobile ._mmenu-list .drilldown-panel.is-active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    z-index: 10;
    height: calc(90dvh - 100px);
    /*max-height: calc(100dvh - 100px);*/
}

._mobile ._mmenu-list .drilldown-panel.is-active .sub-menu {
    margin-left: 25px;
}

._mobile ._mmenu-list .drilldown-panel.is-active .sub-menu_btn_blue {
    font-size: clamp(14.5px, 1vw, 1.125em);
}

._mobile ._mmenu-list .drilldown-panel.is-active .sub-menu .menu-item {
    padding: 10px 5px;
    list-style: none;
}


/* Уходящая панель (при переходе вглубь) */
._mobile ._mmenu-list .drilldown-panel.is-exit {
    transform: translateX(-100%);
    visibility: visible;
    z-index: 5;
}

/* Заголовок панели с кнопкой "Назад" */
._mobile ._mmenu-list .drilldown-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    top: 0;
    background: #fff;
    z-index: 2;
    cursor: pointer;
}

._mobile ._mmenu-list .drilldown-title {
    flex: 1;
    font-size: 19px;
    font-weight: 500;
    color: #0c2990; /* Ваш цвет */
    margin: 0;
    padding-left: 10px; /* Компенсация кнопки назад */
}

/* Кнопка "Назад" */
._mobile ._mmenu-list .drilldown-back {
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border: none;
    background: transparent;
    color: #0c2990;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
}

._mobile ._mmenu-list .drilldown-back svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
}

/* Скрываем подменю в неактивных панелях (ваша вёрстка) */
._mobile ._mmenu-list .drilldown-panel:not(.is-active) .sub-menu {
    display: none;
}

/* Футер меню: фиксирован внизу, не скроллится */
._mobile > ._mmenu_footer {
    /*position: absolute;*/
    /*bottom: 0;*/
    /*left: 0;*/
    /*right: 0;*/
    /*background: #fff;*/
    border-top: 1px solid #eee;
    /*padding: 12px 16px 20px;*/
    /*z-index: 20;*/
}

._mobile .sub-menu ._mmenu_footer {
    margin-top: 40px;
}

/* Отступ для контента, чтобы не перекрывался футером */
._mobile ._mmenu-list .mmenu-block {
    padding-bottom: 160px;
}

/* Ваша стрелочка: поворачиваем при активном родителе (опционально) */
._mobile ._mmenu-list .menu-item-has-children.is-open > a:after {
    transform: rotate(90deg) translateY(0);
    transition: transform 0.2s ease;
}