/* ─── mobile nav drawer ─── */

nav#mobile-menu { display: none; }

@media screen and (max-width: 940px) {

    nav#mobile-menu {
        display: block; position: absolute; top: 6.1rem; right: 0;
        width: 20.5rem; background: var(--header-bg-color); z-index: 200;
        overflow: hidden; max-height: 0; visibility: hidden;
        transition: max-height 0.3s ease, visibility 0s 0.3s;
    }

    nav#mobile-menu[data-open] { display: flex; flex-direction: column; min-height: calc(100vh - var(--header-height)); overflow-y: auto; visibility: visible; transition: max-height 0.3s ease, visibility 0s; }
    html[data-reduced-motion="true"] nav#mobile-menu,
    html[data-reduced-motion="true"] nav#mobile-menu[data-open] { transition: none; }

    nav#mobile-menu .mobile-nav-inner { display: flex; flex-direction: column; flex: 1; width: 100%; }

    /* search */

    nav#mobile-menu form.search { position: relative; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color-accent); flex-shrink: 0; }

    nav#mobile-menu form.search input[type="text"] {
        width: 100%; height: 3.5rem; line-height: 3.5rem; border: 0;
        padding: 0 0 0 2.9rem; margin: 0; font-size: 0.9rem;
        background: white url('../images/search/zoom.svg') no-repeat 0 -25px;
        box-sizing: border-box;
    }

    nav#mobile-menu form.search button { position: absolute; right: 1rem; top: 0.75rem; width: 3.5rem; height: 3.5rem; background: none; border: 0; cursor: pointer; opacity: 0; }

    /* nav list */

    nav#mobile-menu ul.mobile-nav-list { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }
    nav#mobile-menu ul.mobile-nav-list li { border-bottom: 1px solid var(--border-color-accent); flex-shrink: 0; }
    nav#mobile-menu ul.mobile-nav-list li a { display: block; height: 2.5rem; line-height: 2.5rem; padding: 0 1rem; color: var(--nav-active-color); text-decoration: none; font-size: 0.9rem; text-transform: uppercase; }

    /* extra links row */

    nav#mobile-menu .mobile-extra { list-style:none;display: flex; padding: 0.75rem 1rem; gap: 1rem; border-bottom: 1px solid var(--border-color-accent); flex-shrink: 0; }

    nav#mobile-menu .mobile-extra a.gauja-help,
    nav#mobile-menu .mobile-extra a.gauja-map {
        min-width: 5.1rem; height: 2.3rem;
    }

    nav#mobile-menu .mobile-extra a span.gauja { position: absolute; top: 0.4rem; left: 1.5rem; display: block; color: white; font-size: 0.65rem; }
    nav#mobile-menu .mobile-extra a span.txt { padding: 1.1rem 0.65rem 0 1.5rem; display: block; font-size: 0.85rem; }

    nav#mobile-menu .mobile-extra a.gauja-help { background-position: 0% 0%; }
    nav#mobile-menu .mobile-extra a.gauja-help:hover { background-position: 0% 100%; }
    nav#mobile-menu .mobile-extra a.gauja-help span.txt { color: #00a9a8; }

nav#mobile-menu .mobile-extra a.gauja-map { background-position: 100% 0%; }
nav#mobile-menu .mobile-extra a.gauja-map:hover { background-position: 100% 100%; }
    nav#mobile-menu .mobile-extra a.gauja-map span.txt { color: #cc004d; }

    /* language grid */

    nav#mobile-menu .mobile-langs { list-style: none; margin: 0 0 1.3rem 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; flex-shrink: 0; }
    nav#mobile-menu .mobile-langs a { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 0.25rem; padding: 0.2em 0.25em; min-height: 2rem; text-decoration: none; color: var(--nav-active-color); font-size: 0.75rem; text-align: center; }
    nav#mobile-menu .mobile-langs a img { width: 1.8rem; height: auto; }
    nav#mobile-menu .mobile-langs a[aria-current="true"] { font-weight: bold; }

    /* blur overlay — mobile override */

    div#blur { position: fixed; z-index: 130; }
}

@media screen and (max-width: 600px) {
    :root { --header-height: 6.4rem; }
    div#header button#menu-icon { width: 3.8rem; height: 3.8rem; }
    nav#mobile-menu { top: 3.8rem; width: 100%; }
}
