/*
 * Sticky menu of the website templates: pinned to the top of the window, slides out of view
 * while scrolling down and back in while scrolling up (see sticky-nav.js).
 */
[data-sticky-nav] { transition: translate .3s ease, box-shadow .3s ease; }
[data-sticky-nav].is-stuck {
    position: fixed !important;
    top: var(--sticky-nav-top, 0) !important;
    left: 0;
    right: 0;
    margin-inline: auto;
    z-index: 1030;
    box-shadow: 0 6px 24px rgba(22, 54, 92, .15);
}
[data-sticky-nav].is-hidden { translate: 0 -200%; }
.sticky-nav-placeholder { display: block; }

/* Template 3: the menu is a floating card centred with left/transform */
.v3nav[data-sticky-nav].is-stuck { --sticky-nav-top: 16px; left: 50%; right: auto; margin-inline: 0; }
.v3nav[data-sticky-nav].is-hidden { translate: 0 -300%; }

/* A pinned menu that is open in a window shorter than the menu (a phone held sideways) scrolls inside
   itself; otherwise its last items are out of reach, the menu being fixed to the window */
@media (max-height: 480px) {
    [data-sticky-nav].is-stuck .navbar-collapse.show {
        max-height: calc(100vh - 130px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-sticky-nav] { transition: none; }
}
