/* 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;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}


/* Disable any animations or transforms on the search icon/button so it's static */
.header_user-search_btn,
.header_user-search_btn .icon-search,
.header_user-search_btn .icon,
.header_user-search .icon-search,
.header_user-search .icon {
	-webkit-animation: none !important;
	animation: none !important;
	-webkit-transition: none !important;
	transition: none !important;
	-webkit-transform: none !important;
	transform: none !important;
}

/* Ensure focus/hover doesn't trigger movement */
.header_user-search_btn:focus,
.header_user-search_btn:hover,
.header_user-search_btn:active {
	-webkit-transform: none !important;
	transform: none !important;
	box-shadow: none !important;
}

/* Normalize button vs anchor icon sizing so search button lines up with other icons */

/* Utility: consistent header icon box */
.header-icon {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px !important;
	height: 40px !important;
	box-sizing: border-box !important;
	padding: 0 !important;
	vertical-align: middle !important;
	background-clip: padding-box !important;
	border: none !important; /* allow existing .header_user-action visuals */
	-webkit-appearance: none !important;
	appearance: none !important;
	border-radius: 50% !important;
}

/* Apply utility to the specific header items */
.header_user-action { /* existing anchor/button style */
	padding: 0 !important;
}

/* Explicitly apply the same box model to all header icons (search button, cookie host, social anchors) */
.header_user .header_user-search_btn,
.header_user .header_user-action,
#silktide-cookie-host,
.header_user a.header_user-action {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px !important;
	height: 40px !important;
	box-sizing: border-box !important;
	padding: 0 !important;
	border-radius: 50% !important;
	border: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

.header_user-action .icon,
.header_user-search_btn .icon,
.header_user-search_btn i,
.header_user-search .icon-search {
	font-size: 16px !important;
	line-height: 1 !important;
	display: inline-block !important;
}

/* Ensure the Silktide cookie host and other inline icons align the same way */
#silktide-cookie-host,
.header_user .header_user-action,
.header_user a.header_user-action {
	/* ensure cookie host and social anchors get the header-icon box */
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px !important;
	height: 40px !important;
	padding: 0 !important;
	border-radius: 50% !important;
}

/* Use container gap for consistent spacing instead of per-element margin */
.header_user { gap: 8px; display: flex; align-items: center; }

/* Ensure icons inside are centered and sized */
.header_user .icon,
.header_user i {
	font-size: 16px !important;
	line-height: 1 !important;
}

/* Fine tuning: nudge icons vertically and adjust spacing to match Silktide cookie host baseline */
@media (max-width: 767.98px) {
	/* Mobile: bring search/social icons slightly higher and closer to cookie host */
	.header_user { gap: 6px; }
	.header_user .header_user-search_btn,
	.header_user .header_user-action,
	#silktide-cookie-host {
		transform: translateY(-3px); /* lift them slightly */
	}
	/* make the cookie host and adjacent icon snugger */
	#silktide-cookie-host { margin-right: 2px !important; }
}

@media (min-width: 768px) {
	/* Desktop/tablet: lift icons a bit more so they align with cookie host baseline
	   and avoid overlapping the search field */
	.header_user .header_user-search_btn,
	.header_user .header_user-action,
	#silktide-cookie-host {
		transform: translateY(-5px);
	}
	/* Give a tiny separation so the search field doesn't overlap on narrow desktop widths */
	.header_user-search { gap: 0.5rem; }
	.header_user .header_user-search_btn { margin-left: 6px !important; }
}

/* Additional targeted tweaks: make search and social icons sit slightly higher than cookie host on mobile,
   and lift more on desktop while shrinking the search input to prevent visual overlap. */
@media (max-width: 767.98px) {
	/* Search & social sit a bit higher than cookie so they visually align when cookie is baseline */
	.header_user .header_user-search_btn,
	.header_user .header_user-action {
		transform: translateY(-6px) !important;
		margin-left: 2px !important;
	}
	/* Keep cookie host slightly less shifted so icons sit near it */
	#silktide-cookie-host { transform: translateY(-2px) !important; }
}

@media (min-width: 992px) {
	/* Desktop: lift icons more to align with cookie baseline and avoid input overlap */
	.header_user .header_user-search_btn,
	.header_user .header_user-action {
		transform: translateY(-8px) !important;
	}
	/* Reduce search field width slightly on wider screens to prevent visual overlap */
	.header_user-search_field { max-width: 160px !important; width: 140px !important; }
	/* Slightly increase the container gap on large screens for spacing balance */
	.header_user { gap: 10px; }
}

/* Final overrides: stronger lift + stacking so icons align precisely with cookie host baseline */
@media (max-width: 767.98px) {
	/* Mobile: cookie is baseline; make search/social slightly higher and near cookie */
	#silktide-cookie-host { transform: translateY(-3px) !important; z-index: 2; }
	.header_user .header_user-search_btn,
	.header_user .header_user-action { transform: translateY(-9px) !important; z-index: 3; }
	.header_user-search_field { width: calc(32vw) !important; max-width: 180px !important; }
	.header_user { gap: 4px; }
}

@media (min-width: 992px) {
	/* Desktop: align all icons with cookie host and ensure no overlap with search input */
	#silktide-cookie-host { transform: translateY(-8px) !important; z-index: 2; }
	.header_user .header_user-search_btn,
	.header_user .header_user-action { transform: translateY(-12px) !important; z-index: 3; }
	/* Shrink search input further if space is tight */
	.header_user-search_field { max-width: 140px !important; width: 120px !important; }
}

/* FINAL: horizontal baseline alignment for header icons (mobile + desktop)
   Ensure all icons (search button, cookie host, social anchors) share the same box
   and sit on the same visual baseline. Avoid transforms and use flex centering. */
.header_user { display: flex; align-items: center !important; gap: 8px; }

.header_user .header_user-search_btn,
.header_user .header_user-action,
#silktide-cookie-host {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px !important;
	height: 40px !important;
	box-sizing: border-box !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50% !important;
	position: relative !important;
	top: 0 !important;
	transform: none !important;
}

.header_user-search { display: flex; align-items: center; }
.header_user-search_field {
	margin: 0 !important;
	vertical-align: middle !important;
	height: 40px !important;
	line-height: 1 !important;
	padding: 0 0.6rem !important;
}

.header_user .icon,
.header_user i {
	font-size: 16px !important;
	line-height: 1 !important;
	display: inline-block !important;
}

/* Slightly smaller icons/controls on very small screens to keep layout compact */
@media (max-width: 767.98px) {
	.header_user .header_user-search_btn,
	.header_user .header_user-action,
	#silktide-cookie-host {
		width: 36px !important;
		height: 36px !important;
	}
	.header_user-search_field { height: 36px !important; }
	.header_user { gap: 6px; }
}

/* Slight tweaks on large desktops: preserve center baseline and avoid overlap */
@media (min-width: 1200px) {
	.header_user { gap: 10px; }
	.header_user-search_field { max-width: 160px !important; width: 140px !important; }
}

/* Footer: center navigation on mobile (override inline injected footer CSS) */
@media (max-width: 767.98px) {
	.footer_main-nav_list {
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important; /* CENTER the items */
		text-align: center !important;
		padding-left: 0 !important;
	}
	.footer_main-nav_list > .list-item { width: 100% !important; }
	.footer_main-nav_list > .list-item > a.link { display: inline-block !important; margin: 0.4rem 0 !important; }
	.footer_main-nav_list .sub-list { padding-left: 0.75rem !important; margin-top: 0.25rem !important; }
}

/* Center the footer section header on mobile */
@media (max-width: 767.98px) {
	.footer_main-nav .footer_main-header {
		text-align: center !important;
		width: 100% !important;
		display: block !important;
		margin-bottom: 0.75rem !important;
	}
}

