/* =========================================================================
   Menu Block — Site Header
   Desktop: transparent overlay bar with hover dropdowns.
   Mobile (< 1024px): hamburger opens an off-canvas drawer from the left.
   Theme via the custom properties on .site-header.
   ========================================================================= */
   
  

.site-header {
	/* --- Color scheme -----------------------------------------------------
	   Defaults below are the LIGHT scheme (white text/logo, over a dark hero);
	   `.site-header.is-dark` overrides them for interior pages. The scheme class
	   is set per page in template.php via acf_core_menu_scheme(). Main-nav links
	   hover with an animated underline in `--sh-fg` (so it reads in both schemes);
	   only the dropdown panel is a solid white surface. */
	--sh-fg: #ffffff;            /* resting text + logo color; also the hover underline */
	--sh-fg-contrast: #111111;   /* readable against a --sh-fg fill (e.g. button hover) */
	--sh-submenu-bg: #ffffff;    /* desktop dropdown panel background */
	--sh-submenu-fg: #111111;    /* desktop dropdown panel text */
	--sh-accent: #b08d3f;        /* hover/active accent */
	--sh-drawer-bg: #ffffff;     /* mobile drawer background */
	--sh-drawer-fg: #000;        /* mobile drawer text */
	--sh-drawer-accent: #b08d3f;
	--sh-gap: 1.75rem;

	/* The .top-header group wrapper (template) provides fixed positioning and
	   the scroll-hide behavior; the block fills it as a normal-flow header. */
	position: relative;
	margin: 0 auto;
	width: calc(100vw - 40px);
}

/* Dark scheme: black text/logo for pages that sit over a light background. */
.site-header.is-dark {
	--sh-fg: #111111;
	--sh-fg-contrast: #ffffff;
}


.top-header{
	padding: 20px 0 20px 0;
	width: 100vw;
	/* Fade the bar backing in/out as it crosses into/out of .light sections. */
	transition: background-color 0.4s ease;
}

/* Solid bar background on hover / once scrolled away from the top. The bar is
   ALWAYS a white surface in both schemes, so the text/logo flip to dark for
   legibility (the light/homepage scheme rests as white text over the hero, so
   it needs the override; the dark/interior scheme is already dark text). The
   `.site-header.is-scrolled` selectors cover the fallback where no `.top-header`
   wrapper is present (script.js then toggles `.is-scrolled` on `.site-header`
   itself). */
.top-header:hover,
.top-header.is-scrolled,
.site-header.is-scrolled {
	background-color: #fff;
	box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
}

.top-header:hover .site-header,
.top-header.is-scrolled .site-header,
.site-header.is-scrolled {
	--sh-fg: #111111;
	--sh-fg-contrast: #ffffff;
}

/* Screen Reader Text - ADA Compliance */
.site-header .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* ---- Top bar ---------------------------------------------------------- */
.site-header__bar {
	display: flex;
	flex-wrap: wrap;
	position: relative;
	align-items: center;
	gap: var(--sh-gap);
	width: 100%;
	justify-content: space-between;
}

.site-header__logo {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	color: var(--sh-fg);
	text-decoration: none;
	font-size: 1.25rem;
	line-height: 1;
}

.site-header__logo img,
.site-header__logo svg {
	display: block;
	height: 30px;
	width: auto;
	fill: currentColor;
}

/* ---- Desktop nav ------------------------------------------------------ */
.site-header__nav {
	display: flex;
}

.site-header__nav .primary-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-header__nav .primary-menu li {
	position: relative;
}

/* Top-level items stay `static` so the full-width dropdown band anchors to the
   bar (which is centered in the viewport) rather than to the item — letting the
   panel span edge-to-edge with the 100vw centering trick below. The link is set
   `relative` so its hover underline (an absolute ::after) still measures against
   the item, not the whole bar. */
.site-header__nav .primary-menu > li {
	position: static;
}

.site-header__nav .primary-menu > li > a {
	position: relative;
}

.site-header__nav .primary-menu a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--sh-fg);
	text-decoration: none;
	font-size: 12px;
	letter-spacing: 0.02em;
	padding: 0.5rem 0;
	transition: all 0.5s ease;
	border-style: solid;
	border-width: 0 0 1px 0;
	border-color: rgba(255, 255, 255, 0);
	font-family: var(--wp--preset--font-family--archivo-semi-expanded);
	text-transform: uppercase;
}

.site-header__nav .primary-menu a:after{
	content:'';
	bottom: 10px;
	position: absolute;
	background-color: var(--sh-fg);
	width: 0;
	opacity: 0;
	height: 1px;
	transition: all 0.5s;
}

.site-header__nav .primary-menu .current-menu-item a:after{
	width: 100%;
	opacity: 1;
}

/* Hover / keyboard focus: animate the underline in (no background fill). The
   underline is --sh-fg, so it's white on the homepage and dark on interior pages. */
.site-header__nav .primary-menu a:hover:after,
.site-header__nav .primary-menu a:focus-visible:after {
	width: 100%;
	opacity: 1;
}

/* The submenu-toggle button is decorative on desktop (hover drives it) */
.site-header__nav .submenu-toggle {
	background: none;
	border: 0;
	padding: 0 0 0 0.15rem;
	margin: 0;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
}

.site-header__nav .submenu-indicator svg {
	fill: var(--sh-fg);
	transition: transform 0.3s ease;
	rotate: 0;
	margin-left: 5px;
}

.site-header__nav .menu-item-has-children:hover .submenu-indicator svg{
	rotate: -180deg;
}

/* ---- Desktop dropdown: full-width black mega-menu band ----------------
   Each top-level dropdown drops a solid black band across the full viewport
   width, directly under the bar. Items flow top-to-bottom then across in a
   two-row grid (matching the design), each prefixed with a `›`. The social
   icons are pinned to the right of the band.

   Full-bleed trick: the band is absolutely positioned against the bar (which
   is centered in the viewport), so `left:50%; translateX(-50%); width:100vw`
   makes it span exactly edge-to-edge. The black background bleeds full width,
   but the content (columns + social icons) is held to a centered 1240px
   container via `--sh-drop-gutter` — the left/right padding that collapses to a
   20px minimum on narrower viewports. */
.site-header {
	--sh-drop-max: 600px;  /* content container width */
	--sh-drop-gutter: max(20px, calc((100vw - var(--sh-drop-max)) / 2));
	--sh-drop-fg: #b9b9b9;
	--sh-drop-fg-hover: #ffffff;
	--sh-drop-marker: #7d7d7d;
}

.site-header__nav .primary-menu > li > .sub-menu {
	position: absolute;
	top: 100%;
	left: 50%;
	width: 100vw;
	/* border-box so the 100vw width INCLUDES the gutter padding — otherwise
	   (with the WP default content-box) the padding is added outside 100vw, the
	   band overflows the viewport, and the centered content lands flush against
	   the window edge instead of inside the 1240px container. */
	box-sizing: border-box;
	margin: 0;
	padding:1rem var(--sh-drop-gutter) 2.3rem;
	padding-top: 1rem;
	padding-bottom: 1rem;
	list-style: none;
	background-color: #000;
//	box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
	z-index: 10;
	border-style: solid;
	border-width: 20px 0 0 0;
	border-top-color: #fff;

	/* Two rows; add columns as needed, filling column-by-column. */
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(2, auto);
	grid-auto-columns: max-content;
	justify-content: start;
	align-content: center;
	column-gap: 3.25rem;
	row-gap: 0.15rem;

	opacity: 0;
	visibility: hidden;
	transform: translateX(-50%) translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.site-header__nav .primary-menu > li.menu-item-has-children:hover > .sub-menu,
.site-header__nav .primary-menu > li.menu-item-has-children:focus-within > .sub-menu,
.site-header__nav .primary-menu > li.menu-item-has-children.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

/* Dropdown item links (exclude the social aside). */
.site-header__nav .sub-menu > li:not(.sub-menu__aside) > a {
	display: inline-flex;
	align-items: baseline;
	color: var(--sh-drop-fg);
	padding: 0.4rem 0;
	margin: 0;
	width: auto;
	border: 0;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	font-family: var(--wp--preset--font-family--archivo-semi-expanded);
	transition: color 0.25s ease;
}

.site-header__nav .sub-menu > li:not(.sub-menu__aside) > a::before {
	content: '\203A';
	margin-right: 0.55rem;
	color: var(--sh-drop-marker);
	font-size: 1.15em;
	line-height: 1;
	transition: color 0.25s ease;
}

.site-header__nav .sub-menu > li:not(.sub-menu__aside) > a:hover,
.site-header__nav .sub-menu > li:not(.sub-menu__aside) > a:focus-visible {
	color: var(--sh-drop-fg-hover);
}

.site-header__nav .sub-menu > li:not(.sub-menu__aside) > a:hover::before,
.site-header__nav .sub-menu > li:not(.sub-menu__aside) > a:focus-visible::before {
	color: var(--sh-drop-fg-hover);
}

/* Neutralise the top-level animated underline for dropdown links. */
.site-header__nav .sub-menu a:after {
	content: none;
}

/* Social icons pinned to the right of the band, out of the grid flow. */
.site-header__nav .sub-menu li.sub-menu__aside {
	position: absolute;
	right: var(--sh-drop-gutter);
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	padding: 0;
}

.sub-menu__social {
	display: flex;
	align-items: center;
	gap: 14px;
}

.sub-menu__social-link {
	display: inline-flex;
	color: var(--sh-drop-fg);
	transition: color 0.2s ease;
}

.sub-menu__social-link:hover,
.sub-menu__social-link:focus-visible {
	color: var(--sh-drop-fg-hover);
}

.sub-menu__social-link svg {
	display: block;
}

/* ---- Action buttons (CALENDAR / LOGIN) -------------------------------- */
/* Own column at the far right of the bar, buttons stacked vertically and
   sized to the same (widest) width. */
.site-header__actions {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.5rem;
	position: relative; /* anchor for the social row that drops beneath it */
}

/* Social icons: pulled out of the dropdown and anchored directly under the
   phone number (the actions column). Out of flow so they never affect the bar
   height, and no fixed/negative offsets. Hidden until a dropdown opens (or the
   row itself is hovered), and layered ABOVE the dropdown band. */
.site-header__social {
	position: absolute;
	top: calc(100% + 40px);
	right: 0;
	margin-top: 1.5rem;
	z-index: 20; /* above the dropdown band (z-index: 10) */
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s;
}

.site-header__bar:has(.menu-item-has-children:hover) .site-header__social,
.site-header__bar:has(.menu-item-has-children:focus-within) .site-header__social,
.site-header__social:hover,
.site-header__social:focus-within {
	opacity: 1;
	visibility: visible;
}

.site-header__action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0px 15px;
	border: 1px solid currentColor;
	border-radius: 0;
	color: #000;
	background-color: #fff;
	text-decoration: none;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: all 0.2s ease, color 0.2s ease;
}

.site-header__action:hover,
.site-header__action:focus-visible {
	background: var(--sh-fg);
	color: var(--sh-fg-contrast);
}

.site-header__action svg {
	flex: 0 0 auto;
	display: none;
}

.site-header__actions .site-header__action:first-child{
	background-color: #000;
	color: #fff;
}

.site-header__actions .site-header__action:first-child:hover{
	background-color: var(--wp--preset--color--buff);
	color: #000;
}



.site-header__actions .site-header__action span{
	padding:6px 0 5px 0;
	line-height: 1em;
}

/* ---- Hamburger toggle ------------------------------------------------- */
.site-header__toggle {
	display: none;
	flex: 0 0 auto;
	background: none;
	border: 0;
	padding: 0.5rem;
	cursor: pointer;
	color: var(--sh-fg);
}

.site-header__bars {
	display: block;
	width: 28px;
}

.site-header__bars span {
	display: block;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

.site-header__bars span + span {
	margin-top: 6px;
}

/* ---- Off-canvas drawer ------------------------------------------------ */
.site-drawer {
	position: fixed;
	inset: 0;
	z-index: 1000;
	visibility: hidden;
	pointer-events: none;
}

.site-drawer::before {           /* overlay */
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.5);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.site-drawer__panel {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: min(86vw, 360px);
	background: var(--sh-drawer-bg);
	color: var(--sh-drawer-fg);
	display: flex;
	flex-direction: column;
	padding: 1.5rem 1.5rem 2rem;
	overflow-y: auto;
	transform: translateX(-100%);
	transition: transform 0.3s ease;
	box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
}

.site-drawer.is-open {
	visibility: visible;
	pointer-events: auto;
}

.site-drawer.is-open::before {
	opacity: 1;
}

.site-drawer.is-open .site-drawer__panel {
	transform: translateX(0);
}

.site-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
}

.site-drawer__logo {
	display: inline-flex;
	align-items: center;
	color: var(--sh-drawer-fg);
	text-decoration: none;
	font-size: 1.1rem;
}

.site-drawer__logo img,
.site-drawer__logo svg {
	display: block;
	height: 46px;
	width: auto;
	fill:#336699;
	color: inherit; /* inline SVG fills use currentColor */
}

.site-drawer__close {
	background: none;
	border: 0;
	padding: 0.25rem;
	cursor: pointer;
	color: var(--sh-drawer-fg);
}

/* Drawer nav */
.site-drawer__nav .primary-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-drawer__nav .primary-menu > li {
	border-bottom: 1px solid rgba(31, 45, 79, 0.1);
}

.site-drawer__nav .primary-menu a {
	display: block;
	color: var(--sh-drawer-fg);
	text-decoration: none;
	padding: 0.9rem 0;
	font-size: 1.05rem;
}

/* item row holds the link + the submenu toggle */
.site-drawer__nav .menu-item-has-children {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
}

.site-drawer__nav .menu-item-has-children > .sub-menu {
	grid-column: 1 / -1;
}

.site-drawer__nav .submenu-toggle {
	background: none;
	border: 0;
	padding: 0.9rem 0.5rem;
	cursor: pointer;
	color: var(--sh-drawer-fg);
	justify-self: end;
}

.site-drawer__nav .submenu-indicator svg {
	fill: currentColor;
	transition: transform 0.25s ease;
}

.site-drawer__nav .submenu-toggle[aria-expanded="true"] .submenu-indicator svg {
	transform: rotate(180deg);
}

/* Drawer submenus: collapsed by default, expand on toggle */
.site-drawer__nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0 0 0 1rem;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.site-drawer__nav .menu-item-has-children.is-expanded > .sub-menu {
	max-height: 60vh;
}

.site-drawer__nav .sub-menu a {
	font-size: 0.98rem;
	padding: 0.6rem 0;
}

/* Drawer action buttons */
.site-drawer__actions {
	margin-top: auto;
	padding-top: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.site-drawer__actions .site-header__action {
	color: var(--sh-drawer-fg);
	justify-content: center;
}

.site-drawer__actions .site-header__action:hover,
.site-drawer__actions .site-header__action:focus-visible {
	background: var(--sh-drawer-fg);
	color: #fff;
}

/* Social icons below the phone number in the mobile drawer. Always visible
   here (no hover reveal), and recolored dark so they read on the white drawer
   — the desktop markup hardcodes white fills, which we flip to currentColor. */
.site-drawer__social {
	display: flex;
	padding-top: 0.5rem;
	justify-content: center;
	align-items: center;
}

.site-drawer__social .sub-menu__social {
	display: flex;
	width:75%;
	justify-content: space-between;
	align-items:;
}

.site-drawer__social .sub-menu__social-link {
	color: var(--sh-drawer-fg);
}

.site-drawer__social svg[fill="white"],
.site-drawer__social svg[fill="#fff"] {
	fill: currentColor;
}

.site-drawer__social svg[stroke="white"] {
	stroke: currentColor;
}

/* ---- Responsive switch ------------------------------------------------ */
@media (max-width: 1068px) {
	.site-header__nav,
	.site-header__actions {
		display: none;
	}
	
	.site-header__logo {
		margin-top: unset;
	}

	.site-header__toggle {
		display: inline-flex;
	}
}

/* Lock scroll when the drawer is open */
body.drawer-open {
	overflow: hidden;
}
