/*
 * Mobile menu (23.11.2026), markup in resources/views/include/menu-mobile.blade.php.
 * Shown (a) in any browser on screens up to 991px wide, where the old navbar is still in the page and is hidden here
 * (so it can also be checked in a narrowed desktop browser), and (b) on phones at every width: class "mm2-ua"
 * on .mm2-bar and #mm2-panel (Controller::onMobile(), by User-Agent), copied to <html> by menu-mobile.js;
 * phones do not get the old navbar at all. Desktop browsers wider than 991px keep the old menu as it is.
 */

.mm2-bar,
.mm2-panel {
    display: none;
}

/* Layout of the bar and the panel (no effect while they are hidden) */
.mm2-bar {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 64px;
    padding: 8px 12px;
    background: #2e7d32;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.mm2-panel {
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100000;
    background: #2e7d32;
    color: #fff;
}

/* (a) Narrow screens, any browser */
@media (max-width: 991.98px) {
    /* The old green bar with the 250px menu box is replaced by .mm2-bar */
    nav.navbar.megamenu {
        display: none !important;
    }
    /* theme.js (margin-top:88px, visibility:hidden) and theme.min.js (display:none) move the logo bar on scroll */
    .toparea {
        display: block !important;
        margin-top: 0 !important;
        visibility: visible !important;
    }
    .mm2-bar,
    .mm2-panel {
        display: flex;
    }
    html.mm2-lock,
    html.mm2-lock body {
        overflow: hidden;
    }
}

/* (b) Phones (by User-Agent): the only menu, at every width (landscape, foldables) */
.mm2-bar.mm2-ua,
.mm2-panel.mm2-ua {
    display: flex;
}
/* the theme scripts still move the logo bar on scroll, though there is no old navbar to make room for */
html.mm2-ua .toparea {
    display: block !important;
    margin-top: 0 !important;
    visibility: visible !important;
}
html.mm2-ua.mm2-lock,
html.mm2-ua.mm2-lock body {
    overflow: hidden;
}

/* closed menu */
.mm2-panel[hidden] {
    display: none !important;
}

/* ---- common look ---- */

.mm2-bar *,
.mm2-panel * {
    box-sizing: border-box;
    letter-spacing: normal;
    text-transform: none;
    font-family: 'Open Sans', Arial, sans-serif;
}

.mm2-ico {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
}

.mm2-bar button,
.mm2-head button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    min-width: 48px;
    margin: 0;
    padding: 0 16px;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.mm2-bar .mm2-search-open {
    padding: 0;
    width: 48px;
}

.mm2-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 8px 12px 8px 16px;
    background: #1b5e20;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.mm2-head-title {
    font-size: 20px;
    font-weight: 700;
}

.mm2-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 16px 0 32px;
}

/* search */
.mm2-search {
    display: flex;
    gap: 8px;
    margin: 0 16px 16px;
}
.mm2-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 52px;
    padding: 0 14px;
    border: 2px solid #fff;
    border-radius: 8px;
    background: #fff;
    color: #1f1f1f;
    font-size: 18px;
}
.mm2-search button {
    flex: 0 0 auto;
    height: 52px;
    padding: 0 18px;
    border: 2px solid #fff;
    border-radius: 8px;
    background: #1b5e20;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

/* sections */
.mm2-list,
.mm2-sub {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mm2-list {
    border-top: 1px solid rgba(255, 255, 255, .35);
}
.mm2-item {
    border-bottom: 1px solid rgba(255, 255, 255, .35);
}
.mm2-toggle,
.mm2-link,
.mm2-link:hover,
.mm2-link:focus,
.mm2-link:active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    margin: 0;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.mm2-chev {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .15s ease;
}
.mm2-toggle[aria-expanded="true"] .mm2-chev {
    transform: rotate(90deg);
}
.mm2-toggle[aria-expanded="true"],
.mm2-sub {
    background: #1b5e20;
}
.mm2-sub a,
.mm2-sub a:hover,
.mm2-sub a:focus,
.mm2-sub a:active {
    display: block;
    min-height: 52px;
    padding: 13px 16px 13px 28px;
    border-top: 1px solid rgba(255, 255, 255, .2);
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
}

/* current page */
.mm2-current > .mm2-toggle span,
.mm2-active,
.mm2-sub a.mm2-active {
    font-weight: 700;
}
.mm2-link.mm2-active {
    box-shadow: inset 6px 0 0 #fff;
    background: #1b5e20;
}
.mm2-sub a.mm2-active {
    box-shadow: inset 6px 0 0 #fff;
    background: rgba(255, 255, 255, .12);
}

/* keyboard focus */
.mm2-bar button:focus-visible,
.mm2-panel a:focus-visible,
.mm2-panel button:focus-visible,
.mm2-panel input:focus-visible {
    outline: 3px solid #ffeb3b;
    outline-offset: 2px;
}

.mm2-social {
    display: flex;
    gap: 16px;
    padding: 20px 16px 8px;
}
.mm2-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
}

.mm2-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
