/**
 * _header.css — the header Astra's builder draws (header-footer.php; ADR 0001), in the kit's SiteHeader look.
 * Owns: Menu 1's hover / current marks and its dropdowns' rows; the phone button's icon; the mobile dropdown menu's
 * rows and toggle.
 * Doesn't own: the header's layout, colors, sizes and stickiness (Astra's builder settings); the logo (Astra).
 * Depends on: global/_tokens.css. Astra prints its own builder CSS inline; the #ast-… and .site-header-scoped rules here
 * out-rank it.
 */

/* Menu 1: navy links; hover, focus and the current page underline in teal, 2px, 6px below (the kit's link hover). */
#ast-hf-menu-1 > .menu-item > .menu-link {
	text-decoration: none;
	text-underline-offset: 6px;
}

#ast-hf-menu-1 > .menu-item > .menu-link:is(:hover, :focus-visible),
#ast-hf-menu-1 > :is(.current-menu-item, .current-menu-ancestor) > .menu-link:not([href*="#"]) {
	text-decoration: underline 2px var(--rl-color-alt-brand);
}

/* 1081–1240px: the logo (249), the six items (612 at 16px a side) and the phone (203) don't fit one row — "Contact"
   wrapped under at 1100. 8px a side saves 96px, enough down to the 1080 header breakpoint. */
@media (min-width: 1081px) and (max-width: 1240px) {
	#ast-hf-menu-1 > .menu-item > .menu-link {
		padding-right: 8px;
		padding-left: 8px;
	}
}

/* The dropdowns: 16px 500 navy rows, 10 × 20 (the kit's 15px is under the floor), the tint on hover. */
#ast-hf-menu-1 .sub-menu {
	padding: 8px 0;
}

#ast-hf-menu-1 .sub-menu .menu-link {
	padding: 10px 20px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--rl-color-brand);
	text-decoration: none;
}

#ast-hf-menu-1 .sub-menu .menu-item:is(:hover, :focus-within) > .menu-link,
#ast-hf-menu-1 .sub-menu .current-menu-item > .menu-link {
	background: var(--rl-color-tint);
}

/* The phone button: the kit's phone icon (Lucide, 18px) before the number. */
.ast-header-button-1 .ast-custom-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.ast-header-button-1 .ast-custom-button::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.9.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.9.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* 1080px and narrower (inc/breakpoints.php) Astra puts .ast-header-break-point on <body> but hides its desktop header
   only below its tablet breakpoint (921): from 922 to 1080 both headers showed, the desktop menu stacked. The mobile
   header only, and its row laid out as Astra's grid (Astra does that only below 922 too). Ported from exceed-legal. */
.ast-header-break-point #ast-desktop-header {
	display: none;
}

@media (min-width: 922px) {
	.ast-header-break-point #ast-mobile-header .ast-primary-header-bar {
		display: grid;
	}
}

/* The mobile dropdown menu: rows under the header, inside the content width; each level 20px further in — the levels'
   only marker since the carets went (Markup #40). By ID: Astra's 20px for every level out-ranked a class rule. */
#ast-hf-mobile-menu .sub-menu .menu-link {
	padding-left: 40px;
}

#ast-hf-mobile-menu .sub-menu .sub-menu .menu-link {
	padding-left: 60px;
}

#ast-hf-mobile-menu .sub-menu .sub-menu .sub-menu .menu-link {
	padding-left: 80px;
}

.ast-mobile-header-content .main-header-menu .menu-link {
	text-decoration: none;
}

/* The toggle: a 44px target. */
.ast-mobile-menu-trigger-minimal {
	min-width: 44px;
	min-height: 44px;
}

/* No caret before a submenu's links (Markup #40, 2026-10-28: Astra's .icon-arrow — shown on the links without children
   by an eight-class rule, so by ID here); the open and close arrows on the right stay. */
#ast-hf-mobile-menu .sub-menu .menu-link > .ast-icon.icon-arrow {
	display: none;
}

/* The open menu fills the window under the header — 76px tall at every width it shows (Markup #41, 2026-10-28): Astra
   Pro caps the dropdown at 60% of the window (#ast-mobile-header .content-align-flex-start), so on a short phone Blog
   and Contact scrolled out of view. A submenu that runs past the window scrolls inside it, not the page. */
#ast-mobile-header .ast-mobile-header-content.ast-mobile-header-content {
	height: calc(100vh - 76px);
	height: calc(100dvh - 76px);
	max-height: none;
	overscroll-behavior: contain;
}

@media (max-width: 480px) {
	/* Phones: the logo, the phone and the toggle share a 390px row — the logo narrows and the phone button is its icon
	   alone, 44px square. The link keeps its name: Astra's aria-label is the number. */
	.ast-mobile-header-wrap .custom-logo-link img {
		max-width: 150px;
	}

	#ast-mobile-header .ast-header-button-1 .ast-custom-button {
		justify-content: center;
		min-width: 44px;
		min-height: 44px;
		padding: 0;
		font-size: 0;
		gap: 0;
	}

	#ast-mobile-header .ast-header-button-1 .ast-custom-button::before {
		width: 20px;
		height: 20px;
	}
}

/* Below 360px the row needs 302px — the 150px logo, Astra's 16px after it (room for a site title, not shown), the 20px
   column gap, the 44px phone, 20px, the 52px toggle — and has 280 between the 20px gutters: at 320 the toggle ran 2px
   off the screen and the page scrolled sideways (found with Markup #49, 2026-10-30). The logo's 16px goes, and the phone
   and the toggle sit 10px apart: 276px. */
@media (max-width: 359px) {
	#ast-mobile-header .site-logo-img {
		padding-right: 0;
	}

	#ast-mobile-header .site-header-primary-section-right > :first-child {
		padding-right: 5px;
	}

	#ast-mobile-header .site-header-primary-section-right > :last-child {
		padding-left: 5px;
	}
}

/* ── The Practice Areas mega menu (Astra Pro's Nav Menu module, site-layout.php megamenu) — Abbey's design ─────────
   (Markup #2, 2026-10-28). A full-width white panel under the header (Astra Pro's full width: its wrapper spans the
   viewport, the list inside is the 1200 container): a 280px column of the four groups and, beside it, the open group's
   pages — its name and "Read More About <group> →" (inc/navigation.php adds that item) over three columns of links.
   The groups' <li>s are display: contents, so each group's link and its page list sit in the panel's own grid. The
   open group is the one last pointed at or focused (assets/js/mega-menu.js marks it .rl-mega-active); without the
   script, the first, or the one under the pointer. The fourth level (e.g. Car Accidents' pages) isn't in the panel;
   those pages stay in the mobile menu. */
.ast-desktop #ast-hf-menu-1 .astra-megamenu-li .astra-full-megamenu-wrapper {
	border-top: 1px solid var(--rl-border-subtle);
	background: var(--rl-white);
	box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.ast-desktop #ast-hf-menu-1 .astra-megamenu-li .astra-megamenu.astra-megamenu:not(.ast-hidden) {
	position: relative;
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	grid-template-rows: repeat(4, auto) 1fr; /* the groups take their own height; a long page list grows the last row */
	column-gap: 40px;
	box-sizing: border-box;
	width: 100%;
	max-width: 1200px; /* the container; Astra Pro also sets it inline on hover */
	margin: 0 auto;
	padding: 32px 40px 40px;
	border: 0;
	background: none;
	box-shadow: none;
}

/* The rule down the groups' column (the design's border-right). Astra's hover bridge is every sub-menu's ::before,
   lifted by its own height (.ast-desktop .main-header-menu > .menu-item .sub-menu::before: translateY(-100%)): without
   transform: none the rule sat over the header instead (Markup #42, 2026-10-30). */
.ast-desktop #ast-hf-menu-1 .astra-megamenu-li .astra-megamenu.astra-megamenu:not(.ast-hidden)::before {
	content: "";
	position: absolute;
	top: 32px;
	bottom: 40px;
	left: calc(40px + 279px);
	width: 1px;
	background: var(--rl-border-subtle);
	transform: none;
}

.ast-desktop #ast-hf-menu-1 .astra-megamenu > .menu-item {
	display: contents;
}

/* Astra's toggles and arrows: no place in the panel (the toggle span inside a group's link is focusable). */
.ast-desktop #ast-hf-menu-1 .astra-megamenu > .menu-item > .ast-menu-toggle,
.ast-desktop #ast-hf-menu-1 .astra-megamenu .menu-link :is(.dropdown-menu-toggle, .ast-icon),
.ast-desktop #ast-hf-menu-1 .astra-megamenu .sub-menu .sub-menu,
.ast-desktop #ast-hf-menu-1 .astra-megamenu .sub-menu .ast-menu-toggle {
	display: none;
}

/* The groups, down the left: Mulish 600 navy, a chevron; the open one navy with a white label. */
.ast-desktop #ast-hf-menu-1 .astra-megamenu > .menu-item > .menu-link {
	grid-column: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 24px 0 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 2px;
	font-size: 16px;
	font-weight: 600;
	line-height: 22px;
	letter-spacing: 0;
	text-transform: none;
	color: var(--rl-color-brand);
	background: transparent;
	transition: background-color var(--rl-ease), color var(--rl-ease);
}

.ast-desktop #ast-hf-menu-1 .astra-megamenu > .menu-item > .menu-link::after {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
}

.ast-desktop #ast-hf-menu-1 .astra-megamenu.rl-mega-js > .rl-mega-active > .menu-link,
.ast-desktop #ast-hf-menu-1 .astra-megamenu:not(.rl-mega-js):not(:has(> .menu-item:not(:first-child):is(:hover, :focus-within))) > .menu-item:first-child > .menu-link,
.ast-desktop #ast-hf-menu-1 .astra-megamenu:not(.rl-mega-js) > .menu-item:is(:hover, :focus-within) > .menu-link {
	color: var(--rl-white);
	background: var(--rl-color-brand);
}

/* A group's pages: the right-hand column, three columns of links under its title row; only the open group's shows. */
.ast-desktop #ast-hf-menu-1 .astra-megamenu > .menu-item > .sub-menu.sub-menu {
	position: static;
	grid-column: 2;
	grid-row: 1 / -1;
	display: none;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-content: start;
	gap: 2px 32px;
	width: auto;
	margin: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
}

.ast-desktop #ast-hf-menu-1 .astra-megamenu.rl-mega-js > .rl-mega-active > .sub-menu.sub-menu,
.ast-desktop #ast-hf-menu-1 .astra-megamenu:not(.rl-mega-js):not(:has(> .menu-item:not(:first-child):is(:hover, :focus-within))) > .menu-item:first-child > .sub-menu.sub-menu,
.ast-desktop #ast-hf-menu-1 .astra-megamenu:not(.rl-mega-js) > .menu-item:is(:hover, :focus-within) > .sub-menu.sub-menu {
	display: grid;
}

.ast-desktop #ast-hf-menu-1 .astra-megamenu > .menu-item > .sub-menu > .menu-item {
	width: auto;
	padding: 0;
}

.ast-desktop #ast-hf-menu-1 .astra-megamenu > .menu-item > .sub-menu > .menu-item > .menu-link {
	padding: 8px 0;
	font-size: 16px;
	line-height: 22px;
	color: var(--rl-color-body);
	background: none;
}

.ast-desktop #ast-hf-menu-1 .astra-megamenu > .menu-item > .sub-menu > .menu-item > .menu-link:is(:hover, :focus-visible) {
	color: var(--rl-color-accent-strong);
	text-decoration: underline 2px var(--rl-color-alt-brand);
	text-underline-offset: 3px;
}

/* The open group's title row: its name, Lora 28, and "Read More About <group> →", over a hairline. */
.ast-desktop #ast-hf-menu-1 .astra-megamenu > .menu-item > .sub-menu > .rl-mega-more.rl-mega-more {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: row; /* Astra stacks a sub-menu item's children */
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 18px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--rl-border-subtle);
}

.ast-desktop #ast-hf-menu-1 .rl-mega-more__title {
	font-family: var(--rl-font-heading);
	font-size: 28px;
	line-height: 34px;
	color: var(--rl-color-brand);
}

.ast-desktop #ast-hf-menu-1 .astra-megamenu > .menu-item > .sub-menu > .rl-mega-more > .menu-link {
	padding: 0;
	font-weight: 600;
	color: var(--rl-color-brand);
}

.ast-desktop #ast-hf-menu-1 .astra-megamenu > .menu-item > .sub-menu > .rl-mega-more > .menu-link::after {
	content: " →" / "";
}

/* Keyboard: Astra Pro positions the full-width wrapper when a link in it takes focus, but with the header builder it
   never adds its own focus classes, so the panel would stay hidden. Show it while focus is inside, as hover does. */
.ast-desktop .ast-mega-menu-enabled .astra-megamenu-li:is(.focus, :focus-within) > .astra-full-megamenu-wrapper,
.ast-desktop .ast-mega-menu-enabled .astra-megamenu-li:is(.focus, :focus-within) .astra-megamenu {
	visibility: visible;
	opacity: 1;
}

.ast-desktop .ast-mega-menu-enabled .astra-megamenu-li:is(.focus, :focus-within) .astra-megamenu .sub-menu {
	visibility: visible;
	opacity: 1;
}

/* The mobile menu: the group's name is the toggle above, so its Read More link stands alone, 600 with an arrow. */
#ast-hf-mobile-menu .rl-mega-more__title {
	display: none;
}

#ast-hf-mobile-menu .rl-mega-more > .menu-link {
	font-weight: 600;
}

#ast-hf-mobile-menu .rl-mega-more > .menu-link .menu-text::after {
	content: " →" / "";
}
