/* ============================================================
   Case Study page styles
   Source: _design-reference/redesign/CaseStudy.jsx
   ============================================================ */

.cs-container { max-width: 800px; }

/* ── Hero ── */
.cs-hero {
  background: linear-gradient(180deg, #FAFAF9 0%, #fff 100%);
  border-bottom: 1px solid var(--border-hairline);
  padding: 56px 32px;
}

.cs-hero__inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  align-items: center;
}

.cs-hero__title {
  font-size: 44px;
  font-weight: 900;
  color: #1F2A3D;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 14px;
  text-wrap: balance;
}

.cs-hero__subtitle {
  font-size: 18px;
  line-height: 1.55;
  color: #585961;
  margin: 0 0 18px;
}

.cs-hero__meta {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  color: #9A9CA3;
  margin-bottom: 14px;
}

.cs-hero__client { font-weight: 700; color: #585961; }

.cs-hero__lead {
  font-size: 16px;
  line-height: 1.6;
  color: #585961;
  margin: 0 0 18px;
}

.cs-hero__meta {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  color: #9A9CA3;
  flex-wrap: wrap;
}

.cs-hero__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cs-hero__tag {
  display: inline-block;
  padding: 5px 12px;
  background: color-mix(in srgb, var(--tag-color) 12%, transparent);
  color: var(--tag-color);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cs-hero__image { border-radius: 18px; overflow: hidden; }
.cs-hero__image img { width: 100%; display: block; object-fit: cover; aspect-ratio: 4/3; }

@media (max-width: 900px) {
  .cs-hero__inner { grid-template-columns: 1fr; }
  .cs-hero__title { font-size: 32px; }
  .cs-hero__image { max-width: 400px; }
}

/* ── Summary ── */
.cs-summary {
  padding: 40px 32px 0;
}

.cs-summary__text {
  font-size: 19px;
  line-height: 1.65;
  color: #3D3F47;
  font-style: italic;
  border-left: 4px solid var(--apoh-blue);
  padding-left: 24px;
  margin: 0;
}

/* ── Two-column body layout ── */
.cs-body-section {
  background: #fff;
  padding: 48px 0 64px;
}

.cs-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.cs-main { min-width: 0; }

/* ── TOC Sidebar ── */
.cs-toc {
  position: sticky;
  top: 180px;
  align-self: start;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.admin-bar .cs-toc { top: 212px; }

.cs-toc__box {
  background: #F5F8FF;
  border-radius: 14px;
  padding: 20px 22px;
  border: 1px solid #DBEAFE;
}

.cs-toc__label {
  font-size: 10px;
  font-weight: 800;
  color: var(--apoh-blue);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cs-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-toc__list a {
  font-size: 13px;
  line-height: 1.4;
  color: var(--fg-1);
  font-weight: 500;
  text-decoration: none;
  display: block;
  padding: 5px 8px;
  border-radius: 6px;
  transition: all var(--dur-fast);
}
.cs-toc__list a:hover { background: #DBEAFE; color: var(--apoh-blue); }
.cs-toc__list a.is-active {
  background: #DBEAFE;
  color: var(--apoh-blue);
  font-weight: 700;
}

/* ── Case Body (full content from post_content) ── */
.case-body { font-size: 17px; line-height: 1.78; color: #3D3F47; }

.case-body h2 {
  scroll-margin-top: 220px;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 44px 0 20px;
  padding: 13px 20px;
  background: #246AB4;
  border-radius: 8px;
}
.admin-bar .case-body h2 { scroll-margin-top: 252px; }
.case-body h2:first-of-type { margin-top: 8px; }

.case-body h3 {
  font-size: 17px;
  font-weight: 800;
  color: #1F2A3D;
  margin: 28px 0 10px;
  letter-spacing: -0.01em;
  padding: 0 0 0 14px;
  border-left: 3px solid var(--apoh-green);
}

.case-body p { margin: 0 0 20px; }
.case-body > p:first-child { font-size: 18px; color: #585961; line-height: 1.7; }
.case-body strong, .case-body b { color: #1F2A3D; font-weight: 700; }
.case-body a { color: var(--apoh-blue); font-weight: 700; }

.case-body ul, .case-body ol { padding-left: 28px; margin: 0 0 20px; }
.case-body li { margin-bottom: 10px; line-height: 1.6; }
.case-body ul li::marker { color: var(--apoh-green); font-size: 1.1em; }

/* Pull quotes */
.case-body blockquote,
.case-body blockquote.pull-quote {
  margin: 28px 0;
  padding: 22px 26px;
  background: #EEF5FC;
  border-left: 5px solid #246AB4;
  border-radius: 0 12px 12px 0;
  font-size: 17px;
  font-style: italic;
  color: #1F2A3D;
  font-weight: 500;
  line-height: 1.65;
}
.case-body blockquote p { margin: 0; font-style: inherit; }
.case-body blockquote cite {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  color: #246AB4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Tables */
.case-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  font-size: 14px;
}
.case-body thead tr { background: #1F2A3D; color: #fff; }
.case-body thead th { padding: 13px 16px; text-align: left; font-size: 11px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.case-body tbody tr:nth-child(even) { background: #F4F7FB; }
.case-body tbody tr:nth-child(odd) { background: #fff; }
.case-body tbody td { padding: 12px 16px; color: #3D3F47; border-bottom: 1px solid #E8EDF4; vertical-align: top; line-height: 1.5; }

/* FAQ sections */
.case-body .faq-section { margin: 36px 0; background: #F4F8FF; border-radius: 16px; border: 1px solid #D0E3F5; overflow: hidden; }
.case-body .faq-heading { font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; margin: 0; padding: 14px 22px; background: #1F2A3D; color: #fff; border-left: none; }
.case-body .faq-item { padding: 18px 22px; border-bottom: 1px solid #D0E3F5; }
.case-body .faq-item:last-child { border-bottom: none; }
.case-body .faq-q { font-size: 13px; font-weight: 800; color: #246AB4; margin-bottom: 8px; line-height: 1.45; letter-spacing: 0.02em; }
.case-body .faq-a { font-size: 16px; line-height: 1.65; color: #3D3F47; }

/* Key Takeaways */
.case-body .takeaways-section { margin: 44px 0; padding: 28px 32px; background: #F4F7FB; border-radius: 16px; border: 1px solid #EAEAE7; }
.case-body .takeaways-title { font-size: 20px; font-weight: 900; color: #1F2A3D; margin: 0 0 20px; letter-spacing: -0.02em; background: none; padding: 0; }
.case-body .takeaways-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.case-body .takeaway-card { padding: 16px 18px; background: #fff; border-radius: 10px; border: 1px solid #EAEAE7; font-size: 14px; line-height: 1.55; color: #3D3F47; }

/* Legacy ACF section headings (fallback) */
.cs-section { margin-bottom: 40px; }
.cs-section__heading {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 44px 0 20px;
  line-height: 1.25;
  padding: 13px 20px;
  background: #246AB4;
  border-radius: 8px;
  scroll-margin-top: 220px;
}
.admin-bar .cs-section__heading { scroll-margin-top: 252px; }

@media (max-width: 1024px) {
  .cs-layout { grid-template-columns: 1fr; }
  .cs-toc { display: none; }
}

.cs-section__body {
  font-size: 17px;
  line-height: 1.78;
  color: #3D3F47;
}

.cs-section__body p { margin: 0 0 20px; }
.cs-section__body strong, .cs-section__body b { color: #1F2A3D; font-weight: 700; }
.cs-section__body a { color: var(--apoh-blue); font-weight: 700; }

.cs-section__body h3 {
  font-size: 17px;
  font-weight: 800;
  color: #1F2A3D;
  margin: 28px 0 10px;
  padding: 0 0 0 14px;
  border-left: 3px solid var(--apoh-green);
}

.cs-section__body blockquote {
  margin: 28px 0;
  padding: 22px 26px;
  background: #EEF5FC;
  border-left: 5px solid #246AB4;
  border-radius: 0 12px 12px 0;
  font-size: 17px;
  font-style: italic;
  color: #1F2A3D;
  font-weight: 500;
  line-height: 1.65;
}
.cs-section__body blockquote p { margin: 0; }
.cs-section__body blockquote cite {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  color: #246AB4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cs-section__body ul { list-style: none; padding: 0; }
.cs-section__body ul li { margin-bottom: 10px; padding-left: 22px; position: relative; }
.cs-section__body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--apoh-green);
}

/* ── Pull Quote ── */
.cs-pullquote {
  margin-bottom: 40px;
}

.cs-pullquote__block {
  background: linear-gradient(135deg, #EEF5FC 0%, #F0F8FF 100%);
  border-left: 5px solid #246AB4;
  border-radius: 0 14px 14px 0;
  padding: 24px 28px;
  margin: 0;
  color: #1F2A3D;
}

.cs-pullquote__block p {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 600;
  font-style: italic;
  margin: 0 0 10px;
}

.cs-pullquote__cite {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  color: #246AB4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Outcomes ── */
.cs-outcomes {
  margin-bottom: 40px;
}

.cs-outcomes__title {
  font-size: 22px;
  font-weight: 900;
  color: #1F2A3D;
  margin: 0 0 18px;
}

.cs-outcomes__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cs-outcomes__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #3D3F47;
}

.cs-outcomes__item svg { flex: 0 0 auto; margin-top: 2px; }

/* ── Related Programs ── */
.cs-related {
  padding: 0 32px 40px;
}

.cs-related__title {
  font-size: 14px;
  font-weight: 800;
  color: var(--apoh-blue);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.cs-related__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cs-related__link {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  color: var(--apoh-blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.cs-related__link:hover { border-color: var(--apoh-blue); text-decoration: none; }

/* ── Privacy footer ── */
.cs-privacy {
  margin-top: 40px;
}

.cs-privacy__note {
  font-size: 12px;
  color: #9A9CA3;
  text-align: center;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-hairline);
}
