/* ─── CASE STUDY PAGE ────────────────────────────────── */
/* Page-specific styles. Shared tokens, nav, footer, buttons
   come from styles.css which is loaded first. */

/* ─── HERO ───────────────────────────────────────────── */
.cs-hero {
  position: relative;
  padding: 9rem 5% 5rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.cs-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(14, 207, 200, 0.08);
  border: 1px solid rgba(14, 207, 200, 0.25);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.cs-hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.cs-hero h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.cs-hero h1 em {
  font-style: normal;
  color: var(--teal);
}

.cs-hero-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.78;
  max-width: 480px;
  margin-bottom: 2.5rem;
}

.cs-hero-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.cs-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cs-meta-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.cs-meta-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--white);
}

/* ─── HERO DASHBOARD CARD ────────────────────────────── */
.cs-hero-visual {
  position: relative;
}

.cs-dashboard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(14, 207, 200, 0.06);
  animation: csFloat 6s ease-in-out infinite;
}

@keyframes csFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.cs-db-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.cs-db-dots {
  display: flex;
  gap: 6px;
}

.cs-db-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.cs-db-title {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.cs-live-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--teal);
  background: rgba(14, 207, 200, 0.08);
  border: 1px solid rgba(14, 207, 200, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cs-live-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 1.5s infinite;
}

/* Pipeline flow */
.cs-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.2rem;
  gap: 0.5rem;
}

.cs-pipe-node {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 0.7rem;
  text-align: center;
}

.cs-pipe-node.active {
  border-color: rgba(14, 207, 200, 0.25);
  background: rgba(14, 207, 200, 0.05);
}

.cs-pipe-icon {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.cs-pipe-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  color: var(--white);
}

.cs-pipe-sub {
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 0.12rem;
}

.cs-pipe-arrow {
  flex: 0 0 auto;
  display: flex;
  gap: 3px;
  align-items: center;
}

.cs-pipe-arrow span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
  animation: dotFlow 1.5s infinite;
}

.cs-pipe-arrow span:nth-child(2) { animation-delay: 0.3s; }
.cs-pipe-arrow span:nth-child(3) { animation-delay: 0.6s; }

@keyframes dotFlow {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

/* Dashboard stats row */
.cs-db-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}

.cs-db-stat {
  padding: 1rem 1.1rem;
  border-right: 1px solid var(--border);
}

.cs-db-stat:last-child {
  border-right: none;
}

.cs-db-stat-label {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.cs-db-stat-val {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--white);
}

.cs-db-stat-val .unit {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}

/* ─── SECTION BASE ───────────────────────────────────── */
.cs-section {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 5%;
}

.cs-section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.2rem;
}

.cs-section-label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}

.cs-section h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.cs-section h2 em {
  font-style: normal;
  color: var(--teal);
}

.cs-section-intro {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.78;
}

/* ─── GLOW DIVIDER ───────────────────────────────────── */
.glow-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(14, 207, 200, 0.3) 30%, var(--teal) 50%, rgba(14, 207, 200, 0.3) 70%, transparent 100%);
  margin: 0 auto;
}

/* ─── TANTANGAN / CHALLENGES ─────────────────────────── */
.challenges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 3rem;
}

.challenge-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem 1.7rem;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
  overflow: hidden;
}

.challenge-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.challenge-card:hover {
  border-color: rgba(14, 207, 200, 0.25);
  transform: translateY(-4px);
}

.challenge-card:hover::before {
  opacity: 1;
}

.challenge-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.challenge-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.challenge-body {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ─── SOLUSI / SOLUTIONS ─────────────────────────────── */
.solutions-wrap {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.solution-row {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.solution-row:hover {
  border-color: rgba(14, 207, 200, 0.25);
}

.solution-left {
  padding: 2.2rem 2rem;
  border-right: 1px solid var(--border);
  background: rgba(14, 207, 200, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sol-year {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.6rem;
}

.sol-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}

.solution-right {
  padding: 2.2rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.solution-right p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.8;
}

/* ─── DAMPAK / IMPACT ────────────────────────────────── */
.impact-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-top: 3rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.impact-stat {
  background: var(--card);
  padding: 2.2rem 1.5rem;
  border-right: 1px solid var(--border);
  text-align: center;
  transition: background 0.3s;
}

.impact-stat:last-child {
  border-right: none;
}

.impact-stat:hover {
  background: rgba(14, 207, 200, 0.04);
}

.impact-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.impact-num em {
  font-style: normal;
  color: var(--teal);
}

.impact-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

.impact-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  margin-top: 1.2rem;
}

.impact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: border-color 0.3s;
}

.impact-card:hover {
  border-color: rgba(14, 207, 200, 0.25);
}

.impact-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(14, 207, 200, 0.08);
  border: 1px solid rgba(14, 207, 200, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

.impact-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.impact-card-body {
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.75;
}

/* ─── WILAYAH / REGION MAP ───────────────────────────── */
.cs-wilayah-section {
  background: var(--ink);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4rem 0;
}

.cs-wilayah-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.map-container {
  position: relative;
  margin-top: 2.5rem;
  background: #060a14;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

#mapCanvas {
  width: 100%;
  display: block;
}

.map-legend {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: rgba(6, 10, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  transition: color 0.3s;
  cursor: default;
}

.legend-item.active {
  color: var(--teal);
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.legend-item.active .legend-dot {
  background: var(--teal);
  box-shadow: 0 0 6px var(--teal);
}

.map-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.2rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.75rem;
  color: var(--muted);
}

.status-live {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--teal);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: pulse 1.5s infinite;
}

/* ─── CTA SECTION ────────────────────────────────────── */
.cs-cta-section {
  text-align: center;
  padding: 6rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.cs-cta-section p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 1rem;
  margin-bottom: 2.5rem;
}

.cs-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--blue);
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.22s;
  box-shadow: 0 0 32px var(--glow);
}

.cs-cta-btn:hover {
  background: #0e4fd4;
  transform: translateY(-2px);
  box-shadow: 0 0 48px var(--glow);
}

/* ─── SCROLL REVEAL ──────────────────────────────────── */
.cs-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ─── RESPONSIVE: TABLET ─────────────────────────────── */
@media (max-width: 960px) {
  .cs-hero {
    grid-template-columns: 1fr;
    padding: 8rem 5% 4rem;
    gap: 3rem;
  }

  .cs-hero-visual {
    max-width: 500px;
    margin: 0 auto;
  }

  .challenges-grid {
    grid-template-columns: 1fr 1fr;
  }

  .solution-row {
    grid-template-columns: 1fr;
  }

  .solution-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .impact-details {
    grid-template-columns: 1fr;
  }

  .map-legend {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    margin: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    padding: 0.75rem 1.2rem;
  }
}

/* ─── RESPONSIVE: MOBILE ─────────────────────────────── */
@media (max-width: 640px) {
  .cs-hero {
    padding: 7rem 5% 3rem;
    gap: 2.5rem;
  }

  .cs-hero h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .cs-hero-meta {
    gap: 1.5rem;
  }

  .challenges-grid {
    grid-template-columns: 1fr;
  }

  .impact-stats {
    grid-template-columns: 1fr;
  }

  .impact-stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .impact-stat:last-child {
    border-bottom: none;
  }

  .cs-pipeline {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
  }

  .cs-pipe-arrow {
    display: none;
  }

  .cs-pipe-node {
    flex: 0 0 calc(33% - 0.3rem);
  }

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

  .cs-db-stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .cs-db-stat:last-child {
    border-bottom: none;
  }

  .map-status-bar {
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
  }
}

/* ─── RESPONSIVE: SMALL MOBILE ───────────────────────── */
@media (max-width: 380px) {
  .cs-hero h1 {
    font-size: 1.5rem;
  }

  .cs-pipe-node {
    flex: 0 0 100%;
  }
}
