/* MAVERICK REUSABLE PAGE BLOCKS
   Wrap page content in .mav-page. Keep the WordPress header/footer outside.
   Sections = spacing + colour; layouts = arrangement; blocks = content.
   Uses Source Sans 3 and Roboto Condensed supplied by the WordPress theme.
*/
/* 1. Scoped tokens and typography */
.mav-page {
  --mav-red: #b40000;
  --mav-red-hover: #870000;
  --mav-black: #171719;
  --mav-grey: #f4f4f5;
  --mav-width: 1240px;
  --mav-gutter: max(5%, calc((100% - var(--mav-width)) / 2));
  --mav-section-space: 100px;
  --mav-column-gap: clamp(40px, 7vw, 110px);
  --surface: #fff;
  --text: var(--mav-black);
  --muted: #5c5c63;
  --line: #dddde0;
  --accent: var(--mav-red);
  color: var(--text);
  font: 1.125rem/1.55 'Source Sans 3', Arial, sans-serif;
}
.mav-page, .mav-page *, .mav-page *::before, .mav-page *::after { box-sizing: border-box; }
.mav-page :is(h1, h2, h3, h4) { margin: 0; font-weight: 700; color: var(--text); }
.mav-page :is(h1, h2) { font-family: 'Roboto Condensed', 'Arial Narrow', sans-serif; line-height: 1.03; }
.mav-page h2 { font-size: clamp(2.4rem, 4.5vw, 4rem); margin-bottom: 24px; }
.mav-page h3 { font-size: 1.35rem; line-height: 1.2; }
.mav-page h4 { font-size: 1.0625rem; line-height: 1.3; }
.mav-page p { margin: 0 0 20px; color: var(--muted); }
.mav-page a { color: inherit; text-decoration: none; }
.mav-page button { font: inherit; cursor: pointer; }
.mav-page :is(a, button) { touch-action: manipulation; }
.mav-page :is(a, button, [tabindex]):focus-visible { outline: 3px solid #147ab5; outline-offset: 5px; }
.mav-page img { max-width: 100%; }
.mav-page .eyebrow { margin: 0 0 22px; color: var(--accent); font-size: .875rem; font-weight: 700; letter-spacing: 2px; }
.mav-page .lead { font-size: 1.625rem; line-height: 1.3; color: var(--text); }
.mav-page .text-red { color: var(--accent); }

/* 2. Background utilities also set readable foreground colours.
   The dark theme keeps brand-red eyebrows on a small white label.
*/
.mav-page .bg-white { --surface:#fff; --text:#171719; --muted:#5c5c63; --line:#dddde0; --accent:var(--mav-red); background:var(--surface); color:var(--text); }
.mav-page .bg-grey { --surface:var(--mav-grey); --text:#171719; --muted:#5c5c63; --line:#ccc; --accent:var(--mav-red); background:var(--surface); color:var(--text); }
.mav-page .bg-black { --surface:var(--mav-black); --text:#fff; --muted:#c9c9cd; --line:#48484a; --accent:#fff; background:var(--surface); color:var(--text); }
.mav-page .bg-red { --surface:var(--mav-red); --text:#fff; --muted:#fff; --line:#ffffff4d; --accent:#fff; background:var(--surface); color:var(--text); }
.mav-page .bg-black .eyebrow, .mav-page .hero .eyebrow { display:table; padding:6px 10px; background:#fff; color:var(--mav-red); }

/* 3. Sections and composable layouts */
.mav-page .section { padding:var(--mav-section-space) var(--mav-gutter); }
.mav-page .columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:var(--mav-column-gap); align-items:start; }
.mav-page .columns > * { min-width:0; }
.mav-page .columns-wide-right { grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); }
.mav-page .columns-heading { grid-template-columns:minmax(0,1fr) minmax(0,.65fr); align-items:end; }
.mav-page .section-heading { margin-bottom:48px; }
.mav-page .section-heading h2 { margin-bottom:0; }
.mav-page .section-heading > p { max-width:360px; justify-self:end; margin-bottom:4px; }
.mav-page .span-full { grid-column:1 / -1; }
.mav-page .section-footer { display:flex; justify-content:space-between; align-items:center; gap:20px; padding-top:25px; font-size:1.0625rem; }
.mav-page .section-flush { padding:0; }
.mav-page .section-cta { text-align:center; }
.mav-page .section-cta h2 { font-size:clamp(3.7rem,7vw,6rem); }
.mav-page .section-cta .actions { justify-content:center; }

/* 4. Actions */
.mav-page .actions { display:flex; flex-wrap:wrap; align-items:center; gap:30px; margin-top:28px; }
.mav-page .button { display:inline-flex; align-items:center; justify-content:center; gap:30px; padding:16px 26px; border:0; background:var(--mav-red); color:#fff; font-size:1.0625rem; font-weight:700; transition:background .2s, transform .2s; }
.mav-page .button:hover { background:var(--mav-red-hover); transform:translateY(-2px); }
.mav-page .button-small { padding:12px 22px; font-size:1rem; }
.mav-page .button-white { background:#fff; color:var(--mav-red); }
.mav-page .button-white:hover { background:#eee; }
.mav-page .text-link { display:inline-block; border-bottom:1px solid currentColor; padding-bottom:4px; font-size:1.0625rem; font-weight:700; }
.mav-page .text-link:hover { color:var(--accent); }

/* 5. Hero and optional navigation/highlight strip */
.mav-page .hero { --text:#fff; --muted:#d2d2d5; position:relative; display:grid; grid-template-columns:1fr 1fr; min-height:650px; background:var(--mav-black); color:var(--text); overflow:hidden; }
.mav-page .hero-content { grid-column:1; grid-row:1; padding:66px 0 60px 10%; z-index:1; }
.mav-page .hero h1 { font-size:clamp(4rem,6.9vw,7rem); letter-spacing:-1px; margin-bottom:28px; }
.mav-page .hero h1 em { font-style:normal; border-bottom:7px solid var(--mav-red); padding-bottom:1px; }
.mav-page .hero h2 { font:700 1.5rem 'Source Sans 3',Arial,sans-serif; margin-bottom:12px; }
.mav-page .hero p:not(.eyebrow) { max-width:400px; font-size:1.1875rem; }
.mav-page .hero .hero-note { font-size:1rem; margin:38px 0 0; color:#c0c0c5; }
.mav-page .hero-note strong { color:#fff; }
.mav-page .hero-media { position:absolute; inset:0 0 0 45%; }
.mav-page .hero-media img { height:100%; width:100%; object-fit:cover; object-position:52% center; }
.mav-page .hero-media::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,var(--mav-black),#17171933 45%,transparent),linear-gradient(0deg,#0008,transparent 40%); }
.mav-page .hero-caption { position:absolute; z-index:1; right:8%; bottom:32px; letter-spacing:2px; font-size:.75rem; }
.mav-page .hero-highlights { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(16px,2.5vw,30px); padding:28px var(--mav-gutter); }
.mav-page .hero-highlights > span { display:block; min-width:0; padding:0 clamp(12px,2vw,24px) 0 0; border-right:1px solid var(--line); color:inherit; font-size:1rem; line-height:1.5; overflow-wrap:break-word; }
.mav-page .hero-highlights > span:last-child { border:0; }
.mav-page .hero-highlights strong { display:block; min-width:0; color:inherit; font:700 clamp(1.375rem,2.4vw,1.625rem)/1.2 'Roboto Condensed',sans-serif; margin:0 0 8px; }
.mav-page .hero-tabs { display:flex; flex-wrap:wrap; gap:0 28px; padding:0 var(--mav-gutter); border-bottom:1px solid var(--line); }
.mav-page .hero-tabs a { display:block; padding:18px 0; border-bottom:3px solid transparent; font-weight:700; }
.mav-page .hero-tabs a:hover, .mav-page .hero-tabs a[aria-current] { border-bottom-color:var(--accent); }

/* 6. Feature grid */
.mav-page .feature-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 44px; }
.mav-page .feature-grid article { border-top:1px solid var(--line); padding:26px 0 18px; }
.mav-page .item-number { display:block; color:var(--accent); font:700 1rem 'Roboto Condensed',sans-serif; margin-bottom:18px; }
.mav-page .feature-grid h3 { margin-bottom:12px; }
.mav-page .feature-grid p { font-size:1.0625rem; }

/* 7. Tabs (behaviour lives in JavaScript; styling has no coaching names) */
.mav-page .tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.mav-page .tabs button { border:1px solid #dddde0; border-bottom:4px solid transparent; padding:24px; text-align:left; color:var(--mav-black); background:var(--mav-grey); font-weight:700; font-size:1.3125rem; line-height:1.2; }
.mav-page .tabs button span { display:block; font-size:.875rem; letter-spacing:1.2px; margin-bottom:12px; color:#5c5c63; }
.mav-page .tabs button[aria-selected=true] { background:var(--mav-black); color:#fff; border-color:var(--mav-black); border-bottom-color:var(--mav-red); }
.mav-page .tabs button[aria-selected=true] span { display:table; padding:4px 6px; color:var(--mav-red); background:#fff; }
.mav-page .tab-panel { --text:#171719; --muted:#5c5c63; padding:40px; background:var(--mav-grey); color:var(--text); margin-top:12px; gap:55px; grid-template-columns:minmax(0,1fr) minmax(0,1.45fr); }
.mav-page .tab-panel h3 { font:700 2.125rem 'Roboto Condensed',sans-serif; margin:14px 0 18px; }
.mav-page .badge { font-size:.875rem; color:var(--mav-red); font-weight:700; }
.mav-page .tab-panel h4 { margin:0 0 10px; }
.mav-page .tab-panel ul { padding-left:20px; margin:0 0 26px; color:var(--muted); font-size:1.0625rem; }
.mav-page .tab-panel li { margin-bottom:7px; break-inside:avoid; }
.mav-page .detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.mav-page .detail-grid > :first-child { grid-column:1 / -1; }
.mav-page .detail-grid > :first-child ul { columns:2; column-gap:32px; }

/* 8. Timeline and application-style steps */
.mav-page .timeline { list-style:none; margin:0; padding:0; }
.mav-page .timeline li { position:relative; display:flex; gap:28px; border-top:1px solid var(--line); padding:25px 0 8px; }
.mav-page .timeline li > span { flex-shrink:0; display:grid; place-items:center; min-width:52px; height:52px; background:#fff; color:var(--mav-red); font:700 1.875rem 'Roboto Condensed',sans-serif; }
.mav-page .timeline li:not(:last-child)::after { content:''; position:absolute; left:25px; top:82px; bottom:0; width:1px; background:var(--line); }
.mav-page .timeline h3 { margin-bottom:10px; }
.mav-page .timeline p { font-size:1.0625rem; }
.mav-page .steps { counter-reset:mav-step; list-style:none; margin:0; padding:0; }
.mav-page .steps li { position:relative; padding:0 0 27px 65px; counter-increment:mav-step; }
.mav-page .steps li::before { content:counter(mav-step,decimal-leading-zero); position:absolute; left:0; top:0; display:grid; place-items:center; width:40px; height:40px; border:1px solid var(--line); background:#fff; color:var(--mav-red); font-weight:700; z-index:1; }
.mav-page .steps li:not(:last-child)::after { content:''; position:absolute; top:40px; bottom:0; left:20px; width:1px; background:var(--line); }
.mav-page .steps h3 { font-size:1.3125rem; margin-bottom:8px; }
.mav-page .steps p { font-size:1.0625rem; margin:0; }

/* 9. Edge-to-edge image/content section */
.mav-page .media-split { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.mav-page .media-split-image img { display:block; width:100%; height:100%; object-fit:cover; min-height:520px; }
.mav-page .media-split-content { padding:70px 10%; }
.mav-page .media-split-content h2 { font-size:clamp(2.3rem,3.7vw,3.5rem); }
.mav-page .media-split-reverse .media-split-image { order:2; }
.mav-page .tag-list { display:flex; flex-wrap:wrap; gap:0 18px; margin-top:28px; }
.mav-page .tag-list span { padding:8px 0; border-bottom:1px solid var(--line); font-size:1.0625rem; }

/* 10. Responsive layouts: tablet, then phone */
@media (min-width:1600px) {
  .mav-page .hero { min-height:720px; }
}
@media (max-width:900px) {
  .mav-page { --mav-section-space:70px; --mav-gutter:6%; --mav-column-gap:40px; }
  .mav-page .hero h1 { font-size:4.5rem; }
  .mav-page .hero-content { grid-column:1 / -1; padding-right:20px; }
  .mav-page .hero-media { left:35%; opacity:.6; }
  .mav-page .hero { min-height:610px; }
  .mav-page .columns-heading { align-items:start; }
  .mav-page .tabs button { padding:18px; font-size:1.125rem; }
  .mav-page .tab-panel { gap:30px; padding:28px; }
  .mav-page .detail-grid { display:block; }
  .mav-page .detail-grid > :first-child ul { columns:1; }
  .mav-page .feature-grid { gap:0 25px; }
  .mav-page .media-split-content { padding:50px 10%; }
}
@media (max-width:600px) {
  .mav-page { --mav-section-space:60px; --mav-column-gap:30px; font-size:1.0625rem; }
  .mav-page .columns { grid-template-columns:minmax(0,1fr); }
  .mav-page .section-heading > p { max-width:none; justify-self:start; margin:0; }
  .mav-page .section-footer { display:block; }
  .mav-page .section-footer a { margin-top:12px; }
  .mav-page .hero { display:block; min-height:0; }
  .mav-page .hero-media { inset:0; opacity:1; }
  .mav-page .hero-media img { object-position:58% center; }
  .mav-page .hero-media::after { background:linear-gradient(90deg,#171719dc,#17171955),linear-gradient(0deg,#171719 3%,#171719a0 50%,#17171933); }
  .mav-page .hero-content { position:relative; padding:55px 6%; }
  .mav-page .hero h1 { font-size:clamp(3.4rem,13vw,4.5rem); }
  .mav-page .hero h2 { font-size:1.375rem; }
  .mav-page .hero p:not(.eyebrow) { max-width:320px; font-size:1.125rem; }
  .mav-page .hero .hero-note { margin-top:35px; font-size:1rem; }
  .mav-page .hero-caption { display:none; }
  .mav-page .actions { gap:24px; }
  .mav-page .feature-grid { grid-template-columns:minmax(0,1fr); }
  .mav-page .feature-grid h3 { font-size:1.25rem; }
  .mav-page .feature-grid p { font-size:1rem; }
  .mav-page .tabs { gap:0; grid-template-columns:minmax(0,1fr); }
  .mav-page .tabs button { padding:16px 20px; }
  .mav-page .tabs button span { margin-bottom:5px; }
  .mav-page .tab-panel { gap:18px; padding:24px; }
  .mav-page .tab-panel h3 { font-size:1.875rem; }
  .mav-page .timeline li { gap:20px; }
  .mav-page .timeline h3 { font-size:1.3125rem; }
  .mav-page .media-split { grid-template-columns:minmax(0,1fr); }
  .mav-page .media-split-reverse .media-split-image { order:0; }
  .mav-page .media-split-image img { min-height:0; height:330px; object-position:center 40%; }
  .mav-page .media-split-content { padding:45px 6%; }
}
@media (prefers-reduced-motion:reduce) {
  .mav-page *, .mav-page *::before, .mav-page *::after { transition:none; scroll-behavior:auto; }
}

/* 11. Stacked opportunities: comparison content remains visible.
   Native details/summary provides keyboard interaction without JavaScript.
   Multiple rows can stay open at once. */
.mav-page .opportunity-list { display:grid; gap:28px; }
.mav-page .opportunity { --text:#171719; --muted:#5c5c63; color:var(--text); background:#fff; border:1px solid #dddde0; border-top:4px solid var(--mav-red); }
.mav-page .opportunity-heading { display:grid; grid-template-columns:52px minmax(0,1fr); gap:24px; padding:32px 36px 0; }
.mav-page .opportunity-number { color:var(--mav-red); font:700 2.5rem/1 'Roboto Condensed',sans-serif; padding-top:3px; }
.mav-page .opportunity-heading h3 { font:700 clamp(1.75rem,2.6vw,2.125rem)/1.15 'Roboto Condensed',sans-serif; margin:0 0 14px; }
.mav-page .opportunity-heading p { max-width:850px; margin:0; }
.mav-page .opportunity-summary { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:32px; padding:28px 36px 32px 112px; }
.mav-page .opportunity h4 { font-size:1.0625rem; margin-bottom:12px; }
.mav-page .opportunity ul { margin:0; padding-left:20px; color:var(--muted); font-size:1.0625rem; }
.mav-page .opportunity li { padding-left:2px; margin-bottom:7px; }
.mav-page .opportunity li:last-child { margin-bottom:0; }
.mav-page .opportunity-compensation { background:var(--mav-grey); padding:22px 24px; align-self:start; }
.mav-page .opportunity-summary > :first-child { padding-top:22px; }
.mav-page .opportunity-details { border-top:1px solid #dddde0; }
.mav-page .opportunity-details summary { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:20px 36px; font-size:1.0625rem; font-weight:700; cursor:pointer; list-style:none; }
.mav-page .opportunity-details summary::-webkit-details-marker { display:none; }
.mav-page .opportunity-details summary:hover { background:var(--mav-grey); color:var(--mav-red); }
.mav-page .opportunity-details summary:focus-visible { outline:3px solid #147ab5; outline-offset:3px; }
.mav-page .opportunity-toggle { position:relative; width:24px; height:24px; flex-shrink:0; color:var(--mav-red); }
.mav-page .opportunity-toggle::before, .mav-page .opportunity-toggle::after { content:''; position:absolute; background:currentColor; top:11px; left:4px; width:16px; height:2px; }
.mav-page .opportunity-toggle::after { transform:rotate(90deg); }
.mav-page details[open] .opportunity-toggle::after { display:none; }
.mav-page .opportunity-expanded { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:36px; padding:8px 36px 32px; }
.mav-page .opportunity-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
@media (max-width:900px) {
  .mav-page .opportunity-summary { padding-left:36px; }
}
@media (max-width:600px) {
  .mav-page .opportunity-heading { grid-template-columns:36px minmax(0,1fr); gap:14px; padding:24px 20px 0; }
  .mav-page .opportunity-number { font-size:2rem; }
  .mav-page .opportunity-summary { grid-template-columns:minmax(0,1fr); gap:22px; padding:24px 20px; }
  .mav-page .opportunity-summary > :first-child { padding-top:0; }
  .mav-page .opportunity-compensation { padding:20px; }
  .mav-page .opportunity-details summary { padding:18px 20px; }
  .mav-page .opportunity-expanded { grid-template-columns:minmax(0,1fr); gap:24px; padding:8px 20px 24px; }
}

/* ACF WYSIWYG wrappers used by page-flexible-content.php. */
.mav-page .hero .hero-note p { font-size:1rem; color:#c0c0c5; margin:0 0 12px; }
.mav-page .section-heading > div:last-child:not(:first-child) { max-width:360px; justify-self:end; }
.mav-page .section-heading > div:last-child:not(:first-child) > :last-child { margin-bottom:4px; }
@media(max-width:600px) {
    .mav-page .section-heading > div:last-child:not(:first-child) { max-width:none; justify-self:start; }
}

/* Highlights stack before three columns become cramped.
   Keep headings above descriptions, including on phones. */
@media (max-width:48rem) {
  .mav-page .hero-highlights {
    grid-template-columns:minmax(0,1fr);
    gap:0;
    padding:8px var(--mav-gutter);
  }
  .mav-page .hero-highlights > span {
    display:block;
    padding:18px 0;
    border-right:0;
    border-bottom:1px solid var(--line);
  }
  .mav-page .hero-highlights > span:last-child { border-bottom:0; }
  .mav-page .hero-highlights strong { margin:0 0 6px; font-size:1.4375rem; }
}

/* Keep theme heading padding and capitalization out of these page blocks.
   Preserve each block's intentional margins and heading alignment. */
.mav-page :is(h1, h2, h3, h4, h5, h6),
.mav-page .hero :is(h1, h2, h3, h4, h5, h6),
.mav-page .section :is(h1, h2, h3, h4, h5, h6),
.mav-page .section :is(h1, h2, h3, h4, h5, h6):first-child {
  padding:0;
  text-transform:none;
}

/* Override the existing theme's decorative section headings. */
.mav-page .section h3:first-child {
  text-align:left;
  text-decoration:none;
  border-bottom:0;
}
.mav-page .section h3:first-child::after {
  content:none;
  display:none;
}

/* Preserve lead styling inside ACF WYSIWYG paragraphs. */
.mav-page .lead p { font-size:inherit; line-height:inherit; color:inherit; }
