:root {
  --hijau: #0b6b45;
  --hijau-muda: #e8f5f0;
  --uí-text: #222;
}

/* ===============================
   RESET & BODY
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f6f8;
  color: #333;
  font-size: 17px;
}

/* ===============================
   HEADER
================================ */
.header {
  background: #0b6b45;
  position: sticky;
  top: 0;
  z-index: 1000;
}

p {
  font-size: 16px;
}

.header-container {
  width: 100%;
  margin: auto;
  padding: 12px 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 768px) {
  .header-container {
    padding: 12px 20px;
  }
}

/* ===============================
   LOGO
================================ */
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-area img,
.logo-img {
  height: 55px; /* 🔥 BESARIN DI SINI */
  width: auto; /* jaga proporsi */
  object-fit: contain;
}

.logo-area span {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.logo-subtitle {
  color: #e0f2ea;
  font-size: 13px;
  font-weight: 500;
}

/* ===============================
   HERO SECTION
================================ */
.hero {
  position: relative;
  height: 100vh;
  background: url("../img/contoh1.png") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}

.hero-content {
  position: relative;
  color: white;
  text-align: center;
}

/* ===============================
   NAVIGATION (FIX)
================================ */
.navmenu {
  margin-left: auto; /* NAV KE KANAN */
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap; /* penting: biar ga turun baris */
}

/* link utama navbar */
.navmenu > a,
.navmenu .nav-dropbtn {
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  position: relative;
  padding-bottom: 4px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* hover/active underline */
.navmenu > a::after,
.navmenu .nav-dropbtn::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #ffffff;
  transition: width 0.5s;
}

.navmenu > a:hover::after,
.navmenu > a.active::after,
.navmenu .nav-dropbtn:hover::after,
.navmenu .nav-dropbtn.active::after {
  width: 100%;
}

.navmenu > a:hover,
.navmenu > a.active,
.navmenu .nav-dropbtn:hover,
.navmenu .nav-dropbtn.active {
  color: #eaeaea;
}

/* ===== FIX DROPDOWN PROFIL (ANTI HILANG) ===== */

/* pastikan area hover dropdown itu nyambung */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* box dropdown */
.nav-dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 10px;
  min-width: 220px;

  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  z-index: 9999;

  /* default hidden */
  display: none;
  padding: 6px 0;
}

/* item dropdown */
.nav-dropdown-content a {
  display: block;
  padding: 12px 14px;
  color: #222;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.nav-dropdown-content a:hover {
  background: rgba(11, 107, 58, 0.08);
  color: #0b6b3a;
}

/* jembatan nutup gap margin-top */
.nav-dropdown-content::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

/* buka saat hover ATAU class JS */
.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown.is-open .nav-dropdown-content {
  display: block;
}

/* ===============================
   FOOTER (SAMA DI SEMUA HALAMAN)
================================ */
/* =========================
   FOOTER
========================= */
.footer {
  background: linear-gradient(135deg, #0b6b45, #45c89a);
  color: #fff;
  width: 100%;
  font-size: 15px; /* ⬅️ TEKS LEBIH RINGKAS */
  line-height: 1.5; /* ⬅️ KUNCI LINE SPACING */
}

/* CONTAINER */
.footer-container {
  max-width: 1200px;
  margin: auto;
  padding: 20px 24px; /* ⬅️ DIPERKECIL */
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px; /* ⬅️ JARAK ANTAR KOLOM */
}

/* KOLOM */
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 4px; /* ⬅️ RAPET */
  align-items: flex-start;
}

/* JUDUL */
.footer-col h2,
.footer-col h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

/* TEKS */
.footer-col p {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  opacity: 0.95;
}

/* LINK */
.footer-col a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.6;
}

.footer-col a:hover {
  text-decoration: underline;
}

/* LOGO */
.footer-logo {
  height: 60px; /* 🔥 BESARIN DI SINI */
  width: auto; /* jaga proporsi */
}

/* SOSMED */
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.footer-social img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.footer-social img:hover {
  transform: scale(1.1);
}

/* FOOTER BAWAH */
.footer-bottom {
  text-align: center;
  padding: 6px;
  background: rgba(0, 0, 0, 0.18);
  font-size: 13px;
}

/* TABLET */
@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* HP */
@media (max-width: 500px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-col {
    align-items: center;
  }

  .footer-social {
    justify-content: center;
  }
}

.berita {
  padding: 60px;
}

.berita h2 {
  font-size: 26px;
  margin-bottom: 10px;
  color: var(--uí-text);
}

.berita p {
  color: #555;
}
.berita {
  padding: 60px;
}

.berita h2 {
  font-size: 26px;
  margin-bottom: 10px;
  color: var(--uí-text);
}

.berita p {
  color: #555;
}

/* ===============================
   PAGE HERO (untuk semua halaman selain Beranda)
================================ */
.page-hero {
  position: relative;
  height: 240px; /* tinggi hero mini */
  background: url("../img/contoh1.png") center/cover no-repeat; /* ganti background default */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 107, 69, 0.65); /* overlay hijau */
}

.page-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 0 18px;
}

.page-hero-content h1 {
  font-size: 44px;
  font-weight: 800;
  margin: 0 0 10px;
}

.page-hero-content p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  opacity: 0.95;
}

/* responsive */
@media (max-width: 768px) {
  .page-hero {
    height: 200px;
  }
  .page-hero-content h1 {
    font-size: 28px;
  }
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .navmenu {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
    justify-content: space-between;
  }
}

/* ===============================
   GENERAL SECTION
================================ */
.section {
  padding: 80px 0;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 24px;
}

.section h2 {
  font-size: 28px;
  margin-bottom: 12px;
  color: #0b6b45;
}

/* ===============================
   PROFIL DESA
================================ */
.profile-box h3 {
  margin-top: 20px;
  color: #0b6b45;
}

.profile-box ul {
  padding-left: 20px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.data-table td {
  padding: 8px;
  border-bottom: 1px solid #ddd;
}

/* ===============================
   GALERI
================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.gallery-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.05);
}

/* ===============================
   KONTAK
================================ */
.contact-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.contact-info p {
  margin-bottom: 10px;
}

.map iframe {
  width: 100%;
  height: 280px;
  border: none;
  border-radius: 10px;
}

html {
  scroll-behavior: smooth;
}

/* karena header sticky, kasih jarak saat loncat ke anchor */
#lambang,
#sejarah,
#latarbelakang,
#visimisi,
#peta {
  scroll-margin-top: 90px; /* sesuaikan tinggi header */
}
/* ===============================
   PEMDES IMAGE + MODAL
================================ */
.pemdes-wrap {
  max-width: 1100px;
  margin: auto;
  padding: 24px;
}

.pemdes-subtitle {
  margin-top: 6px;
  color: #555;
  font-size: 15px;
  font-weight: 600;
}

.pemdes-img-box {
  position: relative;
  margin-top: 18px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

.pemdes-img {
  width: 100%;
  height: auto;
  display: block;
}

/* overlay default: invisible */
.pemdes-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(11, 107, 69, 0);
  opacity: 0; /* <-- sembunyikan */
  pointer-events: none; /* <-- biar klik tetap ke gambar */
  transition:
    opacity 0.2s ease,
    background 0.2s ease;
}

.pemdes-img-box:hover .pemdes-overlay {
  opacity: 1;
  background: rgba(11, 107, 69, 0.18);
}

.pemdes-chip {
  background: rgba(255, 255, 255, 0.92);
  color: #0b6b45;
  font-weight: 800;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 999px;
  transform: translateY(10px);
  opacity: 0; /* <-- sembunyikan */
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}
.pemdes-img-box:hover .pemdes-chip {
  opacity: 1;
  transform: translateY(0);
}
/* MODAL */
.pemdes-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 99999;
  padding: 30px 18px;
}

.pemdes-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pemdes-modal-img {
  max-width: 95%;
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

.pemdes-close {
  position: absolute;
  top: 20px;
  right: 26px;
  font-size: 45px;
  font-weight: 900;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

/* responsive */
@media (max-width: 900px) {
  .pemdes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .pemdes-grid {
    grid-template-columns: 1fr;
  }
  .pemdes-photo {
    height: 210px;
  }
}
#pemdes {
  scroll-margin-top: 90px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .contact-box {
    grid-template-columns: 1fr;
  }
}
/* mobile: karena gak ada hover, tampilkan chip kecil di pojok */
@media (max-width: 768px) {
  .pemdes-overlay {
    opacity: 1;
    background: rgba(11, 107, 69, 0);
    place-items: end;
    padding: 10px;
  }
  .pemdes-chip {
    opacity: 1;
    transform: none;
    font-size: 12px;
    padding: 8px 10px;
  }
}
