/* Case studies: index (Figma 170:2), detail (173:2) and the homepage teaser (34:2).
   Values are taken from the Figma nodes; tokens are used where one matches. */

/* ---------- Filter chips ---------- */
.cs-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-bottom: 16px; margin-bottom: 36px;
  border-bottom: 1px solid #E2DDD6;
}
.cs-chip {
  font-family: var(--font-heading); font-size: 16px; line-height: 20px;
  padding: 6px 17px; border-radius: 999px;
  background: var(--color-white, #fff); color: var(--color-ink);
  border: 1px solid #E2DDD6; cursor: pointer;
}
.cs-chip[aria-pressed="true"] { background: #000; border-color: #000; color: #fff; }
.cs-chip:focus-visible { outline: 2px solid var(--color-teal); outline-offset: 2px; }

/* ---------- Case cards ---------- */
.cs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.cs-card {
  display: flex; flex-direction: column;
  background: #E9F7FE; border: 1px solid #3587A4; border-radius: 4px;
  padding: 12px 10px 20px; color: inherit;
}
.cs-card[hidden] { display: none; }
.cs-card__media { border-radius: 4px; overflow: hidden; aspect-ratio: 2 / 1; }
.cs-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-card__body { display: flex; flex-direction: column; flex: 1; padding: 0 12px; }
.cs-card__tag {
  font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--color-sage); margin: 24px 0 8px;
}
.cs-card__title { font-family: var(--font-heading); font-weight: 400; font-size: 24px; line-height: 28px; color: #000; margin: 36px 0 18px; }
.cs-card__tag + .cs-card__title { margin-top: 0; }
.cs-card__summary { font-size: 16px; line-height: 22px; color: #231F20; margin: 0 0 40px; }
.cs-card__link { margin-top: auto; font-family: var(--font-heading); font-weight: 500; font-size: 16px; color: var(--color-sage); }
.cs-card:hover .cs-card__link { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- "Wondering if your case is similar?" band ---------- */
.cs-cta { background: var(--color-cream); padding: 64px 0; }
.cs-cta__box { background: #DCF0F7; border-radius: 4px; padding: 48px; }
.cs-cta__box h2 { font-family: var(--font-heading); font-weight: 400; font-size: 30px; line-height: 34px; color: #000; margin: 0 0 12px; }
.cs-cta__box p { max-width: 560px; color: var(--color-body-muted); margin: 0 0 24px; }
.cs-cta__box .hero__ctas { justify-content: flex-start; }

/* ---------- Detail page ---------- */
.csd-meta { border-top: 1px solid #E2DDD6; border-bottom: 1px solid #E2DDD6; }
.csd-meta__row { display: flex; flex-wrap: wrap; gap: 20px 64px; padding: 24px 0; }
.csd-meta dt {
  font-family: var(--font-heading); font-weight: 500; font-size: 11px; letter-spacing: 0.6px;
  text-transform: uppercase; color: #4F534A; margin-bottom: 6px;
}
.csd-meta dd { font-family: var(--font-heading); font-weight: 600; font-size: 16px; margin: 0; }

.csd-body { max-width: 720px; margin: 0 auto; padding: 56px 0 24px; }
.csd-section { margin-bottom: 48px; }
.csd-eyebrow {
  display: inline-block; font-family: var(--font-heading); font-weight: 500; font-size: 16px;
  color: #4F534A; padding-bottom: 8px; border-bottom: 1px solid #E2DDD6; min-width: 200px; margin: 0 0 16px;
}
.csd-section h2 { font-family: var(--font-heading); font-weight: 400; font-size: 36px; line-height: 40px; color: #000; margin: 0 0 16px; }
.csd-section p { margin: 0 0 16px; }

.csd-findings { background: #E9F7FE; border: 1px solid #ABE1FA; border-radius: 4px; padding: 24px; margin: 24px 0 0; }
.csd-findings h3 { font-family: var(--font-heading); font-weight: 600; font-size: 16px; color: var(--color-sage); margin: 0 0 10px; }
.csd-findings ul { margin: 0; padding-left: 18px; }
.csd-findings li { margin: 4px 0; }

.csd-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0 48px; }
.csd-pair + .csd-pair { margin-top: -28px; }
.csd-pair figure { margin: 0; }
.csd-pair img { width: 100%; height: auto; display: block; border-radius: 4px; }
.csd-pair figcaption, .csd-caption { font-size: 14px; font-style: italic; color: #4F534A; margin-top: 8px; }

/* ---------- Homepage teaser (Figma 34:2, "Oral Surgery Case Studies") ---------- */
.cs-home { background: var(--color-cream); }
.cs-home .cs-grid { grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; gap: 52px; margin-top: 40px; }
.cs-home__all { display: block; max-width: 772px; margin: 40px auto 0; text-align: center; }
.cs-home .cs-card__link { text-transform: uppercase; letter-spacing: 0.4px; font-size: 15px; }

@media (max-width: 900px) {
  .cs-grid, .cs-home .cs-grid { grid-template-columns: 1fr; gap: 20px; }
  .cs-cta__box { padding: 28px; }
  .csd-section h2 { font-size: 28px; line-height: 32px; }
  .csd-pair { grid-template-columns: 1fr; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
