/* ========================================
   Case Study Template Styles
   ======================================== */

/* Hero */
.cs-hero {
  padding: 140px 0 64px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-light);
}

.cs-hero-inner {
  max-width: 720px;
}

.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 32px;
  transition: var(--transition);
}

.cs-back:hover {
  color: var(--primary);
  gap: 6px;
}

.cs-back svg {
  transition: var(--transition);
}

.cs-back:hover svg {
  transform: translateX(-2px);
}

.cs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.cs-hero h1 {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

.cs-hero-desc {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-light);
  max-width: 600px;
  margin-bottom: 36px;
}

.cs-hero-metrics {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.cs-hero-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cs-hero-metric .result-value {
  font-size: 28px;
}

/* Image Placeholders */
.cs-image {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 48px 0;
  border: 1px solid var(--border-light);
}

.cs-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Fallback when image file is missing — shows alt text as placeholder */
.cs-image img.broken {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--border-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  object-fit: contain;
}

.cs-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--border-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.cs-image-full {
  margin: 48px 0;
  padding: 0 24px;
}

.cs-image-full .cs-image {
  max-width: 1120px;
  margin: 0 auto;
}

/* Content Sections */
.cs-content {
  padding: 64px 0;
}

.cs-section {
  max-width: 720px;
  margin: 0 auto 64px;
  padding: 0 24px;
}

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

.cs-section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.cs-section h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}

.cs-section p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 16px;
}

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

.cs-section ul {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-section li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  padding-left: 20px;
  position: relative;
}

.cs-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* Info Grid */
.cs-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.cs-info-item {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border-light);
}

.cs-info-item h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.cs-info-item p {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0;
}

/* Results Grid */
.cs-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.cs-result-card {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border-light);
  text-align: center;
}

.cs-result-card .result-value {
  font-size: 36px;
  margin-bottom: 4px;
}

.cs-result-card .result-label {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}

/* Quote / Callout */
.cs-callout {
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 32px 0;
  border-left: 4px solid var(--primary);
}

.cs-callout p {
  font-size: 16px;
  font-style: italic;
  color: var(--dark);
  margin-bottom: 0;
}

/* Process Steps */
.cs-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.cs-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.cs-step-number {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs-step-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.cs-step-content p {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 0;
}

/* Two Column */
.cs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

.cs-two-col.cs-three-col {
  grid-template-columns: repeat(3, 1fr);
}

.cs-col h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.cs-col p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
}

.cs-col ul {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cs-col li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-light);
  padding-left: 16px;
  position: relative;
}

.cs-col li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

/* Next Project CTA */
.cs-next {
  padding: 80px 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.cs-next p {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.cs-next h3 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 24px;
}

.cs-next h3 a {
  color: var(--dark);
  transition: var(--transition);
}

.cs-next h3 a:hover {
  color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .cs-hero {
    padding: 120px 0 48px;
  }

  .cs-hero-metrics {
    gap: 24px;
  }

  .cs-info-grid {
    grid-template-columns: 1fr;
  }

  .cs-two-col,
  .cs-two-col.cs-three-col {
    grid-template-columns: 1fr;
  }

  .cs-results-grid {
    grid-template-columns: 1fr;
  }

  .cs-section {
    margin-bottom: 48px;
  }
}
