/*
 * Site-wide theme adjustments (loaded on every page).
 *
 * The theme ships smart-stick-nav.js, which hides the navbar by animating its
 * `top` to a negative value whenever you scroll down, and the header itself is
 * in normal flow — so it scrolls away entirely. Pin it instead.
 */
header:has(> .navbar) {
    position: sticky;
    top: 0;
    z-index: 1030;
}

/* neutralise the hide-on-scroll-down inline style the vendor script writes */
header:has(> .navbar) > .navbar {
    top: 0 !important;
}

/* a subtle edge so content passing underneath stays separated */
header:has(> .navbar) > .navbar {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-bs-theme='light'] header:has(> .navbar) > .navbar {
    box-shadow: 0 1px 0 rgba(31, 31, 36, 0.08);
}

/* anchor targets must clear the pinned header instead of hiding under it */
section[id],
div[id]:not([id='']) {
    scroll-margin-top: 96px;
}

@media (max-width: 767.98px) {
    section[id],
    div[id]:not([id='']) {
        scroll-margin-top: 88px;
    }
}
