/*
 * Single Post — inspire-recovery
 * Page-specific styles for all singular blog posts.
 * Loaded via ir_get_page_css_slug() → is_single() → 'single'.
 *
 * SECTIONS
 *   1.  Article Hero           — two-column: large H1 + form
 *   2.  Hero actions           — call + insurance buttons
 *   3.  Article Content        — white: featured image + reading body
 *   4.  Article Typography     — body text, headings, callouts
 *   5.  Timeline               — 3-column stage cards
 *   6.  Inline CTA Bar         — compact editorial conversion bars
 *   7.  Treatment Callout      — soft-blue editorial panel
 *   8.  FAQ Section            — soft-blue, JS-populated
 *   9.  Related Posts          — 3-up editorial cards
 *  10.  Responsive
 */


/* ─────────────────────────────────────────────────────────────────────────
   1. ARTICLE HERO — soft-blue, two-column
   ───────────────────────────────────────────────────────────────────────── */

.article-hero {
  background: var(--surface-soft-blue);
  padding: clamp(36px, 4.5vh, 56px) 0 clamp(28px, 3.5vh, 44px);
}

.article-hero-grid {
  display: grid;
  gap: clamp(28px, 4vw, 44px);
}

/* Breadcrumb */
.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 0.77rem;
  letter-spacing: 0.015em;
  color: var(--ink-70, rgba(22,32,31,.6));
  margin-bottom: 16px;
}

.article-breadcrumb a {
  color: var(--brand-aqua-hover);
  text-decoration: none;
}

.article-breadcrumb a:hover {
  text-decoration: underline;
}

.article-breadcrumb [aria-current="page"] {
  color: var(--ink-70, rgba(22,32,31,.6));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 26ch;
}

/* Category eyebrow */
.article-hero-copy .eyebrow {
  margin-bottom: 14px;
}

/* H1 — large and commanding */
.article-hero-copy h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  text-wrap: balance;
}

/* Lead excerpt */
.article-hero-copy .lead {
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.72;
  color: var(--ink-70, rgba(22,32,31,.75));
  margin-bottom: 0;
}

/* Metadata bar */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  font-size: 0.8rem;
  color: var(--ink-70, rgba(22,32,31,.6));
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(22,32,31,.1);
}

.article-meta time,
.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


/* ─────────────────────────────────────────────────────────────────────────
   2. HERO ACTIONS — call + insurance buttons (balance the form column)
   ───────────────────────────────────────────────────────────────────────── */

.article-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.article-hero-actions .btn {
  flex: 1 1 auto;
  text-align: center;
  min-width: 160px;
}


/* ─────────────────────────────────────────────────────────────────────────
   Form card (right column)
   ───────────────────────────────────────────────────────────────────────── */

.article-form {
  align-self: start;
}

.article-form .form-card {
  padding: clamp(26px, 3.5vw, 40px);
}

.article-form-title {
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.article-form-note {
  font-size: 0.84rem;
  color: var(--ink-70, rgba(22,32,31,.65));
  margin-bottom: 22px;
  line-height: 1.5;
}


/* ─────────────────────────────────────────────────────────────────────────
   3. ARTICLE CONTENT — white, editorial opening with integrated image
   ───────────────────────────────────────────────────────────────────────── */

.article-content {
  background: #fff;
  padding: clamp(36px, 4.5vh, 56px) 0 clamp(48px, 6vh, 80px);
}

/*
 * Reading column — float-based editorial layout.
 * Featured image floats right; body text wraps beside it and naturally
 * returns to full article width once the float is cleared.
 * display:flow-root creates a BFC that contains the float (no clearfix hack needed).
 * Mobile: float cleared — image stacks full-width above text.
 */
.article-body {
  max-width: 820px;
  margin: 0 auto;
  display: flow-root;
}

/* Featured image: float right so text wraps alongside and below */
.article-featured-image {
  float: right;
  clear: right;
  width: clamp(260px, 44%, 400px);
  margin: 0 0 clamp(16px, 2vw, 24px) clamp(24px, 3.5vw, 36px);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(14,95,122,.12);
}

/* Align first content element flush with the top of the floated image */
.article-body:has(.article-featured-image) > *:first-of-type:not(.article-featured-image),
.article-body:has(.article-featured-image) > p:first-of-type {
  margin-top: 0;
}

.article-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Inline images from legacy content */
.article-body img {
  max-width: 100%;
  height: auto;
}

/* ─────────────────────────────────────────────────────────────────────────
   3b. LEGACY HEADING-FIRST VARIANT
   When ir_av_textblock() detects a heading-style opening — a <p><b>…</b></p>
   heading followed by a paragraph — it wraps both in .ir-opening-block.
   The base .article-body layout is now float-based for all posts, so no
   separate display/float override is needed here. Typography adjustments only.
   ───────────────────────────────────────────────────────────────────────── */

/* Ensure no top margin on the first element inside the opening block
   so the heading aligns flush with the top of the floated image */
.article-body > .ir-opening-block > p:first-child {
  margin-top: 0;
}


/* ─────────────────────────────────────────────────────────────────────────
   4. ARTICLE BODY TYPOGRAPHY
   All scoped to .article-body — zero global side-effects.
   ───────────────────────────────────────────────────────────────────────── */

/*
 * Opening block: reset the global section rhythm padding (layout.css sets
 * `section { padding: var(--space-lg) 0 }`) so the heading aligns with the
 * top of the featured image.
 */
.article-body > .ir-opening-block {
  padding: 0;
}

/*
 * Opening paragraph — slightly larger, leading the reader in.
 * Two selectors cover both layout modes:
 *  1. Normal: first direct-child <p> (no ir-opening-block wrapper).
 *  2. Legacy heading opener: article opens with a heading-style <p><b>…</b></p>
 *     wrapped alongside the first paragraph in .ir-opening-block; the content
 *     paragraph is the last child of that section.
 */
.article-body:not(:has(> .ir-opening-block)) > p:first-of-type,
.article-body > .ir-opening-block > p:last-child {
  font-size: clamp(1.12rem, 1.85vw, 1.24rem);
  line-height: 1.8;
  color: var(--ink);
  font-weight: 400;
  margin-top: 0;
  margin-bottom: 28px;
}

.article-body p {
  font-size: clamp(1.08rem, 1.6vw, 1.17rem);
  line-height: 1.88;
  margin-bottom: 26px;
  color: var(--ink);
  letter-spacing: 0.004em;
}

.article-body h2 {
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: clamp(1.65rem, 2.8vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin-top: clamp(36px, 5vh, 52px);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--surface-soft-blue);
  color: var(--ink);
}

.article-body > h2:first-child,
.article-body > figure + h2 {
  margin-top: 0;
}

.article-body h3 {
  font-size: clamp(1.15rem, 2vw, 1.38rem);
  line-height: 1.25;
  letter-spacing: -0.008em;
  margin-top: 44px;
  margin-bottom: 14px;
  color: var(--brand-aqua-hover);
}

.article-body h4 {
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  font-weight: 700;
  letter-spacing: 0;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--ink);
}

.article-body ul,
.article-body ol {
  font-size: clamp(1.06rem, 1.55vw, 1.15rem);
  margin: 0 0 28px;
  padding-left: 1.65em;
}

.article-body li {
  margin-bottom: 10px;
  line-height: 1.78;
}

.article-body li + li {
  margin-top: 2px;
}

.article-body a {
  color: var(--brand-aqua-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.article-body a:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.article-body strong {
  font-weight: 700;
}

.article-body em {
  font-style: italic;
}

/* Inline images (not the featured image — that's handled separately) */
.article-body > p > img,
.article-body > img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-md);
  display: block;
  margin: 32px auto;
}

.article-body figure:not(.article-featured-image) {
  margin: 36px 0;
}

.article-body figure:not(.article-featured-image) img {
  width: 100%;
  border-radius: var(--r-md);
  margin: 0;
}

.article-body figcaption {
  font-size: 0.79rem;
  color: var(--ink-70, rgba(22,32,31,.65));
  margin-top: 8px;
  text-align: center;
  font-style: italic;
  line-height: 1.5;
}

/* Blockquote — pull-quote with pink accent bar */
.article-body blockquote {
  border-left: 4px solid var(--accent-trans-pink, #FFAFC7);
  background: var(--surface-soft-blue);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: clamp(18px, 2.5vw, 28px) clamp(18px, 2.5vw, 28px) clamp(18px, 2.5vw, 28px) clamp(22px, 3vw, 32px);
  margin: 36px 0;
}

.article-body blockquote p {
  margin-bottom: 0;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.65;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.9rem;
}

.article-body th,
.article-body td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid rgba(22,32,31,.12);
  vertical-align: top;
}

.article-body th {
  background: var(--surface-soft-blue);
  font-weight: 600;
  font-size: 0.81rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-body tr:nth-child(even) td {
  background: rgba(115,215,238,.06);
}

.article-body .wp-block-table {
  overflow-x: auto;
}

/* WP notice / callout blocks */
.article-body .wp-block-notice,
.article-body .callout {
  background: var(--surface-soft-blue);
  border-radius: var(--r-md);
  padding: clamp(18px, 2.5vw, 28px);
  margin: 28px 0;
}

.article-body .wp-block-notice p,
.article-body .callout p {
  margin-bottom: 0;
}

/* Multi-page pagination */
.article-body .page-links {
  margin-top: 32px;
  font-size: 0.9rem;
  color: var(--ink-70, rgba(22,32,31,.65));
}

.article-body .page-links a {
  color: var(--brand-aqua-hover);
}


/* ─────────────────────────────────────────────────────────────────────────
   5. TIMELINE — 3-column stage cards
   Structure: .ir-timeline > .ir-timeline-stage × 3
   Each stage contains a phase label <p><strong>…</strong></p> and a <ul>.
   Editors wrap the three phases in <div class="ir-timeline"> in HTML view.
   ───────────────────────────────────────────────────────────────────────── */

.ir-timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: clamp(36px, 5vh, 56px) 0;
  counter-reset: timeline-step;
}

.ir-timeline-stage {
  background: #fff;
  border-radius: var(--r-md);
  border-top: 3px solid var(--brand-aqua);
  box-shadow: 0 2px 16px rgba(14,95,122,.08);
  padding: clamp(20px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  position: relative;
  counter-increment: timeline-step;
}

/* Step number badge */
.ir-timeline-stage::before {
  content: counter(timeline-step);
  position: absolute;
  top: -14px;
  left: 24px;
  width: 28px;
  height: 28px;
  background: var(--brand-aqua);
  color: var(--brand-aqua-hover);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Phase label — heading inside the stage card */
.ir-timeline-stage p:has(> strong:only-child) {
  display: block;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-top: 8px;
  margin-bottom: 14px;
  font-size: 1rem;
  letter-spacing: 0;
}

.ir-timeline-stage p:has(> strong:only-child) strong {
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: clamp(0.97rem, 1.4vw, 1.08rem);
  font-weight: 700;
  color: var(--brand-aqua-hover);
  line-height: 1.3;
}

/* Symptom list inside stage card */
.ir-timeline-stage ul {
  margin: 0;
  padding-left: 1.3em;
  font-size: clamp(0.93rem, 1.3vw, 1rem);
  flex: 1;
}

.ir-timeline-stage li {
  margin-bottom: 8px;
  line-height: 1.6;
  color: var(--ink);
}

.ir-timeline-stage li:last-child {
  margin-bottom: 0;
}

/* Override the global phase-pill rule inside timeline stages */
.article-body .ir-timeline-stage p:has(> strong:only-child) + ul {
  border-left: none;
  padding-left: 1.3em;
  margin-left: 0;
}

/* 3-column layout on medium+ screens */
@media (min-width: 640px) {
  .ir-timeline {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  /* Connecting line between stages */
  .ir-timeline-stage:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    width: 20px;
    height: 3px;
    background: var(--brand-aqua);
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
  }
}


/* ─────────────────────────────────────────────────────────────────────────
   6. INLINE CTA BAR — compact editorial conversion bar
   Rendered via [ir_inline_cta] shortcode inside article body.
   Editors can add, edit, move, or delete these as shortcode blocks
   in the WordPress block editor. See inline-cta.php for full docs.
   ───────────────────────────────────────────────────────────────────────── */

.ir-inline-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 28px);
  background: #fff;
  border: 1.5px solid var(--border-light);
  border-left: 4px solid var(--brand-aqua);
  border-radius: var(--r-md);
  padding: clamp(22px, 3vw, 36px);
  margin: clamp(36px, 5vh, 56px) 0;
  box-shadow: 0 2px 16px rgba(14,95,122,.07);
}

.ir-inline-cta--blue {
  background: var(--surface-soft-blue);
  border-color: rgba(14,95,122,.15);
  border-left-color: var(--brand-aqua);
}

.ir-inline-cta-text {
  flex: 1 1 260px;
}

.ir-inline-cta-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-aqua-hover);
  margin-bottom: 8px;
  font-weight: 600;
}

.ir-inline-cta-heading {
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 8px;
}

.ir-inline-cta-body {
  font-size: clamp(0.88rem, 1.3vw, 0.96rem);
  line-height: 1.6;
  color: var(--ink-70, rgba(22,32,31,.7));
  margin-bottom: 0;
}

.ir-inline-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

.ir-inline-cta-actions .btn {
  white-space: nowrap;
}

/* Ensure the CTA doesn't get caught by the phase-pill rule */
.article-body .ir-inline-cta p:has(> strong:only-child) {
  display: block;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0 0 8px;
}


/* ─────────────────────────────────────────────────────────────────────────
   7. TREATMENT CALLOUT — soft-blue editorial panel
   Wrapper: <div class="ir-treatment-callout"> in article HTML.
   Editors can view and edit this section via the block editor code view.
   ───────────────────────────────────────────────────────────────────────── */

.ir-treatment-callout {
  background: var(--surface-soft-blue);
  border-radius: var(--r-md);
  padding: clamp(28px, 4vw, 48px);
  margin: clamp(40px, 6vh, 64px) 0;
  box-shadow: 0 2px 20px rgba(14,95,122,.08);
}

.ir-treatment-callout h2 {
  border-bottom-color: rgba(14,95,122,.15);
  margin-top: 0;
}

.ir-treatment-callout p {
  color: var(--ink);
}

.ir-treatment-callout a {
  color: var(--brand-aqua-hover);
  font-weight: 600;
}


/* ─────────────────────────────────────────────────────────────────────────
   Legacy phase-pill rule — applies only outside .ir-timeline wrappers
   ───────────────────────────────────────────────────────────────────────── */

/* Phase label pill */
.article-body p:has(> strong:only-child):not(.ir-timeline-stage p):not(.ir-treatment-callout p):not(.ir-inline-cta p) {
  display: inline-flex;
  align-items: center;
  background: var(--surface-soft-blue);
  border: 1.5px solid rgba(14,95,122,.18);
  border-radius: 100px;
  padding: 7px 18px;
  margin-top: clamp(28px, 4vh, 44px);
  margin-bottom: 14px;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.article-body p:has(> strong:only-child):not(.ir-timeline-stage p):not(.ir-treatment-callout p):not(.ir-inline-cta p) strong {
  color: var(--brand-aqua-hover);
  font-weight: 700;
  font-size: inherit;
}

/* List immediately after a phase label pill */
.article-body p:has(> strong:only-child):not(.ir-timeline-stage p) + ul {
  border-left: 3px solid var(--brand-aqua);
  padding-left: 1.4em;
  margin-left: 4px;
  margin-bottom: 8px;
}

.article-body p:has(> strong:only-child):not(.ir-timeline-stage p) + ul li {
  margin-bottom: 8px;
}


/* ─────────────────────────────────────────────────────────────────────────
   8. FAQ SECTION — brown, JS-populated
   Hidden by default; JS removes the hidden attribute and populates
   .faq-inner with elements moved from .article-body.
   ───────────────────────────────────────────────────────────────────────── */

.article-faq {
  background: #7F4E20;
  padding: var(--space-lg) 0;
}

/* Section heading (the FAQ h2 from article body) */
.faq-section-h2 {
  font-size: clamp(1.65rem, 2.8vw, 2.1rem);
  line-height: 1.12;
  margin-bottom: clamp(32px, 5vh, 52px);
  text-align: center;
  text-wrap: balance;
  color: #fff;
}

/* FAQ list container — stacked, centred reading column */
.faq-inner {
  max-width: 760px;
  margin: 0 auto;
}

/* Individual Q+A pair */
.faq-item {
  background: #fff;
  border-radius: var(--r-md);
  padding: clamp(22px, 3vw, 36px);
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(14,95,122,.06);
}

.faq-item:last-child {
  margin-bottom: 0;
}

/* Question heading */
.faq-q {
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  font-weight: 700;
  color: var(--brand-aqua-hover);
  line-height: 1.3;
  margin-bottom: 14px;
  margin-top: 0;
  padding-left: 0;
}

/* Answer paragraphs */
.faq-a {
  font-size: clamp(1rem, 1.4vw, 1.08rem);
  line-height: 1.76;
  color: var(--ink);
  margin-bottom: 12px;
}

.faq-a:last-child {
  margin-bottom: 0;
}


/* ─────────────────────────────────────────────────────────────────────────
   9. RELATED POSTS — white, 3-up editorial cards
   ───────────────────────────────────────────────────────────────────────── */

.related {
  background: #fff;
  padding: var(--space-lg) 0;
  border-top: 1px solid rgba(22,32,31,.07);
}

.related-head {
  margin-bottom: clamp(36px, 5vh, 56px);
  text-align: center;
}

.related-head .eyebrow {
  margin-bottom: 12px;
}

.related-head h2 {
  font-family: 'Roboto Slab', Georgia, serif;
  font-size: clamp(1.65rem, 2.8vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-top: 0;
  text-wrap: balance;
}

.related-grid {
  display: grid;
  gap: clamp(16px, 2.5vw, 28px);
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card */
.related-grid .entry {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--r-md);
  border: 1px solid rgba(22,32,31,.08);
  box-shadow: 0 2px 20px rgba(14,95,122,.07);
  transition: box-shadow 0.22s ease, transform 0.2s ease;
}

.related-grid .entry:hover {
  box-shadow: 0 10px 40px rgba(14,95,122,.13);
  transform: translateY(-4px);
}

/* Thumbnail — 16:9 ratio, fills card width */
.entry-thumbnail {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.entry-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transition: transform 0.38s ease;
}

.related-grid .entry:hover .entry-thumbnail img {
  transform: scale(1.05);
}

/* Empty thumbnail fallback */
.entry-thumbnail--empty {
  background: linear-gradient(135deg, var(--surface-soft-blue) 0%, rgba(115,215,238,.25) 100%);
  aspect-ratio: 16 / 9;
}

/* Card text body */
.entry-body {
  padding: clamp(20px, 2.5vw, 28px);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Category + date row */
.entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.entry-meta .eyebrow {
  margin-bottom: 0;
  font-size: 0.71rem;
  letter-spacing: 0.07em;
}

.entry-meta::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-70, rgba(22,32,31,.4));
  flex-shrink: 0;
}

.entry-date {
  font-size: 0.73rem;
  color: var(--ink-70, rgba(22,32,31,.55));
  white-space: nowrap;
}

/* Card heading */
.entry-body h3 {
  font-size: clamp(1rem, 1.55vw, 1.15rem);
  line-height: 1.3;
  margin-bottom: 10px;
  margin-top: 0;
  flex: 1;
}

.entry-body h3 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}

.entry-body h3 a:hover {
  color: var(--brand-aqua-hover);
}

/* Excerpt */
.entry-excerpt {
  font-size: 0.875rem;
  line-height: 1.64;
  color: var(--ink-70, rgba(22,32,31,.65));
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Read more link */
.entry-body .morelink {
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 4px;
  align-self: flex-start;
}


/* ─────────────────────────────────────────────────────────────────────────
  10. RESPONSIVE
   ───────────────────────────────────────────────────────────────────────── */

@media (min-width: 480px) {
  .article-hero-actions { gap: 14px; }
  .article-hero-actions .btn { flex: 0 0 auto; }
}

@media (min-width: 640px) {
  .ir-inline-cta-actions .btn { min-width: 140px; }
}

@media (min-width: 900px) {
  /* Two-column article hero — copy wide, form narrower */
  .article-hero-grid {
    grid-template-columns: 1.12fr 0.88fr;
    align-items: start;
  }

  /* Let full breadcrumb title show */
  .article-breadcrumb [aria-current="page"] {
    max-width: none;
  }
}

/* Mobile: clear float — image stacks full-width before text */
@media (max-width: 599px) {
  .article-featured-image {
    float: none;
    clear: none;
    width: 100%;
    margin: 0 0 clamp(28px, 5vh, 44px) 0;
    border-radius: var(--r-md);
  }

  .article-meta { gap: 6px 14px; }
  .article-hero-actions { flex-direction: column; }
  .article-hero-actions .btn { width: 100%; }
  .faq-section-h2 { text-align: left; }

  .ir-inline-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .ir-inline-cta-actions {
    width: 100%;
    flex-direction: column;
  }

  .ir-inline-cta-actions .btn {
    width: 100%;
    text-align: center;
  }

  .ir-treatment-callout {
    padding: clamp(22px, 5vw, 32px);
  }
}

/* Narrow tablet: tighten float image so text column stays readable */
@media (min-width: 600px) and (max-width: 767px) {
  .article-featured-image {
    width: clamp(200px, 38%, 300px);
  }
}


/* ─────────────────────────────────────────────────────────────────────────
  11. LEGACY ARTICLE COMPAT — reversible test pass
  Scope: .article-body only. Zero effect outside single post article content.
  No global typography rules. No changes to forms, cards, header, footer,
  final CTA, admissions, or programme/therapy pages.
  Remove this entire section to restore original behavior.
  ───────────────────────────────────────────────────────────────────────── */

/*
 * A. Legacy standalone-<strong> headings → approved H3 presentation.
 *
 * Legacy posts authored section headings as bare <strong>text</strong> rather
 * than <h2>/<h3>. wpautop wraps these as <p><strong>…</strong></p>, which
 * triggers the phase-pill selector in section 9. The pill shape is appropriate
 * for short phase labels; it is wrong for full-sentence section headings.
 *
 * These overrides replace pill geometry with H3-equivalent heading presentation.
 * The selector and exclusion list are identical to section 9 — later declaration
 * wins at equal specificity.
 */
.article-body p:has(> strong:only-child):not(.ir-timeline-stage p):not(.ir-treatment-callout p):not(.ir-inline-cta p) {
  display: block;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: clamp(1.15rem, 2vw, 1.38rem);
  line-height: 1.25;
  letter-spacing: -0.008em;
  margin-top: clamp(36px, 5vh, 52px);
  margin-bottom: 14px;
}

.article-body p:has(> strong:only-child):not(.ir-timeline-stage p):not(.ir-treatment-callout p):not(.ir-inline-cta p) strong {
  font-size: inherit;
  font-weight: 700;
  color: var(--brand-aqua-hover);
}

/*
 * B. H5 in article body — normalize to H4-equivalent visual weight.
 * H5 is not part of the approved article hierarchy but appears in 11 legacy posts.
 * Styled identically to .article-body h4 so both levels are visually consistent.
 */
.article-body h5 {
  font-size: clamp(0.97rem, 1.3vw, 1.04rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--ink);
}

/*
 * C. font-weight:400 inline span override.
 * Legacy paste-from-Word content inserted <span style="font-weight: 400"> wrappers
 * around heading and paragraph text. These override theme heading weight, collapsing
 * H2/H3 visual hierarchy. Inherit restores the correct design-system weight without
 * any database change.
 */
.article-body span[style*="font-weight: 400"],
.article-body span[style*="font-weight:400"] {
  font-weight: inherit !important;
}

/*
 * D. Legacy inline image alignment.
 * Classic editor alignleft / alignright / aligncenter classes on inline images.
 * Now that the article body uses float-based layout these can float properly.
 * Max-width constrained so they never dominate the column at narrow breakpoints.
 * figure.wp-caption and div.wp-caption (WordPress ≤ 5.x) variants both covered.
 * .wp-caption has inline style="width:Npx" set by WordPress — we don't override width,
 * just supply the float and margin. Inner img gets max-width:100% to stay in bounds.
 */
.article-body img.alignleft,
.article-body figure.alignleft,
.article-body div.wp-caption.alignleft {
  float: left;
  clear: left;
  max-width: clamp(160px, 38%, 360px);
  height: auto;
  margin: 0 clamp(16px, 2.5vw, 28px) clamp(12px, 1.5vh, 20px) 0;
}

.article-body img.alignright,
.article-body figure.alignright,
.article-body div.wp-caption.alignright {
  float: right;
  clear: right;
  max-width: clamp(160px, 38%, 360px);
  height: auto;
  margin: 0 0 clamp(12px, 1.5vh, 20px) clamp(16px, 2.5vw, 28px);
}

.article-body img.aligncenter,
.article-body figure.aligncenter,
.article-body div.wp-caption.aligncenter {
  display: block;
  float: none;
  clear: both;
  max-width: 100%;
  height: auto;
  margin: clamp(20px, 3vh, 32px) auto;
}

/* wp-caption inner image must not exceed its container */
.article-body div.wp-caption img {
  max-width: 100%;
  height: auto;
}

/* wp-caption text — small italic caption below the image */
.article-body .wp-caption-text {
  font-size: 0.78rem;
  color: var(--ink-70, rgba(22,32,31,.65));
  font-style: italic;
  line-height: 1.5;
  margin-top: 6px;
  text-align: center;
}

/* On mobile, inline floats also clear to block */
@media (max-width: 599px) {
  .article-body img.alignleft,
  .article-body figure.alignleft,
  .article-body div.wp-caption.alignleft,
  .article-body img.alignright,
  .article-body figure.alignright,
  .article-body div.wp-caption.alignright {
    float: none;
    clear: none;
    max-width: 100%;
    margin: clamp(16px, 3vh, 28px) auto;
    display: block;
  }
}
