/**
 * The Ladd Firm — header.
 *
 * Targets Astra HFB's real classes. Every value from
 * .claude/docs/measured-design-spec.md; nothing estimated from a screenshot.
 *
 * Design facts being reproduced (2026-10-21 revision, `Ladd Firm Homepage.dc.html`):
 *   <header>      position: sticky; top: 0; z-index: 100; background: #fff;
 *                 border-bottom: 1px solid #E4E0DA  — the ONLY rule in the header
 *   .ld-headrow   max-width 1200; padding 0 40; flex; align-items center;
 *                 space-between; gap 32; min-height 92; padding-block 14
 *   logo          height 96, width auto (299.2 from the 882x283 source)
 *   right column  flex column, align-items flex-end, gap 10 — CTA above nav
 *   nav           justify flex-end; item gap 17; link 17px / 600, padding 8px 0
 *   header CTA    18px / 700, padding 14px 26px, accent fill, radius 8, 2px border
 *
 * NOT implemented here: the design's box-shadow-on-scroll. That needs a scroll
 * listener, and adding a global script requires sign-off first. The resting state
 * (hairline border, no shadow) matches the design exactly.
 */

/* ------------------------------------------------------------- sticky bar ---- */

/* The design's header is a plain CSS sticky, not Astra Pro's fixed-position sticky
   module (deliberately left off so there is less generated CSS to fight).
   position: sticky fails silently if any ancestor has overflow other than visible,
   so #page is forced back — Astra sets overflow-x: hidden on it at some breakpoints. */
#page,
.ast-container,
.site-content {
	overflow: visible;
}

#masthead.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--ladd-background);
	border-bottom: 1px solid var(--ladd-hair);
}

/* With the admin bar present, sticky must clear it or the header hides beneath. */
.admin-bar #masthead.site-header { top: 32px; }
@media screen and (max-width: 782px) {
	.admin-bar #masthead.site-header { top: 46px; }
}

/* Astra adds its own bottom border/box-shadow on the primary bar; the outer header
   already carries the hairline, so suppress the duplicate. */
.ast-primary-header-bar,
.ast-header-break-point .ast-primary-header-bar {
	border-bottom: 0;
	background-color: transparent;
}

/* --------------------------------------------------------------- the rows ---- */

/* ONE ROW (2026-10-21 revision) — see configure-header.php for the measurement.
   primary_left : logo, spanning the full row height
   primary_right: phone CTA stacked above the nav, both right-aligned
   The above row is empty and not rendered. */

/* Astra paints the above-header bar with
   `var(--ast-global-color-primary, var(--ast-global-color-4))` — global colour 4 being
   the same slot it uses for widget backgrounds. That slot holds the alt section colour
   (#F4F2EF) here, so the logo row rendered as a grey band. The design's header is white.

   Astra's rule is `.ast-above-header.ast-above-header-bar` at 0-2-0, so a single-class
   selector loses. Matched with a compound selector of equal specificity, which then
   wins on source order because the child stylesheets enqueue after astra-theme-css.
   (Confirmed with CDP CSS.getMatchedStylesForNode — a hand-rolled cssRules walk missed
   this rule entirely.) */
.ast-primary-header-bar.site-header-focus-item,
.ast-main-header-bar.main-header-bar {
	background-color: var(--ladd-background);
}

.ast-above-header-bar > .ast-container,
.ast-primary-header-bar > .ast-container {
	max-width: var(--ladd-container-max);
	margin-inline: auto;
	padding-inline: var(--ladd-gutter);
}

/* Work WITH Astra's builder grid, not against it. An earlier attempt put
   display:flex + gap on .ast-container, which left Astra's own
   .ast-builder-grid-row shrink-wrapped to 652px inside a 1200px container. The row is
   the flex parent; it just needs to fill the container and push its two sides apart. */
.ast-above-header-bar .ast-builder-grid-row,
.ast-primary-header-bar .ast-builder-grid-row {
	width: 100%;
	align-items: center;
}

/*
 * Everything in this block is scoped to #ast-desktop-header. Astra's MOBILE header uses
 * the same .ast-primary-header-bar class, so unscoped rules here reach the phone header
 * too (measured: it grew from 101px to 133px before the scope was added).
 */

/* Logo pushed left, the CTA/nav column pushed right, the design's 32px between them. */
#ast-desktop-header .ast-primary-header-bar .ast-builder-grid-row-has-sides {
	justify-content: space-between;
	column-gap: 32px;
}

/* 2026-11-17 revision: the logo row is the design's .ld-headrow — 96px logo, 110px row
   (measured off the design at 1440: white row 46 -> 156). */
#ast-desktop-header .ast-primary-header-bar > .ast-container {
	min-height: 92px;
	padding-block: 6px 7px;   /* 96 + 13 = 109, the design's .ld-headrow */
}

/**
 * Astra's spacing defaults that assume a horizontal zone. All three measured, none
 * belongs in a stacked layout:
 *   - .ast-site-identity   padding: 1em 0     -> 18px above and below a 96px logo,
 *                                                making the row 132px instead of 96
 *   - .site-logo-img       padding-right: 18px -> gap reserved for a site title that is
 *                                                hidden here; widened the logo zone to 317
 *   - components in a zone get 10px of side padding to separate them in a ROW. Stacked,
 *     it offset the CTA 10px left of the nav and added 10px to the nav's width.
 * Together these pushed the row to 1147px inside a 1120px box.
 */
#ast-desktop-header .ast-primary-header-bar .ast-site-identity {
	padding-block: 0;
}

#ast-desktop-header .ast-primary-header-bar .site-logo-img {
	padding-right: 0;
}

#ast-desktop-header .site-header-primary-section-right > .ast-builder-layout-element {
	padding-inline: 0;
}

/**
 * The right-hand column: CTA on top, nav directly beneath, both flush right.
 *
 * Astra renders every component in a zone inside one flex container, in the order they
 * are listed (html-1, menu-1). It defaults that container to a ROW, which would put the
 * CTA and the nav side by side — the layout that overflowed by 199px. Turning it into a
 * column is the whole of the revision.
 */
#ast-desktop-header .ast-primary-header-bar .site-header-primary-section-right {
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	gap: 10px;
}

/* No rule between the CTA and the nav — the header's own bottom border is the only one.
   (The two-row build hung a hairline off the above row; that row is gone.) */
.ast-above-header-bar { border-bottom: 0; }

/* The design shows the logo alone — no site-title text beside it. Astra still renders
   the title wrap for SEO/accessibility, so it is removed from the header specifically
   rather than emptied globally (the <title>, schema and feeds still need blogname). */
.ast-above-header-bar .ast-site-title-wrap,
.ast-primary-header-bar .ast-site-title-wrap,
.ast-mobile-header-wrap .ast-site-title-wrap {
	display: none;
}

/* Astra's zone wrappers must not add their own gaps on top of the row gap. */
.ast-builder-layout-element {
	align-items: center;
}

/* ------------------------------------------------------------------ logo ---- */

/**
 * Logo — mobile header and fallback: sized by WIDTH with height:auto (the breakpoint
 * rules below set 260 / 200, as approved in the 2026-09-16 mobile QA).
 *
 * This base rule must keep height:auto. The desktop rule below sets a fixed height; when
 * that was briefly put HERE instead, the phone rule's width:200 combined with it to
 * render the mark at 200x96 rather than 200x64 — stretched, and 32px taller.
 */
.site-branding .custom-logo-link img,
.ast-site-identity .custom-logo-link img {
	width: 318px;
	max-width: 100%;
	height: auto;
}

/**
 * Logo — desktop header: sized by HEIGHT, per the 2026-10-21 revision
 * (`height: 96px; width: auto`), so the mark spans the CTA-plus-nav column beside it.
 * From the 882x283 source that is 299.2px wide. Scoped to #ast-desktop-header so it can
 * never reach the mobile header's logo.
 */
#ast-desktop-header .site-branding .custom-logo-link img {
	height: 96px;
	width: auto;
	max-width: none;
}

/**
 * Logo — mobile header, tablet range: 260px across the WHOLE hamburger range.
 *
 * Keyed to #ast-mobile-header rather than a width media query because the hamburger
 * range moved (921 -> 1240, see the astra_tablet_breakpoint filter). A max-width:1023
 * rule left 1024-1240 on the 318px fallback — bigger than the desktop logo, and 139px
 * of header instead of 120. 260 rather than the old 190, which was smaller than the
 * phone size below.
 */
#ast-mobile-header .site-branding .custom-logo-link img {
	width: 260px;
	height: auto;
	max-width: 100%;
}

/**
 * Phones get a larger mark than the 160px first built.
 *
 * The logo is 390x124 (aspect 3.15), so 200px renders 63.5px tall inside an 87.3px header
 * bar — it still clears the bar and the menu toggle with room to spare.
 */
/* Id-scoped to match the rule above — an unscoped selector would now lose to it and the
   phone logo would jump to 260. */
@media (max-width: 767px) {
	#ast-mobile-header .site-branding .custom-logo-link img { width: 200px; }
}

/* ------------------------------------------------------------------- nav ---- */

/* The nav must never wrap onto a second line — it is a single row by design. Letting
   it wrap hides the overflow instead of surfacing it, which is how a too-wide nav ships
   looking "fine" in a screenshot. */
.ast-desktop .ast-builder-menu-1 .main-header-menu {
	flex-wrap: nowrap;
}

.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link,
.ast-builder-menu-1 .main-header-menu > .menu-item > .ast-menu-toggle + .menu-link {
	font-family: var(--ladd-font-nav);
	font-size: var(--ladd-fs-nav);
	font-weight: var(--ladd-weight-nav);
	line-height: 28px;
	letter-spacing: normal;
	text-transform: none;
	white-space: nowrap;
	color: var(--ladd-headings);
	/* The revision gives nav links `padding: 8px 0` — the nav now sits directly under
	   the CTA in the right-hand column rather than filling its own 56px row.
	   Astra's main.min.css sets `.main-header-menu .menu-link { padding: 0 1em }`
	   (0-2-0). Declaring only padding-block here would leave that 1em — which at a
	   17px font computes to 17px per side and silently adds 34px to every item.
	   The inline axis is therefore zeroed explicitly and the breathing room is applied
	   to the <li>, so the hover target stays the whole item rather than just the text. */
	padding-block: 8px;
	padding-inline: 0;
}

/**
 * 17px between items, the revision's `gap: 17px`.
 *
 * Applied as 8.5px either side of each <li> rather than a flex gap, so the hover target
 * still covers the space around the label. The OUTER edges are zeroed: the last item so
 * the nav ends flush with the CTA above it, and the first because otherwise it counts
 * toward the nav's width — and the width budget here is ~1px (see configure-header.php).
 * Geometrically this is identical to `gap: 17px`.
 */
.ast-builder-menu-1 .main-header-menu > .menu-item {
	padding-inline: var(--ladd-nav-item-gap, 8.5px);
}

.ast-builder-menu-1 .main-header-menu > .menu-item:first-child {
	padding-left: 0;
}

.ast-builder-menu-1 .main-header-menu > .menu-item:last-child {
	padding-right: 0;
}

/* Hover darkens toward the accent — never lightens. */
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link:hover,
.ast-builder-menu-1 .main-header-menu > .menu-item.current-menu-item > .menu-link,
.ast-builder-menu-1 .main-header-menu > .menu-item.current-menu-ancestor > .menu-link {
	color: var(--ladd-accent-text);
}

/* Astra underlines menu links inside .entry-content contexts and on some archive
   templates; the nav is never underlined in this design. */
.ast-builder-menu-1 .main-header-menu .menu-link { text-decoration: none; }

/* ------------------------------------------------------- dropdowns + mega ---- */

/* Shared panel treatment: white, hairline, 10px radius (the dropdown/panel radius),
   soft shadow. Applies to the two ordinary dropdowns and the two mega panels. */
.ast-desktop .ast-builder-menu-1 .sub-menu,
.ast-desktop .astra-full-megamenu-wrapper {
	background-color: var(--ladd-background);
	border: 1px solid var(--ladd-hair);
	border-radius: var(--ladd-radius-card);
	box-shadow: var(--ladd-shadow-sm);
	padding: var(--ladd-space-4) 0;
}

.ast-desktop .astra-full-megamenu-wrapper {
	padding: var(--ladd-space-7) var(--ladd-space-8);
}

/* Submenu links: one step down from the top-level nav. */
.ast-desktop .ast-builder-menu-1 .sub-menu .menu-link {
	font-family: var(--ladd-font-nav);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--ladd-body);
	padding: 9px var(--ladd-space-5);
	border-bottom: 0;
}

.ast-desktop .ast-builder-menu-1 .sub-menu .menu-link:hover,
.ast-desktop .ast-builder-menu-1 .sub-menu .menu-item.current-menu-item > .menu-link {
	color: var(--ladd-accent-text);
	background-color: var(--ladd-bg-section-alt);
}

/* Mega menu columns: the first level inside the panel is a column heading, so it
   reads as a group label rather than another link.

   Alignment: Astra applies `padding-left: 15px` to `.astra-megamenu > .menu-item`, but
   not to the first one, so the first group in the panel sat 15px left of every other
   group. Both the item and the heading link are zeroed on the inline axis so every
   group aligns to its own column edge (and therefore to the column-rule divider). */
.ast-desktop [class*="ladd-mega-cols-"] .astra-megamenu > .menu-item {
	padding-inline: 0 !important;
}

.ast-desktop .astra-megamenu > .menu-item > .menu-link {
	font-family: var(--ladd-font-heading);
	font-size: 15px;
	font-weight: var(--ladd-weight-heading);
	letter-spacing: 0.02em;
	color: var(--ladd-headings);
	padding-inline: 0;
}

/* Child links sit one step in from their group heading. */
.ast-desktop [class*="ladd-mega-cols-"] .astra-megamenu .sub-menu .menu-link {
	padding-left: var(--ladd-space-4);
	padding-right: 0;
}

.ast-desktop .astra-megamenu > .menu-item > .menu-link:hover {
	color: var(--ladd-accent-text);
	background-color: transparent;
}

/* Column dividers come from Astra's generated CSS (set via the menu item's
   _menu_item_megamenu_column_divider_* meta); the last column must not carry one. */
.ast-desktop .astra-megamenu > .menu-item:last-child {
	border-right: 0 !important;
}

/* ---- mega menu columns: shim for the Astra Pro 4.13.4 bug ----
   Astra never emits its own col-N class (see ladd_megamenu_column_class() in
   functions.php for the full diagnosis), so the panel's flex children all land on one
   row. The ladd-mega-cols-N class comes from that shim, driven by the same
   _menu_item_megamenu_col meta Astra already stores.

   Column width is DERIVED from the count, not hardcoded per menu — change the count in
   configure-header.php and the maths follows. !important is needed because Astra's own
   `.astra-megamenu ... > .menu-item { flex: 1 }` lands at higher specificity from the
   generated bundle. */
/* CSS multi-column, not flex-wrap.
   Flex wrapping puts the groups into fixed rows, so a tall group (Probate, which has a
   child) sets the height of everything beside it and leaves ragged vertical gaps — and
   Astra's per-column divider border then only paints alongside the first row. Columns
   flow the groups continuously and `column-rule` draws a full-height divider. */
.ast-desktop [class*="ladd-mega-cols-"] .astra-megamenu {
	display: block !important;
	column-count: var(--ladd-mega-cols);
	column-gap: var(--ladd-space-8);
	column-rule: 1px solid var(--ladd-hair);
}

.ast-desktop [class*="ladd-mega-cols-"] .astra-megamenu > .menu-item {
	/* Astra sets `flex: 1` on these from the generated bundle; in a column context that
	   is meaningless but width:auto still has to be reasserted. */
	flex: none !important;
	width: auto !important;
	/* Never split a practice area away from its own children. */
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	display: block;
	margin-bottom: var(--ladd-space-6);
	/* Astra's generated divider border is per-item and redundant once column-rule
	   draws the real one. */
	border-right: 0 !important;
}

.ast-desktop .ladd-mega-cols-2 .astra-megamenu { --ladd-mega-cols: 2; }
.ast-desktop .ladd-mega-cols-3 .astra-megamenu { --ladd-mega-cols: 3; }
.ast-desktop .ladd-mega-cols-4 .astra-megamenu { --ladd-mega-cols: 4; }
.ast-desktop .ladd-mega-cols-5 .astra-megamenu { --ladd-mega-cols: 5; }
.ast-desktop .ladd-mega-cols-6 .astra-megamenu { --ladd-mega-cols: 6; }

/* Nested lists inside a column must not be positioned or width-constrained. */
.ast-desktop [class*="ladd-mega-cols-"] .astra-megamenu > .menu-item > .sub-menu {
	position: static;
	width: auto;
	min-width: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	background: transparent;
	opacity: 1;
	visibility: visible;
}

/* ------------------------------------------------------------ header CTA ---- */

/* [company-phone] renders a complete <a>, so the anchor itself is the button.
   Wrapping it in another anchor would nest — hence styling the descendant. */
.ladd-header-cta { line-height: 0; }

.ladd-header-cta a {
	display: inline-block;
	font-family: var(--ladd-font-button);
	font-size: 18px;
	font-weight: var(--ladd-weight-button);
	line-height: 28px;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	padding: 14px 26px;
	background-color: var(--ladd-accent);
	border: 2px solid var(--ladd-accent);
	border-radius: var(--ladd-radius-button);
	color: #FFFFFF;
	transition:
		background-color var(--ladd-duration-fast) var(--ladd-ease),
		border-color var(--ladd-duration-fast) var(--ladd-ease);
}

.ladd-header-cta a:hover,
.ladd-header-cta a:focus {
	background-color: var(--ladd-accent-hover);
	border-color: var(--ladd-accent-hover);
	color: #FFFFFF;
}

/* Astra's HTML component adds paragraph margins inside the builder element.
   IMPORTANT: Astra reuses the class `.ast-header-html` for FOOTER html components too
   (Astra_Builder_UI_Controller::render_html_markup emits the same wrapper for both).
   An unscoped `line-height: 0` here collapsed every line in the footer's brand and
   contact columns on top of each other. Scope to the header bars only. */
.ast-above-header-bar .ast-header-html .ast-builder-html-element,
.ast-primary-header-bar .ast-header-html .ast-builder-html-element,
.ast-above-header-bar .ast-header-html .ast-builder-html-element p,
.ast-primary-header-bar .ast-header-html .ast-builder-html-element p {
	margin: 0;
	line-height: 0;
}

/* --------------------------------------------------------- mobile header ---- */

/* Astra swaps to the off-canvas trigger at the configured breakpoint (921). */
.ast-header-break-point .ast-primary-header-bar > .ast-container {
	min-height: 76px;
	gap: var(--ladd-space-4);
}

/* Hamburger in brand colour, not Astra's default link blue. */
.ast-header-break-point .menu-toggle,
.ast-header-break-point .ast-mobile-menu-trigger-minimal {
	color: var(--ladd-headings);
	background-color: transparent;
	border: 0;
}

.ast-header-break-point .menu-toggle .ast-mobile-svg { fill: var(--ladd-headings); }

/* Off-canvas panel: submenus expand inline as an accordion rather than fly out. */
.ast-mobile-popup-drawer .main-header-menu .menu-link {
	font-family: var(--ladd-font-nav);
	font-size: 17px;
	font-weight: var(--ladd-weight-nav);
	color: var(--ladd-headings);
	border-bottom: 1px solid var(--ladd-hair);
}

.ast-mobile-popup-drawer .main-header-menu .sub-menu .menu-link {
	font-size: 16px;
	font-weight: 400;
	color: var(--ladd-body);
}

/* The phone CTA also appears in the off-canvas panel; give it room. */
.ast-mobile-popup-drawer .ladd-header-cta {
	padding: var(--ladd-space-6) 0 0;
	line-height: normal;
}

.ast-mobile-popup-drawer .ladd-header-cta a {
	display: block;
	width: 100%;
}

/* ------------------------------------------- collapsible mega-menu groups ---- */

/**
 * [12] The "Areas We Serve" panel is 703px of locations against an 800px viewport, with
 * no scroll — the last few were unreachable. Each location collapses to its label, and
 * the panel is capped and scrollable as a backstop for short screens.
 *
 * Only applied to panels megamenu.js marked as collapsible (those whose second-level
 * items actually have children), so the Practice Areas panel is untouched.
 */
.astra-megamenu.ladd-mega--collapsible {
	max-height: calc(100vh - 220px);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}

/* The label link and its toggle share one row. */
.ladd-mega--collapsible .ladd-mega-group > a {
	display: inline-flex;
	align-items: center;
}

.ladd-mega-toggle {
	position: absolute;
	top: 0;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin-left: 4px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 50%;
	color: currentColor;
	cursor: pointer;
	vertical-align: middle;
	transition: transform var(--ladd-duration-fast) var(--ladd-ease),
		background-color var(--ladd-duration-fast) var(--ladd-ease);
}

.ladd-mega-toggle:hover { background-color: rgba(0, 0, 0, 0.06); }

.ladd-mega-toggle:focus-visible {
	outline: 2px solid var(--ladd-accent);
	outline-offset: 2px;
}

/**
 * The toggle is positioned against the group, not laid out in a row with the label.
 *
 * Making the <li> a flex row was the obvious approach and it fought the theme the whole
 * way: Astra forces `display: block` on mega-menu items, gives their links `width: 100%`,
 * and centres the result — the chevron ended up under a centred label. Taking the button
 * out of flow sidesteps all three.
 */
.ladd-mega--collapsible .ladd-mega-group {
	position: relative;
	padding-right: 32px;
}

/**
 * Collapsed by default; the chevron points down.
 *
 * !important is beating Astra Pro's
 * `.ast-desktop .ast-mega-menu-enabled .astra-megamenu-li.megamenu-active .astra-megamenu
 *  ... { display: block }` — a five-class selector that forces every sub-menu inside an
 * open mega menu visible. Nothing at a sane specificity can override it.
 */
.ladd-mega--collapsible .ladd-mega-group > ul { display: none !important; }
.ladd-mega--collapsible .ladd-mega-group--open > ul { display: block !important; }
.ladd-mega--collapsible .ladd-mega-group--open > .ladd-mega-toggle { transform: rotate(180deg); }

/* Without JS every group stays open, which is the behaviour this replaces. */
.astra-megamenu:not(.ladd-mega--collapsible) .sub-menu { display: block; }

/* ------------------------------------------------ mobile menu QA 2026-09-14 ---- */

/**
 * [16] No chevron before each sub-page name.
 *
 * Astra injects `<span class="ast-icon icon-arrow"><svg …>` inside every sub-menu link,
 * which rendered as a "›" to the left of every page title in the drawer. The toggle
 * arrows on items that actually expand are a different element (.ast-menu-toggle) and are
 * deliberately left alone — those still need to be visible.
 */
.ast-mobile-header-content .sub-menu .menu-link > .ast-icon {
	display: none !important;
}

/**
 * [17] The drawer scrolls.
 *
 * With Practice Areas expanded the panel is 954px against an 844px viewport, but it sets
 * `overflow-y: visible` while Astra locks the body — so the last practice areas could not
 * be reached by scrolling the page OR the menu. Capping it to the space below the header
 * and letting it scroll internally makes every item reachable.
 *
 * `dvh` first so the cap follows the mobile browser's collapsing toolbar; `vh` is the
 * fallback for anything that does not support it.
 */
.ast-mobile-header-content {
	max-height: calc(100vh - var(--ladd-mobile-header, 88px));
	max-height: calc(100dvh - var(--ladd-mobile-header, 88px));
	overflow-y: auto !important;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

/**
 * Phone glyph on the header CTA (2026-10-20 header revision).
 *
 * A CSS mask on a pseudo-element, not inline <svg>: the CTA is an Astra HTML component
 * and Astra strips <svg> out of those — the same reason the footer icons are CSS rather
 * than markup. `currentColor` through the mask keeps the glyph the same white as the
 * label, including on hover.
 *
 * The anchor itself comes from [company-phone], so nothing here may add a second <a>.
 */
.ladd-header-cta a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.ladd-header-cta a::before {
	content: "";
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: var(--ladd-phone-glyph) center / contain no-repeat;
	mask: var(--ladd-phone-glyph) center / contain no-repeat;
}

:root {
	--ladd-phone-glyph: 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.127.96.361 1.903.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.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

/* ======================================== breakpoint move: undo side effects ==== */

/**
 * The hamburger moved from 921 to 1240 via astra_tablet_breakpoint (functions.php). That
 * filter moves Astra's WHOLE tablet breakpoint, not just the header switch, so Astra's
 * other tablet styles started applying across 922-1240 as well.
 *
 * Found by diffing the computed style of every element in <main> and the footer, with
 * the filter on and off, at 950/1000/1100/1200/1240 on five page types. Headings, body
 * copy, buttons and content layout were identical. Exactly these three differed, and
 * each is put back to its pre-move value here — nothing else needs restoring.
 *
 * Why the header-only filter (astra_header_break_point) was not used instead: it moves
 * the switch in JS, so before the script runs the server-rendered desktop header paints
 * at 922-1240 — overflowing, with horizontal scroll — and then swaps. Tested with JS
 * off: a visible flash and a layout shift on every load at laptop widths.
 *
 * If the breakpoint filter is ever removed, remove this block with it.
 *
 * Specificity is deliberate. Astra's tablet rules tie on specificity with the child's
 * and still win on source order (confirmed with CDP), so equal-weight overrides lose
 * silently. :root and #colophon win on weight instead.
 */
@media (min-width: 922px) and (max-width: 1240px) {

	/* 1. Astra's tablet `html { font-size: 91.2% }` took the root from 16px to 14.592px,
	      shrinking the footer copyright text and the carousel arrow buttons. */
	:root {
		font-size: 100%;
	}

	/* 2. Astra's tablet "stack" rule gave every footer section 10px of bottom margin,
	      adding 30px to the footer. */
	#colophon .ast-footer-row-tablet-stack .site-footer-section {
		margin-bottom: 0;
	}
}

/* 3. Astra's tablet "2-equal" grid replaced the footer's three columns, wrapping the
      Mississippi office onto its own row (footer 642px -> 1113px). Only 922-1023 needs
      it: from 1024 footer.css already forces `2fr 1fr 1fr !important`. The value is
      footer.css's own unconditional grid, restated at a weight that beats Astra's. */
@media (min-width: 922px) and (max-width: 1023px) {
	#colophon .site-above-footer-wrap .ast-builder-grid-row {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
		gap: 56px;
	}
}


/* ================================================================ top bar ==== */

/**
 * 2026-11-17 homepage revision: orange top bar above the logo row — phone left,
 * Make a Payment / Client Portal right (design .ld-topbar). Built from Astra's above row
 * (html-2 left, html-3 right) on both the desktop and mobile headers, so it is part of
 * the sticky #masthead. Content comes from [ladd_topbar] (functions.php).
 *
 * Astra paints the above bar at `.ast-above-header.ast-above-header-bar` (0-2-0);
 * matched at equal specificity and wins on source order.
 */
.ast-above-header.ast-above-header-bar {
	background-color: var(--ladd-accent);
	border-bottom: 0;
}

.ast-above-header-bar > .ast-container,
.ast-above-header-bar .ast-builder-grid-row {
	min-height: 0;
}

/* Astra pads the MOBILE above row 5px top/bottom; the design's bar is the links alone. */
#ast-mobile-header .ast-above-header-bar,
#ast-mobile-header .ast-above-header-bar > .ast-container {
	padding-block: 0;
	min-height: 0;   /* Astra's mobile above row defaults to a 50px min-height */
}

.ast-above-header-bar .site-header-above-section-left > .ast-builder-layout-element,
.ast-above-header-bar .site-header-above-section-right > .ast-builder-layout-element {
	padding-inline: 0;
}

.ladd-topbar__links {
	display: flex;
	align-items: center;
	gap: 28px;
}

/* [company-phone] is a complete <a>; style the descendant, never wrap it. */
.ladd-topbar a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 0;
	font-family: var(--ladd-font-body);
	font-size: 15px;
	font-weight: 700;
	line-height: 28px;   /* design: 46px bar = 9 + 28 + 9 at desktop, 40px (22px line) on phones */
	white-space: nowrap;
	color: #FFFFFF;
	text-decoration: none;
	transition: opacity var(--ladd-duration-fast) var(--ladd-ease);
}

.ladd-topbar a:hover,
.ladd-topbar a:focus-visible {
	color: #FFFFFF;
	opacity: .82;
}

.ladd-topbar a:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: 2px;
}

.ladd-topbar__phone a::before {
	content: "";
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	background-color: currentColor;
	-webkit-mask: var(--ladd-phone-glyph) center / contain no-repeat;
	mask: var(--ladd-phone-glyph) center / contain no-repeat;
}

.ladd-topbar svg { flex: 0 0 auto; }

/* Phones: 22px line (the design's body line-height there) -> 40px bar. After the base
   rule so it wins on source order. */
@media (max-width: 767px) {
	.ladd-topbar a { line-height: 22px; }
}

/* Design: icon-only payment/portal links below 560px. */
@media (max-width: 560px) {
	.ladd-topbar__label { display: none; }
	.ladd-topbar__links { gap: 22px; }
}
