/*
 * WordPress-only fixes, loaded after app.css (the verbatim Astro build). See inc/enqueue.php.
 */

/* Insurance logos in the inner hero: a navy panel instead of the white one, with a light version of the logo
   (the logos are navy on transparent). invert + grayscale keeps inner details (Anthem / BCBS symbols). */
.ihero-media.logo { background: var(--navy); border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .6); }
.ihero-media.logo img { filter: invert(1) grayscale(1) brightness(1.1); }

/* Trustindex reviews widget: use the site's font (Jost) instead of its bundled "Trustindex Poppins". */
.ti-widget, .ti-widget * { font-family: var(--sans, "Jost", "Helvetica Neue", Arial, sans-serif) !important; }

/* Blog and category listings: post cards (image, category, date, title, excerpt, Learn More) in equal-height rows,
   then centered numbered pagination with previous / next arrows. Built on the theme's post-card look. */
.blog-list { background: var(--ground2); padding: clamp(44px, 6vw, 80px) 0; }
.blog-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(16px, 2vw, 24px); grid-auto-rows: 1fr; align-items: stretch; }
.blog-grid > li { display: flex; }
.blog-card { flex: 1; display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 1px 0 rgba(18, 40, 56, .05), 0 10px 30px -22px rgba(18, 40, 56, .35); transition: transform .2s ease, box-shadow .2s ease; }
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(18, 40, 56, .05), 0 18px 40px -22px rgba(18, 40, 56, .45); }
.blog-card-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy); }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.blog-card:hover .blog-card-media img { transform: scale(1.04); }
.blog-card-noimg { position: absolute; inset: 0; background: linear-gradient(118deg, var(--navy) 0%, #1B2E44 45%, var(--dusk, #4B3A5A) 100%); }
.blog-card-cat { position: absolute; left: 14px; bottom: 14px; padding: 5px 11px; border-radius: 999px; background: var(--ember-soft, #F6E6CF); color: var(--ember-ink, #8A5A1E); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; line-height: 1.2; }
.blog-card-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }
.blog-card-body time { font-size: 13.5px; color: var(--muted); }
.blog-card-title { margin: 0; font-family: var(--display); font-weight: 500; font-size: 1.3rem; line-height: 1.22; letter-spacing: -.005em; color: var(--navy); text-wrap: balance; }
.blog-card-title a { color: inherit; text-decoration: none; }
.blog-card-title a:hover { text-decoration: underline; text-decoration-color: var(--ember); text-underline-offset: 4px; }
.blog-card-excerpt { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.blog-card-more { margin-top: auto; padding-top: 8px; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--navy); text-decoration: none; border-bottom: 2px solid var(--ember); }
.blog-card-more span { transition: transform .2s ease; }
.blog-card-more:hover span, .blog-card-more:focus-visible span { transform: translateX(4px); }
.blog-card a:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 4px; }
.blog-pager { margin-top: clamp(32px, 4vw, 48px); display: flex; justify-content: center; }
.blog-pager ul { list-style: none; margin: 0; padding: 6px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; background: #fff; border-radius: 999px; box-shadow: 0 1px 0 rgba(18, 40, 56, .05); }
.blog-pager a, .blog-pager span { min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--navy); text-decoration: none; transition: background-color .15s ease, color .15s ease; }
.blog-pager a:hover { background: var(--ember-soft, #F6E6CF); }
.blog-pager .current { background: var(--navy); color: #fff; }
.blog-pager .dots { min-width: 24px; padding: 0; color: var(--muted); }
.blog-pager .pg-arrow { padding: 0; width: 42px; }
.blog-pager .pg-arrow.is-off { color: var(--line); }
.nl-issues { scroll-margin-top: 96px; }
.nl-issues h2 { margin: 0 0 clamp(22px, 3vw, 36px); }
@media (prefers-reduced-motion: reduce) { .blog-card, .blog-card-media img, .blog-card-more span { transition: none; } .blog-card:hover { transform: none; } .blog-card:hover .blog-card-media img { transform: none; } }

/* Phone menu: contact block at the bottom of the open menu (template-parts/header/drawer-contact.php). Content from
   Ava Theme → Contact Details and Header → Phone menu; on the menu's own background, with the site's ember button and round social icons. */
.nav-contact { display: none; }
@media (max-width: 1180px) {
  /* The phone menu is a column so the contact block sits at its bottom (it follows the menu when the menu is long).
     Selectors start with .nav: app.css resets every ".nav a" (no background, border or padding). */
  .nav { display: flex; flex-direction: column; }
  .nav:has(.nav-contact) { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .nav > ul { flex-shrink: 0; }
  .nav .nav-contact { display: grid; flex-shrink: 0; justify-items: center; gap: 18px; margin-top: auto; padding-top: 32px; color: var(--navy); text-align: center; }
  .nav .nav-contact-btns { display: grid; gap: 10px; width: 100%; }
  .nav .nav-contact .nav-contact-verify { width: 100%; min-height: 37px; padding: 0 15px; gap: 10px; font-size: 16px; }
  .nav .nav-contact .nav-contact-verify svg { width: 18px; height: 18px; }
  .nav .nav-contact .nav-contact-cta { width: 100%; min-height: 37px; padding: 0 15px; justify-content: center; gap: 10px; border-radius: 999px; border: 1.5px solid var(--ember); background: var(--ember); color: var(--night); font-size: 16px; }
  .nav .nav-contact .nav-contact-cta:hover { background: #E8B26E; border-color: #E8B26E; }
  .nav .nav-contact .nav-contact-cta svg { width: 18px; height: 18px; }
  /* Address and phone: each a full-width row, icon and text centered together, icon beside the middle of the text. */
  .nav .nav-contact-lines { display: grid; justify-items: stretch; gap: 12px; width: 100%; text-align: center; padding-top: 18px; border-top: 1px solid var(--line); }
  .nav .nav-contact-line { margin: 0; width: 100%; }
  .nav .nav-contact-line a, .nav .nav-contact-line > span { display: flex; width: 100%; justify-content: center; align-items: center; gap: 10px; padding: 0; border-radius: 0; color: var(--navy); font-family: var(--sans); font-size: 15.5px; font-weight: 500; line-height: 1.45; text-align: center; }
  .nav .nav-contact-line a:hover span { text-decoration: underline; text-underline-offset: 3px; }
  .nav .nav-contact-line svg { width: 18px; height: 18px; flex: none; color: var(--ember); }
  .nav .nav-contact .socials { margin-top: 0; justify-self: center; justify-content: center; }
  .nav .nav-contact .socials { gap: 12px; }
  .nav .nav-contact .socials a { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--navy); }
  .nav .nav-contact .socials svg { width: 20px; height: 20px; }
  .nav .nav-contact .socials a:hover { border-color: var(--navy); }
}

/* Staff (portrait) cards on About Us and other team grids: three across on desktop, two on tablets (phones keep
   the compact list from app.css under 600px). Four across was too tight. */
@media (min-width: 901px) {
  .ib-cards.portrait { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .ib-cards.portrait { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}

/* Gravity Forms swapped in for a theme placeholder form (inc/form-swap.php): the theme form's look. The variables are
   Gravity Forms' own style settings; !important beats the per-form values it prints inline. */
.ava-gf .gform_wrapper.gform-theme {
  --gf-font-family-base: var(--sans) !important;
  --gf-color-primary: #122838 !important;
  --gf-color-primary-rgb: 18, 40, 56 !important;
  --gf-ctrl-bg-color: #fff !important;
  --gf-ctrl-border-color: #DDD8D1 !important;
  --gf-ctrl-radius: 10px !important;
  --gf-ctrl-size: 48px !important;
  --gf-ctrl-padding-x: 14px !important;
  --gf-ctrl-font-size: 16px !important;
  --gf-ctrl-label-color-primary: #122838 !important;
  --gf-ctrl-label-font-size-primary: 14px !important;
  --gf-ctrl-label-font-weight-primary: 500 !important;
  --gf-ctrl-btn-bg-color-primary: #122838 !important;
  --gf-ctrl-btn-border-color-primary: #122838 !important;
  --gf-ctrl-btn-color-primary: #fff !important;
  --gf-ctrl-btn-radius: 999px !important;
  --gf-ctrl-btn-font-size: 16.5px !important;
  --gf-form-gap-y: 20px !important;
}
.ava-gf .gform_wrapper.gform-theme textarea { min-block-size: 110px !important; block-size: 110px !important; }
.ava-gf .gform_wrapper.gform-theme .gform_footer :is(input[type="submit"], button) { min-block-size: 50px; padding-inline: 28px; font-weight: 500; }
.ava-gf .gform_wrapper.gform-theme input[type="checkbox"] { accent-color: #122838; }

/* Verify Insurance popup: even padding (no 110px under the form), so the panel scrolls only when the form is taller than the screen. */
.vp-body {
	padding: 22px 28px 22px 28px;
}

/* ---- QA Before Launch fixes (2026-11-17) ---- */

/* Row 104, heading order: a heading block that would skip a level prints one level up (blocks.php) and keeps
   the look of the level its editor chose. */
.ib-col h3.as-h4 {
	font-size: 1.12rem;
	line-height: 1.08;
	letter-spacing: -0.01em;
	margin-top: 6px;
}
.ib-col h2 + h3.as-h4 { margin-top: 6px; }

/* Row 105, tap targets of at least 24×24px (WCAG 2.2 SC 2.5.8). Vertical padding on inline links grows the tap
   area without moving any text; the breadcrumb's negative margin cancels its extra height. */
.ftr li > a,
.ftr .ftr-bottom a,
.ftr .crisis a,
.gfield--type-consent .gform-field-label a {
	padding-block: 3px;
}
.crumbs li > a {
	padding-block: 1px;
	margin-block: -1px;
}
.gform_wrapper.gform-theme {
	--gf-ctrl-choice-size: 24px !important;
}

/* Row 106, cookie consent banner (inc/consent.php). Accept all and Reject all are the same size and style. */
.ava-consent {
	position: fixed;
	z-index: 1000;
	left: max(16px, env(safe-area-inset-left, 0px));
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	width: min(440px, calc(100vw - 32px));
	box-sizing: border-box;
	padding: 20px 22px;
	background: #fff;
	color: #122838;
	border: 1px solid #DDD8D1;
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(18, 40, 56, .18);
	font-family: var(--sans);
}
.ava-consent[hidden] { display: none; }
.ava-consent-title {
	margin: 0 0 6px;
	font-family: "Newsreader", Georgia, serif;
	font-size: 1.3rem;
	line-height: 1.2;
}
.ava-consent-text {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.5;
}
.ava-consent-text a {
	color: inherit;
	text-decoration: underline;
	padding-block: 3px;
}
.ava-consent-btns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.ava-consent-btn {
	min-height: 46px;
	padding: 10px 16px;
	border: 1px solid #122838;
	border-radius: 999px;
	background: #122838;
	color: #fff;
	font: 500 16px/1.2 var(--sans);
	cursor: pointer;
}
.ava-consent-btn:hover { background: #1d3a50; }
.ava-consent-btn:focus-visible { outline: 3px solid #122838; outline-offset: 3px; }
@media (max-width: 600px) {
	.ava-consent {
		left: 0;
		right: 0;
		bottom: 0;
		width: auto;
		border-radius: 14px 14px 0 0;
		border-width: 1px 0 0;
		padding: 18px max(16px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
	}
}

/* Equal-height cards. In these grids the card is the <a> inside each <li>, so the <li> stretched
   but the card did not. Each card now fills its cell, and every row takes the tallest card's height:
   .res-list = hub cards (/insurance/, /resource-hub/...) and the related-pages grid on inner pages;
   .treat-tiles = the home "What we treat" tiles. */
.res-list, .treat-tiles { grid-auto-rows: 1fr; }
.res-list > li, .treat-tiles > li { display: flex; }
.res-list > li > a, .treat-tiles > li > a { flex: 1; }

/* Insurer logo cards (hub cards that carry a logo): logo and title centered, logos in a
   fixed-height box so every title starts on the same line. */
.ihub .res-list a:has(> img) { align-items: center; justify-content: center; text-align: center; }
.ihub .res-list a:has(> img) img { height: 44px; max-height: 44px; width: 100%; max-width: 100%; object-fit: contain; }

/* Insurance logo strips in page sections (.ib-logos, the "Cost & Insurance" style), 19 Nov 2026:
   six logos per row on desktop (12 logos = 6 x 2), more space between them, and logos 20% larger
   than before (80px boxes -> 96px, every max-height x1.2). A short last row stays centered.
   Four per row on tablets, three on phones. The single-logo version (.solo) is unchanged. */
.ib-logos:not(.solo) { justify-content: center; gap: 28px 40px; max-width: 880px; margin-left: auto; margin-right: auto; }
.ib-logos:not(.solo) li { flex: 0 0 calc((100% - 5 * 40px) / 6); min-width: 0; }
.ib-logos:not(.solo) img { max-width: min(96px, 100%); max-height: 43px; }
.ib-logos:not(.solo) img.wide { max-height: 77px; }
.ib-logos:not(.solo) img.sq { max-height: 62px; }
.ib-logos:not(.solo) img.tight { max-height: 31px; }
@media (max-width: 900px) {
  .ib-logos:not(.solo) { gap: 24px 32px; }
  .ib-logos:not(.solo) li { flex-basis: calc((100% - 3 * 32px) / 4); }
}
@media (max-width: 560px) {
  .ib-logos:not(.solo) { gap: 20px 24px; }
  .ib-logos:not(.solo) li { flex-basis: calc((100% - 2 * 24px) / 3); }
  .ib-logos:not(.solo) img { max-height: 36px; }
  .ib-logos:not(.solo) img.sq { max-height: 52px; }
}

/* Mental Health Stabilization, "What You'll Actually Experience at Ava Health" (19 Nov 2026): its six cards
   sit three per row on desktop (two full rows) instead of four and two. Tablets and phones keep the theme's
   own two- and one-column layout. */
@media (min-width: 900px) {
  .postid-570 .ib-cards:has(> li:nth-child(6):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Related-card sections at the bottom of pages ("Our Programs", "Treatments", "Services", "Locations We Serve",
   newsletter issues), 19 Nov 2026: three cards per row on desktop, two on tablets, and a short last row is
   centered. A 6-column grid (each card spans 2) keeps every card the same height. */
@media (min-width: 901px) {
  .irel .res-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .irel .res-list > li { grid-column: span 2; }
  .irel .res-list > li:last-child:nth-child(3n+1) { grid-column: 3 / span 2; }
  .irel .res-list > li:nth-last-child(2):nth-child(3n+1) { grid-column: 2 / span 2; }
  .irel .res-list > li:last-child:nth-child(3n+2) { grid-column: 4 / span 2; }
}
@media (min-width: 561px) and (max-width: 900px) {
  .irel .res-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .irel .res-list > li { grid-column: span 2; }
  .irel .res-list > li:last-child:nth-child(2n+1) { grid-column: 2 / span 2; }
}

/* Mental Health Stabilization, "How We Track Your Healing Journey" (19 Nov 2026): the four progress measures are
   check boxes; each box's title sits on its own line above its description. */
.postid-570 .ib-checks li > strong:first-child { display: block; color: var(--navy); margin-bottom: 2px; }

/* Related-card sections on phones (19 Nov 2026): one card per row, each as tall as its own text. */
@media (max-width: 560px) {
  .irel .res-list { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .irel .res-list > li { grid-column: auto; }
}

/* Residential Treatment, "What We Offer" and "How We Track Progress" (19 Nov 2026): same check boxes as
   Mental Health Stabilization, title on its own line above its description. */
.postid-577 .ib-checks li > strong:first-child { display: block; color: var(--navy); margin-bottom: 2px; }

/* Team members without a photo yet (19 Nov 2026): a default profile avatar, a head-and-shoulders silhouette in
   Ava's soft lavender-gray, like social media's default picture. Covers the Team page and homepage portraits and the
   staff cards on About Us, Admissions and Contact. On phones the staff-card avatar is the small square beside the name. */
.portraits li.noimg, .portraits li:not(:has(img)) { background: #EFECF1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 125'%3E%3Ccircle cx='50' cy='40' r='18' fill='%23C9C2CF'/%3E%3Cpath d='M12 125V104c0-21 17-36 38-36s38 15 38 36v21z' fill='%23C9C2CF'/%3E%3C/svg%3E") no-repeat center bottom / 78% auto; }  /* taller figure: the head sits above the name band */
.ib-cards.portrait > li.ib-card:not(:has(> img))::before { content: ""; display: block; aspect-ratio: 4 / 5; background: #EFECF1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='37' r='19' fill='%23C9C2CF'/%3E%3Cpath d='M12 100c0-23 17-39 38-39s38 16 38 39z' fill='%23C9C2CF'/%3E%3C/svg%3E") no-repeat center bottom / 78% auto; }
@media (max-width: 600px) {
  .ib-cards.portrait > li.ib-card:not(:has(> img))::before { grid-column: 1; grid-row: 1 / span 2; width: 84px; aspect-ratio: 1 / 1; border-radius: 12px; }
}

/* Programs page, "Live-in care" and "Outpatient and aftercare" (19 Nov 2026): three cards per row on desktop and tablets, and a
   short last row is centered. A 6-column grid (each card spans 2) keeps the cards the same width. The third group
   (Medical Detox) and phones keep the theme's layout. */
@media (min-width: 700px) {
  .page-id-488 .ihub .path-group:nth-of-type(-n+2) .ihub-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .page-id-488 .ihub .path-group:nth-of-type(-n+2) .ihub-grid > * { grid-column: span 2; }
  .page-id-488 .ihub .path-group:nth-of-type(-n+2) .ihub-grid > :last-child:nth-child(3n+1) { grid-column: 3 / span 2; }
  .page-id-488 .ihub .path-group:nth-of-type(-n+2) .ihub-grid > :nth-last-child(2):nth-child(3n+1) { grid-column: 2 / span 2; }
  .page-id-488 .ihub .path-group:nth-of-type(-n+2) .ihub-grid > :last-child:nth-child(3n+2) { grid-column: 4 / span 2; }
}

/* Site container (19 Nov 2026): 1320px instead of 1200px. .wrap, the header bar and the home hero all use --max,
   so they widen together and the navbar stays lined up with page content. */
:root { --max: 1320px; }


/* ==========================================================================
   Review board cards, approved 20 Nov 2026
   ========================================================================== */

/* Cards 10, 12, 20, 21, 25: a navy button on a dark panel can't be seen. On the dark photo panels (.ib-band) and
   the navy panel (.tone-slate) it becomes the gold button, the same as in the dark call-to-action bands. */
.ib-band .btn-navy, .ib-panel.tone-slate .btn-navy { background: var(--ember); color: var(--night); border-color: var(--ember); }
.ib-band .btn-navy:hover, .ib-panel.tone-slate .btn-navy:hover { background: #E8B26E; border-color: #E8B26E; }

/* Card 1: home service tiles, every screen size (phones first, widened 20 Nov 2026 on request). The title sits
   right under the icon, so the titles in a row start at the same height whatever their length; spare space goes
   to the bottom of the tile. */
.tiles li { justify-content: flex-start; gap: 14px; }

/* Card 6: staff cards that have no role chip (Contact, Admissions, Verify Insurance) on phones. The job title sits
   under the name, both beside the photo, instead of on its own row below it. */
@media (max-width: 600px) {
  .ib-cards.portrait .ib-card-in:not(:has(.chip)) > strong { grid-row: 1; align-self: end; }
  .ib-cards.portrait .ib-card-in:not(:has(.chip)) > p { grid-column: 2; grid-row: 2; align-self: start; margin-top: 0; }
}

/* Card 43: team profile header once the photo drops under the text (tablets and phones). Role, name, buttons and
   photo are centred; the breadcrumb stays left. */
@media (max-width: 900px) {
  .single-team .ihero .kick, .single-team .ihero h1 { text-align: center; }
  .single-team .ihero h1 { margin-inline: auto; }
  .single-team .ihero-ctas { justify-content: center; }
  .single-team .ihero-media.portrait { justify-self: center; }
}

/* Card 16: phone menu. theme.js lists each parent page first inside its own sub-menu; that extra item only shows
   in the phone menu, never in the desktop flyouts. */
.nav .nav-parent { display: none; }
@media (max-width: 1180px) {
  .nav ul ul li.nav-parent { display: flex; }
  .nav ul ul li.nav-parent > a { font-weight: 500; }
}

/* Card 14: photo galleries open a large view (theme.js). */
.ib-gallery img { cursor: zoom-in; }
.ib-gallery img:focus-visible { outline: 3px solid var(--ember); outline-offset: -3px; }
dialog.lb { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(11, 26, 40, .95); color: #fff; overflow: hidden; }
dialog.lb[open] { display: grid; grid-template-columns: 76px minmax(0, 1fr) 76px; align-items: center; justify-items: center; }
dialog.lb::backdrop { background: rgba(11, 26, 40, .6); }
.lb-fig { grid-column: 2; grid-row: 1; margin: 0; max-width: 100%; display: grid; justify-items: center; gap: 10px; }
.lb-img { display: block; max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 12px; }
.lb-cap { font-size: 14px; color: rgba(255, 255, 255, .8); min-height: 1.4em; }
.lb-x, .lb-nav { width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-x:hover, .lb-nav:hover { background: rgba(255, 255, 255, .2); }
.lb-x:focus-visible, .lb-nav:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }
.lb-x { position: absolute; top: 12px; right: 14px; z-index: 1; }
.lb-x::before, .lb-x::after { content: ""; grid-area: 1 / 1; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transform: rotate(45deg); }
.lb-x::after { transform: rotate(-45deg); }
.lb-prev { grid-column: 1; grid-row: 1; }
.lb-next { grid-column: 3; grid-row: 1; }
.lb-nav::before { content: ""; width: 11px; height: 11px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateX(-2px) rotate(-45deg); }
.lb-prev::before { transform: translateX(2px) rotate(135deg); }
dialog.lb.lb-one .lb-nav { display: none; }
@media (max-width: 700px) {
  dialog.lb[open] { grid-template-columns: minmax(0, 1fr); }
  .lb-fig { grid-column: 1; padding: 0 12px; }
  .lb-img { max-height: calc(100vh - 210px); max-height: calc(100dvh - 210px); }
  .lb-nav { position: absolute; bottom: 18px; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { left: calc(50% + 12px); }
}


/* Round 9 (Christopher, Nov 17: "Make sure everywhere that has boxes or picture sets are centered to the page - site wide").
   Card grids now wrap as centered rows, so a short last row sits in the middle instead of flush left.
   Column counts match the old grid tracks: .ib-cards = auto-fit minmax(250px,1fr), .ihub-grid = auto-fill minmax(220px,1fr),
   .ib-cards.portrait = 3 / 2 columns (wp.css above), .portraits = 4 / 3 / 2 (app.css). Six cards balance as 3 + 3. */
.ib-cards:not(.portrait),
.ihub-grid:not(:where(.page-id-488 .ihub .path-group:nth-of-type(-n+2) .ihub-grid)) {
	display: flex; flex-wrap: wrap; justify-content: center; container-type: inline-size;
}
.ib-cards:not(.portrait) > li { flex: 0 0 auto; width: 100%; }
@container (min-width: 514px) { .ib-cards:not(.portrait) > li { width: calc((100% - 14px) / 2); } .ib-cards:not(.portrait):not(:has(> li:nth-child(3))) > li { flex: 1 1 0; } }
@container (min-width: 778px) { .ib-cards:not(.portrait) > li { width: calc((100% - 28px) / 3); } .ib-cards:not(.portrait):not(:has(> li:nth-child(4))) > li { flex: 1 1 0; } }
@container (min-width: 1042px) {
	.ib-cards:not(.portrait) > li { width: calc((100% - 42px) / 4); }
	.ib-cards:not(.portrait):not(:has(> li:nth-child(5))) > li { flex: 1 1 0; }
	.ib-cards:not(.portrait):has(> li:nth-child(6):last-child) > li { width: calc((100% - 28px) / 3); }
}
.ihub-grid:not(:where(.page-id-488 .ihub .path-group:nth-of-type(-n+2) .ihub-grid)) > * { flex: 0 0 auto; width: 100%; }
@container (min-width: 454px) { .ihub-grid > * { width: calc((100% - 14px) / 2); } }
@container (min-width: 688px) { .ihub-grid > * { width: calc((100% - 28px) / 3); } }
@container (min-width: 922px) { .ihub-grid > * { width: calc((100% - 42px) / 4); } }
@container (min-width: 1156px) { .ihub-grid > * { width: calc((100% - 56px) / 5); } }
@media (min-width: 601px) {
	.ib-cards.portrait, .portraits { display: flex; flex-wrap: wrap; justify-content: center; }
	.ib-cards.portrait > li { flex: 0 0 auto; width: calc((100% - 18px) / 2); }
	.portraits > li { flex: 0 0 auto; width: calc((100% - 32px) / 3); }
}
@media (min-width: 901px) {
	.ib-cards.portrait > li { width: calc((100% - 44px) / 3); }
	.portraits > li { width: calc((100% - 48px) / 4); }
}
@media (max-width: 600px) {
	.portraits { display: flex; flex-wrap: wrap; justify-content: center; }
	.portraits > li { flex: 0 0 auto; width: calc((100% - 10px) / 2); }
}

/* Round 9: BambooHR open roles on /careers/ */
.ava-jobs{list-style:none;margin:18px 0;padding:0;display:grid;gap:10px}
.ava-jobs li{margin:0;padding:0}
.ava-jobs a{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 18px;border:1px solid rgba(0,0,0,.12);border-radius:12px;text-decoration:none;color:inherit;background:#fff}
.ava-jobs a:hover{border-color:currentColor}
.ava-jobs .t{font-weight:600}.ava-jobs .m{font-size:.9em;opacity:.75}

/* Footer newsletter signup row (template-parts/footer/footer.php, Theme Settings → Footer). */
.ftr .ftr-nl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: center; margin-top: 30px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.16); }
.ftr .ftr-nl .ftr-h { font-family: var(--serif, Georgia, serif); font-size: 22px; font-weight: 400; letter-spacing: 0; margin-bottom: 8px; }
.ftr .ftr-nl .ftr-h a { color: #fff; text-decoration: none; }
.ftr .ftr-nl .ftr-h a:hover { text-decoration: underline; }
.ftr .ftr-nl p { margin: 0; color: rgba(255,255,255,.8); }
.ftr .ftr-nl .ava-gf .gform_wrapper.gform-theme {
  --gf-ctrl-label-color-primary: #fff !important;
  --gf-ctrl-label-color-secondary: rgba(255,255,255,.75) !important;
  --gf-ctrl-desc-color: rgba(255,255,255,.75) !important;
  --gf-ctrl-btn-bg-color-primary: #fff !important;
  --gf-ctrl-btn-border-color-primary: #fff !important;
  --gf-ctrl-btn-color-primary: #122838 !important;
  --gf-form-gap-y: 12px !important;
}
.ftr .ftr-nl .gform_wrapper .gfield_required { color: rgba(255,255,255,.7) !important; }
.ftr .ftr-nl .gform_wrapper .gform_validation_errors, .ftr .ftr-nl .gform_wrapper .validation_message { color: #fff !important; }
.ftr .ftr-nl .gform_confirmation_message { color: #fff; }
@media (max-width: 900px) { .ftr .ftr-nl { grid-template-columns: 1fr; gap: 18px; } }

/* Round 10: center short last rows that round 9 missed (Christopher, Nov 17: boxes and picture sets centered site-wide). */
/* Logo rows (homepage trust strip and insurance pages): flex rows so a short last row sits in the middle. */
.logos { display: flex; flex-wrap: wrap; justify-content: center; }
.logos li { flex: 0 0 calc((100% - 5 * 26px) / 6); }
@media (max-width: 900px) { .logos li { flex-basis: calc((100% - 3 * 26px) / 4); } }
@media (max-width: 560px) { .logos li { flex-basis: calc((100% - 2 * 16px) / 3); } }
/* Two-column check lists: an odd last item is centered under the pair above it. */
@media (min-width: 641px) {
  .prose.ib-checks ul > li:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc((100% - 14px) / 2); }
}
/* Photo galleries. Desktop (3 columns): one left over goes in the middle column; two left over sit centered. */
@media (min-width: 641px) {
  .ib-gallery:not(:has(> figure:nth-child(2):last-child)):not(:has(> figure:nth-child(4):last-child)):not(:has(> figure:nth-child(5):last-child)) > figure:last-child:nth-child(3n+1):not(:first-child) { grid-column: 2; }
  .ib-gallery:has(> figure:last-child:nth-child(3n+2)):not(:has(> figure:nth-child(2):last-child)):not(:has(> figure:nth-child(5):last-child)) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ib-gallery:has(> figure:last-child:nth-child(3n+2)):not(:has(> figure:nth-child(2):last-child)):not(:has(> figure:nth-child(5):last-child)) > figure { grid-column: span 2; }
  .ib-gallery:has(> figure:last-child:nth-child(3n+2)):not(:has(> figure:nth-child(2):last-child)):not(:has(> figure:nth-child(5):last-child)) > figure:nth-last-child(2) { grid-column: 2 / span 2; }
}
/* Phones (2 columns): an odd last photo is centered. */
@media (max-width: 640px) {
  .ib-gallery:not(:has(> figure:nth-child(5):last-child)) > figure:last-child:nth-child(odd):not(:first-child) { grid-column: 1 / -1; justify-self: center; width: calc((100% - 12px) / 2); }
}
/* Insurance hub payer cards: a short last row is centered. */
.ihub .res-list { display: flex; flex-wrap: wrap; justify-content: center; }
.ihub .res-list > li { flex: 0 0 calc((100% - 36px) / 4); display: flex; }
.ihub .res-list > li > a { flex: 1 1 auto; }
@media (max-width: 900px) { .ihub .res-list > li { flex-basis: calc((100% - 12px) / 2); } }
/* Insurance hub: a payer card with no logo centers its name. */
.ihub .res-list a:not(:has(img)) { justify-content: center; align-items: center; text-align: center; }
