/* =============================================================
   TOP UTILITY BAR
   ============================================================= */
.utility {
	background: var(--wba-dark);
	color: var(--wba-white);
	padding: 11px var(--gutter-d);
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: lowercase;
}
.utility__left { display: flex; align-items: center; gap: 18px; }
.utility__connect {
	color: rgba(255,255,255,0.6);
	font-style: italic;
	text-transform: none;
	letter-spacing: 0.04em;
}
.utility__socials { display: flex; gap: 10px; }
.utility__socials a {
	color: rgba(255,255,255,0.7);
	text-decoration: none;
	transition: color 0.2s, border-color 0.2s;
	width: 22px; height: 22px;
	border: 1px solid rgba(255,255,255,0.25);
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.65rem;
}
.utility__socials a:hover { color: var(--wba-orange); border-color: var(--wba-orange); }
.utility__right { display: flex; gap: 22px; }
.utility__right a {
	color: rgba(255,255,255,0.85);
	text-decoration: none;
}
.utility__right a:hover { color: var(--wba-orange); }

/* =============================================================
   STICKY NAV
   ============================================================= */
.nav {
	background: var(--wba-white);
	padding: 18px var(--gutter-d);
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--wba-border);
	position: sticky;
	top: 0;
	z-index: 50;
}
.nav__logo {
	font-weight: 900;
	letter-spacing: -0.005em;
	text-decoration: none;
	color: var(--wba-dark);
	display: flex;
	align-items: center;
	gap: 14px;
}
.nav__logo-img {
	height: 60px;
	width: auto;
	max-width: 280px;
	object-fit: contain;
	display: block;
	flex-shrink: 0;
}
.nav__logo-text {
	display: flex; flex-direction: column; line-height: 1.1;
}
.nav__logo-text small {
	font-size: 0.6rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wba-muted);
}

/* =============================================================
   PRIMARY NAV LINKS
   ============================================================= */
.nav__menu { /* container */ }
.nav__links {
	display: flex; gap: 22px;
	list-style: none; margin: 0; padding: 0;
}
.nav__links > li { position: relative; }
.nav__links > li > a {
	color: var(--wba-dark);
	text-decoration: none;
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: lowercase;
	transition: color 0.2s;
	padding: 8px 0;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}
.nav__links > li > a:hover,
.nav__links > li > a:focus-visible { color: var(--wba-red); }

/* Dropdown caret on parent items */
.nav__links > li.menu-item-has-children > a::after,
.nav__links > li.has-submenu > a::after {
	content: "";
	display: inline-block;
	width: 0; height: 0;
	margin-left: 4px;
	border: 4px solid transparent;
	border-top-color: currentColor;
	transform: translateY(2px);
	transition: transform 0.2s;
}
.nav__links > li.menu-item-has-children:hover > a::after,
.nav__links > li.menu-item-has-children:focus-within > a::after,
.nav__links > li.has-submenu:hover > a::after,
.nav__links > li.has-submenu:focus-within > a::after {
	transform: translateY(2px) rotate(180deg);
}

/* =============================================================
   DROPDOWN PANELS
   ============================================================= */
.submenu, .sub-menu {
	position: absolute;
	top: 100%;
	left: -16px;
	min-width: 240px;
	background: var(--wba-white);
	border: 1px solid var(--wba-border);
	border-top: 2px solid var(--wba-red);
	list-style: none;
	margin: 0;
	padding: 12px 0;
	z-index: 100;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
	box-shadow: 0 14px 32px rgba(26,26,26,0.10);
}
.menu-item-has-children:hover > .submenu,
.menu-item-has-children:hover > .sub-menu,
.has-submenu:hover > .submenu,
.has-submenu:hover > .sub-menu,
.menu-item-has-children:focus-within > .submenu,
.menu-item-has-children:focus-within > .sub-menu,
.has-submenu:focus-within > .submenu,
.has-submenu:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}
.submenu li, .sub-menu li { padding: 0; position: relative; }
.submenu a, .sub-menu a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 22px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: lowercase;
	color: var(--wba-dark);
	text-decoration: none;
	transition: background 0.15s, color 0.15s, padding-left 0.15s;
	white-space: nowrap;
}
.submenu .menu-item-has-children > a::after,
.submenu .has-submenu > a::after,
.sub-menu .menu-item-has-children > a::after,
.sub-menu .has-submenu > a::after {
	content: "→";
	font-weight: 400;
	color: var(--wba-muted);
	font-size: 0.85rem;
	transition: transform 0.2s, color 0.2s;
}
.submenu a:hover,
.sub-menu a:hover {
	background: var(--wba-cream);
	color: var(--wba-red);
	padding-left: 28px;
}
.submenu .menu-item-has-children:hover > a::after,
.submenu .has-submenu:hover > a::after,
.sub-menu .menu-item-has-children:hover > a::after,
.sub-menu .has-submenu:hover > a::after {
	color: var(--wba-red);
	transform: translateX(3px);
}

/* Side flyout for nested submenus (depth >= 2) */
.submenu .submenu, .submenu .sub-menu,
.sub-menu .submenu, .sub-menu .sub-menu,
.submenu--flyout {
	top: -12px;
	left: 100%;
	margin-left: 0;
	border-top: 1px solid var(--wba-border);
	border-left: 2px solid var(--wba-red);
}

/* =============================================================
   RIGHT-EDGE DROPDOWN FLIP  (NEW)
   --------------------------------------------------------------
   When a top-level menu item sits in the right half of the nav,
   its first-level dropdown opens RIGHT-ALIGNED to the parent
   instead of left-anchored, so it can never overflow the
   viewport's right edge. Targets the last 5 of 9 menu items
   (warriors-representative, coaches, officials, shop, news,
   contact — whichever have submenus).
   ============================================================= */
.nav__links > li:nth-last-child(-n+5) > .submenu,
.nav__links > li:nth-last-child(-n+5) > .sub-menu {
	left: auto;
	right: -16px;
}

/* Within those right-anchored dropdowns, sub-flyouts must open
   LEFTWARD (right: 100% of parent) so they don't shoot past the
   viewport on the other side. */
.nav__links > li:nth-last-child(-n+5) > .submenu .submenu,
.nav__links > li:nth-last-child(-n+5) > .submenu .sub-menu,
.nav__links > li:nth-last-child(-n+5) > .sub-menu .submenu,
.nav__links > li:nth-last-child(-n+5) > .sub-menu .sub-menu {
	left: auto;
	right: 100%;
	border-left: 0;
	border-right: 2px solid var(--wba-red);
}

/* =============================================================
   MOBILE NAV TOGGLE + DRAWER
   ============================================================= */
.nav__toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--wba-border);
	padding: 10px 14px;
	font-family: inherit;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: lowercase;
	color: var(--wba-dark);
	cursor: pointer;
	gap: 8px;
	align-items: center;
}
.nav__toggle:hover { background: var(--wba-cream); }

.mobile-drawer {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 200;
	background: var(--wba-white);
	overflow-y: auto;
	padding: 80px 24px 40px;
}
.mobile-drawer.is-open {
	display: block;
}

/* Empty-state guard: if the drawer opens with no content (e.g. main.js
   hasn't cloned the menu in yet), at least show a clear placeholder
   instead of an unexplained white panel. */
.mobile-drawer:empty::before,
.mobile-drawer__inner:empty::before {
	content: 'Menu loading…';
	display: block;
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: lowercase;
	color: var(--wba-muted);
	padding: 24px 0;
	text-align: center;
}

.mobile-drawer__inner ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.mobile-drawer__inner li { border-bottom: 1px solid var(--wba-border); }
.mobile-drawer__inner a {
	display: block;
	padding: 18px 4px;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: lowercase;
	color: var(--wba-dark);
	text-decoration: none;
}
.mobile-drawer__inner a:hover { color: var(--wba-red); }
.mobile-drawer__inner .submenu,
.mobile-drawer__inner .sub-menu {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	box-shadow: none;
	border: 0;
	background: var(--wba-cream);
	padding: 0 0 0 16px;
	min-width: 0;
}
.mobile-drawer__inner .submenu a,
.mobile-drawer__inner .sub-menu a {
	padding: 12px 4px;
	font-size: 0.9rem;
	font-weight: 500;
}

/* Close button inside drawer (added by main.js fallback if not present in markup) */
.mobile-drawer__close {
	position: absolute;
	top: 22px;
	right: 22px;
	background: transparent;
	border: 0;
	padding: 8px 12px;
	font-family: 'Montserrat', sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: lowercase;
	color: var(--wba-dark);
	cursor: pointer;
}
.mobile-drawer__close:hover { color: var(--wba-red); }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1180px) {
	.nav__links { display: none; }
	.nav__toggle { display: inline-flex; }
	.nav { padding: 14px var(--gutter-m); }
}
@media (max-width: 980px) {
	.utility { padding: 12px var(--gutter-m); }
	.utility__connect { display: none; }
}

/* =============================================================
   MOBILE DRAWER — content visibility fix
   The drawer's inner .nav__links is hidden by the same rule
   that hides the desktop nav on mobile. Override it here.
   ============================================================= */
@media (max-width: 1180px) {

	/* Show nav content inside the open drawer */
	.mobile-drawer .nav__links {
		display: flex !important;
		flex-direction: column !important;
		gap: 0 !important;
	}

	/* Safari: ensure toggle button taps register */
	.nav__toggle {
		cursor: pointer;
		touch-action: manipulation;
		-webkit-tap-highlight-color: transparent;
		position: relative;
		z-index: 51;
	}
}

/* Body scroll lock when drawer is open (iOS-safe) */
body.nav-open {
	overflow: hidden;
	position: fixed;
	width: 100%;
}
