/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

:target {
  scroll-margin-top: 90px;
}

/* ================= BODY ================= */
body {
  margin-top: 90px;
  background: #f9f9f9;
  color: #333;
}

/* ================= HEADER ================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #28a745;
  color: #fff;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: background 0.3s ease;
}

/* Logo dan judul */
header .logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

header .logo img {
  height: 55px;
  border-radius: 5px;
}

header .judul h1 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

header .judul p {
  font-size: 12px;
  opacity: 0.9;
}

/* ================= NAVIGATION ================= */
nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 15px;
}

nav ul li {
  position: relative;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 5px;
  display: block;
  transition: background 0.3s, transform 0.2s;
}

nav ul li a:hover {
  background: #1f8027;
  transform: translateY(-2px);
}

/* ================= DROPDOWN ================= */
.dropdown-content,
.dropdown-subcontent {
  display: none;
  position: absolute;
  background: #28a745;
  border-radius: 6px;
  z-index: 999;
  min-width: 220px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.dropdown-content li a,
.dropdown-subcontent li a {
  padding: 10px 15px;
  display: block;
  color: #fff;
}

.dropdown-content li a:hover,
.dropdown-subcontent li a:hover {
  background: #1f8027;
}

/* Dropdown utama muncul ke bawah */
.dropdown:hover > .dropdown-content {
  display: block;
  top: 100%;
  left: 0;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Submenu muncul ke kanan */
.dropdown-content li.dropdown:hover > .dropdown-subcontent {
  display: block;
  top: 0;
  left: 100%;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

/* ================= HAMBURGER ================= */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  transition: transform 0.3s ease;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animasi rotasi hamburger */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ================= RESPONSIVE NAV ================= */
@media (max-width: 768px) {
  nav ul {
    display: none;
    position: absolute;
    top: 75px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: #28a745;
    padding: 10px 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s ease;
  }

  nav ul.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  nav ul li {
    text-align: center;
  }

  .hamburger {
    display: flex;
  }

  /* dropdown mobile */
  .dropdown-content,
  .dropdown-subcontent {
    position: static;
    display: none;
    background: #1f8027;
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .dropdown.active > .dropdown-content {
    display: block;
  }
}

/* ================= HERO ================= */
.hero {
  background: url('hero.jpg') center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 120px 20px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #28a745;
}

.hero h2 {
  position: relative;
  z-index: 1;
  font-size: 32px;
  animation: fadeInUp 1s ease forwards;
}

/* ================= CONTENT ================= */
main.content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
}

main .text {
  flex: 1;
}

main .text h3 {
  color: #28a745;
  margin-bottom: 10px;
}

main .text p {
  margin-bottom: 15px;
  text-align: justify;
}

main .image img {
  width: 380px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: transform 0.4s ease;
}

main .image img:hover {
  transform: scale(1.05);
}

/* ================= FOOTER ================= */
footer {
  background: #28a745;
  color: #fff;
  text-align: center;
  padding: 15px;
  margin-top: 40px;
  font-size: 14px;
}

/* ================= ANIMASI ================= */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: 0.8s ease all;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==== 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;
}