/*
 * ASTA Primary Menu — presentational styles.
 *
 * Mobile-first. Single desktop breakpoint at --asta-breakpoint (default
 * 1100px). All colors come from CSS custom properties emitted inline by
 * the renderer; fluid phone sizing via clamp(); zero !important except
 * where Elementor's own reset demands it (marked inline).
 */

/* ───────── Elementor wrapper normalisation ─────────
 * Force the asta_site_header Elementor widget to fill its container
 * row-width, regardless of whether the container happens to be
 * boxed vs full-width. Prevents the 8-items-wrapping-vertically case
 * we saw when e-con-boxed capped the content area too narrow. */

.elementor-widget-asta_site_header,
.elementor-widget-asta_site_header > .elementor-widget-container {
	width: 100%;
	max-width: none;
	padding: 0;
	margin: 0;
}

/*
 * Break out of every Elementor/theme wrapper so the header spans the
 * full viewport width on mobile/tablet (prev: visible black strips on
 * left/right edges below the header because the outer
 * `<header class="elementor-location-header">` had padding/constraint
 * from Elementor's theme-builder CSS that my :has() rule didn't reach).
 * `margin: 0 calc(50% - 50vw)` pushes the element outward by half the
 * viewport minus half its containing block, guaranteeing it touches
 * the viewport edges regardless of parent padding.
 */
header.elementor-location-header:has(.elementor-widget-asta_site_header) {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding: 0;
}

/* Also neutralise column-width caps + default padding on any parent
 * container rendering this widget — the migrator sets layout:full_width,
 * but older theme builder versions still emit `e-con-boxed` with its
 * own horizontal padding (visible as gaps at the viewport edges on
 * mobile/tablet). Force flush-to-edge. */
.elementor-element:has(> .e-con-inner > .elementor-widget-asta_site_header),
.e-con:has(> .e-con-inner > .elementor-widget-asta_site_header) {
	--width: 100%;
	--content-width: 100%;
	width: 100%;
	max-width: none;
	padding: 0;
	margin: 0;
}
.elementor-element:has(> .e-con-inner > .elementor-widget-asta_site_header) > .e-con-inner,
.e-con:has(> .e-con-inner > .elementor-widget-asta_site_header) > .e-con-inner {
	max-width: none;
	width: 100%;
	padding: 0;
	margin: 0;
}

/* ───────── Reset scoped to the header so we don't leak anywhere ───────── */

#asta-site-header,
#asta-site-header *,
.asta-mobile-drawer,
.asta-mobile-drawer * {
	box-sizing: border-box;
}

#asta-site-header ul,
.asta-mobile-drawer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

#asta-site-header a,
.asta-mobile-drawer a {
	color: inherit;
	text-decoration: none;
}

/*
 * Button reset — covers BOTH the header and the drawer. The drawer
 * is re-parented to <body> at runtime (to escape Elementor's fixed-
 * positioning containing blocks), so a selector scoped to
 * `#asta-site-header button` alone misses drawer buttons and they
 * pick up native browser chrome (blue focus fill, default padding).
 */
#asta-site-header button,
.asta-mobile-drawer button {
	font: inherit;
	color: inherit;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

/*
 * Suppress the browser-default focus outline on MOUSE/TOUCH clicks —
 * Chromium paints a blue ring on <button>/<a>/<input> when you click
 * them, which flashed over chevrons, the logo, the search icon, and
 * the phone button during navigation. Keyboard-induced focus still
 * gets our custom `:focus-visible` rings, so a11y isn't affected —
 * this targets only the click-based default outline.
 */
#asta-site-header a:focus:not(:focus-visible),
#asta-site-header button:focus:not(:focus-visible),
#asta-site-header input:focus:not(:focus-visible),
.asta-mobile-drawer a:focus:not(:focus-visible),
.asta-mobile-drawer button:focus:not(:focus-visible),
.asta-mobile-drawer input:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}

/* Same deal for <input> elements inside the drawer. */
.asta-mobile-drawer input {
	font: inherit;
	color: inherit;
	-webkit-appearance: none;
	appearance: none;
}

/* ───────── Header shell ───────── */

/*
 * Header bottom offset, exposed as a CSS variable so any element that
 * needs to sit flush below the fixed site header (Elementor sticky
 * sections, scroll-margin-top targets for in-page anchors, etc.) can
 * consume a single source of truth that tracks the layout's actual
 * header height across all breakpoints.
 *
 * Values mirror the layouts declared further down in this file:
 *   ≥1536px              wide single-row header                 72px
 *   1200px – 1535px      stacked two-row header (logo / nav)    132px
 *   <1200px              mobile/tablet (header hidden,
 *                        burger + minimal bar)                  64px
 *
 * .admin-bar adds 32px because WP's logged-in toolbar pushes the
 * header (and everything else) down by that amount.
 */
:root {
	--asta-header-bottom-offset: 72px;
}
@media (min-width: 1200px) and (max-width: 1535px) {
	:root {
		--asta-header-bottom-offset: 132px;
	}
}
@media (max-width: 1199px) {
	:root {
		--asta-header-bottom-offset: 64px;
	}
}
.admin-bar {
	--asta-header-bottom-offset: 104px; /* 72 header + 32 toolbar */
}
@media (min-width: 1200px) and (max-width: 1535px) {
	.admin-bar {
		--asta-header-bottom-offset: 164px; /* 132 header + 32 toolbar */
	}
}
@media (max-width: 1199px) {
	.admin-bar {
		--asta-header-bottom-offset: 110px; /* 64 header + 46 mobile toolbar */
	}
}

/*
 * Override Elementor's sticky-section `top` so the section sits flush
 * with the bottom of our fixed site header at every breakpoint —
 * regardless of the per-section sticky_offset values stored in the
 * Elementor editor (which are hardcoded pixel values that don't track
 * the dynamic header height).
 *
 * Targets:
 *   .elementor-sticky--effects  — class Elementor JS adds the moment
 *                                 sticky engages on a section
 *   .elementor-sticky--active   — same, used by some Elementor versions
 *
 * !important is required because Elementor sometimes writes an inline
 * style="top: <offset>px" onto the element from JS at runtime.
 */
.elementor-sticky--effects,
.elementor-sticky--active {
	top: var(--asta-header-bottom-offset, 72px) !important;
}

#asta-site-header {
	/* Normal z-index so WP's admin toolbar (z-index 99999) and its
	 * dropdown menus can paint above the site header for logged-in
	 * users. Only raised to the extreme max-int range while the
	 * mobile drawer is open (see `.asta-drawer-open` override below)
	 * so chat / cookie banner widgets can't cover the drawer. */
	z-index: 100;

	--asta-header-height: 72px;
	--asta-header-height-mobile: 64px;
	/* Generous horizontal inset on desktop so the logo breathes on
	 * the left and the phone CTA doesn't hug the right viewport edge.
	 * Mobile/tablet override this below with a tight 12px. */
	--asta-gutter: clamp(32px, 4.5vw, 104px);
	/* Inner flex gap between logo / nav / actions — matches the nav's
	 * per-item column-gap so the space between the last nav link and
	 * the actions cluster reads as just another inter-item gap. */
	--asta-gap: clamp(8px, .85vw, 22px);

	/*
	 * Font chain — Public Sans for all menu/header text, with Helvetica
	 * Neue / Helvetica / Arial as the fallback stack so layout stays
	 * consistent while the webfont is still loading (and on devices that
	 * block Google Fonts entirely).
	 */
	--asta-font-nav:   "Public Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--asta-font-body:  "Public Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--asta-font-phone: "Public Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

	position: relative;
	width: 100%;
	background: var(--asta-bg, #fff);
	color: var(--asta-text, #171717);
	border-bottom: 1px solid rgba(0, 0, 0, .06);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
	font-family: var(--asta-font-body);
	line-height: 1.3;
}

/* Fixed positioning guarantees the header always stays at the top
   of the viewport on every device, regardless of any ancestor having
   overflow:hidden/auto (which silently breaks position:sticky inside
   Elementor's nested container structure). JS adds matching
   padding-top to <body> to compensate for the removed flow space. */
#asta-site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 100;
}

/* Keep class-based aliases — harmless, ignored while fixed is set */
#asta-site-header.asta-site-header--sticky-mobile,
#asta-site-header.asta-site-header--sticky-desktop {
	position: fixed;
	top: 0;
}

/* ── WP Admin Toolbar offset ──────────────────────────────────────────
 * When a user is logged in to WP Admin, WordPress adds .admin-bar to
 * <html> and <body> AND injects `html.admin-bar { margin-top: 32px }`
 * (46px on narrow screens). Both the toolbar and our fixed header use
 * top: 0 in the viewport, causing them to overlap.
 *
 * Fix: push the fixed header below the toolbar using the same heights
 * WP uses. The JS body-offset function measures getBoundingClientRect()
 * .height (not .bottom), so it stays correct in both cases — the body
 * padding it sets equals the header height alone, and WP's own
 * html margin-top handles the admin-bar space above.
 *
 * Logged-in visitors who cannot see the toolbar are unaffected because
 * WP only adds .admin-bar when the toolbar is actually rendered.
 * ─────────────────────────────────────────────────────────────────── */
.admin-bar #asta-site-header {
	top: 32px; /* desktop toolbar height */
}

@media screen and (max-width: 782px) {
	.admin-bar #asta-site-header {
		top: 46px; /* mobile toolbar height — initial value;
		             JS overrides this dynamically because WP's
		             toolbar scrolls off-screen below 600px. */
	}
}

.asta-site-header__inner {
	display: flex;
	align-items: center;
	gap: var(--asta-gap);
	width: 100%;
	/* Full-viewport header so the logo sits flush left and the phone
	 * sits flush right — no 1440px max-width cap. The gutter supplies
	 * the only edge inset. */
	max-width: none;
	margin: 0;
	padding: 0 var(--asta-gutter);
	min-height: var(--asta-header-height-mobile);
}

@media (min-width: 1200px) {
	.asta-site-header__inner {
		min-height: var(--asta-header-height);
	}
}

/*
 * Stacked (two-row) desktop layout between 1200px and 1535px.
 *   Row 1: logo, centered
 *   Row 2: nav left-aligned (shrinks as needed) + search/phone right — ONE line
 * At ≥1536px we revert to the single-row flex layout (logo left, nav
 * centre-right, phone right). The 1536px threshold (down from 1800px
 * originally — a common laptop viewport breakpoint) is paired with:
 *
 *   - Tighter nav column-gap        (clamp 4–14px, was 6–18px)
 *   - Tighter root link padding     (10px 4px, was 10px 6px)
 *   - Logo allowed to shrink slightly via clamp at narrower widths
 *     (320–400px, was fixed 400px above 1200px)
 *   - Phone horizontal padding zeroed so the phone-text right edge
 *     sits at the same gutter distance as the logo's left edge
 *     (per webmaster spec — equal distance from each viewport edge)
 *
 * If the row gets crowded again (longer labels, more menu items, etc.)
 * raise this threshold back toward 1650–1800px or tighten further.
 *
 * Uses CSS grid instead of flex-wrap because `minmax(0, auto)` on the
 * nav column lets it shrink below content width without ever pushing
 * the actions cluster onto a third row — which is what flex-wrap kept
 * doing at the 1100–1158 end of the range.
 */
/*
 * NB: Every selector in this block is scoped under `#asta-site-header`
 * to bump specificity above the generic desktop rules defined later in
 * the file — without that bump the wider-viewport rules (padding 10px
 * 10px, font up to 17px) would override the tightened stacked values
 * and the nav would overflow its grid column into the actions area.
 */
@media (min-width: 1200px) and (max-width: 1535px) {
	/*
	 * Row 1 = logo centred. Row 2 = nav + search + phone, one line.
	 * CSS Grid is used so row 2 can NEVER wrap — grid rows are
	 * explicitly defined. minmax(0, auto) columns let both nav and
	 * actions shrink/grow to share the available width without
	 * flex-wrap pushing actions to a third row.
	 */
	#asta-site-header .asta-site-header__inner {
		display: grid;
		grid-template-columns: minmax(0, auto) minmax(0, auto);
		grid-template-rows: auto auto;
		grid-template-areas:
			"logo    logo"
			"nav     actions";
		justify-content: center;
		align-items: center;
		row-gap: 4px;
		column-gap: 14px;
		padding-top: .5rem;
		padding-bottom: .5rem;
	}

	#asta-site-header .asta-site-header__logo {
		grid-area: logo;
		justify-self: center;
		/* Explicitly reset margin-right — the global `.asta-site-header__logo`
		 * rule sets margin-right:auto (to push actions flush right on the
		 * wide single-row layout); that same auto-margin overrides
		 * justify-self:center here and would left-align the logo. */
		margin-right: 0;
	}

	#asta-site-header .asta-site-header__nav {
		grid-area: nav;
		justify-self: end;
		min-width: 0;
	}

	/* Nav link sizing tuned to the reference: 16px labels (per webmaster
	 * spec: minimum 16px on root nav across all desktop widths), tight
	 * padding and column-gap so all 8 labels fit on the same row as the
	 * Search + Phone cluster at every width in the range. */
	#asta-site-header .asta-site-header__nav > .asta-menu {
		justify-content: flex-end;
		column-gap: 4px;
	}
	#asta-site-header .asta-site-header__nav > .asta-menu > .asta-menu__item > .asta-menu__link {
		padding: 8px 8px;
		font-size: 16px;
		font-weight: 650;
		letter-spacing: 0;
	}

	#asta-site-header .asta-site-header__actions {
		grid-area: actions;
		justify-self: start;
		margin-left: 0;
		flex: 0 0 auto;
		gap: 10px;
	}

	/* Phone icon: shown alongside the number, sized via `width: 1em`
	 * (from the ≥1100px rule further down) so it matches the phone's
	 * font-size automatically at every width in this stacked range. */

	/* Phone stays the prominent CTA — bold red, fluid 17–20px so it
	 * reads as bigger than nav labels without crowding the row. */
	#asta-site-header .asta-site-header__phone {
		/* +10% larger and +100 weight over the previous stacked-layout
		 * tuning so the number reads as a stronger CTA at the wide end
		 * of the range, without pushing into wide-single-row territory. */
		font-size: clamp(17px, .4vw + 12px, 20px);
		font-weight: 700;
		padding: 4px 4px;
	}
}

/* ───────── Logo ───────── */

.asta-site-header__logo {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	max-width: clamp(200px, 32vw, 320px);
	overflow: hidden;
	/* Logo pinned left; auto margin consumes all remaining horizontal
	 * space so the nav + actions cluster sits together on the right,
	 * separated only by the inner column-gap (no big chasm between
	 * the nav and the search/phone). Stacked + mobile layouts override
	 * this (their own media blocks reset margin-right to 0 / auto). */
	margin-right: auto;
}

.asta-site-header__logo-img {
	display: block;
	/* Mobile/tablet: logo tracks the Call pill + hamburger height so all
	 * three items feel the same visual weight in the row.
	 * min 48px matches the pill/hamburger min (44px) + a bit more so the
	 * logo artwork (letterboxed with object-fit:contain) reads as big.
	 * Width is capped so it never crowds the actions cluster. */
	height: clamp(40px, 5vw, 48px);
	width: clamp(160px, 38vw, 300px);
	max-width: 100%;
	object-fit: contain;
	object-position: left center;
}

@media (min-width: 1200px) {
	/* Logo allowed to shrink slightly at narrower desktop widths so the
	 * single-row layout (active at ≥1536px) has enough horizontal room
	 * for the 8 nav items + search + phone. At ≥1800px the clamp ceiling
	 * keeps the logo at the original 400px treatment. */
	.asta-site-header__logo {
		max-width: clamp(320px, 22vw, 400px);
	}
	.asta-site-header__logo-img {
		height: clamp(44px, 2.9vw, 52px);
		width: clamp(320px, 22vw, 400px);
	}
}

.asta-site-header__logo-text {
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--asta-text);
}

/* ───────── Desktop nav container ─────────
 * The inner flex layout is UNCONDITIONAL so it survives media-query
 * stripping, boxed-container squeezing, etc. Only `display:none` on
 * the nav itself is gated by breakpoint — below that, the hamburger
 * opens the mobile drawer (separate DOM subtree) instead. */

.asta-site-header__nav {
	display: none;
	/* Natural width (not flex-grow) so the nav + actions sit together
	 * as one cluster right of the logo, spaced by the inner column-gap.
	 * Logo's margin-right: auto below pushes the cluster to the right. */
	flex: 0 0 auto;
	min-width: 0;
}

.asta-site-header__nav > .asta-menu {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	/* Nav items centred within their flex cell so the cluster sits
	 * closer to the screen centre rather than flush against the
	 * actions on the right. */
	justify-content: center;
	/* Inter-item gap on wide desktop. Tightened further (was clamp(6, .55vw, 18),
	 * originally clamp(8, .85vw, 22)) so the row continues to fit at the new
	 * 1536px breakpoint without wrapping or overflow. Stacked layout
	 * (1200–1535px) sets its own tighter gap inside its @media block. */
	column-gap: clamp(4px, .4vw, 14px);
	list-style: none;
	margin: 0;
	padding: 0;
}

.asta-site-header__nav > .asta-menu > .asta-menu__item {
	display: inline-flex;
	align-items: center;
	position: relative;
}

.asta-site-header__nav > .asta-menu > .asta-menu__item > .asta-menu__link {
	/* Padding tightened further (was 10px 5px, originally 10px 6px) so
	 * all 8 labels still fit on one row at the new 1536px single-row
	 * threshold without overflow. */
	padding: 10px 4px;
	letter-spacing: .01em;
	/* Root-level nav (desktop, ≥1536px wide single-row layout):
	 * 16px floor per webmaster spec, weight 650.
	 * The 16px is intentionally non-fluid so the dropdown size
	 * (set below) can sit reliably one step smaller for hierarchy. */
	font-size: 16px;
	font-weight: 650;
	white-space: nowrap;
}

/* Submenu / dropdown labels: 14px so they read as visually subordinate
 * to root-nav items (which are 16px+ at every desktop width). The
 * webmaster spec is "dropdowns must not be larger than root" — we err
 * on the side of clearly smaller for visual hierarchy. */
.asta-site-header__nav .asta-menu__submenu .asta-menu__link {
	text-transform: none;
	letter-spacing: .01em;
	font-size: 14px;
}

@media (min-width: 1200px) {
	.asta-site-header__nav {
		display: block;
	}
}

/* ───────── Menu items ───────── */

/*
 * Root UL: display-block by default (NOT flex), so <li>s naturally stack
 * in the mobile drawer. Desktop media query below flips the top-level
 * nav to a horizontal flex row. Fixing the original bug where
 * `flex-direction: column` was set here and leaked past the desktop
 * `display: flex` override.
 */
.asta-menu {
	display: block;
}

.asta-menu__item {
	position: relative;
	display: block;
}

.asta-menu__link {
	display: inline-flex;
	align-items: center;
	gap: .375rem;
	padding: 14px 16px;
	font-family: var(--asta-font-nav);
	/* Explicit px because the host site resets html root font-size to
	 * 62.5% (1rem = 10px), which throws off rem-based targets. */
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .01em;
	color: var(--asta-text);
	border-radius: 4px;
	transition: color .15s ease, background-color .15s ease;
}

.asta-menu__link:hover,
.asta-menu__link:focus-visible {
	color: var(--asta-accent, #eb0010);
}

.asta-menu__link:focus-visible {
	outline: 2px solid var(--asta-accent);
	outline-offset: 2px;
}

.asta-menu__item--current > .asta-menu__link,
.asta-menu__item--current-ancestor > .asta-menu__link {
	color: var(--asta-accent);
}

.asta-menu__label {
	display: inline-block;
}

.asta-menu__desc {
	display: block;
	margin-top: .125rem;
	font-size: .75rem;
	font-weight: 400;
	color: rgba(0, 0, 0, .56);
}

/* ───────── Submenu toggle (the separate accessible button) ───────── */

.asta-menu__toggle {
	position: absolute;
	top: 50%;
	right: .5rem;
	transform: translateY(-50%);
	width: 2.5rem;
	height: 2.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	color: var(--asta-text);
	transition: transform .2s ease, background-color .15s ease, color .15s ease;
}

.asta-menu__toggle:hover,
.asta-menu__toggle:focus-visible {
	background-color: rgba(0, 0, 0, .04);
	color: var(--asta-accent);
}

.asta-menu__toggle:focus-visible {
	outline: 2px solid var(--asta-accent);
	outline-offset: 2px;
}

/*
 * Chevron glyph — small, subtle, consistent at every depth. Sized
 * to read as a "tick" next to the label, not compete with it.
 *
 * NB: margin-top intentionally NOT adjusted between open/closed
 * states. Previously -2px / +2px was meant to optically re-centre
 * the L-shape after rotation, but because the offsets aren't
 * symmetric in both perceptual-direction AND magnitude, the chevron
 * visibly shifted up when rotating to the open state. With no margin
 * adjustment the glyph rotates cleanly around its geometric centre
 * and stays in the same spot.
 */
.asta-menu__toggle-icon {
	display: block;
	width: 8px;
	height: 8px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transform-origin: 50% 50%;
	transition: transform .2s ease;
}

.asta-menu__toggle[aria-expanded="true"] .asta-menu__toggle-icon {
	transform: rotate(-135deg);
}

/*
 * Top-level toggles: inline, tucked next to the label.
 *   Only the top-level case gets `position: static` so the chevron
 *   reads as part of the nav row; submenu toggles stay absolutely
 *   positioned on the right (fix for the stacked-chevron bug).
 */
.asta-site-header__nav > .asta-menu > .asta-menu__item > .asta-menu__toggle {
	position: static;
	transform: none;
	width: 1.25rem;
	height: 1.25rem;
	margin-left: .25rem;
}
.asta-site-header__nav > .asta-menu > .asta-menu__item > .asta-menu__link + .asta-menu__toggle {
	margin-right: .25rem;
}

/*
 * Submenu toggles: pin to the right edge of the row, vertically
 * centered. Works for every depth since `.asta-menu__item` is
 * `position: relative` and the toggle is `position: absolute`.
 */
/*
 * Submenu chevron: inline flex sibling, not absolute — so it stays on
 * the header row when the accordion expands underneath. Fixed width
 * means the visual alignment is consistent across every row.
 * The chevron is a fully interactive tap target — clicks on it toggle
 * the accordion via the shared click handler in the JS.
 */
.asta-site-header__nav .asta-menu__submenu .asta-menu__toggle {
	position: static;
	transform: none;
	width: 40px;
	height: auto;
	margin: 0;
	flex: 0 0 40px;
	align-self: stretch;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

/* ───────── Submenus — desktop ───────── */

.asta-menu__submenu {
	display: none;
	background: var(--asta-bg, #fff);
}

@media (min-width: 1200px) {
	.asta-site-header__nav > .asta-menu > .asta-menu__item > .asta-menu__submenu {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 280px;
		max-width: 420px;
		/* Cap desktop dropdown height at 65% of viewport so deep menus
		 * (e.g. Practice Areas with 30+ items + nested accordions)
		 * always stay on-screen and become inner-scrollable instead
		 * of flooding past the fold. */
		max-height: 65vh;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: .5rem 0;
		border-radius: 8px;
		box-shadow:
			0 2px 4px rgba(0, 0, 0, .05),
			0 12px 28px rgba(0, 0, 0, .12);
		border: 1px solid rgba(0, 0, 0, .06);
		opacity: 0;
		visibility: hidden;
		transform: translateY(4px);
		transition:
			opacity .15s ease,
			transform .15s ease,
			visibility 0s linear .15s;
		z-index: 10;
	}

	/* Subtle scrollbar inside long dropdowns — keeps the panel clean. */
	.asta-site-header__nav > .asta-menu > .asta-menu__item > .asta-menu__submenu {
		scrollbar-width: thin;
		scrollbar-color: rgba(0, 0, 0, .25) transparent;
	}
	.asta-site-header__nav > .asta-menu > .asta-menu__item > .asta-menu__submenu::-webkit-scrollbar {
		width: 8px;
	}
	.asta-site-header__nav > .asta-menu > .asta-menu__item > .asta-menu__submenu::-webkit-scrollbar-thumb {
		background-color: rgba(0, 0, 0, .2);
		border-radius: 4px;
	}

	/*
	 * Top-level dropdowns open on EITHER hover OR click — `:hover`
	 * reveals the submenu via CSS, and click/tap sets `data-open="1"`
	 * via JS (which also reveals). Both triggers coexist so a user on
	 * a laptop with a mouse gets instant hover-open, and a user on a
	 * touch device (where :hover is emulated) or on keyboard gets
	 * reliable click/tap.
	 */
	.asta-site-header__nav > .asta-menu > .asta-menu__item--has-children:hover > .asta-menu__submenu,
	.asta-site-header__nav > .asta-menu > .asta-menu__item[data-open="1"] > .asta-menu__submenu {
		display: block;
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		transition:
			opacity .15s ease,
			transform .15s ease,
			visibility 0s linear 0s;
	}

	/* Chevron rotation on hover — mirrors the rotation that already
	 * fires via [aria-expanded="true"] when the submenu is opened by
	 * click. Keeps the visual feedback identical regardless of how
	 * the user opens the menu (hover vs tap/click vs keyboard). */
	.asta-site-header__nav > .asta-menu > .asta-menu__item--has-children:hover > .asta-menu__toggle > .asta-menu__toggle-icon {
		transform: rotate(-135deg);
	}

	/*
	 * Nested items: flex layout so the chevron is a row-1 sibling of the
	 * link, not absolute-positioned relative to the whole <li>. This is
	 * what keeps the chevron anchored to the header row even after the
	 * accordion expands (fix for the "chevron moves down to Self-Driving
	 * Cars" bug).
	 */
	.asta-site-header__nav .asta-menu__submenu .asta-menu__item {
		display: flex;
		flex-wrap: wrap;
		align-items: stretch;
	}

	.asta-site-header__nav .asta-menu__submenu .asta-menu__link {
		display: flex;
		align-items: center;
		gap: .5rem;
		flex: 1 1 auto;
		min-width: 0;
		padding: 10px 16px;
		border-radius: 0;
		white-space: normal;
	}

	.asta-site-header__nav .asta-menu__submenu > .asta-menu__submenu,
	.asta-site-header__nav .asta-menu__submenu .asta-menu__item > .asta-menu__submenu {
		flex: 1 0 100%;
	}

	.asta-site-header__nav .asta-menu__submenu .asta-menu__link:hover,
	.asta-site-header__nav .asta-menu__submenu .asta-menu__link:focus-visible {
		background-color: rgba(0, 0, 0, .035);
	}

	/* Extend the hover/focus highlight across the chevron column too —
	 * the chevron button is a sibling of the link, so hovering the
	 * label alone leaves the chevron on the right visibly unhighlighted
	 * unless we explicitly paint both.
	 *
	 * Uses .asta-menu__item:hover / :focus-within rather than :has(),
	 * because Perfmatters' CSS minifier silently drops most :has() rules
	 * during minification (verified by inspecting the cached
	 * /wp-content/cache/perfmatters/.../*.asta-menu.min.css output).
	 * :hover/:focus-within on the LI is well-supported by every minifier
	 * and produces the same effect: both direct children get the bg.
	 *
	 * Side effect: hovering a nested submenu item (e.g. Brain Injury
	 * under Personal Injury) ALSO triggers :hover on the parent LI via
	 * normal DOM propagation, so the parent row stays highlighted while
	 * the user navigates into the nested accordion. This is a useful
	 * breadcrumb cue and is intentional. */
	.asta-site-header__nav .asta-menu__submenu .asta-menu__item:hover > .asta-menu__link,
	.asta-site-header__nav .asta-menu__submenu .asta-menu__item:hover > .asta-menu__toggle,
	.asta-site-header__nav .asta-menu__submenu .asta-menu__item:focus-within > .asta-menu__link,
	.asta-site-header__nav .asta-menu__submenu .asta-menu__item:focus-within > .asta-menu__toggle {
		background-color: rgba(0, 0, 0, .035);
	}

	/* Submenu toggles: square the highlight to match the link's flat-edge
	 * hover bg. Without this override the .asta-menu__toggle base style
	 * applies a 4px border-radius, which leaves a visible notch between
	 * the (square) link bg and the (rounded) toggle bg. */
	.asta-site-header__nav .asta-menu__submenu .asta-menu__toggle {
		border-radius: 0;
	}

	/* Nested parent rows: whole row is a toggle, so show a pointer
	 * cursor regardless of the underlying href. */
	.asta-site-header__nav .asta-menu__submenu .asta-menu__item--has-children > .asta-menu__link {
		cursor: pointer;
	}

	/* Flip right-edge top-level dropdowns leftward so they never clip. */
	.asta-site-header__nav > .asta-menu > .asta-menu__item[data-flip="1"] > .asta-menu__submenu {
		left: auto;
		right: 0;
	}

	/*
	 * Nested submenus (depth 2+) render as inline accordions WITHIN the
	 * first-level dropdown panel — matches the reference layout where
	 * expanding "Personal Injury" shows Brain/Burn/Catastrophic/etc.
	 * stacked directly below, indented.
	 */
	.asta-site-header__nav .asta-menu__submenu .asta-menu__submenu {
		position: static;
		top: auto;
		left: auto;
		right: auto;
		min-width: 0;
		max-width: none;
		padding: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		background: rgba(0, 0, 0, .02);
		opacity: 1;
		visibility: visible;
		transform: none;
		display: block;
		max-height: 0;
		overflow: hidden;
		transition: max-height .25s ease;
	}

	.asta-site-header__nav .asta-menu__submenu .asta-menu__item[data-open="1"] > .asta-menu__submenu {
		max-height: 1200px;
	}

	/* Indent deeper levels so hierarchy reads cleanly. */
	.asta-site-header__nav .asta-menu__submenu .asta-menu__submenu .asta-menu__link {
		padding-left: 2rem;
	}
	.asta-site-header__nav .asta-menu__submenu .asta-menu__submenu .asta-menu__submenu .asta-menu__link {
		padding-left: 2.75rem;
	}
	.asta-site-header__nav .asta-menu__submenu .asta-menu__submenu .asta-menu__submenu .asta-menu__submenu .asta-menu__link {
		padding-left: 3.5rem;
	}

	/* Subtle highlight on the currently-expanded accordion row. */
	.asta-site-header__nav .asta-menu__submenu .asta-menu__item[data-open="1"] > .asta-menu__link {
		background-color: rgba(0, 0, 0, .03);
	}
}

/* ───────── Action cluster (search + phone + hamburger) ───────── */

.asta-site-header__actions {
	display: inline-flex;
	align-items: center;
	gap: clamp(12px, 1vw, 24px);
	flex: 0 0 auto;
	/* No margin-left: auto here — the logo's margin-right:auto
	 * already pushes the cluster right. Keeping both would split
	 * the gap between nav and actions, re-introducing the chasm. */
}

/* ───────── Search popup ───────── */

.asta-site-header__search {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.asta-site-header__search-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .25rem;
	padding: .375rem .5rem;
	border-radius: 999px;
	color: var(--asta-text);
	transition: background-color .15s ease, color .15s ease;
	font-family: inherit;
}

.asta-site-header__search-trigger:hover,
.asta-site-header__search:hover .asta-site-header__search-trigger,
.asta-site-header__search-trigger:focus-visible,
.asta-site-header__search-trigger[aria-expanded="true"] {
	background-color: rgba(0, 0, 0, .05);
	color: var(--asta-accent);
}

.asta-site-header__search-icon svg {
	display: block;
	width: 20px;
	height: 20px;
}

/* Down-caret indicator next to the magnifier — rotates up on open. */
.asta-site-header__search-caret {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(-1px, -1px);
	transition: transform .2s ease;
}

.asta-site-header__search-trigger[aria-expanded="true"] .asta-site-header__search-caret {
	transform: rotate(-135deg) translate(-1px, -1px);
}

/* The dropdown form — clean rectangular panel, no double-outline. */
.asta-site-header__search-popup {
	position: absolute;
	/* Sits right against the trigger bottom (no visual gap) so moving
	 * the cursor from trigger → popup never crosses an "empty" zone
	 * that would fire mouseleave. The visual spacing is supplied by
	 * the transition/margin below. */
	top: 100%;
	right: 0;
	z-index: 20;
	margin-top: 6px;
	display: flex;
	align-items: stretch;
	width: min(380px, 85vw);
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition:
		opacity .15s ease,
		transform .15s ease,
		visibility 0s linear .15s;
}

/*
 * Invisible "hover bridge" — a 24px-wide translucent frame around the
 * popup that counts as part of the search's hover area. The cursor
 * can briefly overshoot the popup's visible bounds by up to 24px in
 * any direction without triggering mouseleave (which kicks off the
 * 400ms close timer). Covers the gap between trigger and popup plus
 * gives generous slop on the left/right/bottom edges.
 */
.asta-site-header__search-popup::before {
	content: '';
	position: absolute;
	top: -24px;
	right: -24px;
	bottom: -24px;
	left: -24px;
	background: transparent;
	pointer-events: auto;
	z-index: -1;
}

/* Open state: hover anywhere on .asta-site-header__search OR explicit
 * aria-expanded. `:focus-within` is intentionally NOT listed — it
 * would pin the popup open while the input has focus, which prevents
 * mouseleave from closing the panel (the input stays focused after
 * openSearch auto-focuses it). Closure is fully JS-driven via
 * scheduleSearchClose, so the CSS just mirrors aria-expanded. */
.asta-site-header__search:hover .asta-site-header__search-popup,
.asta-site-header__search-trigger[aria-expanded="true"] ~ .asta-site-header__search-popup {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition:
		opacity .15s ease,
		transform .15s ease,
		visibility 0s linear 0s;
}

.asta-site-header__search-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	font-size: 16px;
	color: var(--asta-text);
	padding: 12px 16px;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: none;
	/* Flat corners — the popup's `overflow: hidden` + its own border-radius
	 * clip any visible background. Earlier code set 7px left radii here
	 * which created a visible seam in the top-left corner when the
	 * popup's 8px outer radius and the input's 7px inner radius didn't
	 * perfectly align (Chromium/Safari anti-aliasing quirk). */
	border-radius: 0;
}

.asta-site-header__search-input:focus {
	outline: 0;
	background: rgba(0, 0, 0, .02);
}

.asta-site-header__search-input::placeholder {
	color: rgba(0, 0, 0, .42);
}

.asta-site-header__search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	flex: 0 0 auto;
	/* Flat corners — the popup wrapper's `overflow: hidden` + its 8px
	 * border-radius round the red button's right corners via clipping.
	 * Setting our own 7px radius here caused a 1px seam artefact where
	 * the button's rounding slightly mismatched the popup's. */
	border-radius: 0;
	background: var(--asta-accent);
	color: #fff;
	transition: background-color .15s ease;
}

.asta-site-header__search-submit:hover,
.asta-site-header__search-submit:focus-visible {
	background: var(--asta-accent-hover);
}

.asta-site-header__search-submit svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
}

/* Mobile: hide the search popup — header search isn't shown there (drawer
 * handles navigation-level search if the user adds it). */
@media (max-width: 1199px) {
	.asta-site-header__search {
		display: none;
	}
}

/* Screen-reader-only label utility */
.asta-site-header__search .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ───────── Phone CTA — the responsive sizing story ───────── */

.asta-site-header__phone,
.asta-site-header__phone:link,
.asta-site-header__phone:visited,
.asta-site-header__phone .asta-site-header__phone-text,
.asta-site-header__phone .asta-site-header__phone-icon {
	color: #eb0010;
	fill: #eb0010;
}

.asta-site-header__phone {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	white-space: nowrap;
	font-family: var(--asta-font-phone);
	/* +100 weight over the previous tuning. */
	font-weight: 700;
	letter-spacing: .01em;
	line-height: 1;
	/* ~20% smaller than the previous 20–30px clamp — now 16–24px fluid.
	 * Still the largest element in the header row but no longer
	 * dominates next to the nav labels. */
	font-size: clamp(16px, .7vw + 11px, 24px);
	/* Vertical padding only — horizontal padding is zero so the phone
	 * text's right edge sits exactly at the gutter boundary, mirroring
	 * the logo image's left edge on the opposite side. The header's
	 * --asta-gutter supplies equal horizontal inset on both sides of
	 * .asta-site-header__inner; this rule preserves that symmetry by
	 * not adding extra inner padding to the rightmost element. */
	padding: .375rem 0;
	transition: color .2s ease;
}

/*
 * Underline animation on hover — slides in from left, slides out to right
 * on unhover (matches the effect used on tridentlawhq.com's phone CTA).
 * The ::after bar is scaled via transform so it animates cheaply on the
 * GPU and respects prefers-reduced-motion (neutralised globally below).
 */
.asta-site-header__phone::after {
	content: '';
	position: absolute;
	/* Anchored to the container's content edges (which are now the
	 * actual text edges, since horizontal padding was zeroed above for
	 * symmetric viewport-edge alignment). */
	left: 0;
	right: 0;
	bottom: .15rem;
	height: 2px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right center;
	transition: transform .3s ease;
	pointer-events: none;
}

.asta-site-header__phone:hover,
.asta-site-header__phone:hover .asta-site-header__phone-text,
.asta-site-header__phone:hover .asta-site-header__phone-icon,
.asta-site-header__phone:focus-visible,
.asta-site-header__phone:focus-visible .asta-site-header__phone-text,
.asta-site-header__phone:focus-visible .asta-site-header__phone-icon {
	color: #b8000c;
	fill: #b8000c;
}

.asta-site-header__phone:hover::after,
.asta-site-header__phone:focus-visible::after {
	transform: scaleX(1);
	transform-origin: left center;
}

.asta-site-header__phone:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
	border-radius: 2px;
}

.asta-site-header__phone-icon {
	display: inline-flex;
	align-items: center;
}

/* Explicit toggles per breakpoint */
@media (max-width: 1199px) {
	.asta-site-header__phone--hide-mobile {
		display: none;
	}
}
@media (min-width: 1200px) {
	.asta-site-header__phone--hide-desktop {
		display: none;
	}

	/* Desktop: show full phone number + icon. Hide the mobile-only
	 * "Call" text-label. */
	.asta-site-header__phone-label {
		display: none;
	}

	/* Phone icon sized in em so it always matches the phone text's
	 * cap height, regardless of the fluid font-size clamp. */
	.asta-site-header__phone-icon {
		display: inline-flex;
		align-items: center;
	}
	.asta-site-header__phone-icon svg {
		width: 1em;
		height: 1em;
	}
}

/*
 * Mobile / tablet (< 1100px): swap the long phone number for a compact
 * "Call" pill button with a phone icon — red fill, white text, 6px
 * rounded — matching the reference design. The full number wouldn't
 * fit comfortably next to the hamburger at this width.
 *
 * Height is hard-pinned to 40px so the pill and the 40px hamburger
 * icon line up perfectly on their baselines, and the actions cluster
 * uses a tight 8px gap to avoid a visual gutter between the two.
 */
@media (max-width: 1199px) {
	/* Header runs flush to the viewport edges on mobile/tablet — no
	 * outer gutter padding. Logo and actions keep a small inset of
	 * their own so they don't physically touch 0,0 / 0,right. */
	.asta-site-header__inner {
		padding-left: 12px;
		padding-right: 12px;
	}

	/* Logo: 62% of header width so it reads as the dominant element.
	 * Override the global max-width clamp on mobile/tablet. */
	.asta-site-header__logo {
		flex: 0 0 62%;
		max-width: 62%;
		overflow: hidden;
	}
	.asta-site-header__logo-img {
		width: 100%;
		max-width: none;
	}

	/* Actions: remaining 38%; both buttons sit flush right with a
	 * fixed gap between them — no space-between spread. */
	.asta-site-header__actions {
		flex: 0 0 38%;
		width: 38%;
		justify-content: flex-end;
		box-sizing: border-box;
		gap: 12px;
	}

	.asta-site-header__phone {
		/* Slightly less tall than before — still matches logo + hamburger. */
		height: clamp(40px, 5vw, 48px);
		box-sizing: border-box;
		background: #eb0010;
		border-radius: 6px;
		padding: 0 clamp(12px, 2vw, 18px);
		gap: 6px;
		font-size: clamp(14px, 1.5vw + 11px, 17px);
		font-weight: 700;
		line-height: 1;
		margin-right: 0;
	}

	.asta-site-header__phone,
	.asta-site-header__phone:link,
	.asta-site-header__phone:visited,
	.asta-site-header__phone .asta-site-header__phone-icon,
	.asta-site-header__phone .asta-site-header__phone-label {
		color: #ffffff;
		fill: #ffffff;
	}

	.asta-site-header__phone:hover,
	.asta-site-header__phone:focus-visible {
		background: #b8000c;
	}

	.asta-site-header__phone:hover,
	.asta-site-header__phone:focus-visible,
	.asta-site-header__phone:hover .asta-site-header__phone-icon,
	.asta-site-header__phone:focus-visible .asta-site-header__phone-icon,
	.asta-site-header__phone:hover .asta-site-header__phone-label,
	.asta-site-header__phone:focus-visible .asta-site-header__phone-label {
		color: #ffffff;
		fill: #ffffff;
	}

	/* Hide the full phone number on mobile; the Call pill stands in. */
	.asta-site-header__phone-text {
		display: none;
	}

	/* Underline hover animation is desktop-only (doesn't fit a pill CTA). */
	.asta-site-header__phone::after {
		display: none;
	}
}

/* Tablet only (768–1199px): push Call button slightly left of the
 * hamburger by widening the gap between them. */
@media (min-width: 768px) and (max-width: 1199px) {
	.asta-site-header__actions {
		gap: 28px;
	}
	.asta-site-header__logo {
		max-width: 480px;
	}
	.asta-site-header__logo-img {
		max-width: 480px;
	}
}

/* Extra-small phones: tighten the pill padding and drop the icon so
 * just the word "Call" shows next to a small hamburger. */
@media (max-width: 420px) {
	.asta-site-header__phone {
		padding: 7px 12px;
		font-size: 14px;
	}
	.asta-site-header__phone-icon {
		display: none;
	}
}

/* ───────── Hamburger ───────── */

.asta-site-header__hamburger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* Matches Call pill height exactly. */
	width: clamp(40px, 5vw, 48px);
	height: clamp(40px, 5vw, 48px);
	box-sizing: border-box;
	border-radius: 6px;
	margin-left: 2px;
	color: var(--asta-text);
	-webkit-tap-highlight-color: transparent;
}

.asta-site-header__hamburger:hover,
.asta-site-header__hamburger:focus-visible {
	background-color: rgba(0, 0, 0, .05);
}

.asta-site-header__hamburger:focus-visible {
	outline: 2px solid var(--asta-accent);
	outline-offset: 2px;
}

.asta-site-header__hamburger-icon {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	width: 26px;
	height: 22px;
}

.asta-site-header__hamburger-icon span {
	display: block;
	height: 2.5px;
	width: 100%;
	background-color: currentColor;
	border-radius: 2px;
	transition: transform .25s ease, opacity .2s ease;
	transform-origin: center;
}

.asta-site-header__hamburger[aria-expanded="true"] .asta-site-header__hamburger-icon span:nth-child(1) {
	transform: translateY(8.5px) rotate(45deg);
}
.asta-site-header__hamburger[aria-expanded="true"] .asta-site-header__hamburger-icon span:nth-child(2) {
	opacity: 0;
}
.asta-site-header__hamburger[aria-expanded="true"] .asta-site-header__hamburger-icon span:nth-child(3) {
	transform: translateY(-8.5px) rotate(-45deg);
}

@media (min-width: 1200px) {
	.asta-site-header__hamburger {
		display: none;
	}
}

/* ───────── Mobile drawer (under-header, full-width) ─────────
 * New pattern: drawer anchors directly below the header bar. The
 * header (logo + hamburger) remains visible and sticky above. The
 * hamburger icon morphs into an X via aria-expanded="true" CSS, so
 * we don't need a separate close button inside the drawer. Full
 * viewport width means there's no right/left panel seam, no need
 * for a backdrop, and no double-scrollbar scenario.
 *
 * `--asta-drawer-top` is set inline by the JS to match the header's
 * rendered bottom edge (incl. admin bar / sticky scroll offsets).
 */
.asta-mobile-drawer {
	position: fixed;
	top: var(--asta-drawer-top, 64px);
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	z-index: 2147483600;
	visibility: hidden;
	pointer-events: none;
	background: #ffffff;
	/* Dynamic-viewport units so iOS Safari's shrinking URL bar
	 * doesn't clip the drawer bottom. */
	max-height: calc(100dvh - var(--asta-drawer-top, 64px));
}

.asta-mobile-drawer[aria-hidden="false"] {
	visibility: visible;
	pointer-events: auto;
}

@media (min-width: 1200px) {
	.asta-mobile-drawer {
		display: none;
	}
}

.asta-mobile-drawer__panel {
	width: 100%;
	height: 100%;
	background: #ffffff;
	color: var(--asta-text);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-top: 1px solid rgba(0, 0, 0, .08);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
	opacity: 0;
	transform: translateY(-8px);
	transition: opacity .22s ease, transform .22s ease;
}

.asta-mobile-drawer[aria-hidden="false"] .asta-mobile-drawer__panel {
	opacity: 1;
	transform: translateY(0);
}

/* ───────── Mobile drawer — search bar ───────── */

.asta-mobile-drawer__search {
	flex: 0 0 auto;
	display: flex;
	align-items: stretch;
	/* Margins match the nav rows' 16px inner padding so the search
	 * field lines up visually with the menu labels at every viewport
	 * width. Width: auto fills the remaining space — no max-width
	 * cap, so the field stretches edge-to-edge on tablets/large phones. */
	margin: 12px 16px 4px;
	width: auto;
	box-sizing: border-box;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, .14);
	border-radius: 8px;
	overflow: hidden;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.asta-mobile-drawer__search:focus-within {
	border-color: #eb0010;
	box-shadow: 0 0 0 3px rgba(235, 0, 16, .12);
}

.asta-mobile-drawer__search-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	font-size: 16px;
	color: var(--asta-text);
	padding: 10px 14px;
	appearance: none;
	-webkit-appearance: none;
	border-radius: 8px 0 0 8px;
}

.asta-mobile-drawer__search-input::placeholder {
	color: rgba(0, 0, 0, .42);
}

.asta-mobile-drawer__search-submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	background: #eb0010;
	color: #ffffff;
	border-radius: 0 7px 7px 0;
	transition: background-color .15s ease;
}

.asta-mobile-drawer__search-submit:hover,
.asta-mobile-drawer__search-submit:focus-visible {
	background: #b8000c;
}

.asta-mobile-drawer__search-submit svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
}

/* ───────── Drawer scroller ───────── */

.asta-mobile-drawer__scroller {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: .5rem 0 .5rem;
	/* Hide the visible scrollbar — scrolling still works via touch
	 * and mouse wheel, but the track is invisible so the drawer
	 * doesn't show a second scrollbar alongside the page's (now-
	 * hidden) one. */
	scrollbar-width: none;
}
.asta-mobile-drawer__scroller::-webkit-scrollbar {
	width: 0;
	height: 0;
	display: none;
}

.asta-mobile-drawer nav .asta-menu {
	display: block;
}

/*
 * Mobile drawer items: same flex-layout technique as desktop nested
 * items — chevron is a row-1 sibling of the link, submenu wraps to
 * row 2. Guarantees the chevron never drifts when the accordion opens.
 */
.asta-mobile-drawer .asta-menu__item {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.asta-mobile-drawer .asta-menu > .asta-menu__item:last-child {
	border-bottom: 0;
}

.asta-mobile-drawer .asta-menu__link {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 16px;
	font-family: var(--asta-font-nav);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	border-radius: 0;
}

/* Top-level mobile drawer items a touch larger than submenu rows so
 * they still read as "section headers" — kept at 16px minimum. */
.asta-mobile-drawer .asta-menu > .asta-menu__item > .asta-menu__link {
	font-size: 17px;
	font-weight: 700;
	letter-spacing: .01em;
}

.asta-mobile-drawer .asta-menu__link:hover,
.asta-mobile-drawer .asta-menu__link:focus-visible {
	background-color: rgba(0, 0, 0, .04);
}

/* Whole-row hover/focus highlight — chevron is a sibling of the link,
 * so hovering the label alone left the chevron column un-tinted. :has()
 * paints both children of the <li> when EITHER is interacted with. */
/* Same chevron-highlight propagation as the desktop submenu rule above —
 * rewritten without :has() because Perfmatters' minifier strips it. See
 * the corresponding desktop rule for full reasoning. */
.asta-mobile-drawer .asta-menu__item:hover > .asta-menu__link,
.asta-mobile-drawer .asta-menu__item:hover > .asta-menu__toggle,
.asta-mobile-drawer .asta-menu__item:focus-within > .asta-menu__link,
.asta-mobile-drawer .asta-menu__item:focus-within > .asta-menu__toggle {
	background-color: rgba(0, 0, 0, .04);
}

.asta-mobile-drawer .asta-menu__toggle {
	position: static;
	transform: none;
	width: 48px;
	height: auto;
	margin: 0;
	flex: 0 0 48px;
	align-self: stretch;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

/* Mobile drawer: submenu always takes its own row (full-width flex line). */
.asta-mobile-drawer .asta-menu__submenu {
	flex: 1 0 100%;
}

/* Accordion submenus: collapsed by default, expand on aria-expanded */
.asta-mobile-drawer .asta-menu__submenu {
	display: block;
	max-height: 0;
	overflow: hidden;
	transition: max-height .3s ease;
	background: rgba(0, 0, 0, .02);
}

.asta-mobile-drawer .asta-menu__item[data-open="1"] > .asta-menu__submenu {
	/* Tall enough to fit any realistic submenu without clipping; the
	 * outer .asta-mobile-drawer__scroller handles actual overflow.
	 * `overflow: hidden` is intentionally inherited from the base rule
	 * (NOT switched to auto) — auto briefly renders a visible inner
	 * scrollbar during the max-height transition that flashes in and
	 * out as the accordion opens. */
	max-height: 2000px;
}

/* Per-depth indent rhythm — keeps deep trees readable */
.asta-mobile-drawer .asta-menu__submenu .asta-menu__link {
	padding-left: 2rem;
}
.asta-mobile-drawer .asta-menu__submenu .asta-menu__submenu .asta-menu__link {
	padding-left: 2.75rem;
}
.asta-mobile-drawer .asta-menu__submenu .asta-menu__submenu .asta-menu__submenu .asta-menu__link {
	padding-left: 3.5rem;
}
.asta-mobile-drawer .asta-menu__submenu .asta-menu__submenu .asta-menu__submenu .asta-menu__submenu .asta-menu__link {
	padding-left: 4.25rem;
}
.asta-mobile-drawer .asta-menu__submenu .asta-menu__submenu .asta-menu__submenu .asta-menu__submenu .asta-menu__submenu .asta-menu__link {
	padding-left: 5rem;
}

/*
 * Mobile drawer phone CTA — sits at the end of the scroll flow after
 * the last menu item. Not sticky; user scrolls to reach it. Colours
 * are declared with !important so third-party link colour rules
 * (Elementor kit globals, parent-theme anchor styles, etc.) can't
 * turn the number black on the red pill.
 */
.asta-mobile-drawer__phone,
.asta-mobile-drawer__phone:link,
.asta-mobile-drawer__phone:visited,
.asta-mobile-drawer__phone > * {
	background: #eb0010 !important;
	color: #ffffff !important;
	fill: #ffffff !important;
}
.asta-mobile-drawer__phone > * {
	background: transparent !important;
}

.asta-mobile-drawer__phone {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	margin: 20px 16px calc(20px + env(safe-area-inset-bottom, 0));
	padding: 14px 16px;
	border-radius: 8px;
	font-weight: 800;
	font-size: 20px;
	letter-spacing: .01em;
	text-align: center;
	transition: background-color .15s ease;
}
.asta-mobile-drawer__phone:hover,
.asta-mobile-drawer__phone:focus-visible {
	background: #b8000c !important;
	color: #ffffff !important;
}
.asta-mobile-drawer__phone:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -4px;
}

/* ───────── Body lock when drawer open ─────────
 * Lock both <html> and <body> overflow so the page behind the drawer
 * can't scroll — only the drawer's inner scroller is scrollable.
 * Note: scrollbar-gutter: stable is NOT used here because it reserves
 * a visible gutter strip on the right that reads as a second
 * scrollbar. Without it, the page scrollbar disappears cleanly. */

html.asta-drawer-open,
body.asta-drawer-open {
	overflow: hidden !important;
	/* NB: `touch-action: none` intentionally NOT set here. It's not
	 * needed (overflow:hidden alone blocks background page scroll on
	 * mobile) and on some iOS builds it caused taps inside the drawer
	 * to fail to generate click events, which meant nested leaf links
	 * seemed to collapse the accordion instead of navigating. */
}

/* While the drawer is open we raise the whole header stacking context
 * to sit above chat / cookie-consent / popup widgets (typically at
 * z-index 999999). Outside this state the header sits at z-index 100
 * so WP's admin toolbar (99999) and its dropdown menus can render
 * cleanly on top for logged-in users. */
html.asta-drawer-open #asta-site-header,
body.asta-drawer-open #asta-site-header {
	z-index: 2147483500;
}

/* ───────── "CTA" / "Phone" / "Featured" author hooks ───────── */

.asta-menu__item.asta-cta > .asta-menu__link {
	background: var(--asta-accent);
	color: #fff;
	border-radius: 999px;
	padding-inline: 1.25rem;
}
.asta-menu__item.asta-cta > .asta-menu__link:hover,
.asta-menu__item.asta-cta > .asta-menu__link:focus-visible {
	background: var(--asta-accent-hover);
	color: #fff;
}

.asta-menu__item.asta-featured > .asta-menu__link {
	box-shadow: inset 0 -2px 0 var(--asta-accent);
}

.asta-menu__item.asta-no-arrow > .asta-menu__toggle {
	display: none;
}

/* ───────── Reduced motion ───────── */

@media (prefers-reduced-motion: reduce) {
	#asta-site-header *,
	.asta-mobile-drawer * {
		transition: none !important; /* justified override: user opt-out of animation is an a11y requirement */
	}
}

/* ───────── Skip link (keyboard) ───────── */

.asta-site-header .asta-skip-link {
	position: absolute;
	left: -9999px;
}
.asta-site-header .asta-skip-link:focus {
	left: 1rem;
	top: 1rem;
	background: var(--asta-bg);
	padding: .5rem 1rem;
	border-radius: 4px;
	z-index: 10001;
}
