:root {
  --warna-utama: #2F539B;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f9fbfd;
  color: #1e293b;
  line-height: 1.5;
  scroll-behavior: smooth;
}

.container { max-width: 1440px; margin: 0 auto; padding: 0 32px; }

/* MARQUEE */
.top-marquee {
  background-color: var(--warna-utama);
  color: white;
  padding: 10px 0;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.4px;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 8px rgba(47,83,155,0.1);
  width: 100%;
}
.top-marquee marquee { display: block; color: white; }
.top-marquee marquee:hover { animation-play-state: paused; }

/* HEADER */
.desa-header {
  background: white;
  padding: 20px 0 16px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 6px 18px rgba(47,83,155,0.02);
}
.header-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.logo-area { display: flex; align-items: center; gap: 16px; flex: 1 1 280px; }
.logo-kab { display: flex; align-items: center; gap: 6px; }
.logo-icon {
  width: 86px; height: 86px; border-radius: 1px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; box-shadow: 0 10px 15px -8px rgba(47,83,155,0.2);
}
.logo-icon img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 8px; }
.desa-title h1 { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; color: var(--warna-utama); line-height: 1.2; }

.header-gallery {
  flex: 2 1 600px; background: #f0f4f7; border-radius: 4px; padding: 8px 12px;
  display: flex; align-items: center; box-shadow: inset 0 1px 5px rgba(47,83,155,0.02);
  overflow: hidden; position: relative;
}
.gallery-scroll {
  display: flex; gap: 18px; overflow-x: hidden; scroll-behavior: smooth;
  white-space: nowrap; padding: 6px 0; width: 100%; -webkit-overflow-scrolling: touch;
}
.gallery-item {
  flex: 0 0 auto; width: 110px; height: 70px; border-radius: 4px; background: #fff;
  box-shadow: 0 5px 12px rgba(47,83,155,0.02); border: 1px solid white; overflow: hidden;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.nav-wrapper {
  position: sticky; top: 0; z-index: 1000; background: white; margin: 32px 0 20px;
  border-radius: 10px; box-shadow: 0 4px 12px rgba(47,83,155,0.08); border: 1px solid #edf2f7;
  transition: all 0.3s ease;
}
.nav-bar { background: white; padding: 6px 12px; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.nav-menu { display: flex; align-items: center; list-style: none; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-item { position: relative; }
.nav-item > a {
  display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 10px;
  font-weight: 500; color: var(--warna-utama); text-decoration: none; font-size: 0.95rem;
  transition: all 0.2s ease; white-space: nowrap;
}
.nav-item > a i { font-size: 1rem; color: var(--warna-utama); transition: color 0.2s; }
.nav-item > a:hover { background: #eef3fa; }
.nav-item.active > a { background: var(--warna-utama); color: white; }
.nav-item.active > a i { color: white; }

.dropdown-menu {
  position: absolute; top: 100%; left: 0; background: white; border-radius: 20px; padding: 8px 0;
  min-width: 220px; box-shadow: 0 10px 25px rgba(47,83,155,0.15); border: 1px solid rgba(47,83,155,0.1);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all 0.2s ease; z-index: 1000; margin-top: 5px;
}
.nav-item.has-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: var(--warna-utama); text-decoration: none; font-size: 0.9rem; transition: background 0.2s; }
.dropdown-item a i { width: 18px; font-size: 0.9rem; color: var(--warna-utama); }
.dropdown-item a:hover { background: #eef3fa; }

.menu-toggle {
  display: none; background: #f1f6f9; border: none; border-radius: 40px; padding: 10px 18px;
  font-size: 0.95rem; font-weight: 500; color: var(--warna-utama); cursor: pointer; align-items: center; gap: 8px;
}

.auto-slider-section { width: 100%; border-radius: 32px; overflow: hidden; box-shadow: 0 20px 30px -10px rgba(47,83,155,0.08); margin-bottom: 24px; }
.slider-container { position: relative; width: 100%; height: 0; padding-bottom: 36%; background: #d0dfd4; border-radius: 28px; overflow: hidden; }
.slider-track { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; transition: transform 0.75s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.slide-item { flex: 0 0 100%; width: 100%; height: 100%; position: relative; }
.slide-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-caption {
  position: absolute; bottom: 20px; left: 30px; background: rgba(47,83,155,0.7); backdrop-filter: blur(6px);
  color: white; padding: 12px 30px; border-radius: 60px; font-weight: 600; font-size: 1.2rem;
  letter-spacing: 0.3px; border: 1px solid rgba(255,255,255,0.2);
}

.content-grid { display: flex; flex-wrap: wrap; gap: 30px; margin: 50px 0 70px; }
.main-articles { flex: 2 1 380px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 28px; border-bottom: 2px solid rgba(47,83,155,0.1); padding-bottom: 12px; }
.section-title h2 { font-weight: 700; font-size: 1.7rem; color: var(--warna-utama); letter-spacing: -0.01em; }
.section-title a { color: var(--warna-utama); font-weight: 600; text-decoration: none; font-size: 0.95rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.card { background: white; border-radius: 28px; padding: 0 0 24px; box-shadow: 0 6px 24px rgba(47,83,155,0.03); transition: 0.25s ease; border: 1px solid rgba(0,0,0,0.02); cursor: pointer; }
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 34px -12px rgba(47,83,155,0.15); }
.card-img { width: 100%; height: 180px; background: #cbd5c0; border-radius: 28px 28px 0 0; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-content { padding: 20px 20px 8px; }
.card h3 { font-weight: 700; font-size: 1.25rem; margin-bottom: 8px; color: #1e3a2e; }
.card-meta { display: flex; gap: 14px; color: #5b6f66; font-size: 0.8rem; font-weight: 500; margin-bottom: 12px; }
.card-meta i { color: var(--warna-utama); }

.side-panel { flex: 1 1 280px; }
.widget { background: white; border-radius: 32px; padding: 28px 26px; margin-bottom: 32px; box-shadow: 0 8px 22px rgba(47,83,155,0.02); border: 1px solid #f1f6f4; }
.widget h3 { font-size: 1.3rem; font-weight: 700; color: var(--warna-utama); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.widget h3 i { color: var(--warna-utama); }

.map-widget { background: white; border-radius: 32px; padding: 0; margin-bottom: 32px; box-shadow: 0 8px 22px rgba(47,83,155,0.08); border: 1px solid #f1f6f4; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.map-widget:hover { transform: translateY(-3px); box-shadow: 0 18px 30px rgba(47,83,155,0.12); }
.map-widget .map-header { background: var(--warna-utama); padding: 14px 20px; color: white; display: flex; align-items: center; gap: 12px; }
.map-widget .map-header h3 { margin: 0; font-size: 1.1rem; font-weight: 600; color: white; }
.map-widget .map-container { width: 100%; aspect-ratio: 16 / 12; }
.map-widget iframe { width: 100%; height: 100%; display: block; border: none; }

.currency-widget {
  background: linear-gradient(135deg, #f6f9fc, #eef2f7); border-radius: 24px; padding: 20px; margin-bottom: 20px;
  border: 1px solid rgba(47,83,155,0.15); box-shadow: 0 6px 14px rgba(47,83,155,0.06);
  display: flex; align-items: center; justify-content: space-between; transition: all 0.3s ease;
}
.currency-widget:hover { box-shadow: 0 12px 24px rgba(47,83,155,0.12); transform: translateY(-2px); }
.currency-info { display: flex; flex-direction: column; }
.currency-label { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #5b6f8c; }
.currency-rate { font-size: 1.6rem; font-weight: 700; color: #1e293b; line-height: 1.2; }
.currency-rate small { font-size: 0.9rem; font-weight: 500; color: #5b6f8c; margin-left: 4px; }
.currency-updated { font-size: 0.7rem; color: #7f8fa4; margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.currency-updated i { font-size: 0.6rem; color: var(--warna-utama); }
.currency-icon { background: var(--warna-utama); color: white; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; box-shadow: 0 8px 14px rgba(47,83,155,0.2); }
.currency-widget.btc-widget { background: linear-gradient(135deg, #fff4e6, #ffe9d6); border-color: rgba(247, 147, 26, 0.3); margin-top: -10px; }
.currency-widget.btc-widget .currency-icon { background: #f7931a; }

.sidebar-slider { position: relative; width: 100%; overflow: hidden; border-radius: 20px; }
.sidebar-slides { display: flex; transition: transform 0.5s ease-in-out; }
.sidebar-slide { flex: 0 0 100%; width: 100%; }
.banner-lra { width: 100%; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 20px rgba(47,83,155,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid rgba(47,83,155,0.1); }
.banner-lra:hover { transform: translateY(-4px); box-shadow: 0 18px 30px rgba(47,83,155,0.15); }
.banner-lra img { width: 100%; height: auto; display: block; transition: transform 0.5s ease; }
.banner-lra:hover img { transform: scale(1.03); }
.banner-caption { background: linear-gradient(145deg, var(--warna-utama), #1a3a6b); color: white; padding: 14px 20px; text-align: center; font-weight: 600; letter-spacing: 0.5px; }
.banner-caption i { margin-right: 8px; color: white; }
.banner-caption a { color: white; text-decoration: none; display: block; }
.banner-caption span { display: block; font-size: 0.8rem; font-weight: 400; margin-top: 4px; opacity: 0.9; }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.slider-dot { width: 10px; height: 10px; border-radius: 50%; background: #d0ddea; cursor: pointer; transition: background 0.3s; }
.slider-dot.active { background: var(--warna-utama); }

.footer { background: #0b1e33; color: #e5f0ea; padding: 48px 0 24px; border-radius: 40px 40px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1.8fr 1.2fr; gap: 40px; align-items: start; margin-bottom: 40px; }
.footer-profil { display: flex; flex-direction: column; gap: 16px; }
.footer-profil h3 { color: white; font-weight: 600; font-size: 1.4rem; margin-bottom: 8px; }
.footer-profil p { display: flex; align-items: center; gap: 12px; color: #b0c4de; font-size: 0.95rem; line-height: 1.5; }
.footer-profil i { color: #6d8fd1; font-size: 1.1rem; width: 24px; text-align: center; }
.footer-links h4, .footer-sosmed h4 { color: white; font-weight: 600; font-size: 1.2rem; margin-bottom: 20px; border-bottom: 2px solid var(--warna-utama); display: inline-block; padding-bottom: 8px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-links li a { color: #b0c4de; text-decoration: none; display: flex; align-items: center; gap: 10px; transition: color 0.2s; font-size: 0.95rem; }
.footer-links li a:hover { color: white; }
.footer-links li i { color: #6d8fd1; font-size: 1rem; width: 20px; }
.footer-sosmed .medsos-wrap { display: flex; flex-direction: column; gap: 16px; }
.footer-sosmed .medsos-item { display: flex; align-items: center; gap: 12px; color: #b0c4de; font-size: 0.95rem; }
.footer-sosmed .medsos-item i { color: #6d8fd1; font-size: 1.1rem; width: 24px; text-align: center; }
.footer-sosmed .medsos-item a { color: #b0c4de; text-decoration: none; transition: color 0.2s; }
.footer-sosmed .medsos-item a:hover { color: white; }
.footer-copyright { border-top: 1px solid #2a405c; padding-top: 24px; text-align: center; color: #8ba0bc; font-size: 0.9rem; }
.footer-copyright p { margin-bottom: 6px; }
.footer-copyright .developer { font-size: 0.85rem; opacity: 0.8; }

/* Halaman statis & artikel detail */
.static-page { background: white; border-radius: 28px; padding: 40px; box-shadow: 0 6px 24px rgba(47,83,155,0.03); margin: 40px 0 70px; }
.static-page h1 { color: var(--warna-utama); margin-bottom: 20px; font-size: 1.8rem; }
.static-page-content { line-height: 1.8; color: #334155; }
.static-page-content img { max-width: 100%; border-radius: 12px; margin: 12px 0; }
.static-page-content p { margin-bottom: 14px; }
.static-page-content .ql-align-center { text-align: center; }
.static-page-content .ql-align-right { text-align: right; }
.static-page-content .ql-align-justify { text-align: justify; }
.static-page-content .ql-align-left { text-align: left; }
.static-page-content img.ql-align-center { display: block; margin-left: auto; margin-right: auto; }
.static-page-content img.ql-align-right { display: block; margin-left: auto; margin-right: 0; }
.static-page-content img.ql-align-left { display: block; margin-right: auto; margin-left: 0; }
.article-meta-detail { display: flex; gap: 16px; color: #64748b; font-size: 0.9rem; margin-bottom: 20px; }
.article-detail-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 20px; margin-bottom: 24px; }

.alert-flash { padding: 14px 20px; border-radius: 12px; margin-bottom: 20px; font-weight: 500; }
.alert-success { background: #e6f7ec; color: #1e7e42; border: 1px solid #b7e6c6; }
.alert-danger { background: #fdecec; color: #a12626; border: 1px solid #f3c6c6; }

.form-kontak { background: white; border-radius: 28px; padding: 32px; box-shadow: 0 6px 24px rgba(47,83,155,0.03); margin: 40px 0 70px; max-width: 620px; }
.form-kontak label { display: block; font-weight: 600; margin-bottom: 6px; color: #334155; }
.form-kontak input, .form-kontak textarea { width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid #dbe4ee; margin-bottom: 18px; font-family: inherit; font-size: 0.95rem; }
.form-kontak button { background: var(--warna-utama); color: white; border: none; padding: 12px 28px; border-radius: 40px; font-weight: 600; cursor: pointer; font-size: 0.95rem; }
.form-kontak button:hover { opacity: 0.9; }

/* APBDES / LRA APBDES */
.tahun-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.tahun-filter label { font-weight: 600; color: #334155; }
.tahun-filter select.form-control { width: auto; padding: 10px 16px; border-radius: 12px; border: 1px solid #dbe4ee; font-family: inherit; font-size: 0.92rem; background: white; }
.apbdes-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 30px; }
.apbdes-summary-card { background: #f8fafc; border-radius: 18px; padding: 20px; border: 1px solid #edf2f7; }
.apbdes-summary-card span { display: block; color: #64748b; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.apbdes-summary-card strong { font-size: 1.3rem; color: var(--warna-utama); }
.apbdes-summary-card.positif strong { color: #1e7e42; }
.apbdes-summary-card.negatif strong { color: #a12626; }
.apbdes-jenis-title { color: var(--warna-utama); font-size: 1.15rem; margin: 24px 0 12px; }
.table-responsive { overflow-x: auto; margin-bottom: 10px; }
table.apbdes-table { width: 100%; border-collapse: collapse; min-width: 480px; }
table.apbdes-table th { text-align: left; padding: 12px 14px; background: #f1f5f9; color: #334155; font-size: 0.85rem; font-weight: 700; }
table.apbdes-table td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; font-size: 0.92rem; color: #334155; }
table.apbdes-table tfoot td { font-weight: 700; background: #f8fafc; }

/* STRUKTUR ORGANISASI */
.struktur-tab-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; border-bottom: 2px solid #eef2f7; padding-bottom: 18px; }
.struktur-tab-btn { padding: 10px 20px; border-radius: 40px; background: #f1f5f9; color: #334155; font-weight: 600; font-size: 0.9rem; text-decoration: none; transition: 0.2s; }
.struktur-tab-btn:hover { background: #e2e8f0; }
.struktur-tab-btn.active { background: var(--warna-utama); color: white; }
.struktur-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.struktur-card { background: #f8fafc; border-radius: 20px; padding: 24px 16px; text-align: center; border: 1px solid #edf2f7; transition: 0.2s; }
.struktur-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(47,83,155,0.08); }
.struktur-foto { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; margin: 0 auto 16px; background: #e2e8f0; border: 3px solid white; box-shadow: 0 4px 14px rgba(47,83,155,0.1); }
.struktur-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.struktur-foto-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 2.2rem; }
.struktur-card h3 { font-size: 1rem; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.struktur-card p { font-size: 0.85rem; color: var(--warna-utama); font-weight: 600; }

/* KOMENTAR ARTIKEL */
.komentar-section { margin-top: 44px; padding-top: 32px; border-top: 2px solid rgba(47,83,155,0.08); }
.komentar-title { color: var(--warna-utama); font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-komentar { background: #f8fafc; border-radius: 20px; padding: 24px; margin-bottom: 28px; border: 1px solid #edf2f7; }
.form-komentar .form-group { margin-bottom: 16px; }
.form-komentar label { display: block; font-weight: 600; margin-bottom: 6px; color: #334155; font-size: 0.9rem; }
.form-komentar .form-control { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid #dbe4ee; font-family: inherit; font-size: 0.92rem; resize: vertical; }
.form-komentar .form-control:focus { outline: 2px solid var(--warna-utama); border-color: transparent; }
.komentar-counter { text-align: right; color: #94a3b8; font-size: 0.78rem; margin-top: 4px; }
.btn-kirim-komentar { background: var(--warna-utama); color: white; border: none; padding: 11px 24px; border-radius: 40px; font-weight: 600; cursor: pointer; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 8px; }
.btn-kirim-komentar:hover { opacity: 0.9; }
.komentar-kosong { color: #94a3b8; padding: 20px 0; text-align: center; }
.daftar-komentar { display: flex; flex-direction: column; gap: 18px; }
.komentar-item { display: flex; gap: 14px; }
.komentar-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--warna-utama); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.komentar-body { flex: 1; background: #f8fafc; border-radius: 16px; padding: 14px 18px; border: 1px solid #edf2f7; }
.komentar-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.komentar-nama { font-weight: 700; color: #1e293b; font-size: 0.92rem; }
.komentar-waktu { color: #94a3b8; font-size: 0.78rem; }
.komentar-isi { color: #334155; font-size: 0.92rem; line-height: 1.6; word-break: break-word; }

.pagination-desa { display: flex; gap: 8px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.pagination-desa a, .pagination-desa span { padding: 8px 14px; border-radius: 10px; background: white; color: var(--warna-utama); text-decoration: none; font-weight: 600; border: 1px solid #e2e8f0; }
.pagination-desa .active { background: var(--warna-utama); color: white; }

@media (max-width: 992px) {
  .nav-menu { gap: 2px; }
  .nav-item > a { padding: 8px 12px; font-size: 0.9rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .desa-title h1 { font-size: 1.5rem; }
  .logo-icon { width: 48px; height: 48px; }
  .slider-container { padding-bottom: 56%; }
  .slide-caption { font-size: 0.9rem; padding: 8px 18px; bottom: 15px; left: 20px; }
  .nav-bar { flex-wrap: wrap; padding: 8px; }
  .nav-brand { flex: 1; }
  .menu-toggle { display: flex; }
  .nav-menu { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 10px 0 5px; gap: 2px; }
  .nav-menu.expanded { display: flex; }
  .nav-item { width: 100%; }
  .nav-item > a { padding: 12px 16px; justify-content: flex-start; }
  .nav-item.has-dropdown > a .fa-chevron-down { margin-left: auto; }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: #f8fafc; margin: 2px 0 5px 20px; min-width: auto; padding: 0; }
  .dropdown-item a { padding: 10px 16px; }
  .static-page { padding: 24px; }
}
@media (max-width: 480px) {
  .header-gallery { flex: 1 1 100%; }
}
