/* ==========================================================================
   WEBSITE PESANTREN MAMBA'UL HIKMAH
   Tema Visual Elegan Terinspirasi: https://pesantrenaliman.or.id/
   Warna Utama: Deep Forest Green (#0f4a2e, #145c39, #1f7a4d) & Islamic Gold (#c8952f)
   Latar: Warm Cream (#fbf6ec, #faf7ef) & Hairline Borders (#e6e0d2)
   Tipografi: Display Serif 'Fraunces' + 'Plus Jakarta Sans' + 'Amiri'
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700;9..144,800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* --- 1. RESET & DESIGN TOKENS --- */
:root {
  /* Tipografi */
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Fraunces", "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", serif;
  --font-arabic: "Amiri", serif;

  /* Palet Warna Al-Iman */
  --color-brand: #1f7a4d;
  --color-brand-strong: #145c39;
  --color-brand-dark: #0f4a2e;
  --color-brand-teal: #163f2f;
  --color-brand-teal-mid: #123626;
  --color-brand-teal-deep: #0b2b1f;

  --color-gold: #c8952f;
  --color-gold-strong: #a5741e;
  --color-gold-soft: #f6e6c3;

  --color-ink: #1c2b22;
  --color-ink-soft: #4a564d;
  --color-muted: #7a7263;

  --color-cream: #fbf6ec;
  --color-mist: #d9e8d2;
  --color-white: #ffffff;
  --color-surface: #faf7ef;
  --color-surface-soft: #f5f0e3;
  --color-surface-feature: #e9f1e2;

  --color-hairline: #e6e0d2;
  --color-hairline-soft: #efe9db;
  --color-hairline-strong: #cec5ac;
  --color-hairline-dark: #24352b;

  --shadow-soft: 0 10px 30px rgba(20, 92, 57, 0.16);
  --shadow-card: 0 4px 14px rgba(28, 43, 34, 0.08);

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;

  --pattern-lattice: repeating-linear-gradient(45deg, rgba(31, 122, 77, 0.035) 0, rgba(31, 122, 77, 0.035) 1px, transparent 1px, transparent 26px), repeating-linear-gradient(-45deg, rgba(31, 122, 77, 0.035) 0, rgba(31, 122, 77, 0.035) 1px, transparent 1px, transparent 26px);

  /* Legacy aliases for backward compatibility */
  --primary-900: var(--color-brand-teal-deep);
  --primary-800: var(--color-brand-dark);
  --primary-700: var(--color-brand-strong);
  --primary-600: var(--color-brand);
  --primary-500: #2a9460;
  --primary-100: var(--color-mist);
  --primary-50:  var(--color-surface-feature);

  --gold-700: var(--color-gold-strong);
  --gold-600: var(--color-gold);
  --gold-500: #d4a23b;
  --gold-400: #e2b75a;
  --gold-100: var(--color-gold-soft);
  --gold-50:  #fdf9f0;

  --dark-900: var(--color-ink);
  --dark-800: var(--color-ink-soft);
  --dark-700: #3c4840;
  --light-bg: var(--color-surface);
  --white:    var(--color-white);

  /* Transisi */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-surface);
  color: var(--color-ink);
  line-height: 1.65;
  overflow-x: hidden;
  font-size: 16px;
  background-image: var(--pattern-lattice);
}

h1, h2, h3, .font-display, .font-serif {
  font-family: var(--font-display);
}


img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

ul {
  list-style: none;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* --- 2. HEADER & NAVIGASI TOP BAR --- */
.top-bar {
  background: var(--primary-900);
  color: var(--white);
  font-size: 0.825rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: none;
}

@media (min-width: 900px) {
  .top-bar {
    display: block;
  }
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left, .top-bar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.9;
}

.top-bar-item:hover {
  opacity: 1;
  color: var(--gold-400);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(6, 78, 59, 0.08);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
  padding: 0.2rem 0;
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.logo-badge {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary-800), var(--primary-600));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-400);
  box-shadow: 0 4px 10px rgba(6, 78, 59, 0.2);
  border: 1.5px solid rgba(251, 191, 36, 0.4);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-900);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand-text span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-600);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Menu Navigasi Desktop */
.nav-menu {
  display: none;
  align-items: center;
  gap: 1.8rem;
}

@media (min-width: 992px) {
  .nav-menu {
    display: flex;
  }
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark-700);
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-700);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2.5px;
  background: linear-gradient(90deg, var(--primary-600), var(--gold-500));
  border-radius: 2px;
  transition: width 0.25s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-psb-nav {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
  color: var(--white);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.2);
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

@media (min-width: 768px) {
  .btn-psb-nav {
    display: inline-flex;
  }
}

.btn-psb-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(6, 78, 59, 0.3);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
}

/* Tombol Toggle Menu Mobile */
.mobile-toggle-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  gap: 5px;
  transition: all 0.2s ease;
}

@media (min-width: 992px) {
  .mobile-toggle-btn {
    display: none;
  }
}

.mobile-toggle-btn span {
  display: block;
  width: 22px;
  height: 2.5px;
  background-color: var(--primary-800);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-toggle-btn.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.mobile-toggle-btn.open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle-btn.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Drawer Menu Mobile */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-drawer.active {
  opacity: 1;
  visibility: visible;
}

.drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 82%;
  max-width: 320px;
  height: 100%;
  background: var(--white);
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.5rem;
  overflow-y: auto;
}

.mobile-drawer.active .drawer-content {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 1.5rem;
}

.drawer-close {
  background: var(--gray-100);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--dark-800);
  cursor: pointer;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-links a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--dark-800);
  font-size: 1rem;
}

.drawer-links a:hover, .drawer-links a.active {
  background: var(--primary-50);
  color: var(--primary-700);
}

.drawer-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

/* --- 3. HERO SECTION (BAGIAN UTAMA ATAS) --- */
.hero-section {
  position: relative;
  background: radial-gradient(circle at 80% 20%, #064e3b 0%, #062e24 60%, #041f18 100%);
  color: var(--white);
  padding: 3.5rem 0 4.5rem;
  overflow: hidden;
}

@media (min-width: 992px) {
  .hero-section {
    padding: 5rem 0 6.5rem;
  }
}

/* Ornamen Geometris Islami Latar Belakang */
.hero-bg-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: radial-gradient(#d97706 1px, transparent 1px), radial-gradient(#ffffff 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  pointer-events: none;
}

.hero-glow-1 {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  bottom: -150px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

@media (min-width: 992px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-300, #fde68a);
  backdrop-filter: blur(8px);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (min-width: 1200px) {
  .hero-title {
    font-size: 3.4rem;
  }
}

.hero-title .highlight-gold {
  color: var(--gold-400);
  position: relative;
  display: inline-block;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #cbd5e1;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 580px;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.15rem;
  }
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

/* Tombol Reusable */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.btn-primary-gold {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #1e1b4b;
  color: #0f172a;
  box-shadow: var(--shadow-gold);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary-gold:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(217, 119, 6, 0.35);
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-green {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
  color: var(--white);
  box-shadow: 0 6px 15px rgba(6, 78, 59, 0.25);
}

.btn-green:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(6, 78, 59, 0.35);
}

/* Statistik Cepat di Bawah Hero */
.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 640px) {
  .hero-stats-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hero-stat-item h3 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold-400);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.hero-stat-item p {
  font-size: 0.82rem;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 600;
}

/* Hero Media Card */
.hero-media-wrapper {
  position: relative;
}

.hero-image-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 4px solid rgba(255, 255, 255, 0.12);
}

.hero-image-card img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

@media (min-width: 992px) {
  .hero-image-card img {
    height: 480px;
  }
}

.hero-image-card:hover img {
  transform: scale(1.03);
}

/* Floating Badge di atas Foto Hero */
.floating-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(251, 191, 36, 0.3);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.badge-icon {
  width: 42px;
  height: 42px;
  background: var(--gold-500);
  color: var(--dark-900);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.badge-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.badge-text p {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* --- 4. SECTION HEADING REUSABLE --- */
.section-padding {
  padding: 4.5rem 0;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 6rem 0;
  }
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-100);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary-900);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.35rem;
  }
}

.section-desc {
  font-size: 1.05rem;
  color: var(--gray-600);
  line-height: 1.65;
}

/* Bismillah Arabic Accent Header */
.arabic-bismillah {
  font-family: var(--font-arabic);
  font-size: 1.8rem;
  color: var(--gold-600);
  margin-bottom: 0.5rem;
  display: block;
}

/* --- 5. PROFIL PESANTREN SECTION --- */
.profil-section {
  background-color: var(--white);
  position: relative;
}

.profil-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 992px) {
  .profil-grid {
    grid-template-columns: 1fr 1.15fr;
    gap: 4rem;
  }
}

.profil-image-box {
  position: relative;
}

.profil-image-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 3px solid var(--primary-50);
}

.profil-image-card img {
  width: 100%;
  height: 440px;
  object-fit: cover;
}

.experience-badge {
  position: absolute;
  bottom: -20px;
  right: -10px;
  background: linear-gradient(135deg, var(--primary-800), var(--primary-900));
  color: var(--white);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gold-500);
  box-shadow: var(--shadow-xl);
  text-align: center;
}

@media (min-width: 640px) {
  .experience-badge {
    bottom: -20px;
    right: -20px;
  }
}

.experience-badge .exp-num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold-400);
  line-height: 1;
}

.experience-badge .exp-text {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.profil-content h3 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary-900);
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

.profil-quote {
  background: var(--primary-50);
  border-left: 4px solid var(--primary-600);
  padding: 1.1rem 1.4rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--primary-900);
  margin-bottom: 1.5rem;
  font-size: 0.98rem;
}

.profil-paragraphs {
  color: var(--gray-600);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pilar-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .pilar-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pilar-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--light-bg);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

.pilar-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary-100);
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
}

.pilar-text h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-900);
  margin-bottom: 0.15rem;
}

.pilar-text p {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.4;
}

/* --- 6. VISI & MISI SECTION --- */
.visi-misi-section {
  background: linear-gradient(180deg, #f8fafc 0%, #ecfdf5 100%);
  position: relative;
}

.vm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .vm-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.vm-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(6, 78, 59, 0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vm-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.vm-card-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.vm-icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
  flex-shrink: 0;
}

.vm-icon-visi {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
}

.vm-icon-misi {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
}

.vm-card-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-900);
}

.vm-card-header span {
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 600;
  display: block;
}

.visi-content-box {
  background: var(--gold-50);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--dark-900);
  line-height: 1.65;
  position: relative;
}

.visi-content-box::before {
  content: '“';
  font-family: Georgia, serif;
  font-size: 3.5rem;
  color: var(--gold-500);
  position: absolute;
  top: -10px;
  left: 12px;
  opacity: 0.3;
}

.misi-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.misi-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.misi-badge-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--primary-100);
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.misi-item p {
  color: var(--dark-800);
  font-size: 0.98rem;
  line-height: 1.55;
}

/* --- 7. PROGRAM PENDIDIKAN UNGGULAN --- */
.programs-section {
  background: var(--white);
}

.programs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

@media (min-width: 640px) {
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .programs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.program-card {
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.program-card:hover {
  background: var(--white);
  transform: translateY(-6px);
  border-color: var(--primary-300, #a7f3d0);
  box-shadow: var(--shadow-xl);
}

.program-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.35rem;
  font-size: 1.5rem;
  border: 1px solid var(--primary-200, #a7f3d0);
}

.program-card h4 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-900);
  margin-bottom: 0.75rem;
}

.program-card p {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.program-features {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.program-feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-800);
}

.program-feature-item svg {
  color: var(--gold-600);
}

/* Banner PSB Callout */
.psb-banner {
  margin-top: 4rem;
  background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.3);
  box-shadow: var(--shadow-xl);
}

@media (min-width: 900px) {
  .psb-banner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding: 3rem 3.5rem;
  }
}

.psb-banner-text h3 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  color: var(--gold-400);
}

.psb-banner-text p {
  font-size: 1rem;
  color: #cbd5e1;
  max-width: 600px;
}

.psb-banner-btn {
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .psb-banner-btn {
    margin-top: 0;
    flex-shrink: 0;
  }
}

/* --- 8. BERITA & WARTA PESANTREN --- */
.berita-section {
  background: var(--light-bg);
}

.berita-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .berita-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .berita-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.berita-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.berita-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.berita-img-wrapper {
  position: relative;
  height: 210px;
  overflow: hidden;
}

.berita-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.berita-card:hover .berita-img-wrapper img {
  transform: scale(1.06);
}

.berita-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary-700);
  color: var(--white);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.berita-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.berita-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
}

.berita-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-900);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.berita-card:hover .berita-title {
  color: var(--primary-600);
}

.berita-excerpt {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.berita-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-700);
}

/* --- 9. GALERI FOTO KEGIATAN & LIGHTBOX --- */
.galeri-section {
  background: var(--white);
}

.galeri-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background: var(--gray-100);
  color: var(--dark-700);
  border: 1px solid var(--gray-200);
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary-700);
  color: var(--white);
  border-color: var(--primary-700);
  box-shadow: 0 4px 10px rgba(4, 120, 87, 0.2);
}

.galeri-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .galeri-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .galeri-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.galeri-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: var(--gray-200);
}

.galeri-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.galeri-item:hover img {
  transform: scale(1.08);
}

.galeri-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6, 46, 36, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.galeri-item:hover .galeri-overlay {
  opacity: 1;
}

.galeri-caption h5 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.galeri-caption span {
  font-size: 0.8rem;
  color: var(--gold-400);
  font-weight: 600;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1.5rem;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-wrapper {
  max-width: 900px;
  width: 100%;
  text-align: center;
  position: relative;
}

.lightbox-img {
  max-height: 80vh;
  width: auto;
  max-width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  margin: 0 auto;
}

.lightbox-title {
  color: var(--white);
  margin-top: 1rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.lightbox-close-btn {
  position: absolute;
  top: -45px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Modal Baca Berita */
.news-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}

.news-modal.active {
  opacity: 1;
  visibility: visible;
}

.news-modal-content {
  background: var(--white);
  border-radius: var(--radius-xl);
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
  padding: 2rem;
}

.news-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: var(--gray-100);
  border: none;
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-800);
}

/* --- 10. KONTAK & LOKASI SECTION --- */
.kontak-section {
  background: linear-gradient(180deg, #ecfdf5 0%, #f8fafc 100%);
}

.kontak-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 992px) {
  .kontak-grid {
    grid-template-columns: 1fr 1.15fr;
  }
}

.kontak-info-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

.kontak-info-box h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-900);
  margin-bottom: 0.75rem;
}

.kontak-info-box p {
  color: var(--gray-600);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.kontak-card-items {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.kontak-card-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.kontak-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
  border: 1px solid var(--primary-100);
}

.kontak-detail h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark-900);
  margin-bottom: 0.2rem;
}

.kontak-detail p, .kontak-detail a {
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.5;
}

.kontak-detail a:hover {
  color: var(--primary-600);
}

/* Formulir Kirim Pesan */
.kontak-form-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

.kontak-form-box h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-900);
  margin-bottom: 0.5rem;
}

.kontak-form-box p {
  color: var(--gray-600);
  font-size: 0.92rem;
  margin-bottom: 1.75rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark-800);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gray-200);
  background: var(--light-bg);
  font-size: 0.95rem;
  color: var(--dark-900);
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-600);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

/* Peta Lokasi */
.map-container {
  margin-top: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 220px;
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- 11. FOOTER SECTION --- */
.footer {
  background: var(--primary-900);
  color: #cbd5e1;
  padding: 4.5rem 0 2rem;
  border-top: 2px solid var(--gold-600);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  }
}

.footer-brand h4 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: var(--gold-500);
  color: var(--dark-900);
  border-color: var(--gold-500);
  transform: translateY(-3px);
}

.footer-col h5 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--gold-500);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--gold-400);
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    text-align: left;
  }
}

/* --- 12. FLOATING WHATSAPP BUTTON (TOMBOL WA MELAYANG) --- */
.wa-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25d366;
  color: var(--white);
  width: 58px;
  height: 58px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
  z-index: 1500;
  transition: all 0.3s ease;
  border: 2px solid var(--white);
}

.wa-float-btn:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

.wa-tooltip {
  position: absolute;
  right: 68px;
  background: var(--dark-900);
  color: var(--white);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.25s ease;
  box-shadow: var(--shadow-md);
}

.wa-float-btn:hover .wa-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Quick Bottom Bar untuk Mobile (Tampilan App di HP) */
.mobile-bottom-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--gray-200);
  z-index: 999;
  justify-content: space-around;
  padding: 0.5rem 0;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
  .mobile-bottom-bar {
    display: none;
  }
}

.mobile-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--gray-600);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
}

.mobile-bottom-item.active, .mobile-bottom-item:hover {
  color: var(--primary-700);
}

.mobile-bottom-item svg {
  width: 20px;
  height: 20px;
}

/* Sesuaikan padding bawah body saat mobile agar tidak tertutup bottom bar */
@media (max-width: 767px) {
  body {
    padding-bottom: 60px;
  }
  .wa-float-btn {
    bottom: 74px;
    right: 18px;
    width: 52px;
    height: 52px;
  }
}

/* --- ANIMASI & EFEK HALUS --- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-element {
  animation: fadeIn 0.6s ease forwards;
}
