/**
 * Push the header Navigation block's mobile/hamburger switch up from WP
 * core's hardcoded 600px to a tablet-width breakpoint, so the header stops
 * wrapping instead of collapsing to a single row too late.
 */
@media (max-width: 1024px) {
    header.wp-block-template-part .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: flex;
    }

    header.wp-block-template-part .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
        display: none;
    }
}

/**
 * Ensures header is above all other elements.
 * Targets the template's sticky Group wrapper structurally (it wraps the
 * header template part directly). That wrapper is a
 * block in the Header template itself, not reachable from a page's content
 * editor, so a custom CSS class isn't a practical alternative here.
 */
.is-position-sticky:has(> header.wp-block-template-part) {
    z-index: 999;
}
