/* ==========================================================================
   CASE STUDY & BLOG DETAIL STYLES — LEANDIGI DESIGN SYSTEM (2026 EDITION)
   High-end Editorial Layout: Clear Content Hierarchy, Deep Typography & Data Visuals
   ========================================================================== */

:root {
  --case-bg: var(--ld-paper);
  --case-surface: #ffffff;
  --case-surface-subtle: #f4f5f7;
  --case-border: rgba(23, 19, 11, 0.08);
  --case-border-dark: rgba(23, 19, 11, 0.15);
  --case-gold: var(--ld-gold-deep);
  --case-gold-dark: #d4a923;
  --case-gold-bg: rgba(239, 195, 52, 0.12);
  --case-ink: var(--ld-ink);
  --case-ink-secondary: #374151;
  --case-muted: #6b7280;
  --case-dark-bg: var(--ld-dark);
  --case-radius: 16px;
  --case-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, var(--case-gold), #ffde70);
  z-index: 10001;
  transition: width 0.1s ease-out;
}

body {
  background-color: var(--case-bg);
  color: var(--case-ink);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.case-container {
  width: 100%;
  max-width: var(--container, 1280px);
  padding-inline: var(--pad, clamp(20px, 3vw, 32px));
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   1. BREADCRUMBS
   -------------------------------------------------------------------------- */
.case-breadcrumbs-wrap {
  padding-top: clamp(28px, 4vw, 52px);
  padding-bottom: 24px;
}

.case-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--case-muted);
}

.case-breadcrumbs a {
  color: var(--case-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.case-breadcrumbs a:hover {
  color: var(--case-ink);
}

.case-breadcrumbs .sep {
  opacity: 0.35;
  font-size: 0.8rem;
}

.case-breadcrumbs .current {
  color: var(--case-ink);
  font-weight: 700;
  max-width: 480px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   2. HERO & EDITORIAL HEADER
   -------------------------------------------------------------------------- */
.case-hero {
  padding-bottom: clamp(40px, 6vw, 64px);
}

.case-hero-inner {
  width: 100%;
}

.case-badge-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.case-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--case-ink);
  color: var(--case-gold);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 999px;
}

.case-category-pill::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--case-gold);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--case-gold);
}

.case-meta-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--case-muted);
}

.case-meta-dot {
  opacity: 0.4;
}

.case-title {
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--case-ink);
  margin-bottom: 20px;
}

.case-excerpt-lead {
  font-size: clamp(1.1rem, 1.6vw, 1.28rem);
  line-height: 1.75;
  color: var(--case-ink-secondary);
  margin-bottom: 34px;
  font-weight: 400;
}

/* Author Row */
.case-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 18px 24px;
  background: var(--case-surface);
  border: 1px solid var(--case-border);
  border-radius: 14px;
  margin-bottom: 34px;
}

.author-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid rgba(23, 19, 11, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
  box-sizing: border-box;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

img.author-avatar {
  padding: 10px;
  object-fit: contain;
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--case-ink);
}

.author-role {
  font-size: 0.82rem;
  color: var(--case-muted);
}

.hero-share-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-share {
  background: var(--case-surface-subtle);
  border: 1px solid var(--case-border);
  color: var(--case-ink);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-share:hover {
  background: var(--case-gold);
  border-color: var(--case-gold);
  color: #111;
}

/* Project Facts Quick Board (4 Columns) */
.case-client-meta-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  background: var(--case-surface);
  border: 1px solid var(--case-border);
  border-radius: var(--case-radius);
  padding: 24px 28px;
  margin-bottom: 34px;
  box-shadow: 0 8px 24px rgba(23, 19, 11, 0.03);
}

.client-fact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fact-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--case-muted);
}

.fact-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--case-ink);
  line-height: 1.45;
}

/* Hero Cover Showcase */
.case-cover-wrap {
  width: 100%;
  border-radius: var(--case-radius);
  overflow: hidden;
  border: 1px solid var(--case-border);
  box-shadow: 0 16px 48px rgba(23, 19, 11, 0.08);
  background: #111;
  margin-bottom: clamp(24px, 4vw, 36px);
}

/* Cover now sits above the header, so the facts card closes the hero */
.case-hero-inner > .case-client-meta-card:last-child {
  margin-bottom: 0;
}

.case-cover-img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
  display: block;
}

/* --------------------------------------------------------------------------
   3. TWO-COLUMN MAIN EDITORIAL LAYOUT
   -------------------------------------------------------------------------- */
.case-content-section {
  padding-bottom: clamp(60px, 8vw, 100px);
}

.case-layout-grid {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

/* Sticky Left Sidebar */
.case-sidebar {
  position: sticky;
  top: 100px;
}

.case-sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.case-toc-box {
  background: var(--case-surface);
  border: 1px solid var(--case-border);
  border-radius: var(--case-radius);
  padding: 24px 20px;
  box-shadow: 0 8px 24px rgba(23, 19, 11, 0.04);
}

.toc-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--case-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-title::before {
  content: '';
  width: 4px;
  height: 14px;
  background: var(--case-gold);
  border-radius: 2px;
  display: inline-block;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc-link {
  font-size: 0.86rem;
  color: var(--case-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-left: 2.5px solid transparent;
  border-radius: 0 8px 8px 0;
  transition: all 0.2s;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.toc-link .toc-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--case-gold-dark);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
  flex-shrink: 0;
}

.toc-link .toc-text {
  flex: 1;
}

.toc-link:hover {
  color: var(--case-ink);
  background: var(--case-surface-subtle);
}

.toc-link.active {
  color: var(--case-ink);
  font-weight: 700;
  border-left-color: var(--case-gold);
  background: var(--case-gold-bg);
}

.toc-link.active .toc-num {
  color: var(--case-ink);
}

/* Sidebar Expert Callout (Dark Mode Tech Theme) */
.case-expert-card {
  background: var(--ld-dark);
  color: #fff;
  border-radius: var(--case-radius);
  padding: 28px 22px 26px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(239, 195, 52, 0.22);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.case-expert-card::before {
  content: '';
  position: absolute;
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 160px;
  background: radial-gradient(circle, rgba(239, 195, 52, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.expert-avatar-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ffffff;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-shadow: 0 0 0 3px rgba(239, 195, 52, 0.35), 0 8px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 2;
}

.expert-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.expert-name {
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  display: block;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 2;
}

.expert-role {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--case-gold);
  background: rgba(239, 195, 52, 0.12);
  border: 1px solid rgba(239, 195, 52, 0.25);
  padding: 3px 12px;
  border-radius: 999px;
  margin-top: 6px;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.expert-pitch {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.expert-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  background: var(--case-gold);
  color: var(--ld-ink);
  font-weight: 800;
  font-size: 0.92rem;
  padding: 13px 20px;
  border-radius: 999px;
  text-decoration: none;
  box-sizing: border-box;
  transition: all 0.25s var(--case-ease);
  box-shadow: 0 4px 16px rgba(239, 195, 52, 0.3);
  position: relative;
  z-index: 2;
}

.expert-cta-btn::after {
  content: '→';
  font-size: 1.05rem;
  font-weight: 800;
  transition: transform 0.2s ease;
}

.expert-cta-btn:hover {
  background: #f5cf4a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 195, 52, 0.45);
  color: #0b0d13;
}

.expert-cta-btn:hover::after {
  transform: translateX(4px);
}

/* The sidebar card is narrow (~264px button): keep the brand button (16px
   uppercase, 30px arrow disc) on one line by tightening only gap and padding. */
:root body .case-expert-card .expert-cta-btn {
  gap: 12px !important;
  padding-left: 22px !important;
  padding-right: 14px !important;
  white-space: nowrap !important;
}

/* --------------------------------------------------------------------------
   5. ARTICLE CONTENT BODY TYPOGRAPHY & HIERARCHY
   -------------------------------------------------------------------------- */
.case-article-content {
  background: var(--case-surface);
  border: 1px solid var(--case-border);
  border-radius: var(--case-radius);
  padding: clamp(28px, 5vw, 56px);
  box-shadow: 0 10px 32px rgba(23, 19, 11, 0.02);
  min-width: 0;
}

.case-section {
  margin-bottom: 56px;
  scroll-margin-top: 24px;
}

.case-section:last-child {
  margin-bottom: 0;
}

/* Section Kicker */
.section-kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--case-gold-dark);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.case-article-content h2 {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--case-ink);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--case-surface-subtle);
}

.case-article-content h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--case-ink);
  margin-top: 28px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.case-article-content h3::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--case-gold);
  border-radius: 2px;
  display: inline-block;
}

.case-article-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--case-ink-secondary);
  margin-bottom: 22px;
}

.case-article-content p strong {
  color: var(--case-ink);
  font-weight: 700;
}

.lead-paragraph {
  font-size: 1.16rem;
  line-height: 1.8;
  color: var(--case-ink);
  font-weight: 500;
}

/* Feature & Numbered Lists */
.case-feature-list,
.case-article-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 26px;
}

.case-feature-list li,
.case-article-content ul li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 14px;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--case-ink-secondary);
}

.case-feature-list li::before,
.case-article-content ul li::before {
  content: '✔';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--case-gold-dark);
  font-weight: 900;
  font-size: 0.95rem;
}

.case-numbered-list,
.case-article-content ol {
  padding-left: 24px;
  margin-bottom: 26px;
}

.case-numbered-list li,
.case-article-content ol li {
  margin-bottom: 14px;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--case-ink-secondary);
}

/* Callout Quote Box */
.case-highlight-box {
  background: var(--case-surface-subtle);
  border-left: 4px solid var(--case-gold);
  border-radius: 0 14px 14px 0;
  padding: 24px 28px;
  margin: 32px 0;
  position: relative;
}

.case-highlight-box blockquote {
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.7;
  color: var(--case-ink);
  margin: 0;
}

/* Mid-Article CTA Callout (High-Conversion Box) */
.case-mid-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  background: linear-gradient(135deg, var(--ld-dark) 0%, #1a1e29 100%);
  color: #fff;
  border: 1px solid rgba(239, 195, 52, 0.25);
  border-radius: var(--case-radius);
  padding: 32px 36px;
  margin: 44px 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.case-mid-cta-box::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(239, 195, 52, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.mid-cta-content {
  flex: 1;
  min-width: 260px;
  position: relative;
  z-index: 2;
}

.mid-cta-kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--case-gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.mid-cta-content h4 {
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 8px;
}

.mid-cta-content p {
  font-size: 0.94rem;
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 0 !important;
}

.mid-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--case-gold);
  color: var(--ld-ink);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all 0.25s var(--case-ease);
  box-shadow: 0 4px 18px rgba(239, 195, 52, 0.35);
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.mid-cta-btn::after {
  content: '→';
  font-size: 1.1rem;
  font-weight: 800;
  transition: transform 0.2s ease;
}

.mid-cta-btn:hover {
  background: #f5cf4a;
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(239, 195, 52, 0.5);
  color: #0b0d13;
}

.mid-cta-btn:hover::after {
  transform: translateX(4px);
}

/* Figures & Real Embedded Data Images */
.case-img-figure {
  margin: 36px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.case-img-figure img,
.case-article-content img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--case-border);
  box-shadow: 0 12px 36px rgba(23, 19, 11, 0.06);
  display: block;
  background: #f8f8f8;
}

.case-img-figure figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--case-muted);
  font-style: italic;
  text-align: center;
  line-height: 1.5;
}

/* Stat Highlight Grid */
.case-stat-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.csh-item {
  background: var(--case-surface-subtle);
  border: 1px solid var(--case-border);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
}

.csh-number {
  display: block;
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--case-ink);
  line-height: 1.15;
  margin-bottom: 6px;
}

.csh-label {
  font-size: 0.82rem;
  color: var(--case-muted);
  font-weight: 600;
  line-height: 1.35;
  display: block;
}

/* --------------------------------------------------------------------------
   6. RELATED CASE STUDIES
   -------------------------------------------------------------------------- */
.related-cases-section {
  padding-bottom: clamp(60px, 8vw, 90px);
}

.related-header {
  margin-bottom: 32px;
  text-align: center;
}

.related-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--case-gold-dark);
}

.related-title {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 800;
  color: var(--case-ink);
  margin-top: 6px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.related-card {
  background: var(--white, #ffffff);
  border: 1px solid rgba(23, 19, 11, 0.08);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 36px rgba(23, 19, 11, 0.04);
  transition: transform 0.25s var(--case-ease), box-shadow 0.25s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(23, 19, 11, 0.08);
}

.related-media-link {
  display: block;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.related-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1024 / 536;
  height: auto;
  overflow: hidden;
  background: #0f1015;
}

.related-media img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1024 / 536;
  object-fit: cover;
  display: block;
}

.related-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #7a5e1b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.related-date {
  font-size: 0.8rem;
  color: var(--case-muted);
  margin-bottom: 8px;
}

.related-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 10px;
}

.related-card-title a {
  color: var(--case-ink);
  text-decoration: none;
  transition: color 0.2s;
}

.related-card-title a:hover {
  color: var(--case-gold-dark);
}

.related-excerpt {
  font-size: 0.92rem;
  color: var(--case-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--case-ink);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: gap 0.2s;
}

.related-link:hover {
  color: var(--case-gold-dark);
  gap: 10px;
}

/* --------------------------------------------------------------------------
   7. DARK MODE BOTTOM CTA BANNER
   -------------------------------------------------------------------------- */
.case-cta-banner {
  padding-bottom: clamp(60px, 8vw, 100px);
}

.cta-banner-card {
  background: var(--case-dark-bg);
  border-radius: 24px;
  padding: clamp(40px, 6vw, 70px) clamp(24px, 5vw, 60px);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.cta-banner-card::before {
  content: '';
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 350px;
  background: radial-gradient(circle, rgba(239, 195, 52, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}

.cta-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--case-gold);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: inline-block;
}

.cta-heading {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 18px;
}

.cta-desc {
  font-size: 1.05rem;
  color: #b3b8c6;
  line-height: 1.7;
  margin-bottom: 32px;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.cta-btn-primary {
  background: var(--case-gold);
  color: #111;
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s var(--case-ease);
}

.cta-btn-primary:hover {
  background: var(--case-gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(239, 195, 52, 0.35);
}

.cta-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.25s;
}

.cta-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .case-layout-grid {
    grid-template-columns: 1fr;
  }
  .case-sidebar {
    position: static;
  }
  .case-client-meta-card {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .case-client-meta-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 20px;
  }
  .case-stat-highlight-grid {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .case-article-content {
    padding: 24px 18px;
  }
}

/* --------------------------------------------------------------------------
   8. BLOCK EDITOR CONTENT (admin-app/src/lib/blocks.ts → renderBlocks)
   Each block is wrapped in .ld-block; the wrapper owns the vertical spacing.
   -------------------------------------------------------------------------- */
.ld-block {
  margin-bottom: 24px;
}

.ld-block > :first-child {
  margin-top: 0;
}

.ld-block > :last-child {
  margin-bottom: 0;
}

.ld-block--heading {
  margin-top: 40px;
  margin-bottom: 16px;
}

.ld-block--cta {
  margin-block: 40px;
}

.case-article-content > .ld-block:first-child {
  margin-top: 0;
}

.ld-space-none { margin-bottom: 0; }
.ld-space-sm { margin-bottom: 12px; }
.ld-space-md { margin-bottom: 24px; }
.ld-space-lg { margin-bottom: 48px; }

.ld-align-center { text-align: center; }
.ld-align-right { text-align: right; }
.ld-align-center h3 { justify-content: center; }
.ld-align-right h3 { justify-content: flex-end; }

.case-article-content .ld-text-ink { color: var(--case-ink); }
.case-article-content .ld-text-gold { color: var(--case-gold-dark); }
.case-article-content .ld-text-muted { color: var(--case-muted); }
.case-article-content .ld-text-sm { font-size: 0.95rem; }

/* Image widths */
.case-img-figure.ld-img-wide img { width: 85%; }
.case-img-figure.ld-img-medium img { width: 66%; }
.case-img-figure.ld-img-small img { width: 50%; }

/* Quote source */
.case-highlight-box cite {
  display: block;
  margin-top: 12px;
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 700;
  color: var(--case-muted);
}

/* Button block (styled by the shared button system in shared-ui.css) */
.case-article-content .ld-btn-row {
  margin: 0;
}

/* Image + text */
.ld-media-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}

.ld-media-text--right .ld-media-text__media {
  order: 2;
}

.ld-media-text__body > :first-child {
  margin-top: 0;
}

.ld-media-text__body > :last-child {
  margin-bottom: 0;
}

/* YouTube video, 16:9 */
.ld-video {
  margin: 0;
}

.ld-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}

.ld-video__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.ld-video figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--case-muted);
  text-align: center;
}

/* Table */
.ld-table {
  overflow-x: auto;
  border: 1px solid var(--case-border-dark);
  border-radius: 12px;
}

.ld-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.ld-table th,
.ld-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--case-border);
  text-align: left;
  vertical-align: top;
  color: var(--case-ink-secondary);
}

.ld-table th + th,
.ld-table td + td {
  border-left: 1px solid var(--case-border);
}

.ld-table th {
  background: var(--case-surface-subtle);
  font-weight: 700;
  color: var(--case-ink);
}

.ld-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Callout box */
.ld-callout {
  border-left: 4px solid var(--case-gold);
  border-radius: 0 14px 14px 0;
  background: var(--ld-gold-soft);
  padding: 20px 24px;
}

.ld-callout--info {
  border-left-color: #84adff;
  background: #eff4ff;
}

.ld-callout--warning {
  border-left-color: #fda29b;
  background: #fef3f2;
}

.case-article-content .ld-callout p {
  margin-bottom: 8px;
}

.case-article-content .ld-callout p:last-child {
  margin-bottom: 0;
}

.case-article-content .ld-callout__title {
  font-weight: 800;
  color: var(--case-ink);
}

/* FAQ (details/summary) */
.ld-faq__list {
  overflow: hidden;
  border: 1px solid var(--case-border-dark);
  border-radius: 14px;
}

.ld-faq__item + .ld-faq__item {
  border-top: 1px solid var(--case-border);
}

.ld-faq__item summary {
  position: relative;
  padding: 18px 56px 18px 22px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--case-ink);
  list-style: none;
  cursor: pointer;
}

.ld-faq__item summary::-webkit-details-marker {
  display: none;
}

.ld-faq__item summary::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--case-gold-dark);
  transition: transform 0.2s var(--case-ease);
}

.ld-faq__item[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.case-article-content .ld-faq__item p {
  margin: 0;
  padding: 0 22px 18px;
}

/* Divider / spacer */
.ld-divider {
  border: 0;
  border-top: 1px solid var(--case-border-dark);
  margin: 8px 0;
}

.ld-spacer {
  height: 32px;
}

@media (max-width: 640px) {
  .ld-media-text {
    grid-template-columns: 1fr;
  }
  .ld-media-text--right .ld-media-text__media {
    order: 0;
  }
  .case-img-figure.ld-img-wide img,
  .case-img-figure.ld-img-medium img,
  .case-img-figure.ld-img-small img {
    width: 100%;
  }
}

@media (min-width: 641px) {
  .case-stat-highlight-grid.ld-stats-1 { grid-template-columns: 1fr; }
  .case-stat-highlight-grid.ld-stats-2 { grid-template-columns: repeat(2, 1fr); }
  .case-stat-highlight-grid.ld-stats-4 { grid-template-columns: repeat(4, 1fr); }
}
