/* ===== CSS VARIABLES ===== */
:root {
  --green-dark: #1a4a2e;
  --green-mid: #2d7a4f;
  --green-light: #4caf78;
  --gold: #c9a84c;
  --gold-light: #e8c96a;
  --gold-pale: #f5e9c4;
  --white: #ffffff;
  --cream: #faf8f3;
  --gray-light: #f0ede6;
  --gray: #888;
  --text-dark: #1a2a1e;
  --text-mid: #3a4a3e;
  --shadow: 0 4px 24px rgba(26,74,46,0.10);
  --shadow-gold: 0 2px 16px rgba(201,168,76,0.18);
  --radius: 14px;
  --radius-sm: 8px;
  --transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lora', 'Georgia', serif;
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

bar status
.stats-bar {
  background: var(--white);
  padding: 2.5rem 1.5rem;
  box-shadow: 0 -4px 40px rgba(0,0,0,0.08);
}

.stats-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 12px;
  background: #f8faf8;
  transition: 0.3s;
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-number {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.stat-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-dark);
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.4;
}
/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', 'Georgia', serif;
  color: var(--green-dark);
  line-height: 1.2;
}
p { line-height: 1.8; color: var(--text-mid); }
a { text-decoration: none; color: inherit; }

/* ===== NAVBAR ===== */
.navbar {
  background: linear-gradient(135deg, var(--green-dark) 0%, #0f2e1b 100%);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 72px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 50%;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.1;
}
.brand-sub {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 0.55rem 1.1rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem;
  font-family: 'Lora', serif;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(201,168,76,0.15);
  color: var(--gold-light);
  border-color: rgba(201,168,76,0.3);
}
.nav-links a.active {
  background: linear-gradient(135deg, rgba(201,168,76,0.25), rgba(201,168,76,0.1));
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold-light);
  border-radius: 2px;
  transition: var(--transition);
}
.welcome-image img {
  width: 400px;
  height: auto;
  border-radius: 20px;
}
@media (max-width: 768px) {
  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== PAGE HERO ===== */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 60%, #1a5a35 100%);
  padding: 4.5rem 2rem 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.07'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.page-hero h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 0.6rem;
  position: relative;
}
.page-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}
.hero-ornament {
  color: var(--gold);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  position: relative;
  letter-spacing: 0.5em;
  opacity: 0.8;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201,168,76,0.12);
  transition: var(--transition);
}
.card:hover {
  box-shadow: 0 8px 36px rgba(26,74,46,0.13);
  transform: translateY(-2px);
}
.card-gold {
  border-left: 4px solid var(--gold);
}
.section-label {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--green-dark);
  margin-bottom: 1.1rem;
}
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2rem 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.divider span { color: var(--gold); font-size: 1.2rem; }

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.25rem; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold-pale);
  color: var(--green-dark);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 20px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ===== GALLERY ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery-item {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/3;
  position: relative;
  cursor: pointer;
}
.gallery-item img, .gallery-item .gallery-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-placeholder {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  gap: 0.5rem;
}
.gallery-placeholder span { font-size: 2rem; }
.gallery-item:hover .gallery-placeholder { transform: scale(1.05); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(26,74,46,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  color: white;
  font-size: 0.85rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ===== WHATSAPP BUTTON ===== */
.wa-button {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 999;
  transition: var(--transition);
  animation: waPulse 2.5s infinite;
}
.wa-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
}
.wa-button svg { width: 30px; height: 30px; fill: white; }
@keyframes waPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 30px rgba(37,211,102,0.7); }
}
.wa-tooltip {
  position: absolute;
  right: 68px;
  background: var(--green-dark);
  color: white;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.wa-button:hover .wa-tooltip { opacity: 1; }

/* ===== FOOTER ===== */
footer {
  background: linear-gradient(135deg, var(--green-dark) 0%, #0f2e1b 100%);
  color: rgba(255,255,255,0.8);
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  color: var(--gold-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a {
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--gold-light); }
.footer-col p { font-size: 0.875rem; color: rgba(255,255,255,0.6); line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
.footer-brand {
  color: var(--gold-light);
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

/* ===== PAGE TRANSITION ===== */
.page-fade {
  animation: pageFadeIn 0.45s ease both;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== HIGHLIGHT BOX ===== */
.highlight-box {
  background: linear-gradient(135deg, var(--gold-pale), rgba(201,168,76,0.08));
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
}
.highlight-box h3 { color: var(--green-dark); margin-bottom: 0.5rem; }
.highlight-box p { color: var(--text-mid); font-style: italic; }

/* ===== LIST ITEMS ===== */
.styled-list { list-style: none; }
.styled-list li {
  padding: 0.6rem 0;
  padding-left: 1.75rem;
  position: relative;
  color: var(--text-mid);
  border-bottom: 1px dashed rgba(201,168,76,0.2);
}
.styled-list li:last-child { border-bottom: none; }
.styled-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.65rem;
  top: 0.85rem;
}

/* ===== PROGRAM CARDS ===== */
.program-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
  transition: var(--transition);
  text-align: center;
}
.program-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(26,74,46,0.15);
}
.program-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1rem;
}
.program-card h3 { font-size: 1rem; color: var(--green-dark); margin-bottom: 0.5rem; }
.program-card p { font-size: 0.85rem; color: var(--gray); }

/* ===== INFO TABLE ===== */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--gray-light); }
.info-table tr:last-child { border-bottom: none; }
.info-table td { padding: 0.85rem 1rem; font-size: 0.9rem; vertical-align: top; }
.info-table td:first-child {
  width: 40%;
  color: var(--text-mid);
  font-weight: 600;
}
.info-table td:last-child { color: var(--text-dark); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--green-dark);
    padding: 1rem;
    gap: 0.25rem;
    border-top: 1px solid rgba(201,168,76,0.2);
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .navbar-inner { position: relative; }
  .main-content { padding: 2rem 1rem 3rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-hero { padding: 3rem 1rem 2.5rem; }
}


/* ==============================================
   HALAMAN LEGALITAS
   ============================================== */

.legal-section {
  margin-bottom: 2.5rem;
}

/* Baris identitas pesantren + stempel */
.stamp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: start;
}

/* Kartu legalitas */
.legal-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(201,168,76,0.2);
  overflow: hidden;
  transition: var(--transition);
}
.legal-card:hover {
  box-shadow: 0 8px 36px rgba(26,74,46,0.13);
  transform: translateY(-2px);
}
.legal-card-head {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.legal-card-head h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.15rem;
}
.legal-card-head span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
}
.legal-icon {
  width: 46px;
  height: 46px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Baris info dalam kartu */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid rgba(201,168,76,0.1);
}
.info-row:last-child { border-bottom: none; }
.info-key {
  font-size: 0.82rem;
  color: var(--text-mid);
  font-weight: 600;
  flex: 1;
}
.info-val {
  font-size: 0.82rem;
  color: var(--text-dark);
  flex: 1.5;
  text-align: right;
}

/* Badge status aktif */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #a5d6a7;
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Kotak stempel */
.stamp-box {
  background: linear-gradient(135deg, rgba(201,168,76,0.07), rgba(201,168,76,0.02));
  border: 2px dashed rgba(201,168,76,0.38);
  border-radius: var(--radius);
  padding: 2.25rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-gold);
}
.stamp-seal {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: radial-gradient(circle, rgba(201,168,76,0.12), transparent);
  position: relative;
}
.stamp-seal::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px dashed rgba(201,168,76,0.3);
}
.stamp-sym {
  font-size: 2.4rem;
  line-height: 1;
  display: block;
}
.stamp-word {
  font-size: 0.52rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.22em;
  margin-top: 2px;
  display: block;
}
.stamp-box h3 {
  font-size: 1.05rem;
  color: var(--green-dark);
  margin-bottom: 0.5rem;
}
.stamp-box p {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.7;
}

/* Grid nomor registrasi */
.num-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}
.num-cell {
  background: var(--white);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.num-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(26,74,46,0.12);
}
.num-cell::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-dark), var(--gold));
}
.num-full { grid-column: 1 / -1; }
.num-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.num-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.1;
  word-break: break-all;
}
.num-sub {
  font-size: 0.7rem;
  color: var(--gray);
  margin-top: 0.35rem;
}
.num-icon {
  position: absolute;
  bottom: 0.8rem;
  right: 0.9rem;
  font-size: 1.6rem;
  opacity: 0.08;
}

@media (max-width: 768px) {
  .stamp-row { grid-template-columns: 1fr; }
  .num-grid { grid-template-columns: 1fr; }
  .num-full { grid-column: 1; }
  .info-row { padding: 0.75rem 1.1rem; }
  .legal-card-head { padding: 1rem 1.1rem; }
}
