/* Palet Warna */
:root {
  --hijau-tua: #1e3d2c;
  --hijau-sedang: #43a047;
  --kuning-emas: #fdd835;
  --krem: #f0f8f0;
  --abu-lembut: #f8f9fa;
  --putih-transparan: rgba(255, 255, 255, 0.95);
}

/* --- Pengaturan Dasar dan Tipografi --- */
body {
  font-family: "Poppins", sans-serif;
  background-color: var(--krem);
  color: var(--hijau-tua);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--hijau-tua);
  letter-spacing: -0.5px;
}

p {
  color: #555;
}

.section {
  padding: 100px 0;
  position: relative;
}

/* --- Judul Section Modern --- */
.section-title {
  font-size: 2.8rem;
  margin-bottom: 0.8rem;
  font-weight: 800;
  color: var(--hijau-tua);
  text-align: center;
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  border-radius: 10px;
  background-color: #b0b0b0; /* abu-abu */
  box-shadow: 0 2px 8px rgba(69, 74, 70, 0.3);
}

.section-subtitle {
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 4rem;
  text-align: center;
  opacity: 0.9;
}

/* --- Navbar Transparan dengan Efek Blur --- */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1030;
  transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  padding: 1.2rem 0;
  background-color: transparent !important;
  backdrop-filter: blur(0px);
}

.navbar.scrolled {
  background-color: rgba(30, 61, 44, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.8rem 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1 rem;
  color: var(--kuning-emas) !important;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: #ffffff !important;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  position: relative;
  letter-spacing: 0.5px;
}

.navbar-nav .nav-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 30px;
  height: 3px;
  background-color: var(--kuning-emas);
  border-radius: 2px;
  transition: transform 0.3s ease, width 0.3s ease;
}

.navbar-nav .nav-link:hover::before {
  transform: translateX(-50%) scale(1);
  width: 60px;
}

.navbar-toggler {
  border-color: var(--kuning-emas);
  border-width: 2px;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(253, 216, 53, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-logo {
  height: 45px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.hero-section {
  background: url("photo/navbar/1.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 200px 0 140px 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

/* Efek blur + transparan pada background */
.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  backdrop-filter: blur(1.5px); /* tingkat blur */
  background-color: rgba(0, 0, 0, 0.25); /* lapisan transparan gelap */
  z-index: 0;
}

/* Overlay radial transparan di tengah */
.hero-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(253, 216, 53, 0.1),
    transparent 60%
  );
  pointer-events: none;
  z-index: 1;
}

/* Supaya konten teks tetap di atas overlay */
.hero-section > * {
  position: relative;
  z-index: 2;
}

/* Judul utama */
.hero-section h1 {
  font-size: 3.8rem;
  color: var(--kuning-emas);
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  margin-bottom: 1.2rem;
  animation: fadeInUp 1s ease;
}

/* Animasi fade in */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-section p {
  font-size: 1.3rem;
  max-width: 800px;
  margin: 1rem auto 2.5rem;
  color: var(--putih-transparan);
  animation: fadeInUp 1s ease 0.3s both;
}

.hero-section .btn-primary {
  background-color: var(--kuning-emas);
  border: 2px solid var(--kuning-emas);
  color: var(--hijau-tua);
  font-weight: 600;
  padding: 14px 36px;
  border-radius: 60px;
  transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  font-size: 1.1rem;
}

.hero-section .btn-primary:hover {
  background-color: var(--hijau-tua);
  color: var(--kuning-emas);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border-color: var(--kuning-emas);
}

/* --- Tentang Kami --- */
#tentang-kami {
  background-color: #fff;
}

.about-text h4 {
  font-weight: 700;
  color: var(--hijau-sedang);
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-text h4::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: var(--kuning-emas);
  border-radius: 50%;
}

.about-img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
  transition: all 0.5s ease;
  border: 3px solid var(--krem);
}

.about-img:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  border-color: var(--hijau-sedang);
}

/* --- Statistik Box di Tentang Kami --- */
.stats-box {
  border-left: 5px solid var(--hijau-sedang);
  background-color: var(--krem);
  border-radius: 15px;
}

.stats-box h6 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.stats-box p {
  color: var(--hijau-tua);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0;
}

.stat-icon {
  background-color: rgba(67, 160, 71, 0.1);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto;
}

/* --- Profil Singkat Pondok Pesantren --- */
.profile-box {
  background-color: rgba(255, 255, 255, 0.95);
  border-left: 5px solid var(--hijau-sedang);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  margin-top: 2rem;
}

.icon-wrapper {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(67, 160, 71, 0.1);
  margin: 0 auto 10px;
  transition: transform 0.3s ease;
}

.icon-wrapper:hover {
  transform: scale(1.1);
}

.profile-box h5 {
  color: var(--hijau-tua);
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.profile-box h6 {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--hijau-tua);
}

.profile-box p {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0;
  color: var(--hijau-tua);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.profile-box p.animate {
  opacity: 1;
}

/* --- Styling untuk Misi dengan Ikon Ceklis --- */
.about-text ul {
  padding-left: 1.5rem;
  margin-bottom: 0;
}

.about-text li {
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.about-text li .bi {
  font-size: 1.2rem;
  color: rgb(26, 147, 26);
  margin-top: 2px;
}

/* --- Program Unggulan --- */
.program-item {
  background: white;
  border-radius: 20px;
  padding: 2.2rem 1.8rem;
  transition: all 0.4s ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.program-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--hijau-sedang));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.program-item:hover::before {
  transform: scaleX(1);
}

.program-item:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.program-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  background-color: var(--kuning-emas);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  transition: all 0.4s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.program-icon-wrapper i {
  font-size: 2.5rem;
  color: var(--hijau-tua);
}

.program-item:hover .program-icon-wrapper {
  background-color: var(--hijau-sedang);
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.program-item h5 {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--hijau-tua);
  font-size: 1.2rem;
}

/* --- Fasilitas --- */
.facility-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  height: 300px;
  transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.facility-card:hover {
  transform: scale(1.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.facility-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.facility-card:hover img {
  transform: scale(1.15);
}

.facility-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(30, 61, 44, 0.9), transparent);
  color: white;
  padding: 30px 25px;
  transform: translateY(30px);
  opacity: 0;
  transition: all 0.4s ease;
}

.facility-card:hover .facility-caption {
  transform: translateY(0);
  opacity: 1;
}

.facility-caption h5 {
  color: white;
  margin: 0;
  font-weight: 600;
  font-size: 1.3rem;
}

/* --- Galeri Carousel --- */
.carousel-inner {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.carousel-indicators {
  bottom: 20px;
}

.carousel-indicators button {
  background-color: var(--hijau-sedang) !important;
  opacity: 0.6;
  border-radius: 10px;
  height: 8px;
  transition: all 0.3s ease;
}

.carousel-indicators button.active {
  opacity: 1;
  width: 30px;
  background-color: var(--kuning-emas) !important;
}

.carousel-control-prev,
.carousel-control-next {
  width: 6%;
  opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(30, 61, 44, 0.7);
  border-radius: 50%;
  padding: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.carousel-control-prev-icon:hover,
.carousel-control-next-icon:hover {
  background-color: var(--hijau-sedang);
  transform: scale(1.1);
}

.carousel-img {
  height: 500px;
  object-fit: cover;
  border-radius: 20px;
}

/* --- Modal Galeri --- */
#galleryModal .modal-body {
  background-color: var(--hijau-tua);
  padding: 0;
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

#galleryModal .btn-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
}

#galleryModal .btn-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

#galleryModal .btn-close::before,
#galleryModal .btn-close::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  background: white;
  transform: rotate(45deg);
}

#galleryModal .btn-close::after {
  transform: rotate(-45deg);
}

#galleryModal img.img-fluid {
  border-radius: inherit;
  transition: transform 0.5s ease;
}

#galleryModal img.img-fluid:hover {
  transform: scale(1.05);
}

.modal-description-wrapper {
  background: rgba(0, 0, 0, 0.7);
  padding: 20px;
  color: var(--putih-transparan);
  text-align: center;
}

#modalDescription {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: rgb(218, 203, 203);
}

/* --- Footer Modern --- */
.footer {
  background-color: var(--hijau-tua);
  color: #ccc;
  padding: 80px 0 30px 0;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--hijau-sedang),
    transparent
  );
}

.footer-logo {
  max-width: 180px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.footer-title {
  font-weight: 700;
  color: var(--kuning-emas);
  margin-bottom: 1.2rem;
  font-size: 1.2rem;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1.2rem;
  transition: transform 0.2s ease;
}

.footer-contact-list li:hover {
  transform: translateX(5px);
}

.footer-contact-list .bi {
  font-size: 1.3rem;
  color: var(--kuning-emas);
  margin-top: 3px;
}

.footer a {
  color: #a5d6a7;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
}

.footer a:hover {
  color: #fff;
  transform: scale(1.05);
}

.social-icons .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--kuning-emas);
  font-size: 1.4rem;
  margin: 0 8px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.social-icons .social-icon:hover {
  background-color: var(--kuning-emas);
  color: var(--hijau-tua);
  transform: translateY(-6px) scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.footer-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: 50px 0 20px;
}

.copyright-text p {
  margin: 5px 0 0;
  font-size: 0.9rem;
  color: #a5d6a7;
  opacity: 0.8;
}

/* --- Animasi Fade In Modern --- */
.animasi-fade-in {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.9s ease-out,
    transform 0.9s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.animasi-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Media Queries --- */
@media (max-width: 992px) {
  .hero-section {
    padding: 160px 0 100px;
  }
  .hero-section h1 {
    font-size: 3rem;
  }
  .section-title {
    font-size: 2.4rem;
  }
  .about-img {
    margin-bottom: 2rem;
  }
  .carousel-img {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.5rem;
  }
  .hero-section {
    padding: 140px 0 80px;
  }
  .hero-section h1 {
    font-size: 2.4rem;
  }
  .hero-section p {
    font-size: 1.1rem;
  }
  .section {
    padding: 70px 0;
  }
  .footer-logo,
  .footer-title,
  .social-icons {
    text-align: center;
  }
  .footer-contact-list {
    display: inline-block;
    text-align: left;
    margin: 0 auto;
  }
  .social-icons {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .section-title {
    font-size: 2rem;
  }
  .program-item {
    padding: 1.8rem 1.2rem;
  }
  .carousel-img {
    height: 300px;
  }
}
