/* ===== Umum ===== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f9f9f9;
  line-height: 1.6;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #2e8b57, #1f5d3b);
  color: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 5%;
  transition: padding 0.3s ease;
}

.logo {
  width: 100px;
  height: auto;
  border-radius: flex;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: rotate(10deg) scale(1.1);
}

.site-title h1 {
  font-size: 1.8rem;
  margin: 0;
  transition: font-size 0.3s ease;
}

.site-title p {
  font-size: 1rem;
  margin: 0;
  opacity: 0.8;
  transition: font-size 0.3s ease;
}

/* ===== HEADER SHRINK ===== */
/* ===== HEADER SHRINK Diperbarui ===== */
.site-header.shrink {
  padding: 5px 5%; /* padding lebih kecil */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.site-header.shrink .logo {
  width: 40px; /* logo lebih kecil */
}

.site-header.shrink .site-title h1 {
  font-size: 1rem; /* judul lebih kecil */
}

.site-header.shrink .site-title p {
  font-size: 0.7rem; /* subjudul lebih kecil */
  opacity: 0.9;
}

/* ===== NAV MENU ===== */
.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 15px;
  padding: 0;
  margin: 0;
}

.nav-menu a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #ffeb3b;
}

.hero-banner {
  transition: all 0.6s ease;
  opacity: 1;
  max-height: 500px;
  overflow: hidden;
}

.hero-banner.hidden {
  opacity: 0;
  transform: translateY(-30px);
  max-height: 0;
  padding: 0;
}



.hero-banner h2,
.hero-banner p {
  transition: all 0.5s ease;
}

.cta-btn {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 25px;
  background-color: #ffeb3b;
  color: #1f5d3b;
  font-weight: bold;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-btn:hover {
  background-color: #fdd835;
  transform: scale(1.05);
}

/* Navigasi */
.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  transition: all 0.3s ease;
}

.nav-menu ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  position: relative;
  transition: font-size 0.3s ease;
}

.nav-menu ul li a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background: yellow;
  left: 0;
  bottom: -5px;
  transition: 0.3s;
}

.nav-menu ul li a:hover::after {
  width: 100%;
}

/* Tombol Menu Mobile */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: white;
}

/* Hero Banner */
.hero-banner {
  text-align: center;
  padding: 60px 20px 40px;
  background: url("../images/bg-desa.jpg") center/cover no-repeat;
  color: white;
  transition: padding 0.3s ease;
}

.hero-banner h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  transition: font-size 0.3s ease;
}

.hero-banner p {
  margin-bottom: 20px;
}

.cta-btn {
  background: yellow;
  color: #2e8b57;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-btn:hover {
  background: orange;
  color: white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* ===== Shrink Saat Scroll ===== */
.site-header.shrink .header-container {
  padding: 5px 5%;
}

.site-header.shrink .logo {
  width: 50px;
}

.site-header.shrink .site-title h1 {
  font-size: 1.2rem;
}

.site-header.shrink .site-title p {
  font-size: 0.8rem;
}

.site-header.shrink .nav-menu ul li a {
  font-size: 0.9rem;
}

.site-header.shrink .hero-banner {
  padding-top: 30px;
}

/* ===== Responsif ===== */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    background: #1f5d3b;
    position: absolute;
    top: 70px;
    right: 0;
    width: 200px;
    padding: 20px;
  }

  .nav-menu.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .hero-banner h2 {
    font-size: 1.5rem;
  }

  .hero-banner p {
    font-size: 0.9rem;
  }
}

/* Navigasi */
.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-menu ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  position: relative;
}

.nav-menu ul li a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background: yellow;
  left: 0;
  bottom: -5px;
  transition: 0.3s;
}

.nav-menu ul li a:hover::after {
  width: 100%;
}

/* Tombol Menu Mobile */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: white;
}

/* Hero Banner */
.hero-banner {
  text-align: center;
  padding: 60px 20px;
  background: url("../images/bg-desa.jpg") center/cover no-repeat;
  color: white;
}

.hero-banner h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.hero-banner p {
  margin-bottom: 20px;
}

.cta-btn {
  background: yellow;
  color: #2e8b57;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-btn:hover {
  background: orange;
  color: white;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* RESPONSIVE HEADER */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    background: #1f5d3b;
    position: absolute;
    top: 70px;
    right: 0;
    width: 200px;
    padding: 20px;
  }

  .nav-menu.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }
}

/* === BAGIAN LAIN TETAP === */
.container {
  display: flex;
  gap: 20px;
  padding: 20px;
  align-items: flex-start;
}

/* Sidebar kiri */
.sidebar {
  flex: 0 0 220px;
  background: white;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Sidebar kanan */
.sidebar-kanan {
  padding: 1rem;
  background-color: #f5f5f5;
}

.sidebar-kanan h3 {
  text-align: center;
  margin-bottom: 1rem;
  color: #2e7d32;
}

.galeri-grid {
  display: grid;
  grid-template-columns: repeat(1fr);
  gap: 1rem;
}

.foto-item {
  text-align: center;
  background-color: white;
  padding: 0.5rem;
  border-radius: 6px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

.foto-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

.foto-item p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

/* Konten utama */
.konten {
  flex: 1;
  min-width: 300px;
}

/* Tabel Populasi */
.tabel-populasi {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.tabel-populasi th {
  background: #2e8b57;
  color: white;
  padding: 10px;
  text-align: left;
}

.tabel-populasi td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.tabel-populasi tr:nth-child(even) {
  background: #f2f2f2;
}

/* Menu Desa */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
}

.menu-item img {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}

.menu-item span {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.menu-item:hover {
  background: #f0f0f0;
  transform: translateY(-3px);
}

/* Agenda & Komentar */
.agenda-box,
.komentar-box {
  background: white;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2e8b57, #1f5d3b);
    color: #fff;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
  }

  footer::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
      circle,
      rgba(255, 255, 255, 0.1),
      transparent 70%
    );
    animation: rotate 20s linear infinite;
    z-index: 0;
    pointer-events: none; /* ✅ FIX: animasi tidak blok klik */
  }

  @keyframes rotate {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }

  footer h2,
  footer p,
  .social-icons,
  .footer-links,
  .footer-bottom {
    position: relative;
    z-index: 1; /* konten di atas animasi */
  }

  footer h2 {
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-weight: 600;
  }

  footer p {
    margin: 5px 0 20px;
    font-size: 0.95rem;
    opacity: 0.9;
  }

  .social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
  }

  .social-icons a {
    color: #fff;
    font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
  }

  .social-icons a:hover {
    transform: scale(1.2);
    color: #ffd700;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
  }

  .footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
  }

  .footer-links a:hover {
    color: #ffd700;
  }

  .footer-bottom {
    font-size: 0.85rem;
    opacity: 0.7;
  }

  @media (max-width: 600px) {
    footer h2 {
      font-size: 1.5rem;
    }

    .social-icons a {
      font-size: 1.2rem;
    }
  }

/* Responsif Umum */
@media (max-width: 992px) {
  .container {
    flex-wrap: wrap;
  }
  .sidebar,
  .konten,
  .sidebar-kanan {
    flex: 1 1 100%;
  }
}

/* Statistik */
/* Statistik */
.stat-box {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  background: linear-gradient(to right, #f0fff4, #ffffff);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.stat-box h2 {
  font-size: 1.6rem;
  color: #2e8b57;
  margin-bottom: 20px;
  position: relative;
}

.stat-box h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #2e8b57;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* Lingkaran populasi */
.stat-circle {
  width: 160px;
  height: 160px;
  margin: 0 auto 15px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #2e8b57 0%, #3cb371 100%);
  color: white;
  font-weight: bold;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.stat-circle:hover {
  transform: scale(1.05);
}

/* Angka populasi */
.angka-populasi {
  font-size: 2.2rem;
  font-weight: bold;
  margin-top: 5px;
  color: #ffffff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Detail gender */
.stat-box p {
  font-size: 1rem;
  color: #555;
  margin-top: 10px;
}


/* Aparatur Desa */
.aparat {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.aparat img {
  border-radius: 5px;
  width: 100%;
  height: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* === Popup Identitas Desa === */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  transition: 0.3s;
  z-index: 1000;
}

.popup {
  position: fixed;
  top: 0;
  left: -400px;
  width: 350px;
  height: 100%;
  background: #f1f1f1;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
  transition: 0.3s;
  z-index: 1100;
  overflow-y: auto;
  border-radius: 0 10px 10px 0;
}

.popup-header {
  background: #2e8b57;
  padding: 15px;
  color: white;
  font-weight: bold;
  text-align: center;
  border-radius: 0 10px 0 0;
}

.popup-content {
  padding: 15px;
}

.popup-content p {
  margin: 10px 0;
}

.close-btn {
  display: block;
  margin: 20px auto;
  width: 30px;
  height: 30px;
  background: #2e8b57;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
}

/* Saat popup aktif */
.overlay.active {
  width: 100%;
}
.popup.active {
  left: 0;
}

/* === SLIDER APARATUR === */
.slider-container {
  position: relative;
  overflow: hidden;
  max-width: 275px;
  margin: 30px auto;
  border-radius: 10px;
}

.slider {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slider img {
  min-width: 100%;

  border-radius: 10px;
}

.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 24px;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
}

.prev { left: 10px; }
.next { right: 10px; }

.prev:hover, .next:hover {
  background: rgba(0, 0, 0, 0.8);
}
