/* --- 1. RESET & DASAR --- */
html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

* {
    box-sizing: border-box; /* TETAP GUNAKAN INI */
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Tambahkan ini agar footer bisa "lengket" di bawah */
html, body {
    height: 100%;
    width:100%;
    margin:0;
    padding:0;
    width: 100vw;
    overflow-x: hidden;
}

body {
    display: flex;          /* Tambahan untuk footer */
    flex-direction: column; /* Tambahan untuk footer */
    padding-top: 70px;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}
/* 2. Pembungkus Konten Utama */
.main-content-wrapper {
    flex: 1 0 auto; /* Ini akan mengambil semua sisa ruang yang ada */
    background-image: linear-gradient(to top, #dfe9f3 0%, white 100%);
}

/* --- 2. NAVBAR STYLE --- */
.navbar {
    display: flex;
    /* justify-content: space-between; <-- HAPUS ATAU KOMENTARI INI */
    align-items: center;
    background: #44A08D;
    background: -webkit-linear-gradient(to top, #093637, #44A08D);
    padding: 0.6rem 2rem; /* Beri padding agar logo tidak nempel ke kiri */
    color: white;
    position: fixed; 
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.navbar-links {
    margin-left: 14%; /* KUNCINYA DI SINI: Mendorong menu ke kanan secara stabil */
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

/* --- 3. MENU NAVIGASI (DESKTOP) --- */
.navbar-links ul {
    display: flex;
    list-style: none;
}

.navbar-links li a {
    color: white;
    padding: 1rem 1rem;
    text-decoration: none;
    display: block;
    transition: 0.3s;
}

.navbar-links li a:hover {
    background-color: #00a86b;
    color:#66ffff;
}


/* --- 4. DROPDOWN (DESKTOP) --- */
.dropdown {
    position: relative;
}

/* Sembunyikan total agar tidak ikut memakan ruang di awal */
.dropdown-content {
    display: none; 
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 60px;
    right: 0;
    background-color: #66cc99;
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1002;
    /* Pastikan tidak ikut flex parent */
    flex-direction: column;
}

/* KUNCI: Paksa LI di dalam dropdown agar SELALU vertikal */
.navbar-links ul li.dropdown ul.dropdown-content li {
    display: block !important;
    width: 100% !important;
    float: none !important;
}

.dropdown-content li a {
    padding: 12px 20px !important;
    color: white !important;
    text-decoration: none;
    display: block !important;
    text-align: left !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}

.dropdown-content li a:hover {
    background-color: #00a86b;
}

/* Munculkan HANYA saat di-hover dan paksa jadi block */
.dropdown:hover .dropdown-content {
    display: block !important;
    visibility: visible;
    opacity: 1;
}



/* --- 6. LAYOUT UTAMA (SIDEBAR & KONTEN) --- */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;       /* Ini yang membuat sidebar di SAMPING */
    flex-direction: row; /* Desktop: Berjejer ke samping */
    gap: 25px;           /* Jarak antara sidebar dan konten */
    align-items: flex-start;
}

/* Sidebar Style */
/* --- SIDEBAR PREMIUM STYLE --- */
.sidebar {
    flex: 1;
    min-width: 280px;
    background-image: linear-gradient(to top, #f3e7e9 0%, #e3eeff 99%, #e3eeff 100%);
    padding: 0; /* Padding dipindah ke dalam agar hover full ke pinggir */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    overflow: hidden; /* Supaya lekukan border tetap rapi */
    border: 1px solid #edf2f7;
}

.sidebar-header {
    padding: 10px 15px;
    background: #44A08D;  /* fallback for old browsers */
    background: -webkit-linear-gradient(to top, #093637, #44A08D);  /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to top, #093637, #44A08D); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    color: #bdda57;
}

.sidebar-header h3 {
    font-size: 1.2rem;
    margin: 0;
    border-bottom: none; /* Hapus border bawah lama */
    letter-spacing: 0.5px;
    font-family: Arial, Helvetica, sans-serif;
}

.sidebar-header p {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 5px;
}

.sidebar ul {
    list-style: none;
    padding: 15px 10px;
}

.sidebar ul li {
    margin-bottom: 8px;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar ul li a {
    background-color: #f7fafc;
    color: #3498db;
}

/* Efek Hover Premium */
.sidebar ul li a:hover {
    background-image: linear-gradient(to top, #e6e9f0 0%, #eef1f5 100%);
    color:red;
}

/* Link Aktif (Opsional jika ingin menandai halaman yang dibuka) */
.sidebar ul li a.active {
    background-color: #ebf8ff;
    color: #3182ce;
    border-left: 4px solid #3498db;
}

.icon {
    margin-right: 12px;
    font-size: 1.1rem;
    filter: grayscale(100%); /* Membuat ikon lebih kalem */
    transition: 0.3s;
}

.sidebar ul li a:hover .icon {
    filter: grayscale(0%); /* Ikon berwarna kembali saat hover */
}


/* Box Konten Utama */
.content-box {
    flex: 3;             /* Mengambil 3 bagian ruang (lebih lebar) */
    background: #f7fafc;
    border-radius: 10px;
    padding: 30px;
    padding-bottom: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Soft shadow premium */
    border: 1px solid #f0f0f0;
    margin: 0;
    max-width: 900px;
    position: relative;
    font-family: 'Inter', 'Segoe UI', sans-serif; /* Font modern */
    line-height: 1.7;
    color: #333;
    border-top:5px solid #a9bda8;
}

/* --- 8. THUMBNAIL 4 KOLOM --- */
.thumbnail-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap; /* Agar bisa turun ke bawah saat layar mengecil */
}

.thumbnail-item {
    flex: 1;
    min-width: 250px; /* Ukuran minimal tiap kolom */
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    cursor:pointer;
}

.thumbnail-item:hover {
    opacity:0.7;
}

.thumbnail-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.thumbnail-text {
    padding: 20px;
}

.thumbnail-text h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.thumbnail-text p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* --- 9. SIDEBAR THUMBNAIL GRID --- */
/* Container utama sidebar widget */
.sidebar-thumb-grid {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Jarak antar item rekomendasi */
}

/* Pengaturan tiap baris item */
.side-thumb-item {
    display: flex;
    background-image: linear-gradient(to top, #dfe9f3 0%, white 100%);
    padding:8px;
    align-items: flex-start; /* Teks mulai dari atas gambar */
    gap: 12px; /* Jarak antara gambar dan teks */
    width: 100%;
    cursor:pointer;
    border-bottom:4px solid #94a181;
}

/* Gambar (30%) */
.side-thumb-item img {
    width: 30%;
    height: auto;
    aspect-ratio: 1/1; /* Membuat gambar tetap kotak agar rapi */
    object-fit: cover;
    border-radius: 4px; /* Sudut melengkung halus */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Teks (70%) */
.side-thumb-item p {
    width: 70%;
    font-size: 0.85rem; /* Ukuran teks lebih kecil agar pas di sidebar */
    line-height: 1.4;
    text-align: justify; /* Rata kanan kiri */
    color: #111;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Maksimal 3 baris teks */
    -webkit-box-orient: vertical;
    overflow: hidden;

}

/* Efek Hover (Opsional agar premium) */
.side-thumb-item:hover{
    opacity:0.7;
}

.side-thumb-item:hover p {
    color: red;
    transition: 0.3s;
}

/* --- POST META PREMIUM --- */
/* Meta Data (Tanggal & Share) */
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 0;
    width:100%;
    border-bottom: 2px solid #f8f9fa;
    flex-wrap: wrap;
    gap: 15px;
}

.post-date {
    font-size: 0.85rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-divider {
    color: #ddd;
    font-weight: 300;
}

.post-share {
    display: flex;       /* Membuat isi di dalamnya sejajar menyamping */
    gap: 10px;          /* Memberi jarak antar tombol */
    align-items: center; /* Menyejajarkan secara vertikal */
}

.btn-share-premium {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 8px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.btn-share-premium:hover {
    background: #2c3e50;
    color: #ffffff;
    border-color: #2c3e50;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.footer {
    flex-shrink: 0; /* Mencegah footer menciut */
    background-color: #44A08D;
    color: white;
    text-align: left;
    padding: 20px;
    margin-top: 20px; /* Jarak dari konten ke footer */
}

.footer p {
    margin: 0;
    padding: 30px;
}

/* --- 10. BACK TO TOP BUTTON --- */
#backToTop {
    display: none; /* Sembunyikan di awal */
    position: fixed;
    bottom: 16px;
    right: 30px;
    z-index: 2000;
    font-size: 20px;
    border: none;
    outline: none;
    background-color: #33cccc;
    color: white;
    cursor: pointer;
    padding: 12px 16px;
    border-radius: 50%; /* Membuat tombol bulat */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
    transform: rotate(-90deg); /* Memutar panah agar menghadap ke atas */
}

#backToTop:hover {
    background-color: #33cccc;
    transform: rotate(-90deg) scale(1.1); /* Sedikit membesar saat di-hover */
}

/* Keadaan awal: konten sedikit ke bawah dan transparan */
.content-box {
    position: relative;
    min-height: 90vh; /* Memberi ruang agar loader bisa di tengah vertikal */
    display: flex;
    flex-direction: column;
}

.inner-loader {
    position: absolute;
    height: 600px; /* Memberi ruang agar loader bisa di tengah vertikal */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9); /* Background solid agar konten di belakang tidak bayang */
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center; /* Tengah Horizontal */
    align-items: center;     /* Tengah Vertikal */
    z-index: 100;
    border-radius: 12px;
    transition: opacity 0.5s ease;
}

.loader-container {
    text-align: center; /* Memastikan teks juga di tengah */
}

.loader {
    width: 100px;
    height: 100px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px; /* Center margin untuk element block */
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Hilangkan Loader */
.loader-hidden {
    opacity: 0;
    pointer-events: none; /* Agar tidak menghalangi klik setelah hilang */
}

/* FHOTO GALERI SEJAJAR */

 /* --- PROFIL KOTAK (PAS FOTO RESMI) --- */
.nav-profile-flex {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 70px; /* Mendorong menu ke kanan */
    padding: 2px 2px;
}

.profile-avatar img {
    width: 50px;  /* Lebar pas foto */
    height: 60px; /* Tinggi pas foto (Rasio resmi) */
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 4px; /* Sudut kotak tegas */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.profile-details {
    display: flex;
    flex-direction: column;
}

.p-name {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    line-height: 1.2;
}

.p-role {
    font-size: 12px;
    color: #fff; /* Warna senada sidebar header */
    font-weight: 500;
}

/* foto bawah */
   /* Container utama gallery */
.photo-container {
    display: flex;
    flex-wrap: wrap; /* Agar bisa turun ke bawah */
    gap: 15px;       /* Jarak antar foto */
    justify-content: center;
    padding: 10px;
}

/* Pengaturan Card (Desktop: 4 Kolom) */
.photo-card {
    flex: 1 1 calc(25% - 20px); /* Membagi 4 kolom di layar besar */
    min-width: 200px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.photo-card img {
    width: 100%;
    height: 250px; /* Sesuaikan tinggi foto team */
    object-fit: cover;
    display: block;
}

.info-box {
    padding: 15px;
}

.name-text {
    display: block;
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.role-text {
    display: block;
    font-size: 13px;
    color: #29ab87; /* Hijau tema desa */
    margin-bottom: 8px;
}

.divider {
    height: 3px;
    width: 30px;
    background: #29ab87;
    margin: 0 auto;
}    /* Tombol Install Umum (Android/PC) */
    #installBtn {
    display: none; /* Akan diubah jadi 'block' via JS */
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    cursor: pointer;
    /* Efek Animasi Fade In */
    animation: fadeIn 0.8s ease-in-out;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; transform: translate(-50%, 20px); }
        to { opacity: 1; transform: translate(-50%, 0); }
    }
     #installBtn:hover{
         opacity:0.8;
     }


    /* Popup Instruksi iPhone */
    #ios-prompt {
        display: none;
        position: fixed;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        width: 85%;
        max-width: 350px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 20px;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        z-index: 10000;
        border: 1px solid rgba(0,0,0,0.1);
        animation: slideUp 0.5s ease-out;
    }

    .ios-header {
        display: flex;
        align-items: center;
        margin-bottom: 15px;
    }

    .ios-icon {
        width: 45px;
        height: 45px;
        background: #eee;
        border-radius: 10px;
        margin-right: 12px;
    }

    .ios-text {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica;
        font-size: 14px;
        line-height: 1.4;
        color: #333;
    }

    .ios-instruction {
        background: #f8f9fa;
        padding: 10px;
        border-radius: 10px;
        font-size: 13px;
        margin-top: 10px;
        border-left: 4px solid #007aff;
    }

    .share-icon { width: 20px; vertical-align: middle; }
    .plus-icon { width: 20px; vertical-align: middle; border: 1px solid #ccc; padding: 2px; border-radius: 4px; }

    @keyframes slideUp {
        from { bottom: -100px; opacity: 0; }
        to { bottom: 30px; opacity: 1; }
    }



