/* ============================================================
       CSS VARIABLES — EARTH WARM #07
    ============================================================ */
:root {
  --color-primary: #7d5a3c;
  --color-secondary: #a07850;
  --color-accent: #4caf7d;
  --color-bg: #fffdf9;
  --color-surface: #fdf3e7;
  --color-text: #2e1f0f;
  --color-text-muted: #7a6248;
  --font-heading: "Merriweather", serif;
  --font-body: "Open Sans", sans-serif;
}

/* ============================================================
       RESET & BASE
    ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.8;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}
.arabic-text {
  font-family: "Traditional Arabic", "Scheherazade New", Georgia, serif;
  direction: rtl;
}

/* ============================================================
       UTILITY
    ============================================================ */
.section {
  padding: 80px 0;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.bg-surface {
  background: var(--color-surface);
}
.bg-bg {
  background: var(--color-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
  font-weight: 600;
  background: rgba(76, 175, 125, 0.1);
  padding: 4px 14px;
  border-radius: 4px;
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}
.section-header p {
  color: var(--color-text-muted);
  margin-top: 12px;
  font-size: 0.95rem;
}

/* ============================================================
       BUTTONS
    ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: #3d9668;
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(76, 175, 125, 0.35);
}
.btn-primary:active {
  transform: scale(0.97);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 253, 249, 0.5);
}
.btn-outline:hover {
  background: rgba(255, 253, 249, 0.12);
  transform: scale(1.03);
}

/* ============================================================
       SCROLL ANIMATIONS
    ============================================================ */
.animate {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}
.animate.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-left {
  opacity: 0;
  transform: translateX(-36px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}
.animate-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
       NAVBAR
    ============================================================ */
nav#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 14px 0;
  transition: all 0.35s ease;
  background: linear-gradient(180deg, rgba(46, 31, 15, 0.55) 0%, rgba(46, 31, 15, 0.15) 70%, transparent 100%);
}
nav#navbar.scrolled {
  background: var(--color-surface);
  box-shadow: 0 2px 20px rgba(125, 90, 60, 0.15);
  padding: 10px 0;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
}
nav#navbar.scrolled .nav-brand {
  color: var(--color-text);
}
.nav-logo {
  width: 44px;
  height: 44px;
  background: var(--color-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #fffdf9;
  font-size: 1rem;
  flex-shrink: 0;
}
.nav-name-block {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.nav-school-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}
.nav-arabic-tagline {
  font-size: 0.78rem;
  color: var(--color-accent);
  letter-spacing: 0.5px;
  font-family: "Traditional Arabic", Georgia, serif;
}
.nav-menu {
  display: flex;
  gap: 2px;
  align-items: center;
}
.nav-menu a {
  color: rgba(255, 253, 249, 0.85);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 11px;
  border-radius: 4px;
  transition: all 0.2s;
  position: relative;
}
.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 11px;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}
.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: calc(100% - 22px);
}
.nav-menu a:hover,
.nav-menu a.active {
  color: #fff;
}
nav#navbar.scrolled .nav-menu a {
  color: var(--color-text-muted);
}
nav#navbar.scrolled .nav-menu a:hover,
nav#navbar.scrolled .nav-menu a.active {
  color: var(--color-primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}
nav#navbar.scrolled .nav-toggle span {
  background: var(--color-text);
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(125, 90, 60, 0.15);
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-menu a {
    color: var(--color-text-muted);
    width: 100%;
  }
  .nav-menu a:hover,
  .nav-menu a.active {
    color: var(--color-primary);
  }
  .nav-school-name {
    font-size: 0.88rem;
  }
}

/* ============================================================
       NILAI BAR — Islamic Values Ticker
    ============================================================ */
#nilai-bar {
  background: var(--color-primary);
  height: 44px;
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 999;
  margin-top: 72px; /* navbar height */
}
.nilai-ticker-wrapper {
  width: 100%;
  overflow: hidden;
}
.nilai-ticker-inner {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: tickerScroll 25s linear infinite;
}
.nilai-ticker-inner:hover {
  animation-play-state: paused;
}
.nilai-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 32px;
  color: rgba(255, 253, 249, 0.9);
  font-size: 0.82rem;
}
.nilai-arabic {
  font-size: 1.05rem;
  color: var(--color-accent);
  font-family: "Traditional Arabic", Georgia, serif;
}
.nilai-latin {
  font-weight: 600;
  color: #fff;
}
.nilai-meaning {
  color: rgba(255, 253, 249, 0.6);
  font-style: italic;
}
.nilai-separator {
  color: var(--color-accent);
  opacity: 0.7;
  font-size: 0.75rem;
}

@keyframes tickerScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ============================================================
       HERO — Islamic Geometric Pattern
    ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.9s ease;
  z-index: 0;
}
.hero-slide.active {
  opacity: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(46, 31, 15, 0.78) 0%, rgba(46, 31, 15, 0.6) 50%, rgba(46, 31, 15, 0.85) 100%);
  z-index: 1;
}
.hero-geometric-pattern {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.hero-geometric-pattern svg {
  width: 100%;
  height: 100%;
  opacity: 0.06;
}
.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  padding: 0 24px;
  color: #fffdf9;
}
.hero-bismillah {
  display: block;
  font-size: 1.15rem;
  color: var(--color-accent);
  margin-bottom: 16px;
  font-family: "Traditional Arabic", Georgia, serif;
  letter-spacing: 2px;
  animation: fadeInDown 0.8s ease forwards;
  opacity: 0;
  animation-delay: 0.2s;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  font-weight: 700;
  color: #fffdf9;
  line-height: 1.2;
  margin-bottom: 16px;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  animation-delay: 0.4s;
}
.hero-tagline {
  font-size: 1rem;
  color: rgba(255, 253, 249, 0.8);
  margin-bottom: 8px;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  animation-delay: 0.6s;
}
.hero-tagline-arabic {
  font-size: 1.25rem;
  color: var(--color-accent);
  font-family: "Traditional Arabic", Georgia, serif;
  margin-bottom: 4px;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  animation-delay: 0.7s;
}
.hero-tagline-trans {
  font-size: 0.82rem;
  color: rgba(255, 253, 249, 0.5);
  font-style: italic;
  margin-bottom: 36px;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  animation-delay: 0.8s;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  animation-delay: 1s;
}
.hero-ornament {
  position: absolute;
  bottom: 110px;
  pointer-events: none;
  opacity: 0.18;
  z-index: 3;
}
.hero-ornament-left {
  left: 24px;
}
.hero-ornament-right {
  right: 24px;
  transform: scaleX(-1);
}
.hero-controls {
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero-prev,
.hero-next {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 253, 249, 0.4);
  background: transparent;
  color: #fffdf9;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.9rem;
}
.hero-prev:hover,
.hero-next:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.hero-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 253, 249, 0.4);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}
.hero-dot.active {
  background: var(--color-accent);
  width: 20px;
}
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  pointer-events: none;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
       BATCH 2–5 PLACEHOLDERS (will be filled)
    ============================================================ */

/* === TENTANG === */
.tentang-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}
.tentang-history h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: 14px;
}
.tentang-history p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.85;
  margin-bottom: 14px;
}
.tentang-history .hijriah-note {
  display: inline-block;
  background: rgba(125, 90, 60, 0.1);
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.vision-mission {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.vm-card {
  background: #fff;
  border: 1px solid #e8d5b7;
  border-radius: 8px;
  padding: 24px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.vm-card .vm-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
}
.vm-card.visi .vm-icon {
  background: rgba(76, 175, 125, 0.12);
  color: var(--color-accent);
}
.vm-card.misi .vm-icon {
  background: rgba(125, 90, 60, 0.1);
  color: var(--color-primary);
}
.vm-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 8px;
}
.vm-card p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

.principal-section {
  background: var(--color-primary);
  padding: 72px 0;
}
.principal-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 64px;
  align-items: center;
}
.principal-photo-col {
  flex-shrink: 0;
  text-align: center;
}
.principal-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  object-position: top;
  border: 4px solid var(--color-accent);
  border-radius: 8px;
}
.principal-name {
  font-family: var(--font-heading);
  color: #fffdf9;
  font-size: 1rem;
  margin-top: 12px;
}
.principal-title {
  font-size: 0.82rem;
  color: rgba(255, 253, 249, 0.65);
  margin-top: 4px;
}
.principal-sanad {
  display: inline-block;
  background: rgba(76, 175, 125, 0.2);
  color: var(--color-accent);
  border: 1px solid rgba(76, 175, 125, 0.3);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 4px;
  margin-top: 8px;
}
.principal-quote-col {
  flex: 1;
}
.principal-bismillah {
  font-size: 1.8rem;
  color: var(--color-accent);
  font-family: "Traditional Arabic", Georgia, serif;
  display: block;
  margin-bottom: 16px;
  opacity: 0.75;
}
.principal-quote {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-style: italic;
  color: rgba(255, 253, 249, 0.9);
  line-height: 1.75;
  margin-bottom: 20px;
}
.principal-accent-line {
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* === STATISTIK === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat-card {
  background: #fff;
  border: 1px solid #e8d5b7;
  border-top: 4px solid var(--color-accent);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(125, 90, 60, 0.12);
}
.stat-icon {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.accreditation-badge {
  text-align: center;
  margin-top: 40px;
  padding: 24px 36px;
  border: 2px solid #e8d5b7;
  border-radius: 8px;
  display: inline-block;
  background: #fff;
}
.accreditation-badge .stars {
  color: #d4a000;
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.accreditation-badge .grade {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-primary);
  font-weight: 700;
}
.accreditation-badge .by {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 4px;
}
.stats-badge-wrap {
  text-align: center;
  margin-top: 40px;
}

/* === PROGRAM === */
.programs-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.program-card-horizontal {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #e8d5b7;
  border-radius: 8px;
  padding: 24px;
  transition: all 0.3s;
  cursor: default;
  border-left: 1px solid #e8d5b7;
}
.program-card-horizontal:hover {
  border-left: 4px solid var(--color-accent);
  box-shadow: 0 4px 20px rgba(125, 90, 60, 0.1);
  transform: translateY(-2px);
}
.prog-icon {
  width: 64px;
  height: 64px;
  background: var(--color-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.prog-icon i {
  font-size: 1.6rem;
  color: #fffdf9;
}
.prog-body h3 {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  margin-bottom: 8px;
  color: var(--color-text);
}
.prog-body p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

.facilities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
}
.facility-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}
.facility-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.facility-card:hover img {
  transform: scale(1.04);
}
.facility-caption {
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  background: #fff;
  border: 1px solid #e8d5b7;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

/* === STRUKTUR ORG === */
.org-chart {
  overflow-x: auto;
}
.org-tree {
  display: flex;
  justify-content: center;
  padding: 20px 0;
  min-width: 700px;
}
.org-node-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.org-node {
  padding: 12px 20px;
  border-radius: 6px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 160px;
  border: 2px solid var(--color-secondary);
}
.org-node.root {
  background: var(--color-primary);
  color: #fffdf9;
  border-color: var(--color-primary);
}
.org-node .node-name {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  display: block;
  margin-bottom: 3px;
}
.org-node .node-role {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-weight: 400;
}
.org-node.root .node-role {
  color: rgba(255, 253, 249, 0.65);
}
.org-connector-down {
  width: 2px;
  height: 32px;
  background: var(--color-secondary);
  margin: 0 auto;
}
.org-children {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
}
.org-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.org-children-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
  margin-top: 0;
}
.org-connector-h {
  height: 2px;
  background: var(--color-secondary);
  position: relative;
}
.org-branch-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === ASATIDZ === */
.asatidz-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.asatidz-card {
  background: #fff;
  border: 1px solid #e8d5b7;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: default;
  border-left: 1px solid #e8d5b7;
}
.asatidz-card:hover {
  border-left: 5px solid var(--color-accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(125, 90, 60, 0.12);
}
.asatidz-photo {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  object-position: top;
}
.asatidz-body {
  padding: 16px;
}
.asatidz-name {
  font-family: var(--font-heading);
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}
.asatidz-subject {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 8px;
}
.asatidz-specialty {
  display: inline-block;
  background: rgba(76, 175, 125, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(76, 175, 125, 0.3);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 4px;
}

/* === KESISWAAN TAB === */
.tab-nav {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 2px solid #e8d5b7;
  margin-bottom: 32px;
}
.tab-separator {
  color: #c4a882;
  padding: 0 8px;
  font-size: 0.85rem;
}
.tab-btn {
  padding: 12px 20px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text-muted);
  position: relative;
  transition: color 0.2s;
}
.tab-btn::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.tab-btn.active {
  color: var(--color-primary);
}
.tab-btn.active::after {
  transform: scaleX(1);
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}
.tab-panel.fade-in {
  animation: tabFadeIn 0.3s ease;
}
@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tab-card {
  background: #fff;
  border: 1px solid #e8d5b7;
  border-radius: 8px;
  padding: 22px;
}
.tab-card i {
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-bottom: 10px;
}
.tab-card h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 6px;
}
.tab-card p {
  font-size: 0.83rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* === ACCORDION PRESTASI === */
.accordion-item {
  border: 1px solid #e8d5b7;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #fff;
}
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  background: var(--color-surface);
  user-select: none;
  transition: background 0.2s;
}
.accordion-header:hover {
  background: #f5e8d0;
}
.accordion-item.open .accordion-header {
  background: var(--color-primary);
  color: #fffdf9;
}
.accordion-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.accordion-year {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
}
.accordion-badge {
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 4px;
}
.accordion-item.open .accordion-badge {
  background: rgba(76, 175, 125, 0.25);
  color: var(--color-accent);
}
.accordion-arrow {
  transition: transform 0.3s ease;
  font-size: 0.9rem;
}
.accordion-item.open .accordion-arrow {
  transform: rotate(180deg);
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.accordion-item.open .accordion-body {
  max-height: 600px;
}
.accordion-content {
  padding: 20px 24px;
}
.prestasi-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0e4d0;
}
.prestasi-item:last-child {
  border-bottom: none;
}
.prestasi-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.level-nasional .prestasi-icon {
  background: rgba(246, 196, 14, 0.15);
  color: #d4a000;
}
.level-provinsi .prestasi-icon {
  background: rgba(160, 160, 160, 0.15);
  color: #888;
}
.level-kota .prestasi-icon {
  background: rgba(180, 100, 40, 0.15);
  color: #b46428;
}
.prestasi-title {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.95rem;
}
.prestasi-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* === BERITA === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
.news-card {
  background: #fff;
  border: 1px solid #e8d5b7;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(125, 90, 60, 0.1);
}
.news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.news-body {
  padding: 18px;
}
.news-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.news-body h3 {
  font-family: var(--font-heading);
  font-size: 0.97rem;
  color: var(--color-text);
  margin-bottom: 10px;
  line-height: 1.45;
}
.news-body p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}
.news-link {
  font-size: 0.82rem;
  color: var(--color-accent);
  font-weight: 600;
}
.news-link:hover {
  text-decoration: underline;
}

.berita-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.announcements h3,
.calendar-section h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8d5b7;
}
.announcement-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0e4d0;
}
.announcement-item:last-child {
  border-bottom: none;
}
.announcement-item i {
  color: var(--color-secondary);
  font-size: 0.95rem;
  margin-top: 3px;
  flex-shrink: 0;
}
.ann-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 3px;
  background: #e74c3c;
  color: #fff;
  margin-left: 8px;
  vertical-align: middle;
}
.ann-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
}
.ann-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.calendar-table th {
  background: var(--color-primary);
  color: #fffdf9;
  padding: 10px 12px;
  text-align: left;
  font-size: 0.78rem;
}
.calendar-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0e4d0;
  color: var(--color-text);
}
.calendar-table tr:nth-child(even) td {
  background: var(--color-surface);
}
.calendar-table .hijriah {
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 0.78rem;
}

/* === GALERI === */
.gallery-grid {
  columns: 3;
  gap: 14px;
  column-gap: 14px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img {
  transform: scale(1.04);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(46, 31, 15, 0.75) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.gallery-overlay span {
  color: #fffdf9;
  font-size: 0.9rem;
  font-weight: 600;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#lightbox.open {
  display: flex;
}
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
}
.lightbox-inner img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-caption {
  color: rgba(255, 253, 249, 0.75);
  font-size: 0.88rem;
  margin-top: 10px;
}
.lb-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}
.lb-prev,
.lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 253, 249, 0.1);
  border: 1px solid rgba(255, 253, 249, 0.2);
  color: #fff;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 1.1rem;
  border-radius: 4px;
  transition: background 0.2s;
}
.lb-prev {
  left: 16px;
}
.lb-next {
  right: 16px;
}
.lb-prev:hover,
.lb-next:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* === TESTIMONI === */
#testimoni {
  background: var(--color-primary);
  overflow: hidden;
}
#testimoni .section-header .section-label {
  background: rgba(76, 175, 125, 0.2);
}
#testimoni .section-header h2 {
  color: #fffdf9;
}
.testimonial-wrapper {
  overflow: hidden;
  position: relative;
}
.testimonial-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.testimonial-card {
  min-width: 100%;
  padding: 0 24px;
}
.testimonial-inner {
  background: rgba(255, 253, 249, 0.07);
  border: 1px solid rgba(255, 253, 249, 0.12);
  border-radius: 8px;
  padding: 36px 40px;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.testimonial-quote-icon {
  font-size: 2.5rem;
  color: var(--color-accent);
  opacity: 0.5;
  line-height: 1;
  margin-bottom: 16px;
}
.testimonial-text {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-style: italic;
  color: rgba(255, 253, 249, 0.9);
  line-height: 1.8;
  margin-bottom: 24px;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
}
.testimonial-author img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid rgba(76, 175, 125, 0.4);
}
.author-name {
  font-weight: 600;
  color: #fffdf9;
  font-size: 0.95rem;
}
.author-relation {
  font-size: 0.82rem;
  color: rgba(255, 253, 249, 0.55);
  font-style: italic;
}
.testimonial-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.testimonial-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 253, 249, 0.3);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}
.testimonial-dot.active {
  background: var(--color-accent);
  width: 20px;
}
.t-prev,
.t-next {
  background: rgba(255, 253, 249, 0.1);
  border: 1px solid rgba(255, 253, 249, 0.2);
  color: #fffdf9;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.85rem;
}
.t-prev:hover,
.t-next:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* === LOKASI === */
.lokasi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.lokasi-map iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 8px;
}
.info-card {
  background: #fff;
  border: 1px solid #e8d5b7;
  border-top: 4px solid var(--color-accent);
  border-radius: 8px;
  padding: 28px;
}
.info-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--color-text);
  margin-bottom: 20px;
}
.info-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #f0e4d0;
}
.info-row:last-child {
  border-bottom: none;
}
.info-row i {
  color: var(--color-accent);
  font-size: 1rem;
  margin-top: 3px;
  flex-shrink: 0;
  width: 18px;
}
.info-row span {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.info-row strong {
  color: var(--color-text);
}

/* === KONTAK === */
.kontak-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.kontak-left h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 20px;
}
.wa-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #25d366;
  color: #fff;
  padding: 14px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 16px;
  transition: all 0.2s;
  text-decoration: none;
}
.wa-btn:hover {
  background: #1db954;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}
.wa-btn i {
  font-size: 1.3rem;
}
.kontak-info-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.kontak-info-row i {
  color: var(--color-accent);
  width: 18px;
}
.kontak-social {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--color-surface);
  border: 1px solid #e8d5b7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all 0.2s;
}
.social-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.kontak-form h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #e8d5b7;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text);
  background: #fff;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* === FOOTER === */
footer {
  background: var(--color-primary);
  color: rgba(255, 253, 249, 0.65);
  padding: 0;
}
.footer-hadits {
  text-align: center;
  padding: 40px 24px;
  border-bottom: 1px solid rgba(255, 253, 249, 0.1);
}
.footer-hadits-arabic {
  font-size: 1.5rem;
  color: var(--color-accent);
  font-family: "Traditional Arabic", Georgia, serif;
  margin-bottom: 8px;
  display: block;
}
.footer-hadits-trans {
  font-size: 0.85rem;
  color: rgba(255, 253, 249, 0.5);
  font-style: italic;
}
.footer-grid-wrapper {
  padding: 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding: 48px 0;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-logo-sq {
  width: 40px;
  height: 40px;
  background: rgba(255, 253, 249, 0.12);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #fffdf9;
  font-size: 0.9rem;
}
.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: #fffdf9;
}
.footer-desc {
  font-size: 0.85rem;
  line-height: 1.75;
  margin-bottom: 14px;
}
.footer-addr {
  font-size: 0.82rem;
  color: rgba(255, 253, 249, 0.5);
  line-height: 1.6;
}
.footer-col h4 {
  color: #fffdf9;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 253, 249, 0.12);
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(255, 253, 249, 0.55);
  transition: color 0.2s;
}
.footer-col ul li a:hover {
  color: var(--color-accent);
}
.footer-social-icons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.footer-social-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(255, 253, 249, 0.08);
  border: 1px solid rgba(255, 253, 249, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 253, 249, 0.55);
  font-size: 0.9rem;
  transition: all 0.2s;
}
.footer-social-icon:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.footer-hours {
  margin-top: 16px;
}
.footer-hours p {
  font-size: 0.82rem;
  color: rgba(255, 253, 249, 0.5);
  line-height: 1.7;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 253, 249, 0.1);
  text-align: center;
  padding: 20px 24px;
  font-size: 0.82rem;
}
.footer-barakah {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 253, 249, 0.35);
  margin-top: 4px;
  font-style: italic;
}

/* ============================================================
       BACK TO TOP
    ============================================================ */
#backToTop {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: var(--color-primary);
  color: #fffdf9;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  z-index: 990;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    background 0.2s;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(125, 90, 60, 0.3);
}
#backToTop.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#backToTop:hover {
  background: var(--color-accent);
  box-shadow: 0 6px 20px rgba(76, 175, 125, 0.35);
}

/* ============================================================
       RESPONSIVE
    ============================================================ */
@media (max-width: 1023px) {
  .asatidz-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tentang-grid {
    grid-template-columns: 1fr;
  }
  .lokasi-grid {
    grid-template-columns: 1fr;
  }
  .kontak-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 767px) {
  .section {
    padding: 60px 0;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .programs-grid-2col {
    grid-template-columns: 1fr;
  }
  .program-card-horizontal {
    flex-direction: column;
  }
  .facilities-grid {
    grid-template-columns: 1fr;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .berita-bottom {
    grid-template-columns: 1fr;
  }
  .tab-grid {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-grid {
    columns: 2;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .principal-inner {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }
  .asatidz-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .tab-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    columns: 1;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}
