/* ============================================================
   BNPB - Badan Nasional Penanggulangan Bencana
   Stylesheet Utama | bnpbri.org
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Merriweather:ital,wght@0,300;0,400;0,700;1,300&display=swap');

/* ---- Reset & Dasar ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: #1a2332;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- Token Warna ---- */
:root {
  --biru-tua:    #003875;
  --biru-sedang: #0057a8;
  --biru-muda:   #1a80c4;
  --oranye:      #e85d1a;
  --oranye-muda: #f5a623;
  --abu-gelap:   #1a2332;
  --abu-sedang:  #4a5568;
  --abu-muda:    #718096;
  --abu-latar:   #f5f7fa;
  --garis:       #e2e8f0;
  --putih:       #ffffff;
}

/* ============================================================
   HEADER & NAVIGASI
   ============================================================ */
.topbar {
  background: var(--biru-tua);
  color: #ccd9f0;
  font-size: 0.78rem;
  padding: 0.4rem 0;
  letter-spacing: 0.01em;
}
.topbar-inner {
  max-width: 1240px; margin: auto; padding: 0 1.5rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.topbar a { color: #ccd9f0; }
.topbar a:hover { color: var(--oranye-muda); }
.topbar-links { display: flex; gap: 1.2rem; }

.header {
  background: var(--putih);
  border-bottom: 3px solid var(--oranye);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.header-inner {
  max-width: 1240px; margin: auto; padding: 0.8rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand {
  display: flex; align-items: center; gap: 1rem;
  text-decoration: none;
}
.brand img { height: 56px; width: auto; }
.brand-text h1 {
  font-size: 1rem; font-weight: 700; color: var(--biru-tua); line-height: 1.2;
  letter-spacing: -0.01em;
}
.brand-text p {
  font-size: 0.7rem; color: var(--abu-sedang); font-weight: 400;
  max-width: 260px; line-height: 1.3; margin-top: 2px;
}

nav { display: flex; align-items: center; gap: 0; }
nav a {
  display: block; padding: 0.55rem 1rem; font-size: 0.85rem;
  font-weight: 500; color: var(--abu-gelap); border-radius: 6px;
  transition: background 0.15s, color 0.15s; white-space: nowrap;
}
nav a:hover, nav a.aktif {
  background: var(--biru-tua); color: var(--putih);
}
.nav-cta {
  margin-left: 0.5rem; background: var(--oranye) !important;
  color: var(--putih) !important; border-radius: 6px;
  padding: 0.55rem 1.2rem !important;
}
.nav-cta:hover { background: #c44d12 !important; }

/* ---- Mobile hamburger ---- */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--biru-tua); border-radius: 2px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; overflow: hidden; min-height: 580px;
  display: flex; align-items: center;
  background: linear-gradient(135deg, var(--biru-tua) 0%, var(--biru-sedang) 60%, var(--biru-muda) 100%);
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('../images/banner.jpg');
  background-size: cover; background-position: center;
  opacity: 0.22; mix-blend-mode: luminosity;
}
.hero-inner {
  position: relative; max-width: 1240px; margin: auto; padding: 5rem 1.5rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3);
  border-radius: 100px; padding: 0.35rem 1rem; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 1.2rem;
}
.hero-badge::before { content: ''; display: block; width: 7px; height: 7px; background: var(--oranye-muda); border-radius: 50%; }
.hero h2 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700; color: #fff; line-height: 1.25;
  margin-bottom: 1.2rem; letter-spacing: -0.02em;
}
.hero-desc { font-size: 1.05rem; color: rgba(255,255,255,0.85); max-width: 500px; line-height: 1.75; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primer {
  background: var(--oranye); color: #fff; border: none;
  padding: 0.9rem 1.8rem; border-radius: 8px; font-size: 0.9rem;
  font-weight: 600; cursor: pointer; display: inline-block;
  transition: background 0.15s, transform 0.1s; text-align: center;
}
.btn-primer:hover { background: #c44d12; transform: translateY(-1px); }
.btn-sekunder {
  background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.5);
  padding: 0.88rem 1.8rem; border-radius: 8px; font-size: 0.9rem;
  font-weight: 600; cursor: pointer; display: inline-block;
  transition: border-color 0.15s, background 0.15s;
}
.btn-sekunder:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

.hero-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem;
}
.stat-card {
  background: rgba(255,255,255,0.12); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 12px;
  padding: 1.4rem 1.2rem; text-align: center;
}
.stat-number { font-size: 2rem; font-weight: 700; color: var(--oranye-muda); line-height: 1; }
.stat-label { font-size: 0.78rem; color: rgba(255,255,255,0.8); margin-top: 0.4rem; font-weight: 500; }

/* ---- Darurat banner ---- */
.darurat-banner {
  background: var(--oranye); color: #fff; text-align: center;
  padding: 0.75rem 1.5rem; font-size: 0.88rem; font-weight: 600;
}
.darurat-banner a { color: #fff; text-decoration: underline; margin-left: 0.5rem; }

/* ============================================================
   BAGIAN UMUM
   ============================================================ */
.section { padding: 5rem 1.5rem; }
.section-alt { background: var(--abu-latar); }
.container { max-width: 1240px; margin: auto; }
.container-narrow { max-width: 860px; margin: auto; }

.section-label {
  display: block; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--biru-muda); margin-bottom: 0.6rem;
}
.section-judul {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700; color: var(--biru-tua); line-height: 1.3;
  margin-bottom: 1rem; letter-spacing: -0.02em;
}
.section-deskripsi {
  font-size: 1rem; color: var(--abu-sedang); max-width: 640px; line-height: 1.75;
}
.section-head { margin-bottom: 3rem; }
.section-head-center { margin-bottom: 3rem; text-align: center; }
.section-head-center .section-deskripsi { margin: 0 auto; }

/* ============================================================
   KARTU PROGRAM
   ============================================================ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

.program-card {
  background: var(--putih); border: 1px solid var(--garis);
  border-radius: 12px; padding: 2rem 1.6rem; transition: box-shadow 0.2s, transform 0.2s;
  position: relative; overflow: hidden;
}
.program-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--biru-sedang);
}
.program-card:hover { box-shadow: 0 8px 32px rgba(0,56,117,0.12); transform: translateY(-3px); }
.program-icon {
  width: 56px; height: 56px; border-radius: 12px;
  background: var(--abu-latar); display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 1.2rem;
}
.program-card h3 { font-size: 1rem; font-weight: 700; color: var(--biru-tua); margin-bottom: 0.7rem; line-height: 1.3; }
.program-card p { font-size: 0.88rem; color: var(--abu-sedang); line-height: 1.7; }
.program-card a.baca-lagi {
  display: inline-block; margin-top: 1rem; font-size: 0.82rem; font-weight: 600;
  color: var(--biru-muda); border-bottom: 1.5px solid var(--biru-muda); padding-bottom: 1px;
}

/* ============================================================
   BERITA / ARTIKEL
   ============================================================ */
.berita-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.berita-utama { border-radius: 12px; overflow: hidden; border: 1px solid var(--garis); }
.berita-utama img { width: 100%; height: 300px; object-fit: cover; }
.berita-konten { padding: 1.8rem; }
.berita-kategori {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--oranye); margin-bottom: 0.7rem;
  background: #fef3ec; padding: 0.25rem 0.7rem; border-radius: 4px;
}
.berita-konten h3 {
  font-family: 'Merriweather', Georgia, serif; font-size: 1.25rem;
  font-weight: 700; color: var(--biru-tua); line-height: 1.35; margin-bottom: 0.7rem;
}
.berita-konten p { font-size: 0.9rem; color: var(--abu-sedang); line-height: 1.75; margin-bottom: 1rem; }
.berita-meta { font-size: 0.78rem; color: var(--abu-muda); display: flex; gap: 1rem; }

.berita-samping { display: flex; flex-direction: column; gap: 1rem; }
.berita-mini {
  display: grid; grid-template-columns: 90px 1fr; gap: 1rem;
  padding: 1rem; border: 1px solid var(--garis); border-radius: 10px;
  transition: box-shadow 0.15s;
}
.berita-mini:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.berita-mini img { width: 90px; height: 70px; object-fit: cover; border-radius: 6px; }
.berita-mini h4 { font-size: 0.82rem; font-weight: 600; color: var(--biru-tua); line-height: 1.4; margin-bottom: 0.4rem; }
.berita-mini span { font-size: 0.72rem; color: var(--abu-muda); }

/* ============================================================
   KONTAK & CALL TO ACTION
   ============================================================ */
.cta-section {
  background: linear-gradient(135deg, var(--biru-tua), var(--biru-sedang));
  padding: 5rem 1.5rem; text-align: center; color: #fff;
}
.cta-section h2 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem); font-weight: 700;
  margin-bottom: 1rem; color: #fff;
}
.cta-section p { font-size: 1rem; color: rgba(255,255,255,0.85); max-width: 580px; margin: 0 auto 2rem; line-height: 1.75; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-nomor {
  display: flex; align-items: center; gap: 0.6rem; background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3); border-radius: 8px; padding: 0.9rem 1.5rem;
  font-size: 1.3rem; font-weight: 700; color: var(--oranye-muda); cursor: pointer;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #0a1929; color: #9fb3cc; padding: 4rem 1.5rem 0;
}
.footer-grid {
  max-width: 1240px; margin: auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem;
}
.footer-brand img { height: 48px; margin-bottom: 1rem; filter: brightness(0) invert(1) opacity(0.9); }
.footer-brand p { font-size: 0.85rem; line-height: 1.75; color: #8fa4bc; }
.footer h4 { font-size: 0.82rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.footer ul li { margin-bottom: 0.5rem; }
.footer ul li a { font-size: 0.85rem; color: #8fa4bc; transition: color 0.15s; }
.footer ul li a:hover { color: var(--oranye-muda); }
.footer-bottom {
  max-width: 1240px; margin: auto; padding: 1.5rem 0;
  border-top: 1px solid #1e3250; display: flex; justify-content: space-between;
  align-items: center; font-size: 0.78rem; color: #6b86a0;
}
.footer-social { display: flex; gap: 0.8rem; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; background: #1e3250; border-radius: 6px;
  color: #8fa4bc; transition: background 0.15s, color 0.15s; font-size: 0.9rem;
}
.footer-social a:hover { background: var(--biru-sedang); color: #fff; }

/* ============================================================
   HALAMAN DALAM (inner pages)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--biru-tua) 0%, var(--biru-sedang) 100%);
  padding: 4rem 1.5rem 3rem; color: #fff;
}
.page-hero-inner { max-width: 1240px; margin: auto; }
.breadcrumb {
  font-size: 0.78rem; color: rgba(255,255,255,0.65); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.4rem;
}
.breadcrumb a { color: rgba(255,255,255,0.65); }
.breadcrumb a:hover { color: #fff; }
.page-hero h1 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700;
  color: #fff; line-height: 1.25; margin-bottom: 0.8rem;
}
.page-hero p { font-size: 1rem; color: rgba(255,255,255,0.8); max-width: 600px; line-height: 1.75; }

/* ---- Konten artikel ---- */
.artikel-konten {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.02rem; line-height: 1.9; color: #2d3748;
}
.artikel-konten h2 {
  font-size: 1.35rem; font-weight: 700; color: var(--biru-tua);
  margin: 2.5rem 0 1rem; letter-spacing: -0.01em; line-height: 1.3;
}
.artikel-konten h3 {
  font-size: 1.1rem; font-weight: 700; color: var(--biru-tua);
  margin: 2rem 0 0.8rem; line-height: 1.35;
}
.artikel-konten p { margin-bottom: 1.3rem; }
.artikel-konten ul, .artikel-konten ol {
  margin: 0.5rem 0 1.3rem 1.5rem; line-height: 1.85;
}
.artikel-konten li { margin-bottom: 0.4rem; }
.artikel-konten blockquote {
  border-left: 4px solid var(--biru-muda);
  background: var(--abu-latar); padding: 1.2rem 1.5rem;
  border-radius: 0 8px 8px 0; margin: 1.5rem 0;
  font-style: italic; color: var(--abu-sedang);
}
.artikel-konten figure { margin: 2rem 0; }
.artikel-konten figure img { border-radius: 10px; width: 100%; }
.artikel-konten figcaption { font-size: 0.8rem; color: var(--abu-muda); margin-top: 0.5rem; text-align: center; font-style: italic; font-family: 'Inter', sans-serif; }

/* ---- Sidebar ---- */
.sidebar-widget {
  background: var(--abu-latar); border-radius: 10px; padding: 1.4rem; margin-bottom: 1.5rem;
}
.sidebar-widget h4 {
  font-size: 0.85rem; font-weight: 700; color: var(--biru-tua);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem;
  padding-bottom: 0.7rem; border-bottom: 2px solid var(--biru-muda);
}
.sidebar-widget ul li { padding: 0.5rem 0; border-bottom: 1px solid var(--garis); font-size: 0.85rem; }
.sidebar-widget ul li:last-child { border-bottom: none; }
.sidebar-widget ul li a { color: var(--abu-sedang); transition: color 0.15s; }
.sidebar-widget ul li a:hover { color: var(--biru-tua); }

.layout-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }

/* ---- Info Box ---- */
.info-box {
  border: 1px solid var(--garis); border-radius: 10px; overflow: hidden; margin-bottom: 2rem;
}
.info-box-header {
  background: var(--biru-tua); color: #fff; padding: 1rem 1.4rem;
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.info-box table { width: 100%; border-collapse: collapse; }
.info-box td { padding: 0.75rem 1.2rem; font-size: 0.88rem; border-bottom: 1px solid var(--garis); vertical-align: top; }
.info-box td:first-child { font-weight: 600; color: var(--abu-gelap); width: 40%; }
.info-box td:last-child { color: var(--abu-sedang); }
.info-box tr:last-child td { border-bottom: none; }

/* ---- Kontak form ---- */
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--abu-gelap); margin-bottom: 0.4rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 0.75rem 1rem; border: 1.5px solid var(--garis);
  border-radius: 8px; font-size: 0.9rem; color: var(--abu-gelap);
  font-family: inherit; transition: border-color 0.15s;
  background: var(--putih);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--biru-muda);
  box-shadow: 0 0 0 3px rgba(26,128,196,0.12);
}
.form-group textarea { min-height: 140px; resize: vertical; }

/* ---- Struktur organisasi ---- */
.struktur { text-align: center; }
.struktur-tingkat { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.pejabat-card {
  background: var(--putih); border: 1px solid var(--garis); border-radius: 12px;
  padding: 1.5rem 1.2rem; width: 200px; text-align: center; transition: box-shadow 0.2s;
}
.pejabat-card:hover { box-shadow: 0 6px 20px rgba(0,56,117,0.1); }
.pejabat-foto {
  width: 80px; height: 80px; border-radius: 50%; background: var(--biru-tua);
  margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.8rem;
}
.pejabat-card h4 { font-size: 0.88rem; font-weight: 700; color: var(--biru-tua); margin-bottom: 0.3rem; }
.pejabat-card p { font-size: 0.75rem; color: var(--abu-sedang); }

/* ============================================================
   RESPONSIF
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-stats { max-width: 420px; }
}
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .berita-grid { grid-template-columns: 1fr; }
  .layout-sidebar { grid-template-columns: 1fr; }
  nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--putih); padding: 1rem; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
  nav.aktif { display: flex; }
  nav a { padding: 0.7rem 1rem; }
  .hamburger { display: flex; }
  .header-inner { position: relative; }
  .hero-inner { padding: 3rem 1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .topbar-links { display: none; }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 3rem 1rem; }
  .btn-primer, .btn-sekunder { width: 100%; text-align: center; }
  .hero-actions { flex-direction: column; }
}

/* ---- Accessibility ---- */
:focus-visible { outline: 2px solid var(--biru-muda); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
