/* Patch: ensure mobile header navigation stacks vertically when opened */
@media screen and (max-width:1199.98px) {
	/* When the mobile nav is active, force the list into a column layout */
	.header_nav.active .header_nav-list {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 0.75rem !important;
		padding: 0 1rem 2rem !important;
	}

	/* Make each nav item take full width and be easily tappable */
	.header_nav.active .header_nav-list_item {
		display: block !important;
		width: 100% !important;
		margin: 0 0 0.5rem 0 !important;
	}

	.header_nav.active .header_nav-list_item .nav-link,
	.header_nav.active .nav-item > a {
		display: block !important;
		width: 100% !important;
		padding: 12px 16px !important;
		box-sizing: border-box !important;
	}

	/* Prevent the search field from overlapping nav: keep it above the nav when opened */
	.header_nav.active + .header_user,
	.header_nav.active ~ .header_user {
		z-index: 10100 !important;
	}
}

/* Small devices: tighten search field so it doesn't push/overlap items */
@media screen and (max-width:767.98px) {
	.header_user-search_field {
		min-width: 120px !important;
		max-width: 220px !important;
		width: 36vw !important;
	}
}

/* Inline fallbacks moved from header.php (centralized) */
/* default header stacking */
.header{position:relative;z-index:50}
.page_main{position:relative;z-index:1}
/* when overlay is active, make header absolute and push page_main down so hero doesn't hide behind the menu */
body.has-overlay .header{position:absolute;top:0;left:0;width:100%;z-index:60}
body.has-overlay .page_main{padding-top:calc(var(--header-height,72px) + 1rem)}
/* fallback site gap for non-overlay pages */
.site-body-gap{height:70px}
@media(min-width:1200px){ .site-body-gap{height:90px} }
/* Header search adjustments: reduce width and align towards right icons to avoid overlap with nav */
.header_user-search{display:flex;align-items:center;gap:0.5rem}
.header_user-search_field{min-width:160px;max-width:320px;width:22vw;padding:0.5rem 0.6rem;border-radius:999px;border:1px solid rgba(0,0,0,0.08)}
.header_user-search_btn{flex:0 0 auto;padding:0.45rem;width:40px;height:40px;border-radius:50%}
/* On wide screens, reduce search width to avoid collision with nav; push group to the right */
@media(min-width:992px){
	.header_user{margin-left:1rem}
	.header_user-search_field{max-width:220px;width:180px}
}
/* Extra safety: prevent the nav from being overlapped by user controls by ensuring nav has flex:1 */
.header_nav{flex:1 1 60%}
.header_nav-list{display:flex;gap:1rem;align-items:center;flex-wrap:nowrap}
.header_user{flex:0 0 auto}

