/* =========================================
   1. VARIABLES & RESET
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --green-700: #05623a;
  /* Hijau Gelap Solid */
  --green-600: #0b8a4a;
  /* Hijau Utama Solid */
  --green-500: #0f9d58;
  --green-300: #34b27b;
  --gold-300: #ffd27f;
  --bg: #f7fbf8;
  --surface: rgba(11, 138, 74, 0.1);
  --on-green: #eefbf0;
  --text: #0b2f20;
  --muted: #6b7d6f;
  --radius: 10px;
  --transition: 250ms cubic-bezier(0.2, 0.9, 0.2, 1);

  --header-height: 75px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  padding-top: var(--header-height);
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   2. STICKY HEADER (FIXED SOLID - TIDAK TRANSPARAN)
   ========================================= */

/* =========================================
   2. STICKY HEADER (SOLID - TIDAK TRANSPARAN)
   ========================================= */

.header-sticky {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100%;
  z-index: 9999;

  /* PERBAIKAN: Background HEX Solid (TANPA Alpha/Transparansi) */
  background: #05623a;
  /* Hijau Gelap Solid Penuh */

  /* Pastikan tidak ada efek blur yang membuatnya terlihat transparan */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;

  /* Box shadow standar (tidak transparan) */
  box-shadow: 0 4px 20px rgba(3, 30, 20, 0.4);

  height: var(--header-height) !important;
  display: flex;
  align-items: center;

}

.navbar-custom {
  color: var(--on-green);
  width: 100%;
  height: 100%;
  padding: 0 2rem;
  position: relative;
  display: flex;
  align-items: center;
}

/* =========================================
   3. BRAND & LOGO
   ========================================= */

.navbar-custom .navbar-brand {
  position: absolute;
  top: 50%;
  left: 2rem;
  transform: translateY(-50%);

  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin: 0;
  z-index: 10;
  max-width: 40%;
}

.navbar-custom .navbar-brand img {
  height: 44px;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.navbar-custom .navbar-brand:active img {
  transform: scale(0.95);
}

.navbar-custom .navbar-brand span {
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  white-space: nowrap;
  font-size: clamp(0.75rem, 1.5vw + 0.4rem, 1.2rem);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================
   4. NAV LINKS (RATA KANAN)
   ========================================= */

.navbar-custom .navbar-nav {
  position: absolute;
  top: 50%;
  right: 2.5rem;
  transform: translateY(-50%);

  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 5;
  width: auto;
  margin: 0;
  padding: 0;
}

.navbar-custom .nav-link {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 0;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
  position: relative;
  white-space: nowrap;
  cursor: pointer;
  outline: none;
}

.navbar-custom .nav-link:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0, 241, 161, 0.979);
}

.navbar-custom .nav-link:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

.navbar-custom .nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gold-300);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
  box-shadow: 0 2px 4px rgba(255, 210, 127, 0.5);
}

.navbar-custom .nav-link:hover::after {
  width: 100%;
}

/* =========================================
   5. TOGGLER
   ========================================= */

.navbar-custom .navbar-toggler {
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);

  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  z-index: 20;
  transition: all 0.2s ease;
}

.navbar-custom .navbar-toggler:active {
  transform: translateY(-50%) scale(0.9);
  background: rgba(255, 255, 255, 0.25);
}

.navbar-custom .navbar-toggler-icon {
  width: 20px;
  height: 20px;
  filter: invert(1) brightness(200%);
}

/* =========================================
   6. DROPDOWN
   ========================================= */

.navbar-custom .dropdown-menu {
  background: #ffffff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(5, 98, 55, 0.15);
  padding: 0.5rem 0;
  min-width: 200px;
  z-index: 10002;
  font-size: 0.9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  position: absolute;
  /* pastikan overlay */
  top: calc(100% + 8px);
  left: 0;
}

.navbar-custom .dropdown-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Jika script menambahkan kelas `open` pada parent, atau untuk hover desktop */
.navbar-custom .dropdown.open>.dropdown-menu,
.navbar-custom .dropdown:hover>.dropdown-menu {
  opacity: 1;

  /* Smooth scrolling and offset for sticky header */
  html {
    scroll-behavior: smooth;
  }

  transform: translateY(0);

  section,
  [id] {
    scroll-margin-top: calc(var(--header-height) + 12px);
  }

  pointer-events: auto;
}

/* Pastikan parent dropdown dapat menjadi reference untuk posisi absolut */
.navbar-custom .dropdown {
  position: relative;
}

.navbar-custom .dropdown-item {
  color: var(--text);
  padding: 0.7rem 1.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item:focus {
  background: #f0f9f4;
  color: var(--green-700);
  padding-left: 1.8rem;
}

.navbar-custom .dropdown-item:active {
  background: var(--green-600);
  color: #fff;
}

/* =========================================
   6.5. Tombol Daftar
   ========================================= */
.daftar {
  cursor: pointer;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  inset: 0;
  padding: 0;
  line-height: 1;
  overflow: hidden;
}

.daftar::before {
  position: absolute;
  content: '';
  /* top: 0;
    left: 0; */
  width: 100%;
  height: 100%;
  border-radius: 5px;
  box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, .5);
  background: linear-gradient(90deg, #006400, rgba(0, 255, 0, 0.9), #006400);
  background-size: 300%;
  background-attachment: fixed;
  z-index: 0;
  animation: glow 7s linear infinite;
}

.daftar::after {
  position: absolute;
  content: '';
  top: 0;
  left: 0;
  inset: 0;
  transform: scaleX(0);
  border-radius: 5px;
  background: linear-gradient(45deg, #00f, #0ff);
  background-size: 200%;
  background-attachment: fixed;
  z-index: 1;
  transition: all 0.9s;
  transform-origin: left;
}

.daftar:hover::before {
  box-shadow: -10px 8px 30px 1px rgba(0, 0, 255, 0.4), 8px -5px 50px 1px rgba(0, 255, 255, 0.4);
}

.daftar:hover::after {
  transform: scaleX(1);
}

@keyframes glow {
  0% {
    background-position: 0%;
  }

  100% {
    background-position: 300%;
  }
}

.daftar span {
  position: relative;
  padding: .8rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 2px;
  z-index: 2;
}

/* =========================================
   7. RESPONSIVE MOBILE
   ========================================= */

@media (max-width: 991.98px) {
  .navbar-custom .navbar-nav {
    display: none;
  }

  .navbar-custom .navbar-collapse {
    background: #ffffff;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 16px 16px;
    z-index: 9997;
    display: none;
    transform-origin: top;
    animation: slideDown 0.3s ease forwards;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .navbar-custom .navbar-collapse.show {
    display: block;
  }

  .navbar-custom .navbar-collapse .navbar-nav {
    display: flex;
    flex-direction: column;
    position: static;
    transform: none;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 100%;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .navbar-custom .navbar-collapse .nav-link {
    width: 100%;
    display: block;
    padding: 12px 15px;
    font-size: 1rem;
    text-align: left;
    color: var(--text);
    border-radius: 8px;
  }

  .navbar-custom .navbar-collapse .nav-link:hover {
    background: #f0f9f4;
    color: var(--green-700);
    text-shadow: none;
  }

  .navbar-custom .navbar-collapse .nav-link::after {
    display: none;
  }

  .navbar-custom .dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    background: #f9f9f9;
    margin: 0;
    padding-left: 15px;
    border: none;
    display: none;
    opacity: 1;
    transform: none;
  }

  .navbar-custom .dropdown-menu.show {
    display: block;
  }

  .navbar-custom .dropdown-item {
    color: var(--muted);
    padding: 10px 0;
  }

  .navbar-custom .dropdown-item:hover {
    color: var(--green-600);
    padding-left: 10px;
    background: transparent;
  }

  .navbar-custom .navbar-brand {
    left: 1.5rem;
    max-width: calc(100% - 60px);
  }

  .navbar-custom .navbar-brand img {
    height: 38px;
  }

  .navbar-custom .navbar-brand span {
    font-size: clamp(0.85rem, 3.5vw, 1rem);
  }

  .navbar-custom .navbar-toggler {
    right: 1.5rem;
    width: 44px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
  }
}

/* =========================================
   8. HERO & CONTENT BECGROUND HALAMAN
   ========================================= */

.beranda-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 60px 0;
  width: 100%;
  overflow: hidden;
}

/* BACKGROUND FOTO  */
.beranda-hero::before {
  content: "";
  position: fixed;
  top: 75px;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("/assets/img/bgg.webp");
  background-size: cover;
  background-position: center;
  z-index: -2;
}

/* OVERLAY GRADIENT */
.beranda-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  height: 100%;
  bottom: 0;
}

body p .muted,
body p .text-lead {
  color: #ffffff;
}

.beranda-hero>.container {
  position: relative;
  z-index: 1;
}

.card-modern {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-modern:active {
  transform: scale(0.99);
}

.display-5 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #0c0b0b;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.lead {
  font-size: 1.1rem;
  color: #0a0a0a;
  margin-bottom: 1.5rem;
}

.hero-underline {
  display: inline-block;
  height: 6px;
  width: 90px;
  background: linear-gradient(90deg, var(--green-500), var(--gold-300));
  border-radius: 4px;
  margin-bottom: 1.5rem;
}

.btn-modern {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(90deg, var(--green-500), var(--green-600));
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(5, 98, 55, 0.3);
  transition: all 0.3s ease;
  width: 100%;
  font-size: 15px;
}

.btn-modern:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(5, 98, 55, 0.4);
}

.btn-modern:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 5px 15px rgba(5, 98, 55, 0.3);
}


/* =========================================
   9. KEGIATAN (HALAMAN KONTEN KHUSUS)
   ========================================= */

.kegiatan-card {
  padding: 75px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 255, 250, 0.98));
  border: 1px solid rgba(5, 98, 55, 0.06);
}

.kegiatan-img {
  width: 100%;
  height: auto;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(4, 60, 35, 0.08);
  border: 1px solid rgba(11, 138, 74, 0.06);
}

.kegiatan-title {
  color: var(--green-700);
  font-size: clamp(1.05rem, 2.8vw, 1.4rem);
  margin-bottom: 0.6rem;
  font-weight: 600;
}

/* =========================================
   10. LEMBAGA - GAYA UMUM (MTS / MISRIU / MQ)
   ========================================= */

.page-lembaga {
  --primary: var(--green-600);
  --primary-dark: var(--green-700);
}

.page-lembaga .lembaga-header {
  background: #ffffff;
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(5, 98, 55, 0.06);
  margin-top: 24px;
}

.page-lembaga .lembaga-header h1 {
  color: var(--primary-dark);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  margin: 0 0 6px 0;
  font-weight: 700;
}

.page-lembaga .lembaga-header p {
  color: #4f715f;
  margin: 0;
}

.page-lembaga .lembaga-card {
  background: linear-gradient(180deg, #ffffff, #fbfff9);
  border: 1px solid rgba(11, 138, 74, 0.06);
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(5, 98, 55, 0.06);
}

.page-lembaga .lembaga-card h4,
.page-lembaga .lembaga-card h3,
.page-lembaga .lembaga-card h5 {
  color: var(--primary);
  margin-top: 0;
}

.page-lembaga .lembaga-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(5, 98, 55, 0.08);
}

.page-lembaga .lembaga-galeri {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.page-lembaga .lembaga-galeri:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(5, 98, 55, 0.12);
}

.page-lembaga ul {
  color: #546f5d;
}

.page-lembaga .lead {
  color: #547662;
}

.page-lembaga .meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #6b8a74;
  font-size: 0.95rem;
}

.page-lembaga .badge-primary {
  background: var(--primary);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.page-lembaga .cta {
  display: inline-block;
  padding: 10px 18px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(5, 98, 55, 0.12);
}

@media (max-width: 767px) {
  .page-lembaga .lembaga-img {
    height: 220px;
  }

  .page-lembaga .lembaga-header {
    margin-top: 12px;
    padding: 18px;
  }
}

/* for variants where image is on the right */


@media (max-width: 767.98px) {
  .kegiatan-card {
    padding: 1rem;
  }

  .kegiatan-title {
    font-size: 1.05rem;
  }
}


