/* ============================================
   ROOT COLORS
============================================ */
:root {
  --primary-color: #7A0E20;
  --primary-light: #B51E2B;
  --primary-dark: #3D0A10;
  --gold: #D4AF37;
  --bg-soft: #FFF9E9;
  --text-dark: #1E1E1E;
}

* { box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-soft);
  color: var(--text-dark);
  margin: 0;
}

a { text-decoration: none; }

/* ============================================
   NAVBAR PREMIUM
============================================ */
.navbar-premium {
    background: linear-gradient(90deg, #3A070D, #4A0A12, #5C0D15);
    padding: .85rem 0;
    transition: .25s;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
    z-index: 9999;
}

.navbar-premium.shrink {
    padding: .45rem 0;
}

/* Logo */
.navbar-premium .navbar-brand img {
    height: 42px; width: 42px;
    border-radius: 10px;
    transition: .25s;
}

.navbar-premium.shrink .navbar-brand img {
    height: 36px !important;
    width: 36px !important;
}

/* Desktop Nav Links */
.navbar-premium .nav-link {
    color: #fff !important;
    font-weight: 600;
    margin: 0 .35rem;
    padding-bottom: 3px;
    font-size: 1rem;
    position: relative;
}

.navbar-premium .nav-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0%; height: 2px;
    background: #F3CD58;
    transition: width .3s;
}

.navbar-premium .nav-link:hover::after,
.navbar-premium .nav-link.active::after {
    width: 100%;
}

/* Desktop menu horizontal */
@media (min-width: 992px) {
    .navbar-premium .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        gap: 24px;
    }

    #hamburgerMenu {
        display: none !important; /* Desktop hide */
    }
}

/* ============================================
   HAMBURGER ICON (MOBILE ONLY)
============================================ */
#hamburgerMenu {
    font-size: 32px;
    color: #FFD970 !important;
    cursor: pointer;
    display: block;
    z-index: 10000;
}

@media (min-width: 992px) {
    #hamburgerMenu { display: none !important; }
}

/* ============================================
   MOBILE PANEL
============================================ */
.mobile-panel {
    position: fixed;
    top: 0;
    right: -260px;
    width: 260px;
    height: 100vh;
    background: #5a0d15;
    padding: 25px 20px;
    transition: right .3s ease;
    z-index: 9000;
}

.mobile-panel.show-panel {
    right: 0;
}

.mobile-panel a {
    color: #fff;
    font-size: 1.1rem;
    display: block;
    padding: 12px 0;
}

/* ============================================
   HERO SECTION
============================================ */
.hero-section {
    background: radial-gradient(circle at top left, #fff2df, #ffe9c7, #fff9ef);
    padding: 3rem 0 2rem;
}

.hero-title { font-weight: 700; color: var(--primary-dark); }
.hero-sub { color: #5a4a3a; }

/* ============================================
   LAYANAN CARD
============================================ */
.layanan-card {
    width: 100%;
    height: 150px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    transition: .25s;
}

.layanan-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.15));
}

.layanan-title {
    position: absolute;
    bottom: 10px;
    left: 12px;
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
}

/* ============================================
   STATISTIK TABLE
============================================ */
.stat-table {
    width: 100%;
    background: #fff;
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-table h4 {
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-table table {
    width: 100%;
    border-collapse: collapse;
}

.stat-table th, .stat-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}

.stat-table th {
    font-weight: 600;
    color: var(--primary-dark);
}

/* ============================================
   FOOTER
============================================ */
.footer {
    background: var(--primary-dark);
    color: #fff2d9;
    padding: 2rem 0 1rem;
}

.stat-box {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.card-soft {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* Hilangkan titik hijau yang muncul */
.navbar-premium ul li {
    list-style: none !important;
}

/* Rapikan navbar menu */
.navbar-premium .navbar-nav .nav-link {
    padding: 4px 6px !important;
    font-size: 1rem;
    font-weight: 600;
}

/* Pastikan gap bekerja */
.navbar-premium .navbar-nav {
    display: flex !important;
    gap: 22px !important;
}

/* Posisi hamburger stabil */
#hamburgerMenu {
    display: block !important;
}

@media (min-width: 992px) {
    #hamburgerMenu {
        display: none !important;
    }
}

.btn-gold {
    background: linear-gradient(90deg, #F3CD58, #E3B647);
    color: #3D0A10 !important;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
    transition: .2s ease;
}

.btn-gold:hover {
    background: linear-gradient(90deg, #FFE48F, #F3CD58);
    transform: translateY(-2px);
}

/* Hilangkan gap putih besar bawah navbar di halaman Statistik */
.page-statistik,
.statistik-wrapper,
#statistik {
    margin-top: 0 !important;
    padding-top: 20px !important;
}

/* Jika stat-table terlalu turun */
.stat-table {
    margin-top: 15px !important;
}

.statistik-page {
    padding-top: 20px !important;
}

.page-wrapper {
    padding-top: 110px !important; /* jarak aman agar tidak ketimpa navbar */
}

.login-admin-btn {
    margin-left: 18px;
    display: inline-block !important;
    color: #3A070D !important;
    font-weight: 700;
    background: var(--gold);
    padding: 6px 18px;
    border-radius: 8px;
}

.stat-box {
    margin-top: 0 !important;
    margin-bottom: 40px !important; /* jarak antar card */
}

.stat-box table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.stat-box thead th {
    background: #fff7e1;
    color: #3A070D;
    font-weight: 700;
}

@media (max-width: 768px) {
    .stat-box {
        padding: 12px !important;
    }
}

/* ================================
   Fix Navbar untuk semua halaman
================================ */
.page-statistik {
    padding-top: 110px !important; /* agar tidak ketimpa navbar */
}

.navbar-premium .nav-link,
.navbar-premium .btn-gold {
    position: relative;
    z-index: 5;
}

/* Login Admin */
.btn-gold {
    background: var(--gold) !important;
    color: #3A070D !important;
    font-weight: 700;
    border-radius: 6px;
    padding: 6px 16px !important;
}

/* Stat box */
.stat-box {
    padding: 18px;
    background: transparent;
}

.card-soft {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.table-hover tbody tr:hover {
    background: #fff6d6;
}

/* Table header */
.table-warning {
    background: #fff3c4 !important;
    font-weight: 700;
}

/* Responsiveness */
@media (max-width: 768px) {
    .page-statistik {
        padding-top: 90px !important;
    }
    .stat-box {
        margin-bottom: 30px !important;
    }
}

.page-infografis {
    padding-top: 110px !important; /* biar gak ketutup navbar */
}

.page-infografis .card-soft img {
    object-fit: cover;
}

/* Wrapper untuk seluruh halaman agar footer tetap di bawah */
html, body {
    height: 100%;
}

.page-wrapper,
.page-infografis,
.page-profil {
    min-height: calc(100vh - 160px); /* tinggi layar dikurangi navbar + footer */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Footer selalu di posisi paling bawah */
.footer {
    margin-top: auto;
}

/* Struktur Pemerintahan Card */
.struktur-card {
    background: #fff;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border-left: 6px solid var(--primary-color);
    transition: .25s ease;
}

.struktur-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

/* Foto profil */
.struktur-foto {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

/* Nama */
.struktur-nama {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 2px;
}

/* Jabatan */
.struktur-jabatan {
    font-size: .95rem;
    color: #5a4a3a;
}

/* Wrapper fix */
.page-struktur {
    padding-top: 110px !important;
}

/* Membesarkan struktur agar tidak terlihat kosong */
.struktur-bg {
    padding: 25px 32px !important;
}

.struktur-card {
    width: 100%;
    max-width: 900px;   /* lebar card ideal */
    margin: auto;       /* otomatis center */
}

/* Grid 2 kolom */
.struktur-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
}

.struktur-card {
    width: 100%;
    margin: 0;
}

/* Wrapper luas */
.struktur-bg {
    padding: 28px 40px !important;
}

/* Card struktur dibesarkan */
.struktur-card {
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Bulatan foto */
.struktur-foto, .struktur-inisial {
    flex-shrink: 0;
}

/* Sidebar card */
.card-soft {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
}

/* Struktur wrapper */
.struktur-bg {
    background: #fffdf4;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

/* Foto & card struktur */
.struktur-card {
    background: #ffffff;
    border-left: 6px solid var(--primary-color);
    padding: 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: .25s;
}

.struktur-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.struktur-foto {
    width: 70px;
    height: 70px;
    border-radius: 999px;
    object-fit: cover;
    border: 3px solid var(--gold);
}

.struktur-inisial {
    width: 70px;
    height: 70px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Jarak dari navbar */
.page-berita {
    padding-top: 110px !important;
}

/* Card berita */
.berita-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: .25s ease;
    display: flex;
    flex-direction: column;
}

.berita-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.15);
}

/* Gambar berita */
.berita-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 14px;
}

/* Tombol back kecil di kiri */
.back-small {
    display: inline-block;
    font-size: 0.9rem;
    color: #555;
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid #ccc;
    background: #fff;
    transition: 0.2s ease;
}

.back-small:hover {
    background: #f1f1f1;
    color: #000;
    border-color: #bbb;
}

/* Bungkus back button agar tidak full width */
.back-wrapper {
    width: fit-content !important;   /* ukuran mengikuti isi */
    margin-bottom: 12px;
}

/* Tombol kecil */
.back-small {
    display: inline-block !important;
    padding: 6px 14px;
    font-size: 0.9rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #fff;
    color: #444;
    text-decoration: none;
    transition: .2s;
}

.back-small:hover {
    background: #f2f2f2;
    color: #000;
    border-color: #bbb;
}

/* Hide desktop menu on mobile */
@media (max-width: 991px) {
    .navbar-premium .navbar-nav {
        display: none !important;
    }
}

#hamburgerMenu {
    display: block !important;
}

@media (min-width: 992px) {
    #hamburgerMenu {
        display: none !important;
    }
}

.mobile-panel {
    position: fixed;
    right: -260px;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #5a0d15;
    padding: 20px;
    transition: .3s;
    z-index: 9999;
}

.mobile-panel.show-panel {
    right: 0;
}

.navbar-premium {
    position: relative;
    z-index: 9999 !important;
}

.mobile-panel {
    z-index: 100000 !important;
}

#hamburgerMenu {
    position: relative;
    z-index: 100001 !important;
}

.navbar-premium {
    position: relative;
    z-index: 999999 !important;
}

#hamburgerMenu {
    position: relative;
    z-index: 1000000 !important;
}

.mobile-panel {
    position: fixed;
    z-index: 2000000 !important;
}

.hero, .header, .banner, .slider {
    position: relative;
    z-index: 1 !important;
}

/* FIX NAVBAR STICKY */
.navbar-premium {
    position: sticky !important;
    top: 0;
    z-index: 999999 !important;
}

/* FIX NAVBAR TERTUTUP SLIDER */
.navbar-premium {
    position: sticky !important;
    top: 0;
    z-index: 999999 !important;
}

/* Hamburger selalu bisa diklik */
#hamburgerMenu {
    position: relative !important;
    z-index: 1000000 !important;
}

/* Turunkan slider & overlay */
.hero-carousel,
.hero-carousel *,
.carousel,
.carousel-inner,
.carousel-item,
.overlay {
    position: relative !important;
    z-index: 1 !important;
}

/* ================================
   UMKM CARD PREMIUM
================================ */

.umkm-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: .25s ease;
    border: 1px solid #f2e7d5;
}

.umkm-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.umkm-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #eee;
}

.umkm-body {
    padding: 14px 16px;
}

.umkm-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #3A070D;
    margin-bottom: 4px;
}

.umkm-category {
    font-size: .82rem;
    color: #a0753c;
    margin-bottom: 8px;
}

.umkm-desc {
    font-size: .85rem;
    color: #555;
    height: 42px;
    overflow: hidden;
}

.umkm-links {
    border-top: 1px solid #eee;
    padding: 10px 16px;
    background: #faf7f2;
}

.umkm-links a {
    font-size: .8rem;
    padding: 5px 10px;
    border-radius: 6px;
    margin-right: 6px;
}

.badge-wa {
    background: #25D366 !important;
    color: #fff !important;
}

.badge-ig {
    background: #E1306C !important;
    color: #fff !important;
}


.umkm-card {
    background:#fff;
    border-radius:14px;
    box-shadow:0 6px 18px rgba(0,0,0,0.1);
    overflow:hidden;
    transition:.25s;
}

.umkm-card:hover {
    transform:translateY(-4px);
    box-shadow:0 12px 26px rgba(0,0,0,0.15);
}

.umkm-photo {
    width:100%;
    height:160px;
    background-size:cover;
    background-position:center;
}

.umkm-body {
    padding:12px;
}

.umkm-title {
    font-weight:700;
    font-size:1rem;
    color:#3D0A10;
}

.umkm-category {
    font-size:.85rem;
    color:#B51E2B;
    margin-bottom:6px;
}

.umkm-desc {
    font-size:.8rem;
    color:#555;
    height:38px;
    overflow:hidden;
}

.umkm-links .badge {
    margin-right:4px;
    padding:6px 10px;
    font-size:.75rem;
}

.layanan-card {
    transition: transform 0.3s ease, background-size 0.3s ease;
    overflow: hidden;
}

.layanan-card:hover {
    transform: translateY(-5px); /* Kartu naik sedikit */
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); /* Bayangan bawah lembut */
}