/* =========================================
   1. VARIABLES & GLOBAL SETTINGS
   ========================================= */
:root {
    --c-dark: #1B211A;
    /* Hitam/Hijau Gelap */
    --c-primary: #628141;
    /* Hijau Utama */
    --c-secondary: #8BAE66;
    /* Hijau Muda */
    --c-accent: #EBD5AB;
    /* Krem/Gold */
    --c-bg: #F6F6F6;
    /* Background Halaman */
    --c-highlight: #C1E59F;
    /* Hijau Pucat */
    --c-blue: #1581BF;
    /* Biru Link */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--c-bg);
    color: var(--c-dark);
    overflow-x: hidden;
}

/* Helper Colors */
.text-primary-desa {
    color: var(--c-primary) !important;
}

.text-accent {
    color: var(--c-accent) !important;
}

.bg-primary-desa {
    background-color: var(--c-primary) !important;
}

.hover-white:hover {
    color: white !important;
}


/* =========================================
   2. COMPONENT: BUTTONS
   ========================================= */
.btn-primary-desa {
    background-color: var(--c-primary);
    color: white;
    border: none;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-desa:hover {
    background-color: var(--c-secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(98, 129, 65, 0.3);
}

.btn-outline-accent {
    border: 2px solid var(--c-accent);
    color: var(--c-accent);
    border-radius: 50px;
    padding: 8px 25px;
    font-weight: 500;
    transition: 0.3s;
}

.btn-outline-accent:hover {
    background-color: var(--c-accent);
    color: var(--c-dark);
}

.btn-masuk {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--c-accent);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

.btn-masuk:hover {
    background-color: var(--c-accent);
    color: var(--c-dark);
    border-color: var(--c-accent);
}

/* =========================================
   3. COMPONENT: NAVBAR (Floating Pill Style)
   ========================================= */
.navbar-custom {
    background-color: rgba(27, 33, 26, 0.95); /* Warna Dark */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    
    /* LOGIKA MELAYANG (FLOATING) */
    position: fixed;
    top: 20px; /* Jarak dari atas layar */
    left: 50%;
    transform: translateX(-50%); /* Agar pas di tengah horizontal */
    width: 95%; /* Lebar navbar tidak full */
    max-width: 1200px; /* Batas maksimal lebar */
    
    /* BORDER RADIUS (SUDUT MEMBULAT) */
    border-radius: 50px; 
    
    padding: 10px 20px;
    border: 1px solid rgba(235, 213, 171, 0.1); /* Border tipis warna accent */
    z-index: 1030; /* Pastikan di atas elemen lain */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.brand-title {
    font-size: 1.1rem;
    line-height: 1.1;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--c-accent);
}

/* Menu Link Style */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    margin: 0 2px;
    position: relative;
    transition: color 0.3s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: white !important;
    font-weight: 600;
}

/* Garis Bawah Menu Aktif */
.navbar-nav .nav-link.active::after {
    content: '';
    display: block;
    width: 20px; /* Garis kecil di tengah */
    height: 3px;
    background-color: var(--c-accent);
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Tombol Masuk Custom */
.btn-masuk {
    background-color: rgba(255, 255, 255, 0.15);
    color: #EBD5AB;
    border: 1px solid transparent;
    border-radius: 50px; /* Tombol juga membulat */
    padding: 8px 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
}

.btn-masuk:hover {
    background-color: var(--c-accent);
    color: var(--c-dark);
    border-color: var(--c-accent);
}

/* =========================================
   4. MODULE: HERO SECTION (Unified)
   ========================================= */
/* Class dasar untuk semua Hero (Home, Peta, Surat, dll) */
.hero-banner {
    /* Ganti URL gambar di sini satu kali saja untuk semua halaman */
    background: linear-gradient(rgba(27, 33, 26, 0.5), rgba(27, 33, 26, 0.7)), url("../img/bg-klunggen.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Kunci Parallax/Sticky BG */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    width: 100%;
}

/* Modifier untuk tinggi yang berbeda-beda */
.hero-lg {
    height: 90vh;
}

/* Untuk Home */
.hero-md {
    height: 60vh;
}

/* Untuk Tentang, Surat */
.hero-sm {
    height: 50vh;
}

/* Untuk Pemerintahan, Kelembagaan */


/* =========================================
   5. MODULE: CARDS & STATS
   ========================================= */
/* Floating Card Container (Home & Surat) */
.floating-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
    margin-top: -80px;
    /* Efek overlapping ke atas */
}

.floating-card.stats {
    padding: 40px 30px;
    border-bottom: 4px solid var(--c-primary);
}

.floating-card.form {
    padding: 0;
    border-top: 5px solid var(--c-primary);
    overflow: hidden;
}

/* Icon Lingkaran (Statistik & Visi Misi) */
.icon-circle-box {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background-color: var(--c-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-primary);
    font-size: 1.6rem;
    margin: 0 auto 15px;
    transition: 0.3s;
}

.col-stats:hover .icon-circle-box {
    background-color: var(--c-primary);
    color: var(--c-highlight);
    transform: scale(1.1);
}

/* Generic Card Style (Berita, Lembaga, Demo) */
.card-custom {
    background: white;
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    height: 100%;
}

.card-custom:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Lembaga Specific */
.card-lembaga {
    border: 1px solid #e5e7eb;
    padding: 30px;
}

.card-lembaga:hover {
    border-color: var(--c-primary);
}

.lembaga-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #374151;
}


/* =========================================
   6. MODULE: FORMS & INPUTS
   ========================================= */
.form-header {
    padding: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.form-body {
    padding: 40px;
}

.form-control-custom {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    margin-bottom: 5px;
    width: 100%;
}

.form-control-custom:focus {
    border-color: var(--c-primary);
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(98, 129, 65, 0.25);
}

.search-input-pill {
    padding: 15px 25px;
    border-radius: 50px;
    border: none;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}


/* =========================================
   7. PAGE SPECIFIC
   ========================================= */
/* Home News & Links */
.news-img {
    border-radius: 15px 15px 0 0;
    height: 200px;
    object-fit: cover;
}

.link-arrow {
    color: var(--c-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.link-arrow:hover {
    color: var(--c-secondary);
}

.section-title {
    color: var(--c-dark);
    font-weight: 700;
    margin-bottom: 5px;
}

/* Peta & Map Container */
.map-container {
    position: relative;
    height: 600px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background-color: #eee;
}

.map-stats-overlay {
    position: absolute;
    top: 40px;
    left: 40px;
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 20px;
    z-index: 10;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.legend-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
}

/* Demografi Chart Bars */
.gender-bar-container {
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    line-height: 30px;
}

.bg-male {
    background-color: #8BAE66;
}

.bg-female {
    background-color: #FDBF47;
}

/* =========================================
   8. MODULE: FOOTER
   ========================================= */
.footer-dark {
    background-color: var(--c-dark);
    color: white;
}

.input-newsletter {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
}

.input-newsletter:focus {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: none;
}

.input-newsletter::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* =========================================
   9. UTILITIES (Tambahan)
   ========================================= */
.hover-white:hover {
    color: white !important;
    transition: color 0.3s;
}
