/*
 * MBA Medical: site chrome (masthead and footer).
 * Desktop values are from the Figma Masthead (1:536) and Footer (1:715) at 1440 px.
 * Widths below 1280 px use the collapsed navigation. Figma shows only a 390 px mobile reference, so the
 * range between is inferred and flagged in docs/redesign-architecture-proposal.md.
 */

/* ------------------------------ Masthead ------------------------------ */
.mba-masthead {
	background-color: var(--wp--preset--color--paper);
	padding: 22px clamp(24px, 0.5rem + 3.2vw, 48px);
}
.mba-masthead__inner {
	align-items: center;
	display: flex;
	flex-wrap: nowrap;
	justify-content: space-between;
	margin: 0 auto;
	max-width: 1344px; /* 1440 canvas minus 48px each side */
}
.mba-masthead .wp-block-site-logo { flex: none; line-height: 0; }
.mba-masthead .wp-block-site-logo img { display: block; height: auto; width: 250px; }

/* Doubled class: core's flex-layout rule (margin: 0 on every child) has the same specificity as one class and loads later. */
.mba-masthead .mba-masthead__group {
	align-items: center;
	display: flex;
	flex: 1 1 auto;
	gap: 24px;
	justify-content: space-between;
	/* The menu sits close to the logo (40px), and the buttons stay at the right edge. Any spare width falls between them. */
	margin-left: 40px;
	min-width: 0;
}
.mba-masthead__actions {
	align-items: center;
	display: flex;
	flex: none;
	gap: 16px;
}
.mba-masthead__actions .wp-block-buttons { gap: 16px; flex-wrap: nowrap; }

/* Primary navigation: Inter Semi Bold 16, line height 1.55, 24px gaps. */
.mba-masthead .wp-block-navigation {
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--nav);
	font-weight: 600;
	gap: 24px;
	line-height: 1.55;
}
.mba-masthead .wp-block-navigation .wp-block-navigation__container { gap: 24px; }
.mba-masthead .wp-block-navigation-item__content {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.mba-masthead .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--slate); }
/* Chevron: Figma draws it 10 x 5 px with a 1.6 px stroke, 7 px after the label. Core's icon is a 12 x 12 drawing whose arrow
   is 9 x 4 units, so it needs a 14 px box (scale 1.167 = a 10.5 x 4.7 px arrow, stroke 1.4 x 1.167 = 1.6 px). The margins
   keep the item the same width as before (5 + 14 - 2 = the 17 px the 10 px icon plus 7 px gap took). */
.mba-masthead .wp-block-navigation__submenu-icon { margin-left: 5px; margin-right: -2px; }
.mba-masthead .wp-block-navigation__submenu-icon svg { height: 14px; width: 14px; }
.mba-masthead .wp-block-navigation__submenu-icon svg path { stroke-width: 1.4; } /* core sets 1.5 on the path itself */

/* Every top-level label stays on one line (the row is sized so they fit). Dropdown panel text may still wrap. */
@media (min-width: 1280px) {
	.mba-masthead .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { white-space: nowrap; }
}

/* 1280 to 1439 px: the same row, a little tighter, so the full menu and both buttons fit on one line. */
@media (min-width: 1280px) and (max-width: 1439px) {
	.mba-masthead .wp-block-site-logo img { width: 190px; }
	.mba-masthead .mba-masthead__group { gap: 14px; margin-left: 24px; }
	.mba-masthead .wp-block-navigation { font-size: 15px; }
	.mba-masthead .wp-block-navigation,
	.mba-masthead .wp-block-navigation .wp-block-navigation__container { gap: 14px; }
	.mba-masthead__actions,
	.mba-masthead__actions .wp-block-buttons { gap: 8px; }
	.mba-masthead__actions .wp-block-button__link { font-size: 15px; padding-inline: 15px; }
}

/* 1440 to 1499 px: a visible page scroll bar (Windows) takes 15 px from the row, so close the gaps a little. */
@media (min-width: 1440px) and (max-width: 1499px) {
	.mba-masthead .mba-masthead__group { gap: 20px; }
	.mba-masthead .wp-block-navigation,
	.mba-masthead .wp-block-navigation .wp-block-navigation__container { gap: 20px; }
}

/* Collapsed navigation below 1280 px: hide the inline menu and actions, show the menu button.
   Core switches at 600 px, so the rules below move that breakpoint up. */
@media (max-width: 1279px) {
	.mba-masthead { padding-block: 0; }
	.mba-masthead__inner { min-height: 80px; }
	/* Doubled class: core's .is-layout-flex rule has the same specificity and loads later. */
	.mba-masthead .mba-masthead__group { flex: 0 0 auto; margin-left: 0; }
	.mba-masthead .mba-masthead__actions { display: none; }
	.mba-masthead .wp-block-navigation__responsive-container-open { display: flex; }
	.mba-masthead .wp-block-navigation__responsive-container:not(.is-menu-open.has-modal-open) { display: none; }
}

@media (max-width: 767px) {
	.mba-masthead { padding-inline: 24px; }
	.mba-masthead .wp-block-site-logo img { width: 210px; }
}

/* ------------------------------- Footer ------------------------------- */
.mba-footer {
	background-color: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--dark-body);
	padding-block: 104px 64px;
	padding-inline: var(--wp--custom--layout--gutter);
}
.mba-footer__inner { margin: 0 auto; max-width: 1280px; }
.mba-footer__columns {
	display: grid;
	gap: 40px;
	/* 250 / 240 / 200 / 180 / 250 at a 1280 px container (Figma). The fr units keep those proportions when the container is narrower. */
	grid-template-columns: minmax(0, 250fr) minmax(0, 240fr) minmax(0, 200fr) minmax(0, 180fr) minmax(0, 250fr);
}
.mba-footer :where(p, li, a) { font-size: var(--wp--preset--font-size--body-sm); line-height: var(--wp--custom--line-height--body-sm); }
.mba-footer__about { font-size: var(--wp--preset--font-size--body); line-height: var(--wp--custom--line-height--body); margin: 24px 0 0; }
.mba-footer__heading {
	color: var(--wp--preset--color--peach);
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--body);
	margin: 0 0 14px;
}
.mba-footer__list { display: flex; flex-direction: column; gap: 14px; list-style: none; margin: 0; padding: 0; }
.mba-footer a { color: var(--wp--preset--color--dark-body); text-decoration: none; }
.mba-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Phone and email links are always visibly underlined (design system rule). */
.mba-footer__contact a[href^="tel:"],
.mba-footer__contact a[href^="mailto:"] {
	color: var(--wp--preset--color--dark-sky);
	font-weight: 600;
	text-decoration: underline;
	text-underline-position: from-font;
}
.mba-footer__rule { background-color: var(--wp--preset--color--dark-rule); border: 0; height: 1px; margin: 56px 0; opacity: 1; }
.mba-footer__legal {
	display: grid;
	font-size: var(--wp--preset--font-size--small);
	gap: 380px;
	grid-template-columns: 720px 160px;
	line-height: 1.55;
}
.mba-footer__legal :where(p, a) { font-size: inherit; line-height: inherit; margin: 0; }

/* Footer logo: the image uploaded in the Customizer (Footer). Approved size 230 px wide on desktop and phone, height auto
   (Figma 23:1038 "Approved logo / Website implementation"). The image keeps its own colors and transparency: no filter. */
.mba-footer-logo { display: block; max-width: 230px; }
.mba-footer-logo__img { display: block; height: auto; max-width: 100%; width: 230px; }

/* The design's 720 + 380 + 160 legal row only fits a 1280 px container, so it relaxes below a 1440 px viewport. */
@media (max-width: 1439px) {
	.mba-footer__legal { gap: 24px; grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 1099px) {
	.mba-footer__columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.mba-footer { padding-block: 64px 48px; padding-inline: 24px; }
	/* Order on mobile: logo and summary, contact details, then the three disclosure rows. */
	.mba-footer__columns { display: flex; flex-direction: column; gap: 0; }
	.mba-footer__columns > :nth-child(1) { order: 1; }
	.mba-footer__columns > .mba-footer__contact { order: 2; margin-top: 32px; margin-bottom: 32px; }
	.mba-footer__columns > :nth-child(2) { order: 3; }
	.mba-footer__columns > :nth-child(3) { order: 4; }
	.mba-footer__columns > :nth-child(4) { order: 5; }
	.mba-footer__contact .mba-footer__heading { margin-bottom: 14px; }
	.mba-footer__contact .mba-footer__list { gap: 14px; }
	.mba-footer .mba-footer__group { border-top: 1px solid var(--wp--preset--color--dark-rule); }
	.mba-footer .mba-footer__group summary {
		align-items: center;
		cursor: pointer;
		display: flex;
		justify-content: space-between;
		margin: 0;
		min-height: 44px;
		padding: 22px 0;
	}
	.mba-footer .mba-footer__group summary::after {
		background-color: currentcolor;
		content: "";
		flex: none;
		height: 6px;
		-webkit-mask: url("../img/chevron-down.svg") center / contain no-repeat;
		mask: url("../img/chevron-down.svg") center / contain no-repeat;
		width: 10px;
	}
	.mba-footer .mba-footer__group[open] summary::after { transform: rotate(180deg); }
	.mba-footer .mba-footer__group[open] .mba-footer__list { padding-bottom: 22px; }
	.mba-footer__rule { margin-block: 0 24px; }
	.mba-footer__columns + .mba-footer__rule { margin-top: 0; }
	.mba-footer__legal { gap: 24px; grid-template-columns: 1fr; padding-top: 0; }
}

/* Footer link groups are core Details blocks. On desktop they look like plain headed lists (summary styled as the peach
   heading, no marker, always open: assets/js/disclosures.js re-opens them if toggled). On mobile they are disclosure rows. */
.mba-footer .mba-footer__group summary {
	color: var(--wp--preset--color--peach);
	cursor: default;
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--body);
	list-style: none;
	margin: 0 0 14px;
}
.mba-footer .mba-footer__group summary::-webkit-details-marker { display: none; }
.mba-footer .mba-footer__group { margin: 0; }
.mba-footer .mba-footer__group > :not(summary) { margin: 0; }

/* ======================================================================== */
/* Navigation: dropdown panels (desktop) and the full-screen menu           */
/* (Figma 1:506 and 1:3225). The items are the core Navigation block, so    */
/* editors change links and labels in the Site Editor. Any top-level item   */
/* with a submenu is a one-column dropdown (the single-column look is       */
/* inferred, not in Figma). Add class mba-mega for the Services layout:     */
/* groups are nested submenus; the intro card and the "View All" row are    */
/* link items that use the link's Description field for their second line.  */
/* ======================================================================== */
.mba-masthead .wp-block-navigation .mba-nav-mobile-only { display: none; } /* shown only inside the full-screen menu */

/* ---------------- Desktop (1280 px and up): the panel ---------------- */
@media (min-width: 1280px) {
	.mba-masthead { position: relative; z-index: 30; }
	/* The panel is positioned against the masthead, not the Services item, so nothing between may be positioned. */
	.mba-masthead .wp-block-navigation,
	.mba-masthead .wp-block-navigation .wp-block-navigation__container,
	.mba-masthead .wp-block-navigation .wp-block-navigation__responsive-container,
	.mba-masthead .wp-block-navigation .wp-block-navigation__responsive-container-content,
	.mba-masthead .wp-block-navigation .wp-block-navigation__responsive-dialog { position: static; }

	/* EVERY top-level item that has a submenu is a dropdown, so it gets the caret, the underline, the open-state arrow flip,
	   and the panel below, with no per-item class. Add the class .mba-mega to an item to opt in to the three-column layout.
	   (Selector note: ".wp-block-navigation__container > .has-child" is only the top level; nested lists use
	   ".wp-block-navigation__submenu-container".) */
	.mba-masthead .wp-block-navigation__container > .has-child { padding-block: 20px; margin-block: -20px; position: static; } /* a taller hover area so the pointer can reach the panel */
	.mba-masthead .wp-block-navigation__container > .has-child > .wp-block-navigation-item__content { text-underline-offset: 6px; }
	.mba-masthead .wp-block-navigation__container > .has-child:is(:hover, :focus-within) > .wp-block-navigation-item__content,
	.mba-masthead .wp-block-navigation__container > .has-child:has([aria-expanded="true"]) > .wp-block-navigation-item__content { text-decoration: underline; }
	.mba-masthead .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-icon svg { transition: transform var(--wp--custom--motion--fast); }
	.mba-masthead .wp-block-navigation__container > .has-child:is(:hover, :focus-within) > .wp-block-navigation__submenu-icon svg,
	.mba-masthead .wp-block-navigation__container > .has-child > .wp-block-navigation-submenu__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
	.mba-masthead .wp-block-navigation__container > .has-child:has(> .wp-block-navigation-submenu__toggle[aria-expanded="true"]) > .wp-block-navigation__submenu-icon svg { transform: rotate(180deg); } /* opened by click or keyboard */

	/* The dropdown panel. It hangs from the bottom edge of the masthead (top: 100% of the masthead, because nothing between is
	   positioned), with the mega panel's border, radius, and shadow. Default shape is one column: left edge at the item's left
	   edge (left: auto keeps the static position), links as in a mega column, no title, no footer row. */
	.mba-masthead .wp-block-navigation .wp-block-navigation__container > .has-child.wp-block-navigation-submenu > .wp-block-navigation__submenu-container {
		align-items: stretch;
		background-color: var(--wp--preset--color--paper);
		border: 1px solid var(--wp--preset--color--line);
		border-radius: var(--wp--custom--radius--md);
		box-shadow: 0 16px 18px rgba(16, 45, 61, 0.12);
		box-sizing: border-box;
		color: var(--wp--preset--color--ink);
		display: flex;
		flex-direction: column;
		gap: 12px;
		height: auto;
		left: auto;
		margin: 0;
		min-width: 276px;
		opacity: 0;
		overflow: visible;
		padding: 20px;
		pointer-events: none;
		right: auto;
		top: 100%;
		transform: none;
		transition: opacity var(--wp--custom--motion--fast), visibility var(--wp--custom--motion--fast);
		visibility: hidden;
		width: max-content;
		z-index: 20;
	}
	/* The mega panel: 940 x 429 at x 400 on a 1440 canvas (centered: 50% minus 320). Same box as above, three columns. */
	.mba-masthead .wp-block-navigation .has-child.mba-mega.wp-block-navigation-submenu > .wp-block-navigation__submenu-container {
		align-items: normal;
		column-gap: 32px;
		display: grid;
		grid-template-columns: minmax(0, 276fr) minmax(0, 276fr) minmax(0, 260fr);
		left: max(24px, calc(50% - 320px));
		min-width: 0;
		padding: 32px 31px 24px 32px;
		row-gap: 0;
		width: min(940px, calc(100% - 48px));
	}
	/* Open (core sets aria-expanded on the toggle for hover, click, and keyboard alike). */
	.mba-masthead .wp-block-navigation .wp-block-navigation__container > .has-child.wp-block-navigation-submenu:has(> .wp-block-navigation-submenu__toggle[aria-expanded="true"]) > .wp-block-navigation__submenu-container {
		opacity: 1;
		pointer-events: auto;
		visibility: visible;
	}
	/* Dismissed with Escape while the pointer rests on it (see assets/js/disclosures.js). */
	.mba-masthead.mba-nav-dismissed .wp-block-navigation .wp-block-navigation__container > .has-child.wp-block-navigation-submenu > .wp-block-navigation__submenu-container {
		opacity: 0 !important; /* !important: the open-state rule above is more specific */
		pointer-events: none !important;
		visibility: hidden !important;
	}
	.mba-masthead.mba-nav-dismissed::after { display: none !important; }
	/* Bridge the gap between the item and its panel so hover does not drop. The gap is 16 px (item bottom at 80,
	   panel top at 96), so the strip is 24 px. It was 48 px, which reached up to y 47 and sat over the lower half of
	   every label to the right of Services (labels end at y 59), so the pointer could not move to them while the
	   Services panel was open. */
	.mba-masthead .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container::before {
		content: "";
		height: 24px;
		left: 0;
		position: absolute;
		right: 0;
		top: -25px;
	}

	/* Links in a single-column panel: the same rows as the links in a mega group column (18/30, 10 x 12 padding, 4 px radius). */
	.mba-masthead .wp-block-navigation .wp-block-navigation__container > .has-child:not(.mba-mega) > .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		border-radius: 4px;
		color: var(--wp--preset--color--ink);
		font-size: 18px;
		font-weight: 400;
		line-height: 30px;
		padding: 10px 12px;
		width: 100%;
	}
	.mba-masthead .wp-block-navigation .wp-block-navigation__container > .has-child:not(.mba-mega) > .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background-color: var(--wp--preset--color--nav-active); color: var(--wp--preset--color--ink); }
	.mba-masthead .wp-block-navigation .wp-block-navigation__container > .has-child:not(.mba-mega) > .wp-block-navigation__submenu-container .wp-block-navigation-item__content[aria-current="page"] { background-color: var(--wp--preset--color--nav-active); font-weight: 600; }
	/* No footer row in a single-column panel: the item's own label already links to the section's landing page. The
	   "View All" link item stays in the menu for the full-screen menu below 1280 px. */
	.mba-masthead .wp-block-navigation .wp-block-navigation__container > .has-child:not(.mba-mega) > .wp-block-navigation__submenu-container > .mba-mega__all { display: none; }

	/* Dim the page under the open panel (rgba(32,62,80,.2) in Figma). The panel itself is in front of it.
	   Anchored to the masthead's bottom edge (the masthead is position: relative and full width), not to the
	   viewport, so it starts exactly under the header whether or not the WordPress admin bar is showing
	   and wherever the page is scrolled. */
	.mba-masthead:has(.wp-block-navigation__container > .has-child > .wp-block-navigation-submenu__toggle[aria-expanded="true"])::after {
		background-color: rgba(32, 62, 80, 0.2);
		content: "";
		height: 100vh;
		left: 0;
		pointer-events: none;
		position: absolute;
		right: 0;
		top: 100%;
		z-index: 10;
	}

	/* Group columns */
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__group { align-items: stretch; display: flex; flex-direction: column; gap: 12px; position: static; } /* core centers flex items; the columns need full width */
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__group > .wp-block-navigation-item__content {
		color: var(--wp--preset--color--slate);
		font-family: var(--wp--preset--font-family--libre-baskerville);
		font-size: 28px;
		font-weight: 400;
		line-height: 36px;
		padding: 0;
		pointer-events: none;
	}
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__group > .wp-block-navigation__submenu-icon,
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__group > .wp-block-navigation-submenu__toggle { display: none; }
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__group > .wp-block-navigation__submenu-container {
		background: none;
		border: 0;
		box-shadow: none;
		display: flex;
		flex-direction: column;
		gap: 12px;
		height: auto;
		left: auto;
		min-width: 0;
		opacity: 1;
		overflow: visible;
		padding: 0;
		position: static;
		top: auto;
		visibility: visible;
		width: auto;
	}
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__group .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		border-radius: 4px;
		color: var(--wp--preset--color--ink);
		font-size: 18px;
		font-weight: 400;
		line-height: 30px;
		padding: 10px 12px;
		width: 100%;
	}
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__group .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background-color: var(--wp--preset--color--nav-active); color: var(--wp--preset--color--ink); }
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__group .wp-block-navigation-item__content[aria-current="page"] { background-color: var(--wp--preset--color--nav-active); font-weight: 600; }

	/* Core hides link descriptions on the front end; the intro card and the View All row use them. */
	.mba-masthead .mba-mega .wp-block-navigation-item__description { display: block; }

	/* Intro card */
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__intro { align-self: start; }
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__intro > .wp-block-navigation-item__content {
		background-color: var(--wp--preset--color--slate);
		border-radius: 6px;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		gap: 18px;
		padding: 24px;
		pointer-events: none;
		width: 100%;
	}
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__intro .wp-block-navigation-item__label {
		color: var(--wp--preset--color--cream);
		font-family: var(--wp--preset--font-family--libre-baskerville);
		font-size: 28px;
		font-weight: 400;
		line-height: 36px;
	}
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__intro .wp-block-navigation-item__description {
		color: var(--wp--preset--color--mist);
		font-size: 18px;
		font-weight: 400;
		line-height: 30px;
	}

	/* "View All Services" row */
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__all { border-top: 1px solid var(--wp--preset--color--line); grid-column: 1 / -1; margin-top: 28px; padding-top: 28px; }
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__all > .wp-block-navigation-item__content {
		align-items: center;
		display: flex;
		font-size: 18px;
		font-weight: 600;
		justify-content: space-between;
		line-height: 30px;
		padding: 0;
		width: 100%;
	}
	.mba-masthead .wp-block-navigation .has-child.mba-mega .mba-mega__all .wp-block-navigation-item__description { font-size: 16px; font-weight: 400; line-height: 26px; text-align: right; }
}

/* The logo copy inside the phone menu is only for the open full-screen menu; hidden everywhere else (including the desktop menu). */
.mba-masthead .mba-menu-logo { display: none; }

/* ---------------- Full-screen menu (below 1280 px), Figma 1:3225 ---------------- */
@media (max-width: 1279px) {
	.mba-masthead .wp-block-navigation__responsive-container.is-menu-open {
		background-color: var(--wp--preset--color--paper);
		color: var(--wp--preset--color--ink);
		padding: 0;
	}
	/* The comp repeats the masthead (logo and a close button) above the menu. This is the real site logo, added to the
	   overlay by mba_add_menu_logo(); the real logo link sits behind the overlay, so this copy is decorative. */
	.mba-masthead .is-menu-open .mba-menu-logo {
		display: block;
		height: 36.32px; /* approved mobile lockup: 210 x 36.32 */
		left: 24px;
		line-height: 0;
		pointer-events: none;
		position: absolute;
		top: 22px; /* centers the lockup in the 80 px phone masthead */
		width: 210px;
	}
	.mba-masthead .mba-menu-logo__img { display: block; height: auto; width: 210px; }
	.mba-masthead .is-menu-open .wp-block-navigation__responsive-container-close {
		height: 44px;
		right: 20px;
		top: 18px;
		width: 44px;
	}
	.mba-masthead .is-menu-open .wp-block-navigation__responsive-container-content { padding: 104px 24px 40px; }
	/* WordPress 7.x sets the overlay's top padding to 56 px with a selector that includes ":not(.disable-default-overlay)",
	   which outranks the rule above and slid the first button up under the logo. Same declaration, one more class. */
	.mba-masthead .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) .wp-block-navigation__responsive-container-content { padding: 104px 24px 40px; }
	.mba-masthead .is-menu-open .wp-block-navigation__container {
		align-items: stretch;
		display: flex;
		flex-direction: column;
		gap: 16px;
		width: 100%;
	}
	.mba-masthead .is-menu-open .wp-block-navigation-item { align-items: center; display: flex; flex-wrap: wrap; width: 100%; }
/* Core stacks and left-aligns has-child items in the open overlay; the comp puts the label and chevron on one row. */
.mba-masthead .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation .wp-block-navigation-item.has-child { align-items: center; flex-direction: row; }
.mba-masthead .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation .wp-block-navigation-item.mba-mega__group { align-items: stretch; flex-direction: column; }
	.mba-masthead .is-menu-open .wp-block-navigation .wp-block-navigation-item__content {
		box-sizing: border-box;
		color: var(--wp--preset--color--ink);
		flex: 1 1 0;
		width: 100%;
		font-size: 20px;
		font-weight: 500;
		line-height: 30px;
		padding: 14px 0;
	}
	/* Chevron toggles for the expandable rows (core hides them in hover-and-click mode). */
	.mba-masthead .is-menu-open .has-child > .wp-block-navigation-submenu__toggle,
	.mba-masthead .is-menu-open .has-child > .wp-block-navigation__submenu-icon {
		align-items: center;
		display: flex;
		flex: none;
		height: 44px;
		justify-content: center;
		margin: 0;
		padding: 0;
		position: static;
		width: 44px;
	}
	.mba-masthead .is-menu-open .wp-block-navigation .has-child > .wp-block-navigation-item__content { flex: 1 1 0; width: auto; } /* label and chevron share one row */
	/* Same arrow as desktop. Figma centers it 10 px in from the row's right edge; the 44 px tap target stays, with the arrow at its right side. */
.mba-masthead .is-menu-open .has-child > .wp-block-navigation__submenu-icon,
.mba-masthead .is-menu-open .has-child > .wp-block-navigation-submenu__toggle { justify-content: flex-end; }
.mba-masthead .is-menu-open .wp-block-navigation__submenu-icon svg { height: 14px; margin-right: 3px; width: 14px; }
	/* Open state comes from the .mba-sub-open class that disclosures.js sets. WordPress 7.x reports every submenu in the open overlay
	   as expanded (aria-expanded stays "true"), so the attribute can no longer drive the arrow or the collapse. */
	.mba-masthead .is-menu-open .has-child.mba-sub-open > .wp-block-navigation-submenu__toggle svg { transform: rotate(180deg); }

	/* Items that exist only in this menu. */
	.mba-masthead .is-menu-open .wp-block-navigation .mba-nav-mobile-only { display: flex; }
	.mba-masthead .is-menu-open .mba-nav-cta > .wp-block-navigation-item__content,
	.mba-masthead .is-menu-open .mba-nav-billpay > .wp-block-navigation-item__content {
		align-items: center;
		display: flex;
		font-size: 16px;
		justify-content: center;
		line-height: 24px;
		min-height: 52px;
		padding: 14px 16px;
		text-align: center;
	}
	.mba-masthead .is-menu-open .mba-nav-cta > .wp-block-navigation-item__content {
		background-color: var(--wp--custom--button--primary--bg);
		border-radius: var(--wp--custom--radius--md);
		color: var(--wp--custom--button--primary--label);
		font-weight: 500;
	}
	.mba-masthead .is-menu-open .mba-nav-billpay > .wp-block-navigation-item__content {
		background-color: var(--wp--custom--button--utility--bg);
		border-radius: var(--wp--custom--radius--sm);
		font-weight: 600;
		gap: 8px;
	}
	.mba-masthead .is-menu-open .mba-nav-billpay > .wp-block-navigation-item__content::before {
		background-color: currentcolor;
		content: "";
		flex: none;
		height: 20px;
		-webkit-mask: url("../img/icon-bill-pay.svg") center / contain no-repeat;
		mask: url("../img/icon-bill-pay.svg") center / contain no-repeat;
		width: 20px;
	}

	/* Expandable rows: a white card of links, opened with the chevron. */
	.mba-masthead .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation .has-child > .wp-block-navigation__submenu-container {
		background-color: var(--wp--preset--color--white);
		border: 0;
		border-radius: var(--wp--custom--radius--lg);
		box-shadow: none;
		box-sizing: border-box; /* WordPress 7.x no longer sets this; without it the card is 40 px wider than the menu (width 100% plus 20 px padding each side) */
		display: none;
		flex: 0 0 100%;
		flex-direction: column;
		gap: 20px;
		margin: 8px 0 0;
		min-width: 0;
		opacity: 1;
		padding: 20px;
		position: static;
		visibility: visible;
		width: 100%;
	}
	.mba-masthead .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation .has-child.mba-sub-open > .wp-block-navigation__submenu-container { display: flex; }
	.mba-masthead .is-menu-open .mba-mega__group { align-items: stretch; flex-direction: column; flex-wrap: nowrap; gap: 4px; }
	.mba-masthead .is-menu-open .mba-mega__group > .wp-block-navigation-item__content {
		color: var(--wp--preset--color--slate);
		flex: none;
		font-family: var(--wp--preset--font-family--libre-baskerville);
		font-size: 20px;
		font-weight: 400;
		line-height: 30px;
		padding: 0;
		pointer-events: none;
	}
	.mba-masthead .is-menu-open .mba-mega__group > .wp-block-navigation__submenu-icon,
	.mba-masthead .is-menu-open .mba-mega__group > .wp-block-navigation-submenu__toggle { display: none; }
	/* Nested group lists are always open inside the card. */
	.mba-masthead .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation .mba-mega__group > .wp-block-navigation__submenu-container {
		background: none;
		display: flex;
		gap: 0;
		margin: 0;
		padding: 0;
	}
	.mba-masthead .is-menu-open .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		font-size: 17px;
		font-weight: 400;
		line-height: 28px;
		padding: 10px 0;
	}
	.mba-masthead .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item[aria-current],
	.mba-masthead .is-menu-open .wp-block-navigation__submenu-container [aria-current="page"] { font-weight: 600; }
	/* The intro card and the right-hand description are desktop only. */
	.mba-masthead .is-menu-open .mba-mega__intro,
	.mba-masthead .is-menu-open .wp-block-navigation-item__description { display: none; }
	/* "View All" is an inline link at the foot of the card. */
	.mba-masthead .is-menu-open .mba-mega__all { border: 0; margin: 0; padding: 0; }
	.mba-masthead .is-menu-open .has-child .mba-mega__all > .wp-block-navigation-item__content { font-size: 16px; font-weight: 500; line-height: 24px; min-height: 52px; padding: 14px 0; }
}

@media (max-width: 1279px) {
	.mba-masthead .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item { padding: 0; margin: 0; }
}

@media (max-width: 1279px) {
	/* 16 px between rows (the desktop row gap of 26 px is overridden), and the white card sits 16 px under its row. */
	.mba-masthead .wp-block-navigation__responsive-container.is-menu-open ul.wp-block-navigation__container { gap: 16px; } /* the list is both .wp-block-navigation and its own container */
	.mba-masthead .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation .has-child > .wp-block-navigation__submenu-container {
		background-color: var(--wp--preset--color--white) !important; /* core resets the overlay submenu background */
		margin-top: 16px;
	}
	.mba-masthead .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation .mba-mega__group > .wp-block-navigation__submenu-container { background-color: transparent !important; margin-top: 0; }
}

@media (max-width: 1279px) {
	/* Group headings 30 px tall with 4 px between them and the links; links are 48 px (10 + 28 + 10) with 4 px between. */
	.mba-masthead .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation .mba-mega__group > .wp-block-navigation-item__content { padding: 0; }
	.mba-masthead .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation .mba-mega__group > .wp-block-navigation__submenu-container { gap: 4px; }
}

@media (max-width: 1279px) {
	/* The intro card is desktop only. */
	.mba-masthead .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation li.mba-mega__intro { display: none; }
}
