/* === GLOBAL === */
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: 5px;
}

/* === 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: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 15px;
}

.menu-item {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.menu-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #e6f5ea;
}

.menu-item img {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}

.menu-item span {
  font-size: 14px;
  font-weight: bold;
}

/* === KONTEN UTAMA === */
.konten {
  flex: 1;
  min-width: 300px;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.konten img.gambar {
  width: 100%;
  max-width: 500px;
  display: block;
  margin: 0 auto 20px;
  border-radius: 10px;
}

/* === 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;
}


/* === 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);
}

/* === POPUP IDENTITAS === */
.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;
}

/* === FOOTER === */
/* ===== 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;
    }
  }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  main.container {
    flex-direction: column;
  }

  .sidebar {
    flex: 1 1 100%;
  }

  .konten {
    flex: 1 1 100%;
  }

  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
