:root {
    --navy: #082d64;
    --navy-deep: #051d3f;
    --yellow: #f8c922;
    --green: #1a6235;
    --blue: #1674c0;
    --paper: #f7f8fb;
    --ink: #14213d;
    --muted: #64748b;
    --line: #e7eaf0;
    --r-lg: 22px;
    --r-md: 14px;
    --shadow-soft: 0 20px 40px -12px rgba(8,45,100,0.18);
    --shadow-card: 0 10px 24px -10px rgba(20,33,61,0.12);

    --navy-tint: #eaf0fb;
    --blue-tint: #e9f4fc;
    --green-tint: #eaf6ee;
    --yellow-tint: #fff8e3;
    --goong-gold: #c9933b;
    font-size: larger;

    /* === Identitas khas Desa Bantarmara ===
       --green      -> Padi (sawah)
       --yellow     -> Jagung / semarak panen
       --goong-gold -> Goong (kesenian iconic desa)
       --blue       -> Sungai Cipeles
    */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 100px; }

body {
    background-color: var(--paper);
    /* Tekstur garis halus ala pematang sawah, sangat subtle, hanya sebagai ambience */
    background-image: repeating-linear-gradient(
        180deg,
        rgba(26,98,53,0.025) 0px,
        rgba(26,98,53,0.025) 1px,
        transparent 1px,
        transparent 46px
    );
    background-attachment: fixed;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--ink);
    padding-bottom: 0;
}

h1, h2, h3, .font-display {
    font-family: 'Sora', sans-serif;
    letter-spacing: -0.02em;
}

.eyebrow, .mono, .badge-kategori, .harga-tag {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.03em;
}

.btn-navy { background: var(--navy); color: #fff; border: none; }
.btn-navy:hover { background: var(--navy-deep); color: #fff; transform: translateY(-1px); }
.btn-yellow { background: var(--yellow); color: var(--navy); font-weight: 700; border: none; }
.btn-yellow:hover { background: #ecb90f; color: var(--navy); transform: translateY(-1px); }
.btn-green { background: var(--green); color: #fff; border: none; }
.btn-green:hover { background: #124d29; color: #fff; transform: translateY(-1px); }
.btn-navy, .btn-yellow, .btn-green { transition: transform .15s ease, background .15s ease; }

.navbar-glass {
    position: relative;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid rgba(231,234,240,0.8);
}
/* Garis aksen 4 warna: Sungai Cipeles - Padi - Goong - Jagung, sebagai identitas singkat desa di setiap halaman */
.navbar-glass::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--blue) 0% 25%,
        var(--green) 25% 50%,
        var(--goong-gold) 50% 75%,
        var(--yellow) 75% 100%
    );
}
.navbar-glass .village-name { color: var(--navy); font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.08rem; line-height: 1.15; }
.navbar-glass .village-motto { color: var(--blue); font-size: 0.68rem; font-family: 'JetBrains Mono', monospace; }
.nav-links a {
    position: relative;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 100px;
    transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: rgba(8,45,100,0.06); color: var(--navy); }
.nav-links a.active-link { background: var(--navy); color: #fff; }

.bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1050;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -12px rgba(8,45,100,0.18);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-scroll {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}
.bottom-nav-scroll::-webkit-scrollbar { display: none; }
.bn-item {
    flex: 1 0 auto;
    min-width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 9px 6px 7px;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    border-top: 2px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
.bn-item svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; }
.bn-item.active { color: var(--navy); border-top-color: var(--yellow); }
.bn-item.active svg { stroke: var(--navy); }

/* HERO SECTION DENGAN ANIMASI SIGNATURE LOKAL */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f2f6fb 100%);
    padding: 86px 20px 120px;
}
.hero .grain {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(8,45,100,0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.6;
    z-index: 0;
    mask-image: linear-gradient(180deg, black, transparent 80%);
}
.hero .blob {
    position: absolute;
    filter: blur(65px);
    z-index: 0;
    will-change: transform, opacity;
}
/* blob-1 : mengalir seperti Sungai Cipeles yang membelah desa */
.hero .blob-1 {
    width: 800px; height: 300px;
    background: linear-gradient(90deg, var(--blue), transparent);
    border-radius: 50% 100% 50% 100% / 40% 60% 40% 60%;
    top: -50px; left: -150px;
    opacity: 0.25;
    animation: mengalir 10s ease-in-out infinite;
}
/* blob-2 : berdenyut seperti gaung tabuhan Goong, dilengkapi riak cincin suara */
.hero .blob-2 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, var(--goong-gold) 20%, transparent 70%);
    border-radius: 50%;
    top: -80px; right: -80px;
    opacity: 0.35;
    animation: berdenyut 6s ease-in-out infinite;
    box-shadow:
        0 0 0 22px rgba(201,147,59,0.06),
        0 0 0 44px rgba(201,147,59,0.04);
}
/* blob-3 : bergoyang seperti rumpun jagung tertiup angin */
.hero .blob-3 {
    width: 450px; height: 200px;
    background: radial-gradient(ellipse, var(--yellow), transparent 70%);
    border-radius: 50%;
    bottom: -50px; left: 5%;
    opacity: 0.3;
    animation: bergoyang 8s ease-in-out infinite;
}
/* blob-4 : melayang seperti hamparan padi yang menguning */
.hero .blob-4 {
    width: 400px; height: 250px;
    background: radial-gradient(ellipse, var(--green), transparent 70%);
    border-radius: 50%;
    bottom: -80px; right: 8%;
    opacity: 0.22;
    animation: melayang 12s ease-in-out infinite;
}

@keyframes mengalir {
    0%, 100% { transform: translate(0, 0) rotate(-10deg) scale(1); }
    50% { transform: translate(-30px, 15px) rotate(-5deg) scale(1.05); }
}
@keyframes berdenyut {
    0%, 100% { transform: scale(1); opacity: 0.35; }
    50% { transform: scale(1.15); opacity: 0.45; }
}
@keyframes bergoyang {
    0%, 100% { transform: rotate(25deg) translateX(0); }
    50% { transform: rotate(32deg) translateX(20px); }
}
@keyframes melayang {
    0%, 100% { transform: translateY(0) rotate(-20deg); }
    50% { transform: translateY(-25px) rotate(-15deg); }
}

.hero-content { position: relative; z-index: 2; text-align: center; max-width: 760px; margin: 0 auto; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(8,45,100,0.1);
    color: var(--navy);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 100px;
    margin-bottom: 22px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.hero h1 {
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    color: var(--navy-deep);
    margin-bottom: 18px;
}
.hero h1 span.accent {
    background: linear-gradient(100deg, var(--blue) 0%, var(--green) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p.lead { color: var(--muted); font-size: 1.08rem; max-width: 560px; margin: 0 auto; font-weight: 500;}

/* Pita motif khas desa: gelombang Sungai Cipeles, tangkai Padi, Jagung, dan lingkaran Goong.
   Tampil di batas bawah Hero sebagai elemen signature identitas desa. */
.hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='34' viewBox='0 0 200 34'%3E%3Cpath d='M0 22 Q12 12 24 22 T48 22' stroke='%231674c0' stroke-width='2' fill='none' opacity='0.55'/%3E%3Cpath d='M70 32 L70 10 M70 10 Q65 6 62 2 M70 10 Q75 6 78 2 M70 17 Q65 13 62 9 M70 17 Q75 13 78 9' stroke='%231a6235' stroke-width='1.5' fill='none' opacity='0.55'/%3E%3Cellipse cx='115' cy='17' rx='7' ry='13' fill='none' stroke='%23c9933b' stroke-width='1.5' opacity='0.55'/%3E%3Cline x1='109' y1='9' x2='121' y2='9' stroke='%23c9933b' stroke-width='1' opacity='0.4'/%3E%3Cline x1='109' y1='15' x2='121' y2='15' stroke='%23c9933b' stroke-width='1' opacity='0.4'/%3E%3Cline x1='109' y1='21' x2='121' y2='21' stroke='%23c9933b' stroke-width='1' opacity='0.4'/%3E%3Ccircle cx='165' cy='17' r='10' stroke='%23f8c922' stroke-width='1.6' fill='none' opacity='0.6'/%3E%3Ccircle cx='165' cy='17' r='4.5' stroke='%23f8c922' stroke-width='1.2' fill='none' opacity='0.5'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom center;
    background-size: 200px 34px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.9;
}

.stats-bar {
    position: relative;
    z-index: 3;
    max-width: 920px;
    margin: 44px auto 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}
.stats-bar .stat { padding: 26px 18px; text-align: center; border-right: 1px solid var(--line); position: relative; }
.stats-bar .stat:last-child { border-right: none; }
.stats-bar .stat::before {
    content: '';
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 34px; height: 3px; border-radius: 3px;
}
.stats-bar .stat:nth-child(1)::before { background: var(--blue); }
.stats-bar .stat:nth-child(2)::before { background: var(--yellow); }
.stats-bar .stat:nth-child(3)::before { background: var(--green); }
.stats-bar .stat .num { font-family: 'Sora', sans-serif; font-weight: 800; font-size: 1.8rem; color: var(--navy); }
.stats-bar .stat .label { font-size: 0.78rem; color: var(--muted); font-weight: 600; }

@media (max-width: 576px) {
    .stats-bar { grid-template-columns: repeat(3, 1fr); margin-top: 30px; }
    .stats-bar .stat { padding: 16px 8px; border-right: 1px solid var(--line); }
    .stats-bar .stat:last-child { border-right: none; }
    .stats-bar .stat .num { font-size: 1.35rem; }
    .stats-bar .stat .label { font-size: 0.65rem; }
    .stats-bar .stat::before { top: 0; bottom: auto; }
}

.section-wrap { padding: 88px 0 70px; }
.section-wrap.tight { padding-top: 50px; }
.bg-tint-blue { background: var(--blue-tint); }
.bg-tint-green { background: var(--green-tint); }
.bg-tint-yellow { background: var(--yellow-tint); }

.section-title { margin-bottom: 36px; }
.section-title .eyebrow {
    display: inline-block;
    color: var(--blue);
    background: rgba(22,116,192,0.08);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 100px;
    margin-bottom: 12px;
}
.section-title h3 { font-weight: 700; color: var(--navy-deep); margin: 0; }

/* Aksen warna eyebrow per bagian, mengikuti unsur khas desa yang relevan pada tiap section */
#sejarah .section-title .eyebrow {
    /* Sejarah menyinggung kesenian Goong Geude */
    color: var(--goong-gold);
    background: rgba(201,147,59,0.12);
}
#peta .section-title .eyebrow {
    /* Wilayah desa dilintasi Sungai Cipeles */
    color: var(--blue);
    background: rgba(22,116,192,0.1);
}
#fasilitas .section-title .eyebrow,
#umkm .section-title .eyebrow {
    /* Produk unggulan pertanian: padi & jagung */
    color: var(--green);
    background: rgba(26,98,53,0.1);
}

.map-card {
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--line);
    position: relative;
}
#map { height: 440px; width: 100%; }
.map-legend {
    position: absolute; top: 16px; left: 16px; z-index: 400;
    background: rgba(255,255,255,0.92); backdrop-filter: blur(6px);
    padding: 8px 14px; border-radius: 100px; font-size: 0.78rem; font-weight: 600;
    color: var(--navy); box-shadow: 0 6px 16px rgba(20,33,61,0.12);
}

.custom-card {
    border: 1px solid var(--line); border-radius: var(--r-lg);
    overflow: hidden; background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease; position: relative;
}
.custom-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--navy); z-index: 2;
}
.grid-cycle .col-card:nth-of-type(4n+2) .custom-card::before { background: var(--blue); }
.grid-cycle .col-card:nth-of-type(4n+3) .custom-card::before { background: var(--green); }
.grid-cycle .col-card:nth-of-type(4n+4) .custom-card::before { background: var(--yellow); }
.custom-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.card-img-custom { height: 190px; width: 100%; object-fit: cover; }
.card-img-placeholder {
    height: 190px; width: 100%; display: flex; align-items: center; justify-content: center;
    background: #f2f4f8; color: #99a3b3; font-size: 0.8rem; font-family: 'JetBrains Mono', monospace;
}
.badge-kategori {
    display: inline-block; font-size: 0.66rem; font-weight: 600;
    padding: 4px 11px; border-radius: 100px; background: rgba(8,45,100,0.08);
    color: var(--navy); margin-bottom: 10px;
}
.card-title-desa { color: var(--navy-deep); font-weight: 700; font-family: 'Sora', sans-serif; font-size: 1.05rem; }
.harga-tag { color: var(--green); font-weight: 600; font-size: 1rem; }

.complaint-card {
    background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line);
    box-shadow: var(--shadow-card); padding: 44px;
}
.form-label.desa-label { font-weight: 600; color: var(--navy-deep); font-size: 0.85rem; margin-bottom: 6px; }
.form-control.bg-light {
    background: #f7f8fb !important; border: 1px solid var(--line);
    border-radius: var(--r-md); padding: 11px 14px;
}
.form-control.bg-light:focus {
    border-color: var(--blue); box-shadow: 0 0 0 4px rgba(22,116,192,0.12); background: #fff !important;
}
.btn-submit { border-radius: var(--r-md); }

footer.desa-footer {
    position: relative;
    overflow: hidden;
    background: var(--navy-deep); color: rgba(255,255,255,0.7);
    padding: 34px 0 90px; text-align: center; font-size: 0.85rem;
    border-radius: 28px 28px 0 0; margin-top: 20px;
}
/* Pita motif yang sama muncul kembali di atas footer, menutup identitas visual desa */
footer.desa-footer::before {
    content: "";
    position: absolute;
    top: 14px; left: 0; right: 0;
    height: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='28' viewBox='0 0 200 28'%3E%3Cpath d='M0 18 Q12 9 24 18 T48 18' stroke='%2360a5e0' stroke-width='2' fill='none' opacity='0.5'/%3E%3Cpath d='M70 26 L70 8 M70 8 Q65 4 62 1 M70 8 Q75 4 78 1 M70 14 Q65 10 62 7 M70 14 Q75 10 78 7' stroke='%2352b378' stroke-width='1.4' fill='none' opacity='0.5'/%3E%3Cellipse cx='115' cy='14' rx='6' ry='11' fill='none' stroke='%23e0b567' stroke-width='1.4' opacity='0.5'/%3E%3Ccircle cx='160' cy='14' r='9' stroke='%23f8c922' stroke-width='1.5' fill='none' opacity='0.55'/%3E%3Ccircle cx='160' cy='14' r='4' stroke='%23f8c922' stroke-width='1.1' fill='none' opacity='0.45'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: top center;
    background-size: 200px 28px;
    opacity: 0.8;
}
footer.desa-footer .motto { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--yellow); }

.sejarah-media {
    border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card);
    border: 1px solid var(--line); height: 100%; min-height: 320px;
}
.sejarah-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sejarah-media .img-fallback {
    width: 100%; height: 100%; min-height: 320px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, var(--navy) 0%, var(--blue) 100%); color: rgba(255,255,255,0.85);
    font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; text-align: center; padding: 20px;
}
.sejarah-text p { color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
.sejarah-text p:last-child { margin-bottom: 0; }

.visi-card {
    background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 60%, var(--blue) 130%);
    border-radius: var(--r-lg); padding: 40px; color: #fff; height: 100%; position: relative; overflow: hidden;
}
.visi-card::before {
    content: '\201C'; position: absolute; top: -10px; left: 20px;
    font-family: 'Sora', sans-serif; font-size: 7rem; color: rgba(255,255,255,0.08); line-height: 1;
}
.visi-card .eyebrow { color: var(--yellow); font-size: 0.68rem; font-weight: 700; }
.visi-card p.visi-text {
    font-family: 'Sora', sans-serif; font-size: 1.3rem; font-weight: 600;
    line-height: 1.5; margin-top: 14px; position: relative; z-index: 1;
}
.misi-list { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.misi-item {
    display: flex; gap: 16px; align-items: flex-start; background: #fff;
    border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; box-shadow: var(--shadow-card);
}
.misi-item .misi-num {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; color: #fff;
    font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
}
.misi-item:nth-child(1) .misi-num { background: var(--blue); }
.misi-item:nth-child(2) .misi-num { background: var(--green); }
.misi-item:nth-child(3) .misi-num { background: var(--navy); }
.misi-item p { margin: 0; color: var(--ink); font-size: 0.94rem; line-height: 1.55; padding-top: 5px; }

@media (max-width: 991.98px) {
    body { padding-bottom: 75px; }
    footer.desa-footer { padding-bottom: 90px; }
}
@media (max-width: 576px) {
    .complaint-card { padding: 24px 20px; }
    .hero { padding: 48px 16px 90px; }
    .section-wrap { padding: 48px 0 36px; }
    .section-wrap.tight { padding-top: 34px; }
    #map { height: 300px; }
    .hero::after { height: 22px; background-size: 140px 22px; }
    footer.desa-footer::before { height: 20px; background-size: 140px 20px; top: 10px; }
}
.navbar-glass {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030; /* Supaya selalu berada di atas konten lain */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Berikan jarak (padding-top) pada body atau elemen hero agar konten paling atas tidak tertutup navbar yang melayang */
body {
    padding-top: 76px; /* Sesuaikan dengan tinggi navbar kamu */
}
/* ===== TAMBAHAN MOTIF & ELEMEN ALAM PEDESAAN (Sungai, Sawah, Padi, Jagung) ===== */
        .desa-motif-divider {
            height: 48px;
            width: 100%;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 60' preserveAspectRatio='xMidYMid meet'%3E%3Cg fill='none' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3C!-- Padi/Tanaman --%3E%3Cpath d='M40 45 L40 15 M40 28 L28 18 M40 28 L52 18 M40 20 L32 12 M40 20 L48 12' stroke='%231a6235'/%3E%3C!-- Biji Jagung --%3E%3Ccircle cx='130' cy='30' r='10' stroke='%23f0b429'/%3E%3C!-- Sawah Terasering Konsentris --%3E%3Ccircle cx='220' cy='30' r='12' stroke='%23f0b429'/%3E%3Ccircle cx='220' cy='30' r='4' stroke='%23f0b429'/%3E%3C!-- Gelombang Sungai --%3E%3Cpath d='M300 33 Q315 18 330 33 T360 33' stroke='%231674c0'/%3E%3C!-- Pola Ulang --%3E%3Cpath d='M440 45 L440 15 M440 28 L428 18 M440 28 L452 18 M440 20 L432 12 M440 20 L448 12' stroke='%231a6235'/%3E%3Ccircle cx='530' cy='30' r='10' stroke='%23f0b429'/%3E%3C/g%3E%3C/svg%3E");
            background-repeat: repeat-x;
            background-size: 360px 48px;
            opacity: 0.85;
            margin: 20px 0;
        }

        /* Penghalus Tampilan agar Tidak Kaku */
        .hero {
            position: relative;
            overflow: hidden;
        }
        .hero::after {
            content: "";
            position: absolute;
            bottom: 0; left: 0; right: 0;
            height: 60px;
            background: linear-gradient(180deg, transparent, rgba(26,98,53,0.06));
            pointer-events: none;
        }

        .custom-card, .visi-card, .complaint-card, .map-card {
            border-radius: 20px !important;
            transition: transform 0.25s ease, box-shadow 0.25s ease !important;
        }
        .custom-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 16px 32px -10px rgba(11,47,94,0.15) !important;
        }