/* =========================================================
   MOBILE NAVIGATION
========================================================= */

.mobile-menu-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.mobile-menu-toggle__icon {
    position: relative;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.mobile-menu-toggle__icon::before,
.mobile-menu-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.mobile-menu-toggle__icon::before {
    top: -6px;
}

.mobile-menu-toggle__icon::after {
    top: 6px;
}

body.is-mobile-menu-open {
    overflow: hidden;
}

.mobile-menu-overlay,
.mobile-menu-panel {
    display: none;
}

.mobile-menu-panel .frontend-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px 0;
}

.mobile-menu-panel .frontend-menu__item {
    width: 100%;
}

.mobile-menu-panel .frontend-menu__link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-menu-panel .frontend-menu__link.is-active::after {
    display: none;
}

.mobile-menu-panel .frontend-menu__submenu {
    position: static;
    min-width: 0;
    padding: 0 0 0 16px;
    margin-bottom: 10px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
}

.mobile-menu-panel .frontend-menu__submenu-link {
    padding: 10px 0;
}

@media (max-width: 991px) {

    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .topbar {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .header-main {
        align-items: stretch;
    }

    .header-tools {
        justify-content: space-between;
    }

    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        z-index: 900;
        display: block;
        background: rgba(2, 6, 23, 0.68);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition:
            opacity 0.42s ease,
            visibility 0.42s ease,
            backdrop-filter 0.42s ease;
    }

    .mobile-menu-overlay[hidden] {
        display: none;
    }

    .mobile-menu-overlay.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mobile-menu-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 910;
        display: block;
        width: min(340px, 86vw);
        overflow-y: auto;
        background: #ffffff;
        box-shadow: -18px 0 45px rgba(15, 23, 42, 0.24);
        transform: translateX(100%);
        visibility: hidden;
        transition:
            transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
            visibility 0.62s ease;
    }

    .mobile-menu-panel[hidden] {
        display: none;
    }

    .mobile-menu-panel.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .mobile-menu-panel__inner {
        position: relative;
        padding: 22px 22px 30px;
    }

    .mobile-menu-close {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        margin-left: auto;
        margin-bottom: 12px;
        border: 0;
        background: transparent;
        color: #0f172a;
        font-size: 34px;
        line-height: 1;
        cursor: pointer;
    }
}