/*
 * Qeducato MeanMenu remains the only visible mobile navigation.
 * The open menu scrolls independently when its content is taller than the viewport.
 */
@media (max-width: 992px) {
    .mobile-menu .mean-nav {
        max-height: calc(100vh - 90px);
        max-height: calc(100dvh - 90px);
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    /* Avoid a second nested scroll area inside the mobile menu. */
    .mobile-menu .mean-nav > ul,
    .mobile-menu .mean-nav ul.sub-menu,
    .mobile-menu .mean-nav ul.children {
        max-height: none !important;
        overflow: visible !important;
    }

    /* Max Mega Menu remains on desktop; its cloned mobile toggle is not needed. */
    .mobile-menu .mean-nav .mega-menu-toggle {
        display: none !important;
    }

    /*
     * Lock the document behind the open menu without position: fixed.
     * Fixed positioning caused a frozen page after opening the menu from a scrolled position.
     */
    html.bse-mobile-menu-open,
    body.bse-mobile-menu-open {
        overflow: hidden !important;
        overscroll-behavior: none;
    }
}
