/* =========================================================================
   Shared procedure-page template — used by all 16 procedure detail pages.
   Section anatomy + measurements verified against Figma v2 frame 372:2
   (Dental Implants, the template page), 2026-07-24.
   ========================================================================= */

@import url("design-tokens.css");

.breadcrumb {
  font-size: var(--text-footer);
  color: var(--color-sage);
  margin-bottom: 28px;
}
.breadcrumb a:hover { color: var(--color-teal); }

/* ---------- Hero ---------- */

.hero {
  background: var(--color-cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  /* 180px fixed padding plus a 600px image left the copy ~360px wide on a
     laptop. Padding now scales and neither column has a hard minimum. */
  padding: 40px clamp(20px, 6vw, 180px);
}

.hero__content { max-width: 728px; flex: 1 0 420px; min-width: 0; }

.hero__kicker {
  font-size: var(--text-body);
  color: var(--color-body-muted);
  margin-bottom: 12px;
}

.hero__title {
  font-size: var(--text-hero-h1);
  color: var(--color-ink);
  margin-bottom: 24px;
}

.hero__desc {
  font-size: var(--text-body);
  color: var(--color-body-muted);
  max-width: 620px;
  margin-bottom: 32px;
}

.hero__ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__image {
  flex: 0 1 600px;
  width: 600px;
  aspect-ratio: 600 / 338;
  height: auto;
  min-width: 0;
  border-radius: var(--radius-lg);
  background: var(--color-hero-placeholder);
  overflow: hidden;
  object-fit: cover;
}
/* The slot is a <div> wrapping a <picture> on procedure pages, so the fill
   rule has to target the inner <img>, not the container. */
.hero__image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Below this the two columns stop being worth it: the copy is protected at
   420px, so the image is what shrinks, and past here it is too small to earn
   its place beside the text. */
@media (max-width: 1040px) {
  .hero { flex-direction: column-reverse; align-items: stretch; }
  .hero__content { flex: 1 1 auto; }
  .hero__image { flex: 1 1 auto; width: 100%; max-width: 560px; }
}

/* ---------- Page layout: content column + sidebar ---------- */

.page-layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 56px 180px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.content-col {
  max-width: 732px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- Section header formula ---------- */

.section-eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-body-muted);
  margin-bottom: 12px;
}

.section-heading {
  font-size: var(--text-h2);
  color: var(--color-ink);
  margin-bottom: 20px;
}

.section p {
  font-size: var(--text-body);
  color: var(--color-body-muted);
  margin: 0 0 16px;
}
.section p:last-child { margin-bottom: 0; }

/* ---------- Quick Facts card ---------- */

.quick-facts {
  background: var(--color-white);
  border: 1px solid var(--color-blue-tint);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* ---------- Collapsible toggles (Quick Facts + On This Page) ----------
   Both cards are ALWAYS expanded on desktop (the toggle button is inert —
   just a styled heading) and become real accordions on mobile, closed by
   default, per Matthew's "navigable if someone wants, not forced" note
   (2026-07-24). Desktop forces the panel open by overriding the [hidden]
   attribute; mobile lets [hidden] behave natively and JS toggles it. */

.quick-facts__toggle,
.on-this-page__toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 16px;
  font-family: inherit;
  text-align: left;
  cursor: default;
}

.quick-facts__title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: var(--text-subhead);
}

.collapse-icon {
  display: none;
  flex: none;
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--color-teal);
}

.quick-facts__panel[hidden],
.on-this-page__panel[hidden] { display: block; }

.quick-facts dl { margin: 0; }
.quick-facts__row { padding: 12px 0; border-top: 1px solid var(--color-blue-tint); }
.quick-facts__row:first-of-type { border-top: none; padding-top: 0; }

.quick-facts dt {
  font-size: var(--text-label-sm);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-eyebrow-muted);
  margin-bottom: 4px;
}
.quick-facts dd { margin: 0; font-size: var(--text-body); color: var(--color-ink); }

.quick-facts .btn { width: 100%; margin-top: 20px; }

/* ---------- On This Page ---------- */

.on-this-page {
  background: var(--color-white);
  border: 1px solid var(--color-blue-tint);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.on-this-page__title {
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-body-muted);
}
.on-this-page ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.on-this-page a { font-size: var(--text-body); color: var(--color-ink); }
.on-this-page a:hover { color: var(--color-teal); }

/* ---------- Candidacy ---------- */

.candidacy-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.candidacy-list li {
  display: flex;
  gap: 12px;
  font-size: var(--text-body);
  color: var(--color-body-muted);
}
.candidacy-list li::before {
  content: "";
  flex: none;
  width: 8px; height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--color-teal);
}
.candidacy-narrative {
  font-size: var(--text-body);
  color: var(--color-body-muted);
}

/* ---------- Technology cards ---------- */

.tech-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tech-card {
  background: var(--color-white);
  border: 1px solid var(--color-sage);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.tech-card h3 {
  font-size: var(--text-subhead);
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #D98C85;
}
.tech-card__content { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.tech-card__thumb--placeholder { background: var(--color-hero-placeholder); }
.tech-card__thumb {
  flex: none;
  width: 76px; height: 84px;
  border-radius: 8px;
  object-fit: cover;
}
.tech-card p { font-size: var(--text-body); color: var(--color-body-muted); margin: 0 0 8px; }
.tech-card p:last-child { margin-bottom: 0; }

/* ---------- Process steps ---------- */

.process-steps { display: flex; flex-direction: column; gap: 32px; }
.process-step { display: flex; gap: 16px; }
.process-step__num {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-teal);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.process-step h3 { font-size: var(--text-subhead); font-weight: 500; margin-bottom: 8px; }
.process-step p { font-size: var(--text-body); color: var(--color-body-muted); white-space: pre-line; }

/* ---------- Case study ---------- */

.case-study { display: flex; gap: 32px; align-items: center; }
.case-study__image {
  width: 280px; height: 200px; min-width: 280px;
  border-radius: var(--radius-lg);
  background: var(--color-hero-placeholder);
}
.case-study__label {
  font-size: var(--text-eyebrow);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-body-muted);
  margin-bottom: 8px;
}
.case-study__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-card-title);
  margin-bottom: 12px;
}
.case-study__link { font-family: var(--font-heading); font-weight: 600; color: var(--color-teal); display: inline-block; margin-top: 12px; }
.case-study[hidden] { display: none; }

/* ---------- Recovery ---------- */

.recovery-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.recovery-list li { display: flex; gap: 12px; font-size: var(--text-body); color: var(--color-body-muted); }
.recovery-list li::before {
  content: "";
  flex: none; width: 6px; height: 6px; margin-top: 9px; border-radius: 50%;
  background: var(--color-sage);
}
.when-to-call {
  background: var(--color-refer-box);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.when-to-call h3 { font-family: var(--font-heading); font-weight: 500; font-size: var(--text-subhead); margin-bottom: 8px; }
.when-to-call p { margin: 0; font-size: var(--text-body); color: var(--color-body-muted); }

/* ---------- Cost ---------- */

.cost-link { font-family: var(--font-heading); font-weight: 600; color: var(--color-teal); display: inline-block; }

/* ---------- FAQ ---------- */

.faq-item { border-top: 1px solid var(--color-blue-tint); }
.faq-item:last-child { border-bottom: 1px solid var(--color-blue-tint); }
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-ink);
  cursor: pointer;
}
.faq-question__icon { font-family: var(--font-heading); font-size: 18px; color: var(--color-teal); flex: none; }
.faq-answer { margin: 0 0 20px; font-size: var(--text-body); color: var(--color-body-muted); }
.faq-answer[hidden] { display: none; }

/* ---------- Reviews ---------- */

.reviews-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.review-card {
  background: var(--color-white);
  border: 1px solid var(--color-blue-tint);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.review-card__stars { color: var(--color-star-gold); letter-spacing: 2px; margin-bottom: 8px; }
.review-card__date { font-family: var(--font-heading); font-weight: 500; font-size: var(--text-body); margin-bottom: 12px; }
.review-card__quote { font-size: var(--text-body); color: var(--color-body-muted); margin-bottom: 16px; }
.review-card__source { font-size: var(--text-eyebrow); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-eyebrow-muted); }

/* ---------- Related ---------- */

.related-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.related-card {
  background: var(--color-white);
  border: 1px solid var(--color-blue-tint);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.related-card h3 { font-size: var(--text-subhead); font-weight: 600; margin-bottom: 8px; }
.related-card p { font-size: var(--text-body); color: var(--color-body-muted); margin: 0; flex: 1; }
.related-card a.related-card__link { font-family: var(--font-heading); font-weight: 600; color: var(--color-teal); margin-top: 20px; }

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--color-teal);
  padding: 56px 180px;
  text-align: center;
}
.cta-band h2 { font-size: var(--text-h2); color: var(--color-white); margin-bottom: 16px; }
.cta-band p { font-size: var(--text-body); color: var(--color-teal-tint); max-width: 620px; margin: 0 auto 32px; }
.cta-band__ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.cta-band .btn--primary { background: var(--color-white); color: var(--color-teal); }
.cta-band .btn--outline { background: transparent; color: var(--color-white); border: 1px solid var(--color-white); }

/* ---------- Sticky mobile CTA bar (PROC-04) ---------- */

.sticky-cta-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-blue-tint);
  padding: 12px 20px;
  z-index: 90;
  gap: 12px;
}
.sticky-cta-bar .btn { flex: 1; }

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .hero { flex-direction: column-reverse; padding: 24px 20px 32px; text-align: left; }
  .hero__image { width: 100%; max-width: 560px; height: auto; min-width: 0; flex: 1 1 auto; }
  .hero__image img { object-position: center 15%; }
  .hero__title { font-size: 28px; }
  .page-layout { grid-template-columns: 1fr; padding: 32px 20px 100px; gap: 32px; }
  .tech-grid, .reviews-grid, .related-grid { grid-template-columns: 1fr; }
  .case-study { flex-direction: column; align-items: flex-start; }
  .case-study__image { width: 100%; height: 200px; }
  .cta-band { padding: 40px 20px; }
  .sticky-cta-bar { display: flex; }

  /* Quick Facts + On This Page become closed-by-default accordions,
     moved above the article body instead of trailing after it. */
  .sidebar { position: static; order: -1; gap: 12px; }
  .quick-facts__toggle,
  .on-this-page__toggle { cursor: pointer; margin-bottom: 0; }
  .quick-facts__toggle[aria-expanded="true"],
  .on-this-page__toggle[aria-expanded="true"] { margin-bottom: 16px; }
  .collapse-icon { display: block; }
  .quick-facts__panel[hidden],
  .on-this-page__panel[hidden] { display: none; }
}
