/* ── Case Study Template ─────────────────────────────────── */

/* Hero */
.cs-hero {
  padding: 5rem 2rem 4rem;
}

.cs-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.cs-hero__title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin: 0 0 1rem;
}

.cs-hero__subtitle {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  line-height: 1.7;
  margin: 0;
}

/* Tag pills */
.cs-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.cs-tag {
  display: inline-block;
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.4px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Metadata strip */
.cs-meta-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.cs-meta-item {
  padding: 1.25rem 2rem;
  border-right: 1px solid #e2e8f0;
}

.cs-meta-item:last-child {
  border-right: none;
}

.cs-meta-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  margin-bottom: 0.3rem;
}

.cs-meta-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.4;
}

/* Content wrapper */
.cs-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* Overview card */
.cs-overview {
  background: #ffffff;
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 4rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.cs-overview p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #4a5568;
  margin-bottom: 1.25rem;
}

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

/* Section header */
.cs-section-header {
  margin: 4rem 0 2rem;
}

.cs-section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.cs-section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--cs-accent, #1a1a1a);
  opacity: 0.4;
  border-radius: 2px;
}

/* Image gallery */
.cs-image-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 3rem 0;
}

.cs-image-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Video grid */
.cs-video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

.cs-video-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.cs-video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
}

.cs-video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000000;
  overflow: hidden;
}

.cs-video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-video-caption {
  padding: 1.25rem;
}

.cs-video-caption h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--cs-accent, #1a1a1a);
  margin-bottom: 0.5rem;
}

.cs-video-caption p {
  font-size: 0.9rem;
  color: #4a5568;
  line-height: 1.6;
  margin: 0;
}

/* Full-width image */
.cs-full-image {
  margin: 3rem 0;
  text-align: center;
}

.cs-full-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Two-column layout */
.cs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin: 3rem 0;
}

/* Quote / testimonial */
.cs-quote {
  border-left: 4px solid var(--cs-accent, #1a1a1a);
  padding: 1.5rem 2rem;
  background: #f8f9fa;
  border-radius: 0 12px 12px 0;
  margin: 3rem 0;
}

.cs-quote blockquote {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #1a1a1a;
  font-style: italic;
  margin: 0 0 1rem;
}

.cs-quote cite {
  font-size: 0.875rem;
  color: #4a5568;
  font-style: normal;
  font-weight: 600;
}

/* Divider */
.cs-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.12), transparent);
  margin: 4rem 0;
}

/* Staggered entry for video grid children */
.cs-video-grid .cs-animate:nth-child(2) { transition-delay: 0.08s; }
.cs-video-grid .cs-animate:nth-child(3) { transition-delay: 0.14s; }
.cs-video-grid .cs-animate:nth-child(4) { transition-delay: 0.2s; }
.cs-video-grid .cs-animate:nth-child(5) { transition-delay: 0.24s; }
.cs-video-grid .cs-animate:nth-child(6) { transition-delay: 0.28s; }

/* Scroll-reveal */
.cs-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.cs-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 968px) {
  .cs-video-grid {
    grid-template-columns: 1fr;
  }

  .cs-image-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .cs-meta-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-meta-item:nth-child(2) {
    border-right: none;
  }

  .cs-meta-item:nth-child(3),
  .cs-meta-item:nth-child(4) {
    border-top: 1px solid #e2e8f0;
  }
}

@media (max-width: 768px) {
  .cs-hero {
    padding: 4rem 1.5rem 3rem;
  }

  .cs-content-wrapper {
    padding: 2rem 1.5rem 3rem;
  }

  .cs-overview {
    padding: 2rem 1.5rem;
  }

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

@media (max-width: 480px) {
  .cs-meta-strip {
    grid-template-columns: 1fr;
    border-left: none;
  }

  .cs-meta-item {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }

  .cs-meta-item:last-child {
    border-bottom: none;
  }

  .cs-meta-item:nth-child(3),
  .cs-meta-item:nth-child(4) {
    border-top: none;
  }
}

/* ── Dark mode ───────────────────────────────────────────── */

.dark .cs-meta-strip {
  background: #1e293b;
  border-bottom-color: #334155;
}

.dark .cs-meta-item {
  border-right-color: #334155;
}

.dark .cs-meta-item:nth-child(3),
.dark .cs-meta-item:nth-child(4) {
  border-top-color: #334155;
}

.dark .cs-meta-value {
  color: #f1f5f9;
}

.dark .cs-overview {
  background: #1e293b;
}

.dark .cs-overview p {
  color: #94a3b8;
}

.dark .cs-section-title {
  color: #f1f5f9;
}

.dark .cs-video-card {
  background: #1e293b;
}

.dark .cs-video-caption p {
  color: #94a3b8;
}

.dark .cs-quote {
  background: #1e293b;
}

.dark .cs-quote blockquote {
  color: #f1f5f9;
}
