/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background-color: white;
  color: #333;
  line-height: 1.6;
}

/* === HEADER UMUM === */
header {
  background-color: #2e7d32;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  flex-wrap: wrap; /* penting untuk HP */
  gap: 10px;
}

header .logo-admin {
  width: 180px;
  height: auto;
  flex-shrink: 0; /* supaya tidak gepeng */
}

header .title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1; /* supaya judul bisa lebar di samping logo */
  min-width: 200px;
}

header .title h1 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 4px;
}

header .title h3 {
  font-size: 20px;
  margin-bottom: 2px;
}

header .title h4 {
  font-size: 18px;
  margin-bottom: 2px;
}

header .title p {
  font-size: 16px;
  font-style: italic;
  line-height: 1.4;
}

/* INFO CUACA DI HEADER */
header .info-cuaca {
  background-color: #e8f5e9;
  color: #2e7d32;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* === RESPONSIVE MOBILE === */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 10px;
    gap: 10px;
  }

  header .logo-admin {
    width: 150px;
  }

  header .title h1 {
    font-size: 20px;
  }

  header .title h3 {
    font-size: 18px;
  }

  header .title h4 {
    font-size: 16px;
  }

  header .title p {
    font-size: 14px;
  }

  header .info-cuaca {
    width: 100%;
    max-width: 140px;
    margin-top: 10px;
    font-size: 13px;
  }
}

/* HERO SECTION */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@700&display=swap");

.hero {
  position: relative;
  width: 100%;
  height: 500px; /* bisa diganti sesuai keinginan: 600px, 700px, 100vh */
  background: url("image/balaidesa.jpg") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-bottom: 4px solid #2e7d32;
}

.hero-overlay {
  color: #8b0000;
  padding: 50px;
  text-align: center;
  border-radius: 10px;
}

.hero-overlay1,
.hero-overlay2,
.hero-overlay3 {
  font-family: "Poppins", sans-serif;
  font-weight: 2000;
  text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff,
    1px 1px 0 #fff;
}

.hero-overlay1 {
  font-size: 40px;
  margin: 15px 0;
}

.hero-overlay2 {
  font-size: 24px;
  margin: 10px 0;
}

.hero-overlay3 {
  color: #00e600;
  font-size: 30px;
  margin-top: 20px;
}

/* KONTEN UTAMA */
.konten-utama {
  padding: 50px 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* MENU UTAMA */
.menu-utama {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 20px;
  padding: 0 50px;
  max-width: 100%;
}

.menu-header,
.menu-utama h3 {
  text-align: center;
  width: 100%;
  margin-bottom: 15px;
}

.menu-button {
  background-color: white;
  color: #2e7d32;
  text-decoration: none;
  padding: 20px;
  border-radius: 20px;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 120px;
  height: 90px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease;
}

.menu-button:hover {
  background-color: #bcf4c0;
}

.menu-button i {
  margin-bottom: 8px;
  font-size: 24px;
}

/* BERITA SLIDER */
.slider-berita {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px;
}

/* Setiap slide */
.slide {
  position: relative;
  min-width: 100%;
  max-width: 600px;
  scroll-snap-align: start;
}

.slide img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Caption di dalam gambar */
.caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  font-size: clamp(12px, 2.5vw, 16px);
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.caption:hover {
  background: rgba(99, 255, 151, 0.2);
  /* Lebih transparan */
  /* semi transparan agar teks terlihat */
}

/* Judul link seperti tombol */
.caption h4 a {
  display: inline-block;
  color: white;
  cursor: pointer;
  text-decoration: none;
  font-size: 20px;
  padding: 6px 12px;
  border-radius: 5px;
  text-decoration: none;
}

.caption h4 a:hover {
  color: yellow;
}

.meta i {
  margin-right: 5px;
}

.meta {
  color: yellow;
  font-size: 12px; /* atau pakai clamp jika ingin responsif */
  margin-top: 8px;
}

/* KARTU UMUM */
.card {
  background-color: whitesmoke;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.card h3 {
  color: #2e7d32;
  margin-bottom: 10px;
  text-align: center;
}

.card img {
  width: 100%;
  border-radius: 5px;
  margin-bottom: 10px;
}

/* APARAT DESA */
.aparat-desa {
  text-align: center;
}

.aparat-desa p strong {
  display: inline-block;
  width: 500px;
}

.aparat-desa p:nth-child(3) {
  color: green;
  font-weight: bold;
}

/* SLIDER APARAT DESA */
.slider-aparat {
  text-align: center;
  margin-bottom: 40px;
}

.aparat-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.aparat-slide-container {
  width: 280px;
  height: auto;
  min-height: 390px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.aparat-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  height: 100%;
  padding: 10px;
}

.aparat-slide.active {
  display: flex;
}

.aparat-slide img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 20px;
}

.aparat-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
}

.name-aparat {
  color: green;
  font-weight: bold;
  font-size: clamp(12px, 2vw, 16px);
  max-width: 200px;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.jabatan-aparat {
  background-color: rgba(255, 0, 0, 0.1);
  color: red;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.aparat-prev,
.aparat-next {
  background-color: rgba(0, 128, 0, 0.08);
  border: none;
  color: green;
  font-size: 30px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 50%;
}

.aparat-prev:hover,
.aparat-next:hover {
  background-color: rgba(0, 128, 0, 0.2);
}

.aparat-dots {
  margin-top: 15px;
}

.aparat-dots .dot {
  height: 10px;
  width: 10px;
  margin: 0 4px;
  background-color: #ccc;
  border-radius: 50%;
  display: inline-block;
}

.aparat-dots .dot.active {
  background-color: green;
}

/* PETA */
.peta-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* FOOTER */
footer {
  background-color: #2e7d32;
  color: white;
  text-align: center;
  padding: 10px 0;
}

.kartu-dua-kolom {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin: 20px 0;
}

/* Kartu kiri dan kanan */
.kartu-kiri {
  flex: 1 1 48%;
  background-color: whitesmoke;
  padding: 20px;
  border-radius: 15px;
  width: 100px;
  height: 300px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.kartu-kanan {
  flex: 1 1 48%;
  background-color: whitesmoke;
  padding: 20px;
  border-radius: 15px;
  width: 100px;
  height: 400px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Judul dalam kartu */
.kartu-kiri h3,
.kartu-kanan h3 {
  text-align: center;
  color: #2e7d32;
  margin-bottom: 15px;
}

/* Responsif di layar kecil */
@media (max-width: 768px) {
  .kartu-kiri,
  .kartu-kanan {
    flex: 1 1 100%;
  }
}
.menu-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.menu-button i {
  font-size: 24px;
  margin-bottom: 5px;
  color: #2e7d32;
}

@media (max-width: 1024px) {
  header,
  .title,
  .info-cuaca {
    text-align: center;
    flex-direction: column;
    align-items: center;
  }

  .kartu-dua-kolom {
    flex-direction: column;
  }

  .kartu-kiri,
  .kartu-kanan {
    width: 100%;
  }

  .bawah-konten {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
  }

  .aparat-wrapper {
    flex-direction: column;
  }

  .aparat-slide-container {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .aparat-slide {
    min-width: 250px;
    flex: 0 0 auto;
  }

  .aparat-prev,
  .aparat-next {
    position: static;
    margin: 10px;
  }

  .slider-berita img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .menu-utama {
    flex-direction: column;
    align-items: stretch;
  }

  .menu-button {
    width: 100%;
    justify-content: center;
  }

  .hero-overlay h1,
  .hero-overlay h2 {
    font-size: 1.5em;
  }

  .slider-berita .caption h4 {
    font-size: 1em;
  }

  .slider-berita .caption p {
    font-size: 0.9em;
  }

  .peta-desa iframe {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .logo-admin {
    width: 40px;
    height: 40px;
  }

  .hero-overlay1,
  .hero-overlay2,
  .hero-overlay3 {
    font-size: 1.2em !important;
  }

  .menu-button span {
    font-size: 0.9em;
  }

  .aparat-info h4,
  .aparat-info p {
    font-size: 0.85em;
  }

  .aparat-dots {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer p {
    font-size: 0.85em;
  }
}

/* Tambahan umum agar elemen tidak overflow */
img,
iframe,
video {
  max-width: 100%;
  height: auto;
}

/* Untuk .hero section agar responsif */
.hero {
  height: auto;
  min-height: 250px;
}

.hero-overlay1 {
  font-size: clamp(24px, 5vw, 40px);
}
.hero-overlay2 {
  font-size: clamp(18px, 4vw, 24px);
}
.hero-overlay3 {
  font-size: clamp(20px, 4vw, 30px);
}

/* Pastikan .menu-button menyesuaikan layar */
.menu-button {
  width: 100%;
  max-width: 140px;
  height: 90px;
  padding: 15px;
}

/* Judul kartu fleksibel */
.kartu-kiri,
.kartu-kanan {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 250px;
}

/* Responsive Grid jika perlu 2 kolom */
@media (min-width: 600px) {
  .kartu-dua-kolom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

/* Untuk slider aparat agar horizontal scroll di mobile */
@media (max-width: 768px) {
  .aparat-wrapper {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .aparat-slide-container {
    flex: 0 0 80%;
    scroll-snap-align: center;
  }

  .aparat-slide {
    min-width: 100%;
  }
}

/* Caption pada slider berita */
.caption {
  .image-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: auto;
  }

  .responsive-img {
    width: 100%;
    height: auto;
    display: block;
  }

  .caption {
    position: absolute;
    bottom: 0; /* caption muncul di bawah gambar */
    left: 0;
    right: 0;
    font-size: clamp(12px, 3vw, 16px);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.5); /* opsional: biar caption terlihat jelas */
    color: white;
    text-align: center;
  }
}

/* Hero padding responsif */
.hero-overlay {
  padding: 20px;
}

/* Untuk judul adaptif */
.title h2 {
  font-size: clamp(16px, 3vw, 24px);
  text-align: center;
}

/* Tombol slider aparat agar tidak terlalu besar di mobile */
.aparat-prev,
.aparat-next {
  font-size: clamp(20px, 5vw, 30px);
  padding: 8px;
}
