body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

h1, h2, h3 {
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
}

/* === HEADER === */
header {
  background: linear-gradient(to right, #2e8b57, #3cb371);
  color: white;
  text-align: center;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.logo {
  width: 100px;
  border-radius: flex;
  margin-bottom: 10px;
}

/* === NAVIGASI === */
nav {
  background: #006400;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0 15px;
}

nav a {
  color: white;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 5px;
  transition: background 0.3s;
}

nav a:hover {
  background-color: #228b22;
}

/* === LAYOUT UTAMA === */
main.container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
}

/* 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 */
.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 */


/* 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 */
@media (max-width: 992px) {
  .container {
    flex-wrap: wrap;
  }
  .sidebar,
  .konten,
  .sidebar-kanan {
    flex: 1 1 100%;
  }
}

/* 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);
}

.pemerintah-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

.pejabat {
  text-align: center;
  max-width: 200px;
}

.pejabat img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.pejabat h3 {
  margin: 0.5rem 0 0.2rem;
  font-size: 1.1rem;
}

.pejabat p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
}

.tanggal {
  text-align: center;
  margin-top: 2rem;
  font-style: italic;
  color: #777;
}


/* === 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;
}

.map-container {
  text-align: center;
  margin-top: 2rem;
}

.map-container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.map-caption {
  margin-top: 1rem;
  font-size: 1rem;
  color: #555;
}

.map-source {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #777;
}

.map-source a {
  color: #2e7d32;
  text-decoration: none;
}

.map-source a:hover {
  text-decoration: underline;
}

/* ss */

.map-wrapper {
  text-align: center; /* agar konten di tengah */
  margin: 20px 0;     /* beri jarak atas-bawah */
}

.map-wrapper iframe {
  display: inline-block; /* supaya bisa disejajarkan dengan text-align */
  max-width: 100%;       /* responsive di layar kecil */
  height: 450px;
}

.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);
}