/* ==========================================================================
   CASE STUDY DETAIL PAGE STYLES
   Modern, professional layout for individual case study pages
   ========================================================================== */

/* --- Breadcrumb Navigation --- */
.case-breadcrumb {
  padding: 24px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.case-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.case-breadcrumb a:hover {
  color: var(--terracotta);
}

.case-breadcrumb svg {
  width: 12px;
  height: 12px;
  margin: 0 8px;
  opacity: 0.5;
}

/* --- Hero Section --- */
.case-detail-hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  padding: 80px 0 60px;
  overflow: hidden;
  background-color: var(--night);
}

.case-detail-hero .wrap {
  max-width: 1400px;
}

.case-detail-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.3) 0%,
    rgba(10, 10, 10, 0.7) 60%,
    rgba(10, 10, 10, 0.9) 100%
  );
  z-index: 1;
}

.case-detail-hero-content {
  position: relative;
  z-index: 2;
  max-width: 880px;
}

.case-detail-hero .eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  background: rgba(200, 107, 66, 0.15);
  padding: 6px 14px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.case-detail-hero h1 {
  color: var(--ivory);
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  margin-bottom: 20px;
  font-weight: 600;
}

.case-detail-hero .lede {
  color: rgba(237, 237, 237, 0.9);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  max-width: 720px;
  margin-bottom: 0;
}

.case-detail-hero .attribution-note {
  margin-top: 16px;
  font-size: 12px;
  font-style: italic;
  color: rgba(237, 237, 237, 0.7);
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 6px;
  display: inline-block;
}

/* --- Case Meta Bar --- */
.case-meta-bar {
  background: var(--white);
  border-bottom: 1px solid var(--line-soft);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
}

.case-meta-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.case-meta-items {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.case-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.case-meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--terracotta);
}

.case-meta-item strong {
  color: var(--night);
  font-weight: 600;
}

/* --- Stats Section Redesign --- */
.case-stats-section {
  background: linear-gradient(135deg, var(--ivory) 0%, #fff 100%);
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}

.case-stats-section .wrap {
  max-width: 1400px;
}

.case-stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--terracotta), transparent);
  opacity: 0.3;
}

.case-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.case-stat-card {
  background: var(--white);
  padding: 32px 28px;
  border-radius: 16px;
  border: 1px solid rgba(79, 29, 69, 0.08);
  box-shadow: 0 4px 16px rgba(79, 29, 69, 0.06);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(79, 29, 69, 0.12);
}

.case-stat-card b {
  font-family: 'Fraunces', serif;
  font-size: clamp(36px, 5vw, 48px);
  color: var(--plum);
  display: block;
  line-height: 1.1;
  margin-bottom: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--plum), var(--terracotta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.case-stat-card span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: block;
}

/* --- Content Section --- */
.case-content-section {
  padding: 80px 0;
}

.case-content-section .wrap {
  max-width: 1400px;
}

.case-content-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.case-content-block {
  margin-bottom: 56px;
}

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

.case-content-block h4 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.case-content-block h4::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--terracotta);
}

.case-content-block p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--night);
}

.case-note {
  margin-top: 48px;
  padding: 20px 24px;
  background: rgba(200, 107, 66, 0.06);
  border-left: 4px solid var(--terracotta);
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--mulberry);
}

.case-flag {
  margin-top: 48px;
  padding: 20px 24px;
  background: rgba(139, 92, 246, 0.06);
  border-left: 4px solid var(--violet);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.6;
}

.case-flag strong {
  color: var(--violet);
  font-weight: 600;
}

/* --- CTA Section (matching homepage style) --- */
.case-cta-section {
  /* Styles handled by existing .on-dark.cta-end.rv classes */
}

/* --- Related Cases Section --- */
.related-cases-section {
  padding: 80px 0;
  background: var(--ivory);
}

.related-cases-section h3 {
  text-align: center;
  margin-bottom: 48px;
  font-size: 28px;
}

.related-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
  .case-detail-hero {
    min-height: 420px;
    padding: 60px 0 50px;
  }

  .case-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .case-stat-card {
    padding: 24px 20px;
  }

  .case-content-section {
    padding: 60px 0;
  }

  .case-content-block {
    margin-bottom: 44px;
  }

  .case-meta-bar .wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .case-cta-buttons {
    flex-direction: column;
  }

  .case-cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .case-stats-grid {
    grid-template-columns: 1fr;
  }

  .case-breadcrumb {
    font-size: 12px;
  }
}
