/* =============================================================
   Content pages (Case Studies single-page showcase) - page styles
   Used by: lists_product.htm (/index.php/case-studies/)
   Depends on: styles.css design tokens (.page-shell, .section-heading,
   .button, .text-button are global).
   ============================================================= */

/* ---------- Content hero ---------- */
.content-hero {
  padding-top: var(--header-h);
  background:
    radial-gradient(1200px 480px at 85% -10%, var(--soft-blue) 0%, rgba(234, 244, 255, 0) 62%),
    var(--white);
  border-bottom: 1px solid var(--line);
}

.content-hero-inner {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.1fr);
  gap: clamp(36px, 4vw, 78px);
  align-items: center;
  padding-block: clamp(46px, 5vw, 88px);
}

.content-hero-copy { position: relative; z-index: 2; }

.content-hero h1 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(42px, 3.4vw, 64px);
  line-height: 1.12;
  font-weight: 760;
}

.content-hero-copy > p {
  max-width: 580px;
  margin: 30px 0 0;
  color: #526276;
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.9;
}

.content-hero-copy .hero-actions { margin-top: 36px; }

.content-hero-visual { margin: 0; }

.content-hero-visual img {
  width: 100%;
  height: clamp(320px, 34vw, 480px);
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 30px 60px rgba(16, 28, 44, .10);
}

/* ---------- Page intro ---------- */
.page-intro { padding-block: clamp(64px, 6vw, 104px) 0; }

/* ---------- Shared eyebrow label ---------- */
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---------- Case showcase: every case rendered in full on one page ---------- */
.case-list {
  counter-reset: case-idx;
  margin-top: clamp(48px, 4.5vw, 72px);
  border-top: 1px solid var(--line);
}

.case-entry {
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(360px, .95fr);
  gap: clamp(34px, 4.5vw, 84px);
  align-items: start;
  padding-block: clamp(50px, 5vw, 88px);
  border-bottom: 1px solid var(--line);
}

/* Long-form case content: keep the visual in view while scrolling the text */
@media (min-width: 1025px) {
  .case-media { position: sticky; top: calc(var(--header-h) + 32px); }
}

.case-media { margin: 0; }

.case-media img {
  width: 100%;
  height: auto; /* override the HTML height attribute so aspect-ratio applies */
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 48px rgba(16, 28, 44, .08);
}

/* Alternate rows: swap media and copy sides */
.case-entry:nth-child(even) .case-media { order: 2; }
.case-entry:nth-child(even) .case-copy { order: 1; }

/* Auto-numbered eyebrow: CASE 01, CASE 02, ... */
.case-copy .eyebrow::before {
  content: "Case " counter(case-idx, decimal-leading-zero);
  counter-increment: case-idx;
}

.case-copy h2 {
  margin: 0;
  font-size: clamp(28px, 2.4vw, 40px);
  line-height: 1.22;
}

/* Rich-text body rendered from each case's backend content */
.case-body { margin-top: 18px; }

.case-body figure { margin: 20px 0 0; }

.case-body p { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.case-body p:last-child { margin-bottom: 0; }

/* Subsection headings inside the backend rich text stay subordinate to the
   case-title h2 rendered by the template (later rule wins the cascade) */
.case-body h2 {
  margin: 30px 0 0;
  font-size: clamp(19px, 1.55vw, 25px);
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
}

.case-body h3, .case-body h4 {
  margin: 22px 0 0;
  font-size: clamp(17px, 1.35vw, 22px);
  font-weight: 640;
  color: #33445c;
}

.case-body ul, .case-body ol {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.case-body ul li, .case-body ol li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #33445c;
  font-size: 14px;
  line-height: 1.6;
}

/* Decorative check mark for bullet lists, added purely via CSS */
.case-body ul li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: var(--blue);
  font-size: 12px;
  margin-top: 4px;
}

.case-body img {
  max-width: 100%;
  height: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* ---------- Closing line: invite visitors to ask for more cases ---------- */
.case-more {
  margin: clamp(44px, 4.5vw, 72px) 0 0;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.case-more a {
  color: var(--blue);
  font-weight: 600;
  transition: color .2s ease;
}

.case-more a:hover { color: var(--blue-dark); text-decoration: underline; }

/* ---------- Case notes ---------- */
.case-notes-grid {
  margin-top: clamp(48px, 4.5vw, 72px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2vw, 30px);
}

.case-note {
  padding: clamp(26px, 2.6vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.case-note i {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--soft-blue);
  color: var(--blue);
  font-size: 16px;
}

.case-note h3 { margin: 16px 0 0; font-size: clamp(17px, 1.3vw, 20px); }

.case-note p { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }

/* ---------- Bottom CTA (same treatment as industry-page.css) ---------- */
.industry-cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(26px, 3.5vw, 60px);
  align-items: center;
  padding: clamp(38px, 4vw, 64px) clamp(26px, 3.5vw, 64px);
  border: 1px solid #d5e4f4;
  border-radius: 10px;
  background: linear-gradient(120deg, var(--soft-blue) 0%, #f7fbff 68%);
}

.industry-cta-inner h2 {
  margin: 0;
  font-size: clamp(26px, 2.2vw, 38px);
  line-height: 1.25;
}

.industry-cta-inner p { margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }

.industry-cta-inner .button { white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .content-hero-inner { grid-template-columns: 1fr; padding-block: 42px 52px; }
  .content-hero-visual img { height: clamp(260px, 44vw, 420px); }
  .case-entry { grid-template-columns: 1fr; padding-block: 48px; gap: 26px; }
  .case-entry:nth-child(even) .case-media { order: 0; }
  .case-entry:nth-child(even) .case-copy { order: 0; }
}

@media (max-width: 820px) {
  .content-hero h1 { font-size: clamp(34px, 7.4vw, 44px); }
  .industry-cta-inner { grid-template-columns: 1fr; }
  .industry-cta-inner .button { justify-self: start; }
}

@media (max-width: 560px) {
  .case-notes-grid { grid-template-columns: 1fr; }
  .case-entry { padding-block: 40px; }
}
