/* style.css */

/* === 1. Reset Dasar & Font Umum === */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f7f7f7;
    line-height: 1.6;
    color: #333;
    /* Hapus flex jika tidak dibutuhkan secara global lagi setelah sidebar statis/hilang */
    /* display: flex; */
}

a {
    color: #007b55;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #005f43;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Styling untuk H4 di dalam sidebar (jika masih digunakan di tempat lain) */
/* Jika tidak, Anda bisa hapus ini juga */
/*
#sidebar h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#sidebar h4 img {
    margin-bottom: 8px;
}
*/

/* Styling logo (jika ini BUKAN di dalam #sidebar admin) */
#sidebar-logo {
    text-align: center;
    padding: 20px 10px;
    background-color: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#sidebar-logo .logo-img {
    width: 60px;
    height: 70px;
    margin-bottom: 10px;
}

#sidebar-logo .nama-desa {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* === 2. Header & Navigasi Umum === */
header {
    background: #007b55;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1000; /* Ensure header is above other elements */
}

header .logo { display: flex; align-items: center; margin-bottom: 10px; order: 2; flex-grow: 1; justify-content: center; }
header .logo img { height: 40px; margin-right: 10px; }
header .logo h1 { font-size: 1.2rem; margin: 0; font-weight: 600; }

.main-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    background-color: #007b55;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 999; /* Ensure it appears above other elements */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.main-nav.active {
    display: flex; /* Show menu when active */
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    border-bottom: 1px solid #495057;
}

.main-nav a {
    display: block;
    padding: 12px 15px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.main-nav a:hover {
    background-color: #495057;
}

.menu-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.header-actions { display: flex; align-items: center; order: 3; margin-left: 0; flex-grow: 1; justify-content: flex-end; }
.login-button { background: white; color: #007b55; padding: 5px 10px; border-radius: 20px; text-decoration: none; font-weight: bold; margin-left: 10px; white-space: nowrap; font-size: 0.9rem; transition: background-color 0.2s ease; }
.login-button:hover { background-color: #eee; }

/* === 3. Footer Umum === */
footer { text-align: center; padding: 20px; font-size: 0.85rem; color: #777; background: #f0f0f0; margin-top: 40px; border-top: 1px solid #ddd; }


/* === 4. Styling Halaman Index.php === */
body.page-index {
    background-image: url('assets/img/background.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
header.with-background-overlay {
    background-color: rgba(0, 123, 85, 0.75);
}
.page-index .hero {
     background-color: rgba(226, 240, 234, 0.88);
     padding: 60px 20px;
     text-align: center;
     color: #005f43;
     position: relative;
     z-index: 5;
}
.page-index .hero h2 { margin-bottom: 10px; font-weight: 600;}
.page-index .hero p { font-size: 1.1rem; color: #333; }
.page-index .stats { display: none; }
.main-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto 20px auto;
    position: relative;
    z-index: 5;
    background-color: #f7f7f7;
}
.main-column-left, .main-column-right {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.07);
}
.main-column-left h2, .main-column-right h2 {
    margin-top: 0; margin-bottom: 25px; padding-bottom: 10px;
    border-bottom: 2px solid #e2f0ea; color: #007b55;
    font-size: 1.4rem; font-weight: 600;
}
.stats-widget { background-color: #f8f9fa; border-radius: 8px; padding: 20px; margin-bottom: 30px; text-align: center; border: 1px solid #e9ecef; }
.stats-widget .stat-item { margin-bottom: 18px; }
.stats-widget .stat-item:last-child { margin-bottom: 0; }
.stats-widget .stat-value { display: block; font-size: 2.2rem; font-weight: 600; color: #007b55; line-height: 1.1; }
.stats-widget .stat-label { font-size: 1rem; color: #6c757d; }
.info-desa-card, .kegiatan-desa-card { display: flex; gap: 15px; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px dashed #ddd; }
.info-desa-card:last-child, .kegiatan-desa-card:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.info-image-container, .kegiatan-image-container { flex-shrink: 0; width: 110px; height: 85px; border-radius: 5px; overflow: hidden; border: 1px solid #eee; }
.info-thumb, .kegiatan-thumb { width: 100%; height: 100%; object-fit: cover; }
.info-details, .kegiatan-details { flex-grow: 1; display: flex; flex-direction: column; }
.info-title, .kegiatan-title { font-size: 1.15rem; font-weight: 600; margin: 0 0 5px 0; line-height: 1.3; color: #333; }
.info-title-link, .kegiatan-title-link { text-decoration: none; color: inherit; }
.info-title-link:hover .info-title, .kegiatan-title-link:hover .kegiatan-title { color: #007b55; text-decoration: underline; }
.info-meta, .kegiatan-meta { color: #888; font-size: 0.85rem; margin-bottom: 8px; display: flex; align-items: center; flex-wrap: wrap; }
.info-meta span, .kegiatan-meta span { display: inline-flex; align-items: center; margin-right: 10px; }
.info-meta i, .kegiatan-meta i { margin-right: 4px; }
.info-excerpt, .kegiatan-excerpt { color: #555; font-size: 0.95rem; line-height: 1.5; margin-bottom: 10px; flex-grow: 1; }
.read-more-link { display: inline-block; font-size: 0.9rem; color: #007b55; margin-top: auto; font-weight: 600; align-self: flex-start; }
.read-more-link:hover { text-decoration: underline; }
.main-column-right .ultah-content { font-size: 0.95rem; color: #444; background-color: #f0fdf4; padding: 25px; border-radius: 10px; border: 1px solid #c3e6cb; margin-bottom: 30px; }
.main-column-right .ultah-content h4 { font-size: 1.1rem; font-weight: bold; color: #007b55; text-align: center; margin: 0 0 10px 0; }
.main-column-right .ultah-content h5 { font-size: 1.2rem; text-align: center; margin: 15px 0 10px 0; }
.main-column-right .ultah-content p { margin-bottom: 10px; }
.main-column-right .ultah-content ul { list-style: none; padding: 0; margin-top: 15px; }
.main-column-right .ultah-content ul li { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dotted #a3cfbb; }
.main-column-right .ultah-content ul li:last-child { border-bottom: none; }
.main-column-right .ultah-content ul li strong { color: #155724; }
.main-column-right .ultah-content ul li small { font-size: 0.85rem; color: #666; display: block; }
.main-column-right .perangkat-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 15px; text-align: center; background-color: #f8f9fa; padding: 20px; border-radius: 8px; border: 1px solid #e9ecef; }
.main-column-right .perangkat-card img { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px auto; border: 3px solid #007b55; }
.main-column-right .perangkat-card .nama { font-weight: 600; color: #333; font-size: 0.9rem; line-height: 1.2; }
.main-column-right .perangkat-card .jabatan { font-size: 0.8rem; color: #666; }
.no-info, .no-data { text-align: center; color: #6c757d; margin-top: 20px; font-style: italic; padding: 20px; background-color: #f9f9f9; border-radius: 5px; border: 1px dashed #ddd;}

/* === 5. Styling Halaman Daftar (InfoDesa, UMKM Desa, Kegiatan Desa, etc.) === */
.page-title { text-align: center; margin: 30px 0; color: #007b55; font-size: 2rem; font-weight: 600; }
.list-container { max-width: 950px; margin: 0 auto 40px auto; padding: 0 15px; }
.list-item { background-color: #fff; margin-bottom: 25px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); overflow: hidden; display: flex; gap: 20px; padding: 20px; border: 1px solid #eee; }
.list-thumb-container { flex-shrink: 0; width: 180px; height: 120px; border-radius: 5px; overflow: hidden; }
.list-thumb { width: 100%; height: 100%; object-fit: cover; border: 1px solid #ddd; }
.list-details { flex-grow: 1; display: flex; flex-direction: column; }
.list-title { margin: 0 0 5px 0; font-size: 1.4rem; font-weight: 600; line-height: 1.3; }
.list-title a { color: #333; text-decoration: none; }
.list-title a:hover { color: #007b55; }
.list-meta { font-size: 0.85rem; color: #777; margin-bottom: 10px; display: flex; align-items: center; flex-wrap: wrap; }
.list-meta span { display: inline-flex; align-items: center; margin-right: 15px; }
.list-meta i { margin-right: 5px; }
.list-excerpt { font-size: 0.95rem; color: #555; line-height: 1.6; margin-bottom: 12px; flex-grow: 1; }
.detail-link { display: inline-block; margin-top: auto; font-size: 0.9rem; color: #fff; background-color: #007b55; padding: 6px 12px; border-radius: 4px; font-weight: 600; align-self: flex-start; }
.detail-link:hover { background-color: #005f43; text-decoration: none; }
.umkm-meta .owner { font-weight: 600; color: #555; }
.umkm-meta .category { border-left: 1px solid #ccc; padding-left: 15px; margin-left: 15px; }
.umkm-contact { font-size: 0.9rem; margin-bottom: 5px; }
.umkm-contact strong { color: #333; }
.umkm-contact a { color: #007b55; font-weight: 600; }
.umkm-cod { font-size: 0.9rem; font-weight: bold; margin-top: 5px; }
.cod-yes { color: green; }
.cod-no { color: #888; }
.register-prompt { background-color: #e2f0ea; border: 1px dashed #007b55; padding: 20px; margin-top: 30px; border-radius: 8px; text-align: center; font-size: 1rem; color: #333; }
.register-prompt p { margin: 0 0 10px 0; }
.register-prompt a { font-weight: 600; color: #007b55; text-decoration: underline; }

/* === 6. Styling Halaman Detail (InfoDesa, UMKM Detail, Kegiatan Detail) === */
.detail-container { max-width: 850px; margin: 30px auto 40px auto; padding: 30px; background-color: #fff; border-radius: 8px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07); }
.back-link { display: inline-block; margin-bottom: 25px; color: #007b55; font-weight: 600; font-size: 0.95rem; }
.back-link i { margin-right: 5px; }
.detail-header { border-bottom: 1px solid #eee; margin-bottom: 25px; padding-bottom: 20px; }
.detail-title { font-size: 2.2rem; color: #fcfbfb; margin-top: 0; margin-bottom: 10px; font-weight: 600; line-height: 1.3; }
.detail-meta { font-size: 0.95rem; color: #ffc107;; margin-top: 5px; display: flex; align-items: center; flex-wrap: wrap;}
.detail-meta span { display: inline-flex; align-items: center; margin-right: 15px;}
.detail-meta i { margin-right: 5px; }
.detail-meta .owner, .detail-meta .owner a { color: #212529; font-weight: 600; text-decoration: none; }
.detail-meta .owner a:hover { color: #007b55; text-decoration: underline; }
.detail-meta .category { padding-left: 15px; border-left: 1px solid #ccc; font-style: italic; color: #495057; }
.detail-main-image { width: 100%; max-height: 450px; object-fit: cover; border-radius: 6px; margin-bottom: 25px; border: 1px solid #eee; display: block; }
.detail-content-flex { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 25px; }
.detail-main-info { flex: 2; min-width: 300px; }
.detail-side-info { flex: 1; min-width: 250px; }
.detail-content-flex h3 { font-size: 1.3rem; color: #007b55; margin-top: 0; margin-bottom: 15px; border-bottom: 2px solid #e2f0ea; padding-bottom: 8px; }
.description-content { color: #444; font-size: 1.05rem; line-height: 1.8; margin-bottom: 20px; }
.description-content p { margin-bottom: 1em; }
.description-content ul, .description-content ol { margin-bottom: 1em; padding-left: 1.5em; }
.description-content img { max-width: 100%; height: auto; border-radius: 4px; margin: 1em 0; }
.info-item { margin-bottom: 15px; font-size: 1rem; }
.info-item strong { color: #333; display: inline-block; min-width: 90px; font-weight: 600;}
.info-item a { color: #007b55; font-weight: 600; }
.edit-button-container { margin-top: 20px; margin-bottom: 15px; }
.edit-button { background-color: #ffc107; color: #333; padding: 8px 15px; border-radius: 5px; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; border: none; cursor: pointer; transition: background-color 0.2s ease, transform 0.2s ease; }
.edit-button:hover { background-color: #e0a800; text-decoration: none; color: #212529; }
.edit-button i { margin-right: 5px; }
.other-images h5 { margin-bottom: 15px; color: #007b55; font-weight: 600; }
.other-images .row { display: flex; flex-wrap: wrap; margin: -5px; }
.other-images .col { flex: 0 0 33.333%; max-width: 33.333%; padding: 5px; }
.other-images .img-thumbnail { width: 100%; height: 120px; object-fit: cover; margin-bottom: 10px; cursor: pointer; border: 1px solid #ddd; padding: 3px; border-radius: 4px; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.other-images .img-thumbnail:hover { transform: scale(1.05); box-shadow: 0 0 8px rgba(0,0,0,0.2); }
#map {
    height: 350px;
    width: 100%;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-top: 10px;
    z-index: 1;
}

/* Konsolidasi aturan untuk #contactMap */
#contactMap {
    height: 400px; /* Tinggi peta */
    width: 100%; /* Lebar penuh */
    max-width: 100%; /* Pastikan tidak melebar */
    border-radius: 6px; /* Konsisten dengan elemen lain */
    border: 1px solid #ccc; /* Tambahkan border */
    margin-top: 10px; /* Jarak atas */
    overflow: hidden; /* Pastikan elemen di dalam tidak keluar */
    z-index: 1; /* Pastikan berada di atas elemen lain */
}

.map-placeholder { height: 350px; background-color: #e9ecef; display: flex; justify-content: center; align-items: center; color: #6c757d; border-radius: 6px; border: 1px solid #ccc; margin-top: 10px; text-align: center; font-style: italic; }
.error-message { text-align: center; padding: 50px 20px; color: #888; background-color: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.error-message h2 { color: #dc3545; margin-bottom: 10px; }

/* === 7. Styling Form (Register, Login, Edit, Kontak) === */
.form-container, .form-container-large { margin: 30px auto; background-color: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.form-container { max-width: 450px; width: 95%; }
.form-container-large { max-width: 750px; width: 95%; }
.form-container h1, .form-container-large h1 { text-align: center; color: #007b55; margin-bottom: 30px; font-size: 1.8rem; }
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 600; color: #555; font-size: 0.95rem;}
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="file"], input[type="date"], textarea, select { width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: 5px; font-family: inherit; font-size: 1rem; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
input:focus, textarea:focus, select:focus { border-color: #007b55; outline: none; box-shadow: 0 0 0 0.2rem rgba(0, 123, 85, 0.25); }
textarea { min-height: 120px; resize: vertical; }
button[type="submit"] { background-color: #007b55; color: white; padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 1rem; font-weight: 600; transition: background-color 0.3s ease, transform 0.2s ease; margin-top: 10px; }
button[type="submit"]:hover { background-color: #005f43; transform: translateY(-2px); }
.button-secondary { background-color: #6c757d; margin-top: 10px; padding: 10px 15px; font-size: 0.9rem; width: auto; margin-right: 10px; }
.button-secondary:hover { background-color: #5a6268; }
.location-status { margin-top: 10px; font-style: italic; color: #666; font-size: 0.9em;}
input[readonly] { background-color: #e9ecef; cursor: not-allowed; }
.message { padding: 15px; margin-bottom: 20px; border-radius: 5px; border: 1px solid transparent; text-align: center; }
.message.success { background-color: #d1e7dd; color: #0f5132; border-color: #badbcc; }
.message.error { background-color: #f8d7da; color: #842029; border-color: #f5c2c7; }
.form-text { color: #888; font-size: 0.85rem; display: block; margin-top: 5px;}
.form-link { text-align: center; margin-top: 20px; font-size: 0.9rem; }
.form-link a { color: #007b55; text-decoration: none; font-weight: 600; }
.form-link a:hover { text-decoration: underline; }
.current-photo { margin-top: 10px; }
.current-photo img { max-width: 200px; max-height: 150px; border-radius: 5px; border: 1px solid #ddd; display: block; margin-bottom: 5px;}
.delete-photo label { font-weight: normal; color: #dc3545; cursor: pointer;}
.cancel-link { display: inline-block; margin-left: 15px; color: #6c757d; text-decoration: none; font-size: 0.95rem;}
.cancel-link:hover { text-decoration: underline; }
.form-message { margin-top: 15px; font-weight: bold; text-align: center; }
.form-container button[type="submit"],
.form-container-large button[type="submit"] {
    width: 100%;
}

/* === 8. Styling Halaman Kontak === */
.contact-container { max-width: 1100px; margin: 30px auto; padding: 30px; background-color: #fff; border-radius: 8px; box-shadow: 0 3px 15px rgba(0,0,0,0.08); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 20px; }
.contact-info, .contact-map, .contact-form-section { padding: 20px; } /* Perbaiki padding di sini */

/* === PERBAIKAN KHUSUS UNTUK MAP CONTACT === */
.contact-map {
    padding: 20px;
    min-width: 0; /* Penting dalam grid/flex untuk memungkinkan shrinking */
    /* overflow: hidden; /* Ini bisa menyembunyikan bagian peta jika melebar */
    /* Coba atur overflow pada elemen yang lebih spesifik jika perlu */
}

/* Pastikan elemen peta di dalamnya tidak melebar */
#contactMap {
    height: 350px; /* Sesuaikan jika perlu, konsisten dengan placeholder */
    width: 100%;  /* Ini penting */
    max-width: 100%; /* Menambahkan ini untuk jaga-jaga */
    /* Jika masih melebar, coba overflow hidden di elemen ini juga */
    /* overflow: hidden; */
}

/* Tambahkan word-break untuk mencegah teks panjang di info kontak memaksa kolom melebar */
.contact-item a {
    color: #007b55;
    font-weight: 600;
    word-break: break-all; /* Memecah kata panjang seperti email/telepon */
}
/* ===================================== */


.contact-info h3, .contact-map h3, .contact-form-section h3 { color: #007b55; margin-top: 0; margin-bottom: 25px; padding-bottom: 10px; border-bottom: 2px solid #e2f0ea; display: inline-block; font-size: 1.4rem; }
.contact-item { display: flex; align-items: flex-start; margin-bottom: 20px; font-size: 1rem; }
.contact-item i { font-size: 1.5rem; color: #007b55; margin-right: 15px; width: 30px; text-align: center; flex-shrink: 0; margin-top: 3px; }
.contact-item span { line-height: 1.5; color: #555; }
.contact-item strong { display: block; color: #333; margin-bottom: 3px; }
/* Aturan .contact-item a sudah dipindah ke perbaikan khusus */


/* === 9. Styling Halaman Admin (Bagian yang Tersisa) === */
/* Konten Admin (padding, background) */
#content {
    /* Aturan margin-left dan width: calc() Dihapus */
    padding: 25px;
    background-color: #f8f9fa;
    /* Hapus transition: margin-left */
    min-height: 100vh;
    /* Tambahkan ini jika body tidak lagi flex */
    width: 100%;
    box-sizing: border-box;
}

.admin-container { max-width: 1140px; margin: 0 auto; background-color: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 0 15px rgba(0,0,0,0.05); }
.admin-container h1, .admin-container h2 { text-align: center; color: #007bff; margin-bottom: 25px; }
.admin-container h2 { margin-top: 40px; color: #6c757d; font-size: 1.5rem;}
/* Tabel Admin */
.table-responsive { overflow-x: auto; margin-top: 20px; }
.table { width: 100%; margin-bottom: 1rem; color: #212529; vertical-align: middle; border-collapse: collapse; }
.table th, .table td { padding: 0.8rem; border: 1px solid #dee2e6; }
.table thead th { vertical-align: bottom; border-bottom: 2px solid #dee2e6; background-color: #e9ecef; font-weight: 600; white-space: nowrap; text-align: left; }
.table tbody tr:nth-of-type(odd) { background-color: rgba(0, 0, 0, 0.03); }
.table-hover tbody tr:hover { color: #212529; background-color: rgba(0, 0, 0, 0.06); }
.table td { font-size: 0.95rem; }
.img-thumbnail-custom { max-width: 100px; height: auto; border-radius: 4px; border: 1px solid #ccc; }
.isi-preview { max-height: 60px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-size: 0.9rem; color: #6c757d; }
.status-badge { padding: 0.25em 0.6em; font-size: 0.8em; font-weight: 700; line-height: 1; color: #fff; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: 0.25rem; }
.status-tayang.tayang { background-color: #198754; }
.status-tayang.tidak { background-color: #dc3545; }
.status-pending { background-color: #ffc107; color: #000; }
.status-approved { background-color: #198754; }
.status-rejected { background-color: #dc3545; }
/* Tombol Aksi Admin */
.actions { white-space: nowrap; text-align: center; }
.actions a, .actions button { padding: 0.3rem 0.6rem; font-size: 0.85rem; border-radius: 0.25rem; margin: 2px; text-decoration: none; display: inline-flex; align-items: center; vertical-align: middle; border: none; cursor: pointer; transition: filter 0.2s ease; }
.actions i { margin-right: 4px; }
.actions .btn-success { background-color: #198754; color: white;}
.actions .btn-danger { background-color: #dc3545; color: white;}
.actions .btn-warning { background-color: #ffc107; color: #000;}
.actions .btn-info { background-color: #0dcaf0; color: #000; }
.actions .btn-secondary { background-color: #6c757d; color: white; }
.actions a:hover, .actions button:hover { filter: brightness(90%); }
.action-col { min-width: 150px; white-space: nowrap; text-align: center; vertical-align: middle; } /* Gabungkan .action-col */
.action-col .btn { margin: 2px 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }


/* === 10. Media Queries Responsif (Bagian yang Tersisa) === */
@media screen and (min-width: 769px) {
    /* Desktop styles */
    header { flex-wrap: nowrap; }
    header .logo { margin-bottom: 0; order: 0; flex-grow: 0; justify-content: flex-start; }
    header .logo img { height: 50px; }
    header .logo h1 { font-size: 1.5rem; }
    .main-nav { display: flex !important; flex-direction: row; width: auto; margin-top: 0; order: 0; margin-left: auto; background: none; position: static; box-shadow: none; }
    .main-nav ul { flex-direction: row; width: auto; }
    .main-nav li { width: auto; text-align: left; }
    .main-nav a { border-bottom: none; padding: 10px 15px; }
    .header-actions { order: 0; margin-left: 20px;}
    .menu-toggle { display: none; }
    footer { font-size: 0.9rem; }
    /* Ukuran list & detail desktop */
    .list-container { padding: 0 20px; }
    .list-item { padding: 25px; }
    .list-thumb-container { width: 200px; height: 150px; }
    .list-title { font-size: 1.6rem; }
    .list-excerpt { font-size: 1rem; }
    .detail-container { padding: 40px; }
    .detail-title { font-size: 2.5rem; }
    .description-content { font-size: 1.1rem; }
    /* Galeri Detail Desktop */
    .other-images .col { flex: 0 0 25%; max-width: 25%; }
}

        /* Media Queries untuk penyesuaian grid pada layar kecil */
        @media (max-width: 768px) {
            .contact-grid {
                /* Pada layar menengah ke atas, form dan map bisa bersebelahan jika perlu */
                /* grid-template-columns: repeat(2, 1fr); */
                /* grid-template-areas:
                    "info form"
                    "map  form"; /* Contoh layout: info & map di kiri, form di kanan */
            }
            /* .contact-info { grid-area: info; }
            .contact-map { grid-area: map; }
            .contact-form-section { grid-area: form; } */
        }

        @media (min-width: 992px) {
            .contact-grid {
                grid-template-columns: 1fr 1fr; /* 2 kolom sama lebar */
                /* grid-template-areas:
                    "info map"
                    "form form"; /* Contoh layout: info & map di atas, form di bawah */
            }
            /* .contact-info { grid-area: info; }
            .contact-map { grid-area: map; }
            .contact-form-section { grid-area: form; } */
        }
        /* Atur ulang grid-template-areas atau hapus jika layout auto-fit sudah cukup */
.main-content {
    min-height: calc(100vh - 150px); /* Sesuaikan 150px */
    display: flex;
    flex-direction: column;
}

.admin-footer {
  margin-top: auto;
}


/* ========== Gaya untuk Grid UMKM ========== */
.umkm-list-container { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; padding: 1rem 0; }
.umkm-card { border: 1px solid #e0e0e0; border-radius: 8px; background-color: #ffffff; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; text-decoration: none; color: inherit; }
.umkm-card:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); }
.umkm-card-image-container { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; }
.umkm-card-image { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.umkm-card:hover .umkm-card-image { transform: scale(1.05); }
.umkm-card-content { padding: 1rem; display: flex; flex-direction: column; flex-grow: 1; }
.umkm-card-title { font-size: 1rem; font-weight: 600; color: #333; margin-bottom: 0.4rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 2.4em; }
.umkm-card-category { font-size: 0.8rem; color: #555; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.3rem; }
.umkm-card-category .bi { font-size: 0.9em; }
.umkm-card-cod { font-size: 0.75rem; font-weight: 500; padding: 0.2rem 0.5rem; border-radius: 4px; margin-bottom: 0.8rem; display: inline-block; text-align: center; width: fit-content; }
.umkm-card-cod.cod-yes { background-color: #d1e7dd; color: #0f5132; border: 1px solid #a3cfbb; }
.umkm-card-cod.cod-no { background-color: #f8d7da; color: #842029; border: 1px solid #f5c2c7; }
.umkm-card-button { display: block; margin-top: auto; padding: 0.5rem 0.8rem; background-color: #007b55; color: white; text-align: center; text-decoration: none; border-radius: 5px; font-size: 0.85rem; font-weight: 500; transition: background-color 0.2s ease; border: none; }
.umkm-card-button:hover { background-color: #005f44; color: white; }
@media (max-width: 1200px) { .umkm-list-container { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 992px) { .umkm-list-container { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .umkm-list-container { grid-template-columns: repeat(2, 1fr); gap: 1rem; } .umkm-card-title { font-size: 0.95rem; } .umkm-card-button { font-size: 0.8rem; padding: 0.4rem 0.6rem; } }
@media (max-width: 576px) { .umkm-list-container { grid-template-columns: 1fr; } .umkm-card { max-width: 350px; margin-left: auto; margin-right: auto; } }

/* === FINAL: Paksa Keselarasan Tinggi Input & Tombol Pencarian === */
.search-container .input-group .form-control,
.search-container .input-group .btn { padding-top: 10px !important; padding-bottom: 10px !important; font-size: 1rem !important; line-height: 1.6 !important; height: auto !important; margin-top: 0 !important; margin-bottom: 0 !important; box-sizing: border-box !important; vertical-align: middle !important; }
.search-container .input-group .form-control { padding-left: 12px; padding-right: 12px; }
.search-container .input-group .btn { padding-left: 12px; padding-right: 12px; }

.year-selector-container select.form-select { width: 150px !important; display: inline-block !important; }
.year-selector-container { background-color: #40E0D0 !important; border-radius: 8px; padding: 15px 20px !important; border: none !important; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.year-selector-container label { color: white !important; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.year-selector-container select,
.year-selector-container button { border: 1px solid rgba(255,255,255,0.3) !important; background-color: #FFA500 !important; color: white !important; }
.year-selector-container select:hover { background-color: rgba(255,255,255,0.2) !important; }
.year-selector-container select option { color: #333; }

.register-prompt .btn.btn-success { background-color: #fd7e14 !important; border-color: #fd7e14 !important; color: white !important; transition: all 0.3s ease; text-decoration: none; }
.register-prompt .btn.btn-success:hover { background-color: #e66100 !important; border-color: #e66100 !important; color: white !important; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(253, 126, 20, 0.3); }
.register-prompt .btn.btn-success:active,
.register-prompt .btn.btn-success:focus { background-color: #e66100 !important; border-color: #e66100 !important; color: white !important; box-shadow: 0 0 0 0.25rem rgba(253, 126, 20, 0.5) !important; }

.map-container {
    height: 400px; /* Tinggi peta */
    width: 100%; /* Pastikan peta memenuhi lebar container */
    border-radius: 8px; /* Opsional: Tambahkan border radius */
    overflow: hidden; /* Pastikan elemen di dalam tidak keluar */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Opsional: Tambahkan bayangan */
}

.map-placeholder {
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e9ecef;
    text-align: center;
    border-radius: 8px;
    color: #6c757d;
    font-size: 16px;
}
/* ======================================================= */
/* === 11. MEDIA QUERY UMUM UNTUK TATA LETAK RESPONSIF === */
/* ======================================================= */

/* Aturan untuk tablet dan mobile (layar di bawah 992px) */
@media (max-width: 992px) {

    /* --- [FIX] Grid Utama di Halaman Beranda (index.php) --- */
    .main-content-grid {
        grid-template-columns: 1fr; /* KUNCI UTAMA: Ubah menjadi 1 kolom */
        gap: 25px; /* Kurangi jarak antar elemen */
        padding: 15px;
    }

    /* --- [IMPROVEMENT] Layout Daftar Item (Info, Kegiatan, dll) --- */
    .list-item {
        flex-direction: column; /* Susun gambar dan teks secara vertikal */
        gap: 15px;
    }

    .list-thumb-container {
        width: 100%; /* Lebar gambar menjadi penuh */
        height: 180px; /* Atur tinggi yang pas untuk mobile */
    }
    
    /* --- [IMPROVEMENT] Layout Detail Konten (UMKM, Info, dll) --- */
    .detail-content-flex {
        flex-direction: column; /* Susun info utama & info samping secara vertikal */
        gap: 25px;
    }
    
    .detail-container {
        padding: 20px;
    }
    
    .detail-title {
        font-size: 1.8rem; /* Sedikit kecilkan judul di mobile */
    }

    /* --- [IMPROVEMENT] Grid Kontak --- */
    .contact-grid {
        /* Pastikan menjadi satu kolom juga */
        grid-template-columns: 1fr;
    }
}


/* Aturan khusus untuk mobile (layar di bawah 576px) */
@media (max-width: 576px) {
    
    /* Perkecil padding di container utama agar konten lebih lega */
    .main-column-left, .main-column-right {
        padding: 15px;
    }

    /* Perbaiki tampilan card info/kegiatan di beranda */
    .info-desa-card, .kegiatan-desa-card {
        flex-direction: column; /* Susun vertikal gambar dan teks */
        align-items: flex-start;
    }

    .info-image-container, .kegiatan-image-container {
        width: 100%; /* Gambar mengambil lebar penuh */
        height: 150px;
    }
}