/**
 * Header/nav — utility bar + main nav, exact spec ported from the
 * client-supplied reference build. Split out of hero-exact.css because
 * this half renders on every page (header.html) while the other half
 * (hero, impact bar) only exists on the front page — keeping them
 * together meant every non-homepage page downloaded hero-only CSS it
 * never used.
 */
.utility-bar { height: 31px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: rgba(24,24,24,.98); font-size: 12px; font-weight: 800; }
.utility-bar .utility-left { display: flex; align-items: center; gap: 14px; }
.utility-bar a { color: inherit; text-decoration: none; }
.utility-bar a:hover { opacity: .72; }
.utility-bar .dot { opacity: .85; }
.utility-bar .utility-item { display: inline-flex; align-items: center; gap: 6px; }
/* About / The YPS Agenda / Get in Touch + the social icons used to
   sit partly on a fixed 71%/29% gradient split of the whole bar — a
   percentage independent of where the content actually falls, so at
   some widths it sliced through a word instead of landing cleanly on
   yellow. This hugs the real content instead, so the whole cluster is
   yellow on every screen by construction rather than by percentage
   luck. */
.utility-bar .social-links { display: flex; align-items: center; gap: 14px; height: 100%; margin-right: -16px; padding: 0 16px; background: #FDA903; color: #282828; }
.utility-bar .social-links a { color: #282828; }
.utility-bar .utility-social { display: inline-flex; align-items: center; gap: 8px; }
/* Real brand colors on each icon (not the generic white/currentColor
   badge before) — a near-solid white circle so each color reads
   clearly rather than washing out against the dark utility bar. */
.utility-bar .utility-social a { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: rgba(255,255,255,.92); opacity: 1; transition: transform .2s ease, box-shadow .2s ease; }
.utility-bar .utility-social a:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.utility-bar .utility-social__icon--facebook { color: #1877F2; }
.utility-bar .utility-social__icon--x { color: #000000; }
.utility-bar .utility-social__icon--linkedin { color: #0A66C2; }

/* Sticky lives on the outer <header> template-part wrapper, not on
   .main-nav itself — .main-nav's own parent (.site-shell-header) is
   barely taller than .main-nav, so position:sticky there has almost no
   room to travel before its tiny parent scrolls away with it. <header>'s
   parent is .wp-site-blocks, which spans the whole page, giving the
   sticky effect somewhere to actually stay stuck.
   top is negative, equal to .utility-bar's own height (31px) — only
   .main-nav should stay pinned, not the info/social utility bar above
   it. Once scrolled, the header sticks with its top edge 31px above
   the viewport, which tucks the utility bar out of view above the top
   edge while .main-nav (starting 31px into the box) lands exactly at
   the viewport's top and stays there. */
header.wp-block-template-part { position: sticky; top: -31px; z-index: 50; }
.main-nav { height: 72px; display: flex; align-items: center; background: #fff; border-bottom: 1px solid #ececed; box-shadow: 0 4px 16px rgba(40,40,40,.06); }
.main-nav .brand { width: 262px; height: 72px; display: flex; align-items: center; gap: 13px; padding-left: 17px; color: #fff; background: #31A1FF; text-decoration: none; }
.main-nav .brand--logo { width: auto; min-width: 200px; padding-left: 20px; background: none; }
.main-nav .brand--logo figure { margin: 0; }
.main-nav .brand--logo img { height: 60px; width: auto; display: block; }
.main-nav .brand-mark { width: 32px; height: 31px; position: relative; display: block; }
.main-nav .brand-mark i { position: absolute; top: 2px; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.main-nav .brand-mark i:nth-child(1) { left: 1px; } .main-nav .brand-mark i:nth-child(2) { left: 12px; } .main-nav .brand-mark i:nth-child(3) { left: 23px; }
.main-nav .brand-mark b { position: absolute; bottom: 1px; left: 2px; width: 27px; height: 19px; border: 7px solid #fff; border-top: 0; clip-path: polygon(0 0,50% 70%,100% 0,100% 100%,0 100%); }
.main-nav .brand strong { display: block; font-size: 16px; letter-spacing: .4px; line-height: 1; }
.main-nav .brand small { display: block; margin-top: 8px; font-size: 9px; letter-spacing: 2px; font-weight: 800; }
.main-nav .primary-nav { flex: 1; display: flex; justify-content: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.main-nav .primary-nav li { display: flex; align-items: center; }
/* Donate + Call Us duplicated as plain <li>s at the end of the nav
   list so they can appear inside the mobile dropdown itself — on
   desktop the real .main-nav__cta bar already shows them, so these
   stay hidden until the ≤700px breakpoint below. */
.main-nav .primary-nav li.primary-nav__mobile-extra { display: none; }
/* A visible hover chip (not just a color change) on every top-level
   link — Home/Blog/Contact included — so hovering anywhere in the bar
   reads unambiguously as "this is clickable", not just a subtle
   recolor easy to miss. */
.main-nav .primary-nav a { position: relative; display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-radius: 999px; font-size: 14px; font-weight: 800; text-decoration: none; color: inherit; transition: color .2s ease, background .2s ease; }
.main-nav .primary-nav a:hover { color: #31A1FF; background: rgba(49,161,255,.08); }
/* Current page — filled active state plus a small dot beneath it, same
   visual language as .section-label's dot elsewhere on the site. When
   the open page is a dropdown's child (e.g. /agenda/ under About),
   the parent trigger gets marked active too, not just the child link
   inside the panel. */
.main-nav .primary-nav a.is-active { color: #31A1FF; background: rgba(49,161,255,.08); }
.main-nav .primary-nav a.is-active::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 1px;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #31A1FF;
	transform: translateX(-50%);
}

/* Dropdown submenus (Get Involved > Events; Resources > Agenda, Gallery).
   The caret is a real <button>, separate from the link text — clicking
   or tapping it opens/pins the submenu (assets/js/nav-toggle.js toggles
   .is-open + aria-expanded), so reaching a submenu item is a deliberate
   two-step click (open, then pick) instead of a hover-timing gamble
   that closes if the pointer strays off the link on the way down.
   Hover/focus-within are kept too as a bonus fast-path for mouse users
   who hover the whole item, but they're no longer the only way in. */
.main-nav .primary-nav li.has-submenu { position: relative; }
.main-nav .primary-nav .submenu-toggle {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	margin: 0 -6px 0 -2px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: background .15s ease;
}
.main-nav .primary-nav .submenu-toggle:hover,
.main-nav .primary-nav .submenu-toggle:focus-visible {
	background: rgba(49,161,255,.1);
	color: #31A1FF;
}
.main-nav .primary-nav .submenu-caret { width: 12px; height: 12px; flex: none; transition: transform .2s ease; }
.main-nav .primary-nav li.has-submenu:hover .submenu-caret,
.main-nav .primary-nav li.has-submenu:focus-within .submenu-caret,
.main-nav .primary-nav .submenu-toggle[aria-expanded="true"] .submenu-caret { transform: rotate(180deg); }
.main-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 60;
	min-width: 200px;
	margin: 0;
	padding: 10px;
	list-style: none;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 40px rgba(40,40,40,.14);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.main-nav .primary-nav li.has-submenu:hover > .sub-menu,
.main-nav .primary-nav li.has-submenu:focus-within > .sub-menu,
.main-nav .primary-nav li.has-submenu.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.main-nav .sub-menu li { padding: 0; }
.main-nav .sub-menu a {
	display: block;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	color: #282828;
	white-space: nowrap;
}
.main-nav .sub-menu a:hover { background: rgba(49,161,255,.08); color: #31A1FF; }
.main-nav .sub-menu a.is-active { background: rgba(49,161,255,.08); color: #31A1FF; }
/* The parent page's own link, listed first inside its own dropdown
   (e.g. "About Overview" above Team/Agenda) — set apart with a
   divider so it still reads as "the section itself" rather than a
   third sibling page. */
.main-nav .sub-menu a.sub-menu__self {
	margin-bottom: 6px;
	padding-bottom: 10px;
	border-bottom: 1px solid #ececed;
	color: #505260;
	font-weight: 800;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: .04em;
}
.main-nav__cta { height: 72px; display: flex; align-items: center; gap: 20px; padding: 0 24px 0 28px; background: #FDA903; align-self: stretch; }
.main-nav__cta .btn--rect {
	--btn-shadow: none;
}
.main-nav__cta a.btn--rect { padding: 11px 22px; }
.main-nav .call-us { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #282828; white-space: nowrap; }
.main-nav .phone-icon { display: grid; place-items: center; width: 30px; height: 32px; font-size: 32px; font-weight: 800; line-height: .5; transform: rotate(-45deg); color: #282828; }
.main-nav .call-us small, .main-nav .call-us strong { display: block; }
.main-nav .call-us small { color: rgba(40,40,40,.65); font-size: 12px; font-weight: 800; }
.main-nav .call-us strong { margin-top: 4px; font-size: 13px; }
.main-nav .menu-toggle { display: none; margin-left: auto; margin-right: 18px; border: 0; background: transparent; cursor: pointer; }
.main-nav .menu-toggle span { display: block; width: 24px; height: 2px; margin: 5px; background: #222; }

/* The full desktop nav (34px gaps, 14px links, Call Us block shown)
   needs roughly 1120px+ to actually fit — this used to compact at
   900px, leaving a dead zone from ~901-1120px (1024px laptops land
   right in it) where nothing shrank: "Get Involved" wrapped onto two
   lines and "Contact" visually overflowed into the CTA panel's
   background. Raising the breakpoint closes that gap. */
@media (max-width: 1180px) {
	.main-nav .brand { width: 200px; min-width: 0; }
	.main-nav .primary-nav { gap: 12px; }
	.main-nav .primary-nav a { font-size: 13px; white-space: nowrap; }
	.main-nav__cta { padding: 0 16px; gap: 12px; }
	.main-nav__cta a.btn--rect { padding: 9px 16px; }
	.main-nav .call-us { display: none; }
}
@media (max-width: 700px) {
	.utility-bar { background: #222; }
	.utility-bar .social-links { display: none; }
	.main-nav { height: 64px; }
	.main-nav .brand { width: 218px; height: 64px; }
	.main-nav .brand strong { font-size: 14px; }
	.main-nav .brand small { font-size: 8px; }
	.main-nav .brand--logo { width: auto; min-width: 0; height: 64px; }
	.main-nav .brand--logo img { height: 44px; }
	.main-nav .primary-nav { position: absolute; top: 64px; left: 0; right: 0; max-height: calc(100vh - 64px); overflow-y: auto; display: none; flex-direction: column; padding: 15px 22px; background: #fff; box-shadow: 0 8px 15px rgba(0,0,0,.08); }
	.main-nav.nav-open .primary-nav { display: flex; gap: 18px; }
	.main-nav__cta { display: none; }
	.main-nav .menu-toggle { display: block; }

	/* Donate + Call Us — hidden with the rest of .main-nav__cta above,
	   so they need their own place inside the mobile dropdown instead
	   of disappearing on mobile entirely. */
	.main-nav .primary-nav li.primary-nav__mobile-extra { display: block; margin-top: 4px; padding-top: 18px; border-top: 1px solid #ececed; }
	.main-nav .primary-nav__mobile-extra + .primary-nav__mobile-extra { margin-top: 14px; padding-top: 0; border-top: 0; }
	.main-nav .primary-nav__mobile-extra a.btn--rect { width: 100%; }
	.main-nav .primary-nav__mobile-extra .call-us { padding: 12px 14px; border-radius: 12px; background: rgba(253,169,3,.12); }

	/* Submenus render inline/always-open here — no separate mobile
	   accordion JS, they're just nested links under their parent. The
	   toggle button only exists to open the desktop hover/click
	   dropdown, so it's redundant (and would be an inert extra tap
	   target) once the submenu is already always visible below. */
	.main-nav .primary-nav li.has-submenu { flex-direction: column; align-items: flex-start; }
	.main-nav .primary-nav .submenu-toggle { display: none; }
	.main-nav .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		padding: 4px 0 0 16px;
		margin-top: 10px;
		display: flex;
		flex-direction: column;
		gap: 10px;
	}
	.main-nav .sub-menu a { padding: 0; font-size: 13px; }
	.main-nav .sub-menu a:hover { background: none; }
}
