:root {
  --red: #D60000;
  --red-dark: #AD0000;
  --ink: #1F2330;
  --muted: #6B7280;
  --border: #E7E9F0;
  --bg-soft: #F7F8FC;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
}
.container { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
a { color: inherit; text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background 200ms ease, transform 200ms ease;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { background: #fff; color: var(--red); border-color: var(--red); }
.btn-outline:hover { background: #FBEAE9; }
.btn-outline-light { background: #fff; color: var(--ink); }

/* Header */
.site-header { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 80px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-logo { display: block; height: 48px; width: auto; }
.main-nav { display: flex; gap: 28px; }
.main-nav a { font-size: 14px; font-weight: 500; color: var(--ink); padding-bottom: 4px; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: 4px; transition: color 200ms ease; }
.main-nav a.active, .main-nav a:hover { color: var(--red); border-color: var(--red); }
.main-nav .chevron { font-size: 10px; }
.btn-donasi { margin-left: 8px; }

@media (max-width: 860px) {
  .main-nav { display: none; }
}

/* Hero -- foto full-bleed rapat ke tepi atas & kanan viewport (TANPA rounded
   corner, TANPA jarak/inset), fade putih hanya di tepi kiri foto agar
   menyatu dengan teks. min-height (bukan height tetap) + tanpa overflow:hidden
   di .hero supaya teks TIDAK PERNAH terpotong kalau kontennya lebih tinggi
   dari 500px (lihat insiden 2026-06-24: h1 72px di kolom sempit bikin
   teks+tombol kepotong). */
.hero { position: relative; min-height: 560px; background: #fff; padding: 56px 0 40px; }
.hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 56%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,0) 28%);
}
.hero-inner { position: relative; z-index: 2; min-height: 100%; display: flex; align-items: center; }
.hero-text { max-width: 46%; }
.eyebrow { color: var(--red); font-weight: 700; font-size: 13px; letter-spacing: .04em; }
.hero h1 { font-size: clamp(28px, 3.6vw, 46px); font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; margin: 14px 0 18px; }
.hero p { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 480px; }
.hero-actions { display: flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }

/* Entrance animation (pengganti Framer Motion di stack vanilla/PHP) */
.anim-fade-up { opacity: 0; transform: translateY(16px); animation: fadeUp 700ms ease-out forwards; animation-delay: 120ms; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .anim-fade-up { animation: none; opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .hero { min-height: 0; padding-top: 32px; padding-bottom: 24px; }
  .hero-inner { display: block; }
  .hero-text { max-width: 100%; }
  .hero-photo { position: static; width: 100%; height: 220px; margin-top: 24px; inset: auto; }
  .hero-photo::before { display: none; }
}

/* Stats bar -- DILEPAS dari document flow, float di antara hero & section
   berikutnya. Posisi & ukuran ikut permintaan eksplisit (bukan margin-top lagi). */
.stats-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -60px;
  z-index: 50;
  width: calc(100% - 120px);
  max-width: 1680px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 24px 12px;
}
.stat-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 0 8px; transition: transform 300ms ease; }
.stat-card:hover { transform: translateY(-4px); }
.stat-icon { font-size: 22px; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; background: var(--bg-soft); }
.stat-icon--danger { background: #FBEAE9; }
.stat-icon--info { background: #E6EEFB; }
.stat-icon--success { background: #E6F7EE; }
.stat-icon--warning { background: #FDF1E1; }
.stat-icon--accent { background: #EFE9FB; }
.stat-value { font-size: 28px; font-weight: 800; font-feature-settings: "tnum"; }
.stat-label { font-size: 13px; color: var(--muted); line-height: 1.3; }

@media (max-width: 860px) {
  /* Mobile: foto hero jadi stack statis, kartu kembali ke document flow normal. */
  .stats-bar {
    position: static; transform: none; width: 100%; max-width: none;
    grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; border-radius: var(--radius-lg);
  }
}

/* Content grid -- 3 panel sejajar: peta (45%) | bencana aktif (25%) | donasi terbaru (30%).
   margin-top diberi ruang ekstra karena stats-bar sekarang position:absolute
   (lepas dari document flow) dan menonjol ~60px di bawah hero. */
.content-grid { display: grid; grid-template-columns: 1.8fr 1fr 1.2fr; gap: 24px; margin-top: 100px; padding-bottom: 40px; align-items: start; }
.list-col { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1100px) {
  .content-grid { grid-template-columns: 1fr 1fr; }
  .map-panel { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .content-grid { grid-template-columns: 1fr; margin-top: 24px; }
}

.panel {
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; background: #fff;
  box-shadow: 0 8px 24px rgba(20,20,40,.05); transition: transform 300ms ease, box-shadow 300ms ease;
}
.panel:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(20,20,40,.08); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 8px; }
.panel-head h2 { font-size: 13px; letter-spacing: .03em; color: var(--ink); margin: 0; font-weight: 700; }
.panel-head__link { font-size: 12px; color: var(--red); font-weight: 600; white-space: nowrap; }

.map-panel .map { height: 450px; border-radius: var(--radius-lg); overflow: hidden; background: #EEF1F8; }
.map-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }
.map-legend label { display: flex; align-items: center; gap: 6px; }
.map-legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-red { background: var(--red); }
.dot-blue { background: #2D6CDF; }
.dot-green { background: #1B8A4D; }

.list-panel { display: flex; flex-direction: column; }
.bencana-list, .donasi-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.bencana-list .empty, .donasi-list .empty { color: var(--muted); font-size: 13px; }

.bencana-item { display: flex; align-items: flex-start; gap: 10px; }
.bencana-item .icon { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.bencana-item .info { flex: 1; min-width: 0; }
.bencana-item .title { font-weight: 600; font-size: 14px; }
.bencana-item .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.badge-darurat { background: #FBEAE9; color: var(--red); }
.badge-siaga   { background: #FDF1E1; color: #B5790B; }
.badge-waspada { background: #FEF6DC; color: #A36A00; }
.badge-pemulihan { background: #E6F7EE; color: #1B8A4D; }
.icon-darurat, .icon-siaga { background: #FBEAE9; color: var(--red); }
.icon-waspada { background: #FEF6DC; color: #A36A00; }
.icon-pemulihan { background: #E6F7EE; color: #1B8A4D; }

.btn-view-all {
  display: block; text-align: center; margin-top: 16px; padding: 11px;
  border: 1px solid var(--border); border-radius: 12px; color: var(--red); font-weight: 600; font-size: 13px;
  transition: background 200ms ease;
}
.btn-view-all:hover { background: var(--bg-soft); }

.donasi-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: 14px; }
.donasi-item .nama { font-weight: 600; }
.donasi-item .waktu { font-size: 11px; color: var(--muted); margin-top: 2px; }
.donasi-item .nominal { color: var(--ink); font-weight: 700; text-align: right; white-space: nowrap; }

.cta-donasi {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--red); color: #fff; border-radius: var(--radius-lg); padding: 20px; text-align: center;
  box-shadow: 0 12px 28px rgba(214,0,0,.28); transition: transform 300ms ease, background 200ms ease;
}
.cta-donasi:hover { background: var(--red-dark); transform: translateY(-4px); }
.cta-donasi span { font-weight: 700; font-size: 16px; }
.cta-donasi small { opacity: 0.9; font-size: 12px; }

/* CTA banner */
.cta-banner {
  display: flex; align-items: center; gap: 20px;
  background: #FDF0EF; border-radius: var(--radius-xl); padding: 28px 32px; margin-bottom: 48px;
}
.cta-icon { font-size: 28px; }
.cta-text { flex: 1; }
.cta-text h3 { margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.cta-text p { margin: 0; color: var(--muted); font-size: 14px; }

@media (max-width: 600px) {
  .cta-banner { flex-direction: column; text-align: center; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--muted); font-size: 13px; text-align: center; }
