/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* Body */
body {
  margin-top: 70px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #28a745;
  padding: 10px 20px;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

header .logo {
  display: flex;
  align-items: center;
}

header .logo img {
  width: 50px;
  margin-right: 10px;
}

header .judul h1 {
  font-size: 16px;
  margin-bottom: 4px;
}

header .judul p {
  font-size: 12px;
}

nav ul {
  list-style: none;
  display: flex;
}

nav ul li {
  margin: 0 10px;
}

nav ul li a {
  text-decoration: none;
  color: white;
  font-weight: bold;
}

.dropdown {
  position: relative;
  display: flex;
  align-items: center;
}
.dropdown-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 12px;
  margin-left: 5px;
  cursor: pointer;
}
.dropdown-content, .dropdown-subcontent {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #28a745;
  min-width: 180px;
  z-index: 1000;
}
.dropdown-content li a, .dropdown-subcontent li a {
  display: block;
  padding: 10px;
  color: white;
  text-decoration: none;
}
.dropdown-content li a:hover, .dropdown-subcontent li a:hover {
  background: #1f8027;
}
.dropdown-content.show, .dropdown-subcontent.show {
  display: block;
}

.search { margin-left: 15px; font-size: 18px; cursor: pointer; }

/* Hero */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 20px;
}
.hero-logo { width: 350px; margin-bottom: 15px; }
.hero-text { max-width: 60%; text-align: center; }
.hero-text h2 { font-size: 22px; margin-bottom: 15px; }
.hero-text p { margin-bottom: 20px; }
.buttons .btn {
  display: inline-block;
  background: #28a745;
  color: white;
  padding: 10px 20px;
  margin-right: 10px;
  border-radius: 20px;
  text-decoration: none;
  transition: transform 0.3s ease, background 0.3s ease;
}
.buttons .btn:hover {
  transform: scale(1.1);
  background: #1f8027;
}
.hero-img {
  width: 800px; height: 650px;
  background: url("pic1.jpg") no-repeat center center;
  background-size: contain;
  border-radius: 5px;
}

/* Informasi */
.informasi { padding: 30px 20px; }
.informasi h3 {
  margin-bottom: 15px;
  border-bottom: 1px solid #000;
  display: inline-block;
}
.cards { display: flex; gap: 20px; margin-top: 15px; }
.card { text-align: center; flex: 1; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-10px); box-shadow: 0 6px 15px rgba(0,0,0,0.2); }
.card-img { width: 100%; height: 80px; background: #ddd; margin-bottom: 10px; }

/* Pegawai */
.pegawai { text-align: center; margin: 40px 0; }
.pegawai h3 { color: #28a745; font-weight: bold; display: inline-block; padding: 10px 30px; border: 2px solid #28a745; border-radius: 50px; margin-bottom: 20px; }
.pegawai-container { position: relative; overflow: hidden; padding: 20px 40px; }
.pegawai-list { display: grid; grid-auto-flow: column; gap: 20px; overflow-x: auto; scroll-behavior: smooth; width: 100%; }
.pegawai-card {
  width: 200px; text-align: center;
  border-radius: 10px; background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pegawai-card:hover { transform: translateY(-8px); box-shadow: 0 6px 15px rgba(0,0,0,0.2); }
.pegawai-card img { width: 100%; border-radius: 10px; }
.scroll-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: #28a745; color: #fff; border: none; font-size: 20px;
  padding: 8px 12px; border-radius: 50%; cursor: pointer; z-index: 10;
}
.scroll-btn.left { left: 5px; }
.scroll-btn.right { right: 5px; }

/* Kalender */
.kalender { text-align: center; margin: 40px 0; }
.kalender h3 { font-size: 24px; font-weight: bold; margin-bottom: 10px; }
.kalender p { font-size: 16px; color: #1d6d3a; font-weight: bold; margin-bottom: 20px; }
.kalender-google { display: flex; justify-content: center; margin-top: 20px; }
.kalender-google iframe { width: 100%; max-width: 1200px; height: 800px; border-radius: 10px; }

/* Footer */
footer { background: #eee; padding: 20px; }
.footer-content { display: flex; justify-content: center; align-items: flex-start; gap: 40px; margin-top: 20px; }
.footer-content iframe, .footer-content img { width: 600px; height: 450px; border-radius: 8px; }
.sosmed { text-align: center; }
.sosmed .icons img { width: 30px; height: auto; }
.sosmed .icons { margin-top: 10px; }
.sosmed span { margin: 0 10px; cursor: pointer; }

/* Animasi Scroll Reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: all 1s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Animasi Hero */
.hero-text h2 { animation: slideInDown 1s ease forwards; }
.hero-text p { animation: fadeIn 2s ease forwards; }
.hero-logo { animation: zoomIn 1.5s ease forwards; }
@keyframes slideInDown { from { opacity: 0; transform: translateY(-50px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* Biar klik link gak ketutup header */
/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Biar klik link (#id) tidak ketutup header */
:target {
  scroll-margin-top: 90px; /* sesuaikan dengan tinggi header */
}

/* Diagram */
.diagram {
  text-align: center;
  margin: 40px 0;
  font-family: 'Poppins', sans-serif; /* font utama untuk judul & teks */
}

.diagram h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #2c3e50;
  letter-spacing: 1px;
}

.diagram p {
  font-size: 16px;
  color: #1d6d3a;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif; /* biar berbeda dengan judul */
  margin-bottom: 20px;
}

.diagram-container {
  display: flex;
  justify-content: center;
}

.diagram-container canvas {
  width: 100%;
  max-width: 900px;
}

/* Styling khusus untuk chart */
.chartjs-render-monitor {
  font-family: 'Poppins', sans-serif !important; /* angka & label di chart */
}

/* Dropdown hover */
.dropdown:hover > .dropdown-content {
  display: block;
}

/* Submenu hover */
.dropdown-content li.dropdown:hover > .dropdown-subcontent {
  display: block;
  left: 120px;
  top: 0;
}

/* Buang style tombol panah */
.dropdown-toggle {
  display: none;
}

/* Dropdown langsung di navbar */
nav ul > li.dropdown:hover > .dropdown-subcontent {
  display: block;
  top: 100%;
  left: 0;
}

/* Submenu dalam dropdown (turun ke bawah, bukan ke samping) */
.dropdown-subcontent li.dropdown:hover > .dropdown-subcontent {
  display: block;
  position: absolute;
  top: 100%;  /* turun ke bawah dari parent */
  left: 0;    /* sejajar kiri dengan parent */
}

/* ==== PERBAIKAN SUBMENU FORM NIKAH ==== */

/* Biar semua submenu (termasuk Form Nikah) turun ke bawah */
.dropdown-content li.dropdown:hover > .dropdown-subcontent {
  display: block;
  position: absolute;
  top: 100%;   /* muncul di bawah tombol utama */
  left: 0;     /* sejajar kiri */
}

/* Supaya tampilan submenu tetap rapi dan tidak terlalu mepet */
.dropdown-subcontent {
  background: #28a745;
  padding: 5px 0;
  min-width: 200px;
  border-radius: 5px;
}

/* Biar item di submenu lebih enak dibaca */
.dropdown-subcontent li a {
  padding: 10px 15px;
  display: block;
  color: #fff;
  text-decoration: none;
}

.dropdown-subcontent li a:hover {
  background: #1f8027;
}

/* ================= RESPONSIVE DESIGN ================= */

/* Tablet (max-width: 992px) */
@media (max-width: 992px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 20px;
  }

  header .judul h1 {
    font-size: 14px;
  }

  header .judul p {
    font-size: 11px;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-img {
    width: 90%;
    height: 400px;
    margin-top: 20px;
    background-size: contain;
  }

  .cards {
    flex-wrap: wrap;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
  }

  .footer-content iframe,
  .footer-content img {
    width: 90%;
    height: 350px;
  }

  .kalender-google iframe {
    width: 95%;
    height: 600px;
  }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
    background: #28a745;
    padding: 10px 0;
  }

  nav ul li {
    margin: 8px 0;
  }

  .dropdown-content,
  .dropdown-subcontent {
    position: static;
    box-shadow: none;
    width: 100%;
  }

  .dropdown-content li a,
  .dropdown-subcontent li a {
    text-align: center;
    padding: 10px;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .hero-img {
    width: 100%;
    height: 300px;
    background-size: cover;
  }

  .hero-text h2 {
    font-size: 18px;
  }

  .hero-text p {
    font-size: 14px;
  }

  .buttons .btn {
    padding: 8px 16px;
    margin: 5px;
    font-size: 14px;
  }

  .cards {
    flex-direction: column;
    align-items: center;
  }

  .pegawai-list {
    grid-auto-flow: row;
    justify-content: center;
  }

  .pegawai-card {
    width: 80%;
    margin: 10px 0;
  }

  .scroll-btn {
    display: none; /* tombol panah disembunyikan di HP */
  }

  .kalender-google iframe {
    width: 100%;
    height: 500px;
  }

  footer {
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
  }

  .footer-content iframe,
  .footer-content img {
    width: 100%;
    height: 300px;
  }
}

/* Extra small (max-width: 480px) */
@media (max-width: 480px) {
  header .logo img {
    width: 40px;
  }

  header .judul h1 {
    font-size: 13px;
  }

  header .judul p {
    font-size: 10px;
  }

  .hero-text h2 {
    font-size: 16px;
  }

  .hero-text p {
    font-size: 13px;
  }

  .pegawai-card {
    width: 90%;
  }

  .kalender h3 {
    font-size: 20px;
  }

  .kalender p {
    font-size: 14px;
  }
}

/* ================= HAMBURGER MENU ================= */
.menu-toggle {
  position: absolute;
  top: 18px;
  right: 25px;
  width: 35px;
  height: 25px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1100;
}

.menu-toggle span {
  display: block;
  height: 4px;
  width: 100%;
  background: #fff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Animasi garis jadi tanda X */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
  header {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .menu-toggle {
    display: flex;
  }

  nav {
    width: 100%;
    display: none;
    background: #28a745;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    position: absolute;
    top: 70px;
    left: 0;
    border-top: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(-15px);
    transition: all 0.4s ease;
  }

  nav.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  nav ul {
    flex-direction: column;
    width: 100%;
    align-items: center;
  }

  nav ul li {
    margin: 10px 0;
    text-align: center;
    width: 100%;
  }

  nav ul li a {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 16px;
  }

  /* Dropdown untuk mode mobile */
  .dropdown-content {
    position: static;
    background: rgba(255,255,255,0.1);
    width: 100%;
    display: none;
    flex-direction: column;
  }

  .dropdown:hover > .dropdown-content {
    display: flex;
  }

  .dropdown-content li {
    width: 100%;
  }

  .dropdown-content li a {
    font-size: 15px;
    padding: 8px 0;
  }

  main {
    padding-top: 120px;
  }
}

/* ================= EXTRA RESPONSIVE ================= */
@media (max-width: 600px) {
  header .judul h1 {
    font-size: 14px;
  }

  header .judul p {
    font-size: 11px;
  }

  .hero-img {
    width: 100%;
    height: auto;
  }

  .hero-text h2 {
    font-size: 20px;
  }

  .hero-text p {
    font-size: 14px;
  }
}
