/* ──────────────────────────────────────────────────────────────────────────
   Shared site nav (rendered by unitedway_render_site_nav / unitedway/site-nav).
   Two themes: --light (dark bg→ no, light bg) and --dark (dark bg).
   Always position:fixed at the viewport top (site-wide "stays fixed on
   scroll" nav) — transparent until site-nav.js adds .is-scrolled, see below.
   Hero blocks and the standalone unitedway/site-nav block each reserve the
   space it used to take up in flow via padding-top / .uw-nav-spacer.
   ────────────────────────────────────────────────────────────────────────── */

.uw-nav {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 88;
	transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
/* Non-hero pages: unitedway/site-nav block renders this right after the nav
   to reserve the height the now-fixed nav no longer takes up in flow. */
.uw-nav-spacer {
	height: var(--uw-nav-height);
}
.uw-nav__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: 1510px;
	margin: 0 auto;
	padding: 20px;
	border-radius: 60px;
}

/* Logo */
.uw-nav__logo { display: inline-flex; align-items: center; flex: none; text-decoration: none; color: inherit; }
.uw-nav__logo-img { height: 70px; width: auto; display: block; transition: height 0.3s ease; }
.uw-nav__logo-text {
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: 20px;
	line-height: 1;
	color: inherit;
}

/* Center: menu pill (search now lives in the right group) */
.uw-nav__center { display: flex; align-items: center; gap: 0.5rem; }

@media (min-width: 901px) {
	.uw-nav__center { flex: 1; justify-content: center; }
}

.uw-nav__menu-list {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	margin: 0;
	padding: 0.65rem 1.5rem;
	list-style: none;
	border-radius: 100px;
	font-family: var(--wp--preset--font-family--test-national-2-condensed);
	font-weight: 500;
	font-size: 22px;
	transition: background-color 0.3s ease, color 0.3s ease;
}
.uw-nav__menu-list li { margin: 0; }
.uw-nav__item { display: flex; }
.uw-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	text-decoration: none;
	color: inherit;
	white-space: nowrap;
}
.uw-nav__chev {
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 4px;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
}
.uw-nav__search {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid currentColor;
	color: inherit;
	flex: none;
	transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}
.uw-nav__search svg { width: 20px; height: 20px; display: block; }

/* Actions (Get Help / Make Donation). */
.uw-nav__actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }

/* ── Nav pill buttons ──
   Moved here from theme.json's styles.css so they ship with the nav itself.
   Global Styles custom CSS saved in the Site Editor can replace theme.json's
   css string, which silently dropped these rules. */
.uw-nav-btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 24px;
	border-radius: 50px;
	font-family: var(--wp--preset--font-family--test-national-2-condensed);
	font-weight: 500;
	font-size: 22px;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.2s ease;
}
.uw-nav-btn--cobalt {
	background: var(--wp--preset--color--cobalt-blue);
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--cobalt-blue);
}
.uw-nav-btn--cobalt:hover,
.uw-nav-btn--cobalt:focus-visible {
	background: var(--wp--preset--color--deep-navy);
	border-color: var(--wp--preset--color--deep-navy);
	color: var(--wp--preset--color--white);
}
.uw-nav-btn--red {
	background: var(--wp--preset--color--red-text-safe, #DB382E);
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--red-text-safe, #DB382E);
}
.uw-nav-btn--red:hover,
.uw-nav-btn--red:focus-visible {
	background: var(--wp--preset--color--red2-hover, #B52E26);
	border-color: var(--wp--preset--color--red2-hover, #B52E26);
	color: var(--wp--preset--color--white);
}
.uw-nav-btn--cobalt-outline {
	background: transparent;
	color: var(--wp--preset--color--cobalt-blue);
	border-color: var(--wp--preset--color--cobalt-blue);
}
.uw-nav-btn--cobalt-outline:hover,
.uw-nav-btn--cobalt-outline:focus-visible {
	background: var(--wp--preset--color--cobalt-blue);
	color: var(--wp--preset--color--white);
}
.uw-nav-btn--red-outline {
	background: transparent;
	color: var(--wp--preset--color--red);
	border-color: var(--wp--preset--color--red);
}
.uw-nav-btn--red-outline:hover,
.uw-nav-btn--red-outline:focus-visible {
	background: var(--wp--preset--color--red);
	color: var(--wp--preset--color--white);
}

/* On a cobalt or navy hero the cobalt button would vanish into the background,
   so it gets a light edge and a translucent hover. The nav is printed before
   <main> (inc/site-nav.php), outside the hero, so each hero tags its nav with a
   uw-nav--on-<hero>-<colour> class instead of these rules matching the hero as
   an ancestor. */
.uw-nav--on-ph-blue .uw-nav-btn--cobalt,
.uw-nav--on-ah-blue .uw-nav-btn--cobalt,
.uw-nav--on-nih-cobalt .uw-nav-btn--cobalt {
	border-color: color-mix(in srgb, var(--wp--preset--color--white) 20%, transparent);
}
.uw-nav--on-ph-blue .uw-nav-btn--cobalt:hover,
.uw-nav--on-ph-blue .uw-nav-btn--cobalt:focus-visible,
.uw-nav--on-ah-blue .uw-nav-btn--cobalt:hover,
.uw-nav--on-ah-blue .uw-nav-btn--cobalt:focus-visible,
.uw-nav--on-nih-cobalt .uw-nav-btn--cobalt:hover,
.uw-nav--on-nih-cobalt .uw-nav-btn--cobalt:focus-visible {
	background: color-mix(in srgb, var(--wp--preset--color--white) 10%, transparent);
	color: var(--wp--preset--color--white);
}
/* Navy heroes (Page, Article and No Image Hero): the default hover fills the
   button deep navy, the hero's own colour, so it vanished; a 10% white tint is
   barely lighter. Turning the button white with navy text keeps it clearly
   visible on hover and keyboard focus. */
.uw-nav--on-ph-navy .uw-nav-btn--cobalt:hover,
.uw-nav--on-ph-navy .uw-nav-btn--cobalt:focus-visible,
.uw-nav--on-ah-navy .uw-nav-btn--cobalt:hover,
.uw-nav--on-ah-navy .uw-nav-btn--cobalt:focus-visible,
.uw-nav--on-nih-navy .uw-nav-btn--cobalt:hover,
.uw-nav--on-nih-navy .uw-nav-btn--cobalt:focus-visible {
	background: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--deep-navy);
}
/* Once scrolled the nav turns white, so the hero-colour treatment no longer applies. */
.uw-nav.is-scrolled .uw-nav-btn--cobalt { border-color: var(--wp--preset--color--cobalt-blue); }
.uw-nav.is-scrolled .uw-nav-btn--cobalt:hover,
.uw-nav.is-scrolled .uw-nav-btn--cobalt:focus-visible {
	background: var(--wp--preset--color--deep-navy);
	border-color: var(--wp--preset--color--deep-navy);
	color: var(--wp--preset--color--white);
}

/* Hamburger toggle (mobile only; shown via the media query below) */
.uw-nav__toggle {
	box-sizing: border-box;
	display: none;
	flex-direction: row;
	justify-content: center;
	align-items: center; 
	gap: 10px;
	width: 48px;
	height: 48px; 
	border-radius: 80px;
	background: var(--wp--preset--color--cobalt-blue);
	cursor: pointer;
	flex: none;
	border: none;
}
.uw-nav__toggle-bars {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	width: 24px;
	height: 14px;
}
.uw-nav__toggle-bar {
	width: 24px;
	height: 2px;
	background: var(--wp--preset--color--white);
}


/* ── Theme: light background ── */
.uw-nav--light { color: var(--wp--preset--color--deep-navy); }
.uw-nav--light .uw-nav__menu-list {
	/* Parchment so the pill reads on both white and icy-blue backgrounds. */
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--deep-navy);
}
.uw-nav--light .uw-nav__search {
	background: none;
	border-color: color-mix(in srgb, var(--wp--preset--color--deep-navy) 10%, transparent);
	color: var(--wp--preset--color--deep-navy);
}

.uw-nav--light2 .uw-nav__menu-list {
	background: #F1F0ED;
}
.uw-nav--light2 .uw-nav__search {
	border-color: color-mix(in srgb, var(--wp--preset--color--deep-navy) 10%, transparent);
	background: none;
}

/* ── Theme: dark background ── */
.uw-nav--dark { color: var(--wp--preset--color--white); }
.uw-nav--dark .uw-nav__menu-list {
	/* No backdrop-filter here: filter/backdrop-filter/transform on an ancestor of
	   the mega panel create a containing block that traps its position:absolute,
	   pinning the panel to the pill width instead of the full nav. A slightly more
	   opaque translucent fill keeps the labels legible over the hero without it. */
	background: color-mix(in srgb, var(--wp--preset--color--white) 10%, transparent);
	color: var(--wp--preset--color--white);
}
.uw-nav--dark .uw-nav__search {
	background: none;
	border-color: color-mix(in srgb, var(--wp--preset--color--white) 20%, transparent);
	color: var(--wp--preset--color--white);
}
.home .uw-nav--dark .uw-nav__search {
	border-color: var(--wp--preset--color--white);
}

.home .uw-nav--dark .uw-nav__menu-list {
	/* No backdrop-filter (see the --dark note above): it creates a containing
	   block that traps the absolutely-positioned mega panel to the pill width.
	   The :has(...:hover) neutraliser below only covers mouse hover, so a
	   keyboard :focus-within would still open a trapped panel. A more opaque
	   fill keeps the labels legible over the home hero without a filter. */
	background: color-mix(in srgb, var(--wp--preset--color--white) 18%, transparent);
}
 
 
/* ── Scrolled state */
.uw-hero { position: relative; z-index: 9; }
.uw-nav.is-scrolled { padding: 24px 10px 0; }
.uw-nav.is-scrolled .uw-nav__inner {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--deep-navy);
	padding: 6px 12px;
	gap: 10px;
}

.uw-nav.is-scrolled .uw-nav__menu-list {
	background: none;
	color: var(--wp--preset--color--deep-navy);
	backdrop-filter: none;
}
.uw-nav.is-scrolled .uw-nav__search {
	background: none;
	border-color: color-mix(in srgb, var(--wp--preset--color--deep-navy) 10%, transparent);
	color: var(--wp--preset--color--deep-navy);
	width: 42px;
    height: 42px;
}
.uw-nav.is-scrolled .uw-nav__logo-img {
	height: 54px;
}

.uw-nav.is-scrolled .uw-nav-btn {
	line-height: 22px;
	font-size: 18px;
}

/* Dark theme's main logo is the light variant; swap to the alt (dark) logo
   already in the DOM, same technique as the mega-hover swap below. */
.uw-nav--dark.is-scrolled .uw-nav__logo-img:not(.uw-nav__logo-alt) { display: none; }
.uw-nav--dark.is-scrolled .uw-nav__logo-alt { display: inline-flex; }

/* Search overlay opens over a white background; show the alt logo while it's open. */
.uw-nav:has(.uw-nav__search-overlay.is-open) .uw-nav__logo-alt { display: inline-flex; }

/* Scrolled + search overlay open at once: keep the main logo visible too
   (overrides the scrolled-only hide rule above). */
.uw-nav.is-scrolled:has(.uw-nav__search-overlay.is-open) .uw-nav__logo-img:not(.uw-nav__logo-alt) { display: block; }

@media (prefers-reduced-motion: reduce) {
	.uw-nav,
	.uw-nav__inner,
	.uw-nav__menu-list,
	.uw-nav__logo-img,
	.uw-nav__search { transition: none; }
}

/* ── Social row (Figma mobile menu). Data source is the footer's ACF
   footer_social option – no duplication. Shown only in the open mobile menu. ── */
.uw-nav__social { display: none; }
.uw-nav__social-label {
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: 20px;
	line-height: 1;
	color: var(--wp--preset--color--deep-navy);
}
.uw-nav__social-list { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.uw-nav__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1.5px solid var(--wp--preset--color--red);
	color: var(--wp--preset--color--red);
}
.uw-nav__social-link svg { width: 20px; height: 20px; display: block; }

/* Decorative brand watermark behind the open mobile menu. */
.uw-nav__logo-alt,
.uw-nav__watermark { display: none; }

/* ── Mobile: hamburger reveals a full-screen light menu panel (Figma) ── */
@media (max-width: 900px) {
	.uw-nav__inner { padding: 16px 24px; flex-wrap: wrap; gap: 15px; justify-content: flex-start; }
	.uw-nav__toggle { display: inline-flex; }
	.uw-nav__logo-img { height: 60px; }

	/* Top row (closed): logo left, search + hamburger right. */
	.uw-nav__logo { order: 0; }
	.uw-nav__search { order: 1; margin-left: auto; }
	.uw-nav__toggle { order: 2; }
	.uw-nav__center { order: 3; }
	.uw-nav__actions { order: 4; }

	.uw-nav__center,
	.uw-nav__actions { display: none; }

	/* ── Open: full-screen porcelain panel, dark text, dark logo ── */
	.uw-nav.is-open {
		position: fixed;
		inset: 0;
		z-index: 100;
		overflow-y: auto;
		background: var(--wp--preset--color--porcelain);
		color: var(--wp--preset--color--deep-navy);
	}
	.uw-nav.is-open .uw-nav__inner {
		position: relative;
		flex-wrap: nowrap;
		flex-direction: column;
		align-items: stretch;
		min-height: 100dvh;
		max-width: none;
		gap: 0;
		padding: 20px 24px 32px;
		background: #fff;
	}
	/* Keep menu content above the watermark. */
	.uw-nav.is-open .uw-nav__logo,
	.uw-nav.is-open .uw-nav__center,
	.uw-nav.is-open .uw-nav__actions,
	.uw-nav.is-open .uw-nav__social { position: relative; z-index: 1; }

	/* Dark logo swaps in on the light panel. */
	.uw-nav.is-open .uw-nav__logo { align-self: flex-start; }
	.uw-nav.is-open .uw-nav__logo-img { display: none; }
	.uw-nav.is-open .uw-nav__logo-alt { display: block; }
	.uw-nav.is-open .uw-nav__logo-text { color: var(--wp--preset--color--deep-navy); }

	/* Search hidden when open; hamburger becomes a circular X, pinned top-right. */
	.uw-nav.is-open .uw-nav__search { display: none; }
	.uw-nav.is-open .uw-nav__toggle {
		position: absolute;
		top: 20px;
		right: 24px;
		z-index: 2;
		width: 44px;
		height: 44px;
		border-radius: 50%;
		background: var(--wp--preset--color--parchment);
		color: var(--wp--preset--color--deep-navy);
	}
	.uw-nav.is-open .uw-nav__toggle-bar { background: var(--wp--preset--color--deep-navy); }
	.uw-nav.is-open .uw-nav__toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
	.uw-nav.is-open .uw-nav__toggle-bar:nth-child(2) { opacity: 0; }
	.uw-nav.is-open .uw-nav__toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

	/* Top-level list: full-width rows, hairline dividers, uniform right chevron. */
	.uw-nav.is-open .uw-nav__center { display: flex; margin-top: 24px; }
	.uw-nav.is-open .uw-nav__menu-list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
		padding: 0;
		border-radius: 0;
		background: transparent;
		font-family: var(--wp--preset--font-family--marr-sans-cond);
		font-weight: 600;
		font-size: 24px;
	}
	.uw-nav.is-open .uw-nav__item { border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--deep-navy) 12%, transparent); }
	.uw-nav.is-open .uw-nav__link {
		justify-content: space-between;
		width: 100%;
		padding: 20px 0;
		color: var(--wp--preset--color--deep-navy);
	}
	.uw-nav.is-open .uw-nav__chev { display: none; }
	.uw-nav.is-open .uw-nav__link::after {
		content: "";
		width: 9px;
		height: 9px;
		margin-left: auto;
		border-right: 2px solid currentColor;
		border-top: 2px solid currentColor;
		transform: rotate(45deg);
		flex: none;
	}

	/* CTAs below the links. */
	.uw-nav.is-open .uw-nav__actions {
		display: flex;
		flex-wrap: wrap;
		gap: 12px;
		margin-top: 28px;
	}

	/* Social pinned to the bottom of the panel. */
	.uw-nav.is-open .uw-nav__social {
		display: flex;
		align-items: center;
		justify-content: space-between;
		order: 5;
		margin-top: auto;
		padding-top: 32px;
	}

	/* Watermark decoration. */
	.uw-nav.is-open .uw-nav__watermark {
		display: block;
		position: absolute;
		right: 0;
		bottom: 0;
		width: 300px;
		max-width: 78%;
		opacity: 0.05;
		z-index: 0;
		pointer-events: none;
	}
	.uw-nav.is-open .uw-nav__watermark svg { width: 100%; height: auto; display: block; }

	/* Submenu view: hide the social + watermark (Figma shows neither). */
	.uw-nav.has-submenu-open .uw-nav__social { display: none; }
}

/* ──────────────────────────────────────────────────────────────────────────
   Mega menu
   ────────────────────────────────────────────────────────────────────────── */
.uw-nav__search { cursor: pointer; padding: 0; }
.uw-nav__mega { display: none; }
.uw-nav__mega-back { display: none; }

.uw-nav__mega-list {
	flex: 1;
	margin: 0;
	padding: 0;
	list-style: none;
}
.uw-nav__mega-item { margin: 0; }
.uw-nav__mega-link {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 24px 60px 24px 24px;
	border-radius: 12px;
	text-decoration: none;
	transition: background 0.18s ease;
}
.uw-nav__mega-head { display: flex; align-items: center; gap: 8px; }
.uw-nav__mega-title {
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: 28px;
	line-height: 1;
	color: var(--wp--preset--color--deep-navy);
}
.uw-nav__mega-arrow {
	display: inline-flex;
	width: 18px;
	height: 18px;
	color: var(--wp--preset--color--red);
	opacity: 0;
	transition: opacity 0.18s ease;
}
.uw-nav__mega-arrow svg { width: 18px; height: 18px; display: block; }
.uw-nav__mega-desc {
	font-family: var(--wp--preset--font-family--pp-mori);
	font-size: 17px;
	line-height: 1.4;
	color: color-mix(in srgb, var(--wp--preset--color--deep-navy) 70%, transparent);
}
/* Desktop mega menu only: at most two lines, longer descriptions end in an
   ellipsis. The mobile menu (900px and below) shows the full description. The
   field itself has no length limit, so the full text stays saved. */
@media (min-width: 901px) {
	.uw-nav__mega-desc {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		overflow: hidden;
	}
}
.uw-nav__mega-link:hover,
.uw-nav__mega-link:focus-visible,
.uw-nav__mega-item.is-current .uw-nav__mega-link {
	background: var(--wp--preset--color--parchment);
}
.uw-nav__mega-link:hover .uw-nav__mega-arrow,
.uw-nav__mega-link:focus-visible .uw-nav__mega-arrow,
.uw-nav__mega-item.is-current .uw-nav__mega-arrow { opacity: 1; }

/* Vertical divider between the featured card and the link columns. */
.uw-nav__mega-divider {
	flex: 0 0 1px;
	align-self: stretch;
	background: color-mix(in srgb, var(--wp--preset--color--deep-navy) 10%, transparent);
}

/* Featured card stack: parent card is the default; child cards swap in on hover
   (toggled by site-nav.js). Cards are stacked absolutely so the column height
   is driven by the link columns alongside. */
.uw-nav__feature-stack {
	flex: 0 0 370px;
	position: relative;
	align-self: stretch;
	min-height: 280px;
}
/* Featured card: image on top, cobalt body below. */
.uw-nav__feature { 
	inset: 0;
	display: flex;
	flex-direction: column;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease;
}
.uw-nav__feature.is-active {
	opacity: 1;
	visibility: visible;
}
/* No link set on this feature (see class-unitedway-nav-walker.php): fixed
   height instead of stretching to fill the stack, same 12px corners. */
.uw-nav__feature--no-link {
	height: 360px;
}
.uw-nav__feature-media { display: block; height: 190px; flex: none; }
/* Image-only card (no title/link, so no .uw-nav__feature-body sibling):
   let the image fill the full card instead of the fixed 190px media strip. */
.uw-nav__feature-media:only-child { height: 100%; flex: 1; }
.uw-nav__feature-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uw-nav__feature-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 20px;
	padding: 24px;
	background: var(--wp--preset--color--cobalt-blue);
	color: var(--wp--preset--color--white);
}
.uw-nav__feature-title { font-family: var(--wp--preset--font-family--marr-sans-cond); font-weight: 500; font-size: 24px; line-height: 1.2; }
/* Animated underline via shared pseudo-element pattern in custom-styles.css. */
.uw-nav__feature-link {
	align-self: flex-start;
	font-family: var(--wp--preset--font-family--test-national-2-condensed);
	font-weight: 500;
	font-size: 20px;
	line-height: 1;
	color: var(--wp--preset--color--white);
}

/* Desktop: dropdown panel on hover / keyboard focus */
@media (min-width: 901px) {
	.uw-nav__mega {
		position: absolute;
		left: 0;
		right: 0;
		top: 100%;
		z-index: 1;
		background: var(--wp--preset--color--white);
		border-radius: 0 0 16px 16px;
		box-shadow: 0 44px 48px color-mix(in srgb, var(--wp--preset--color--deep-navy) 18%, transparent);
	}
	/* Hover bridge: invisible strip covering the gap between the trigger pill and
	   the panel, so the submenu stays open while the cursor travels down to it.
	   The panel is a descendant of .uw-nav__item--mega, so hovering the bridge
	   keeps :hover on the item. Gap measured at ~10px; 28px gives ample buffer. */
	.uw-nav__mega::before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: -40px;
		height: 56px;
	}
			/* Menu links sit above the mega panels (and their hover bridge) so an
		   open panel never intercepts a sibling link — the bridge otherwise
		   overlaps the bar when the nav is scrolled and the gap shrinks. */
		.uw-nav__menu-list .uw-nav__link { position: relative; z-index: 2; }
		.uw-nav__item--mega:hover .uw-nav__mega,
	.uw-nav__item--mega:focus-within .uw-nav__mega { display: block; }
	.uw-nav__mega-inner {
		max-width: 1620px;
		margin: 0 auto;
		display: flex;
		align-items: stretch;
		gap: 40px;
		padding: 40px clamp(24px, 4.94vw, 80px);
		position: relative;
	}
	/*
	 * Link columns (Figma 1664-24432): two reserved columns, filled 3 items at a
	 * time DOWN the first column before the 4th wraps to the second — a fill, not
	 * a balance. CSS `columns: 2` would balance (3 items -> 2+1); a grid with a
	 * fixed 3 rows + column auto-flow gives the exact fill. 1-3 items leave the
	 * right column empty (reserved) as the design shows; 27px column gap, 12px
	 * row gap, each column ~467px at the Figma inner width.
	 */
	.uw-nav__mega-list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: repeat(3, auto);
		grid-auto-flow: column;
		align-content: start;
		column-gap: 27px;
		row-gap: 12px;
	}

	.uw-nav__mega-inner::before {
		content: "";
		position: absolute;
		top: 8px; 
		left: 50%;
		transform: translateX(-50%);
		width: 100%;
		max-width: 1460px;
		height: 1px;
		background: color-mix(in srgb, var(--wp--preset--color--deep-navy) 10%, transparent);
	}
 
	.uw-nav:has(.uw-nav__item.uw-nav__item--mega:hover),
	.uw-nav:has(.uw-nav__item.uw-nav__item--mega:focus-within) {
		background: var(--wp--preset--color--white);
	}

	.uw-nav:has(.uw-nav__item.uw-nav__item--mega:hover) .uw-nav__menu-list,
	.uw-nav:has(.uw-nav__item.uw-nav__item--mega:focus-within) .uw-nav__menu-list {
		background: #F7F6F3;
		backdrop-filter: none;
	}

	.uw-nav:has(.uw-nav__item.uw-nav__item--mega:hover) .uw-nav__link,
	.uw-nav:has(.uw-nav__item.uw-nav__item--mega:focus-within) .uw-nav__link {
		color: color-mix(in srgb, var(--wp--preset--color--deep-navy) 60%, transparent);
	}

	.uw-nav .uw-nav__item.uw-nav__item--mega:hover .uw-nav__link,
	.uw-nav .uw-nav__item.uw-nav__item--mega:focus-within .uw-nav__link {
		color: var(--wp--preset--color--deep-navy);
	}

	/* Header background turns white on mega hover (above); on the dark theme
	   the main logo is the light variant, so swap to the dark logo variant
	   (already in the DOM as .uw-nav__logo-alt) to keep it visible. The
	   light theme's main logo is already dark and has no alt to swap to. */
	.uw-nav--dark:has(.uw-nav__item.uw-nav__item--mega:hover) .uw-nav__logo-img:not(.uw-nav__logo-alt),
	.uw-nav--dark:has(.uw-nav__item.uw-nav__item--mega:focus-within) .uw-nav__logo-img:not(.uw-nav__logo-alt) {
		display: none;
	}
	.uw-nav--dark:has(.uw-nav__item.uw-nav__item--mega:hover) .uw-nav__logo-alt,
	.uw-nav--dark:has(.uw-nav__item.uw-nav__item--mega:focus-within) .uw-nav__logo-alt {
		display: block;
	}
}

/* Mobile: drill-down sub-view */
@media (max-width: 900px) {
	.uw-nav__mega-back {
		display: inline-flex;
		align-items: center;
		gap: 0.4rem;
		margin-bottom: 0.5rem;
		padding: 0.5rem 0;
		border: 0;
		background: none;
		color: inherit;
		font-family: var(--wp--preset--font-family--pp-mori);
		font-weight: 600;
		font-size: 15px;
		cursor: pointer;
	}
	.uw-nav__mega-back::before { content: "‹"; font-size: 1.3em; line-height: 1; }
	.uw-nav__item--mega.is-open .uw-nav__mega {
		display: block;
		position: static;
		background: transparent;
		box-shadow: none;
		border-radius: 0;
	}
	.uw-nav__mega-inner { display: flex; flex-direction: column; gap: 1.5rem; padding: 0; }
	.uw-nav__mega-divider { display: none; }
	.uw-nav__mega-item { margin-bottom: 4px; }
	.uw-nav__mega-link { padding: 16px; border-radius: 12px; }
	.uw-nav__mega-link:hover { background: transparent; }
	.uw-nav__mega-item.is-current .uw-nav__mega-link { background: var(--wp--preset--color--parchment); }
	/* Mobile: static stack, show only the default card (no hover swap). */
	.uw-nav__feature-stack { position: static; min-height: 0; flex-basis: auto; width: 100%; order: 3; }
	.uw-nav__feature { position: static; opacity: 1; visibility: visible; }
	.uw-nav__feature:not(.is-active) { display: none; }
	.uw-nav__mega-back { color: var(--wp--preset--color--deep-navy); }
	.uw-nav__mega-title { color: var(--wp--preset--color--deep-navy); font-size: 22px; }
	.uw-nav__mega-desc { color: color-mix(in srgb, var(--wp--preset--color--deep-navy) 70%, transparent); font-size: 15px; }
	.uw-nav.has-submenu-open .uw-nav__menu-list > .uw-nav__item:not(.is-open) { display: none; }
	.uw-nav.has-submenu-open .uw-nav__item--mega.is-open > .uw-nav__link { display: none; }
	.uw-nav.has-submenu-open .uw-nav__actions { display: none; }
	.uw-nav.has-submenu-open .uw-nav__watermark { display: none; }
	.uw-nav.is-open .uw-nav__item--mega.is-open { border-bottom: 0; }
	.uw-nav__menu { width: 100%; }
	.uw-nav.is-scrolled.is-open .uw-nav__inner { border-radius: 0; }
}

/* ──────────────────────────────────────────────────────────────────────────
   Full-screen search overlay
   ────────────────────────────────────────────────────────────────────────── */
.uw-nav__search-overlay {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: none;
	flex-direction: column;
	background: color-mix(in srgb, var(--wp--preset--color--deep-navy) 50%, transparent);
}
.uw-nav__search-overlay.is-open { display: flex; }
.uw-nav__search-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px clamp(24px, 4.94vw, 80px);
	background: var(--wp--preset--color--porcelain);
}
.uw-nav__search-top .uw-nav__logo-img { height: 48px; width: auto; }
.uw-nav__search-logo .uw-nav__logo-text {
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: 20px;
	color: var(--wp--preset--color--deep-navy);
}
.uw-nav__search-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	background: color-mix(in srgb, var(--wp--preset--color--deep-navy) 8%, transparent);
	color: var(--wp--preset--color--deep-navy);
}
.uw-nav__search-close svg { width: 22px; height: 22px; }
.uw-nav__search-form {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 25px clamp(24px, 4.94vw, 80px) 1.5rem;
	background: var(--wp--preset--color--porcelain);
}
.uw-nav__search-form-inner {
	position: relative;
	width: 100%;
    display: flex;
}
.uw-nav__search-input {
	flex: 1;
	padding: 0.5rem 0;
	border: 0;
	border-bottom: 2px solid var(--wp--preset--color--deep-navy);
	background: transparent;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: clamp(22px, 4vw, 48px);
	color: #1a1a1a;
}
/* 65% mix over the porcelain form background clears WCAG 4.5:1 for placeholder text. */
.uw-nav__search-input::placeholder { color: color-mix(in srgb, #1a1a1a 65%, transparent); }
.uw-nav__search-input:focus { outline: none; color: #1a1a1a; }
.uw-nav__search-submit { display: inline-flex; border: 0; background: none; cursor: pointer; color: var(--wp--preset--color--deep-navy); position: absolute; top: 20px; right: 0;}
.uw-nav__search-submit svg { width: 28px; height: 28px; }
/* Chrome/Safari/Edge draw their own "clear" (x) icon inside type="search"
   inputs once text is entered, in the same right-edge spot as our submit
   icon, so the two visibly collide. :placeholder-shown is only true while
   the input is empty (before the native clear icon exists), so hiding our
   icon on :not(:placeholder-shown) leaves exactly one icon visible at a
   time — ours when empty, the browser's native clear icon once typed. */
.uw-nav__search-input:not(:placeholder-shown) ~ .uw-nav__search-submit { display: none; }

