/* =========================================================
   Pondok Pesantren Miftahul Ulum — style utama
   Ubah warna lembaga cukup di :root
   ========================================================= */
:root {
  --primary: #0F766E;        /* Modern Teal — warna utama */
  --primary-dark: #103F38;   /* Deep Teal */
  --primary-soft: #E4F1EF;
  --navy: #10243B;           /* Navy */
  --navy-dark: #0A1828;
  --red: #B91C1C;            /* Red Accent — dipakai sedikit saja */
  --accent: #C9A227;         /* Gold */
  --accent-dark: #A8861C;
  --ink: #10243B;
  --text: #4A5563;
  --muted: #8A929C;
  --line: #E7E3D8;
  --bg-soft: #F8F6F0;          /* Ivory */
  --white: #fff;
  --radius: 14px;
  --shadow: 0 18px 40px -18px rgba(16, 36, 59, .28);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --container: 1200px;
  --topbar-h: 36px;
  --fs-h: 1;                  /* skala ukuran judul per bagian (panel admin) */
  --fs-t: 1;                  /* skala ukuran teks per bagian (panel admin) */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(98px + var(--topbar-h)); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button { -webkit-tap-highlight-color: rgba(15,118,110,.12); }
body { margin: 0; font-family: var(--font); color: var(--text); font-size: 16px; line-height: 1.7; background: var(--white); }
main > section, main > article { font-size: calc(16px * var(--fs-t)); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
svg { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.section { padding: 110px 0; }

/* ---------- Komponen umum ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--primary); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; font-size: calc(14px * var(--fs-h));
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.eyebrow--light { color: var(--accent); }
.title, .cta h2, .brosur h2 { font-size: calc(clamp(28px, 2.8vw, 36px) * var(--fs-h)); }
.title { font-weight: 800; }
.title--light { color: var(--white); }
.hl { color: var(--primary); }
.lead { font-size: calc(17px * var(--fs-t)); }

.section__head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section__head .eyebrow::after { content: ""; width: 28px; height: 2px; background: var(--accent); }
/* Pendidikan & Fasilitas: keterangan satu baris di layar lebar (di HP tetap turun baris) */
#pendidikan .section__head, #fasilitas .section__head { max-width: none; }
.section__head--row { display: flex; justify-content: space-between; align-items: end; text-align: left; max-width: none; gap: 20px; flex-wrap: wrap; }
.section__head--row .eyebrow::after { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 50px; font-weight: 700; font-size: 15px;
  transition: background .25s, color .25s, transform .25s, box-shadow .25s; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--lg { padding: 15px 30px; font-size: 16px; }
.btn--primary { background: var(--primary); color: var(--white); }
.btn--primary:hover { background: var(--primary-dark); }
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-dark); box-shadow: 0 10px 24px -10px var(--accent-dark); }
.btn--ghost { border: 2px solid rgba(255,255,255,.7); color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--primary); }
.btn--outline { border: 2px solid var(--primary); color: var(--primary); }
.btn--outline:hover { background: var(--primary); color: var(--white); }
.btn--light { background: var(--white); color: var(--primary); }
.btn--light:hover { background: var(--accent); color: var(--ink); }

/* Placeholder gambar: tampil warna hijau bermotif jika foto belum ada */
.ph {
  position: relative; overflow: hidden;
  background-color: var(--primary); /* tampil jika foto di assets/img belum ada */
  background-size: cover; background-position: center;
}
.ph > span:not([class]) {
  position: absolute; inset: auto 0 12px; text-align: center; color: rgba(255,255,255,.55); font-size: 13px;
}
.ph--round { width: 56px; height: 56px; border-radius: 50%; flex: none; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 51; height: var(--topbar-h); background: var(--navy); color: rgba(255,255,255,.9); font-size: 13px; font-weight: 500; letter-spacing: .01em; }
.marquee { height: 100%; overflow: hidden; display: flex; align-items: center; }
.marquee__track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee__track span { white-space: nowrap; padding-right: 120px; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
  .marquee__track span { white-space: normal; padding: 0 20px; font-size: 13px; line-height: 1.3; }
  .marquee__track span[aria-hidden] { display: none; }
}

/* ---------- Header ---------- */
.header { position: sticky; top: var(--topbar-h); z-index: 50; background: var(--white); transition: box-shadow .3s; }
.header.is-stuck { box-shadow: 0 8px 30px -12px rgba(0,0,0,.18); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 94px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo__mark {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: var(--accent); font-weight: 800; font-size: 18px;
  box-shadow: inset 0 0 0 3px var(--accent);
}
.logo__text strong { display: block; font-size: 23px; color: var(--ink); line-height: 1.1; font-weight: 800; }
.logo__text small { color: var(--primary); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.logo--light .logo__text strong { color: var(--white); }
.logo--light .logo__text small { color: var(--accent); }

.nav > ul { display: flex; gap: 4px; }
.nav li { position: relative; }
.nav > ul > li > a { display: block; padding: 30px 14px; font-weight: 600; color: var(--ink); }
.nav a:hover, .nav a.active { color: var(--primary); }
.nav > ul > li > a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 22px; height: 2px; background: var(--accent);
}
.has-sub > a::after { content: " ▾"; font-size: 11px; }
.sub {
  position: absolute; top: 100%; left: 0; min-width: 210px; background: var(--white);
  border-top: 3px solid var(--primary); border-radius: 0 0 10px 10px; box-shadow: var(--shadow);
  padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(10px); transition: .25s;
}
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { display: block; padding: 8px 22px; font-size: 15px; }
.sub a:hover { background: var(--primary-soft); padding-left: 28px; }
.nav__cta-mobile { display: none; }

.header__actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; font-size: 28px; color: var(--primary); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--primary-dark); }
/* Semua slide ditumpuk di satu sel grid: tinggi hero mengikuti slide terpanjang,
   sehingga isi slide tidak pernah tertimpa tombol geser atau kartu keunggulan. */
.hero__slides { display: grid; min-height: max(560px, min(88vh, 760px)); }
@supports (height: 1svh) { .hero__slides { min-height: max(560px, min(88svh, 760px)); } }
.hero__slide {
  grid-area: 1 / 1; position: relative; background-size: cover; background-position: center;
  opacity: 0; visibility: hidden; transition: opacity 1s, visibility 1s;
  display: flex; align-items: center; padding: 70px 0 150px;   /* bawah: kartu keunggulan (90) + tombol geser */
}
.hero__slide::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(16,36,59,.92) 0%, rgba(16,63,56,.72) 50%, rgba(16,63,56,.25) 100%);
}
.hero__slide::after { /* motif geometris islami halus */
  content: ""; position: absolute; inset: 0; opacity: .07;
  background:
    conic-gradient(from 45deg at 50% 50%, #fff 0 25%, transparent 0 50%, #fff 0 75%, transparent 0) 0 0 / 60px 60px;
  -webkit-mask-image: linear-gradient(270deg, #000, transparent 60%); mask-image: linear-gradient(270deg, #000, transparent 60%);
}
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__photo { display: none; }   /* hanya untuk HP (lihat @media 640px) */
.hero__content { position: relative; z-index: 2; color: rgba(255,255,255,.9); }
.hero__content > * { opacity: 0; transform: translateY(30px); transition: .8s; }
.is-active .hero__content > * { opacity: 1; transform: none; }
.is-active .hero__content > :nth-child(2) { transition-delay: .15s; }
.is-active .hero__content > :nth-child(3) { transition-delay: .3s; }
.is-active .hero__content > :nth-child(4) { transition-delay: .45s; }
.hero h1, .hero .hero__title {
  color: var(--white); font-size: calc(clamp(30px, 4.2vw, 52px) * var(--fs-h)); font-weight: 800;
  line-height: 1.18; letter-spacing: -.01em; max-width: 700px; margin-bottom: 18px;
}
.hero h1 em, .hero .hero__title em { font-style: normal; color: var(--accent); }
.hero p { font-size: calc(17px * var(--fs-t)); line-height: 1.7; max-width: 540px; margin-bottom: 30px; }
.hero__btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__arab { display: block; width: min(360px, 70%); height: auto; margin-bottom: 22px; filter: drop-shadow(0 4px 14px rgba(0,0,0,.35)); }

/* Tombol geser slide: kanan bawah, di atas kartu keunggulan */
.hero__nav {
  position: absolute; z-index: 3; bottom: 114px; right: max(20px, calc((100% - var(--container)) / 2));
  display: flex; align-items: center; gap: 10px;
}
.hero__arrow {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.45); color: var(--white); font-size: 16px; transition: .25s;
}
.hero__arrow:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.hero__dots { display: flex; gap: 6px; }
.hero__dots button { width: 8px; height: 8px; border-radius: 8px; background: rgba(255,255,255,.45); transition: .3s; }
.hero__dots button.is-active { width: 22px; background: var(--accent); }

/* ---------- Fitur ---------- */
.features { position: relative; z-index: 5; margin-top: -90px; }
.features__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.feature { padding: 38px 30px; border-right: 1px solid var(--line); transition: background .35s, color .35s; }
.feature:last-child { border-right: 0; }
.feature__icon {
  width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-size: 30px; margin-bottom: 20px; transition: .35s;
}
.feature h3 { font-size: calc(20px * var(--fs-h)); transition: color .35s; }
.feature p { margin: 0; font-size: calc(15px * var(--fs-t)); }
.feature:hover, .feature--active { background: var(--primary); color: rgba(255,255,255,.85); }
.feature:hover h3, .feature--active h3 { color: var(--white); }
.feature:hover .feature__icon, .feature--active .feature__icon { background: var(--accent); color: var(--ink); }
.features__grid:hover .feature--active:not(:hover) { background: var(--white); color: var(--text); }
.features__grid:hover .feature--active:not(:hover) h3 { color: var(--ink); }
.features__grid:hover .feature--active:not(:hover) .feature__icon { background: var(--primary-soft); color: var(--primary); }

/* ---------- About ---------- */
/* Laptop: kolom kiri foto besar pengasuh (kaligrafi di atasnya, nama di bawahnya);
   kolom kanan Selayang Pandang lalu dua foto kegiatan berdampingan. HP/tablet: bertumpuk (lihat @media 960px). */
.about__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "media text";
  column-gap: 64px; row-gap: 30px; align-items: center;
}
.about__grid--pengasuh { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "peng text" "peng media"; align-items: start; }
/* Puncak huruf kaligrafi sejajar dengan puncak huruf judul (label "Selayang Pandang" tetap di atasnya) */
.about__pengasuh { grid-area: peng; align-self: start; margin: calc(24px * var(--fs-h) + 27px) 0 0; text-align: center; }
.about__pengasuh .about__arab--atas { width: min(340px, 82%); margin: 0 auto 10px; }   /* kaligrafi di atas foto pengasuh */
.about__grid--pengasuh .about__text .about__arab { display: none; }   /* kaligrafi sudah tampil di atas foto */
.about__pengasuh-foto { position: relative; overflow: hidden; height: clamp(440px, 64vh, 580px); }
.about__pengasuh-foto > img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%); mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
}
.about__pengasuh-foto::after {   /* blur halus yang makin kuat ke bawah */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 75%); mask-image: linear-gradient(180deg, transparent, #000 75%);
}
.about__pengasuh-cap {   /* nama di atas bagian foto yang memudar */
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 10px; padding: 0 16px; text-align: center; line-height: 1.3;
}
.about__pengasuh-cap strong {
  display: inline-block; color: var(--navy); font-size: calc(20px * var(--fs-h)); font-weight: 800; letter-spacing: .02em;
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px;
}
.about__pengasuh-cap span { display: block; margin-top: 6px; color: var(--primary); font-size: calc(15px * var(--fs-t)); font-weight: 600; }
.about__text { grid-area: text; }
.about__text .lead, .about__text .tabs__body p { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.about__grid--pengasuh .about__leader { display: none; }   /* foto & nama pengasuh sudah tampil besar */
/* Foto kegiatan: dua foto berdampingan, ukuran sama, tidak saling menutupi. Klik/ketuk = perbesar (popup). */
.about__media { grid-area: media; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.about__photo { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; aspect-ratio: 4 / 3; border-radius: var(--radius); }
.about__zoom {
  position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; padding: 6px;
  border-radius: 50%; background: rgba(16,36,59,.55); color: #fff; transition: background .25s;
}
.about__photo:hover .about__zoom { background: var(--accent); color: var(--ink); }
.tabs__head { display: flex; gap: 8px; margin: 26px 0 18px; border-bottom: 1px solid var(--line); }
.tabs__head button { padding: 10px 18px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs__head button.is-active { color: var(--primary); border-color: var(--accent); }
.tabs__body { display: none; min-height: 110px; }
.tabs__body.is-active { display: block; animation: fade .4s; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.checklist li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.checklist svg { color: var(--white); background: var(--primary); border-radius: 50%; padding: 3px; font-size: 20px; margin-top: 3px; }
.about__leader {
  display: flex; align-items: center; gap: 14px; margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line);
}
.about__leader strong { display: block; color: var(--ink); }
.about__leader span { font-size: calc(14px * var(--fs-t)); color: var(--muted); }
.about__leader .btn { margin-left: auto; }
@media (max-width: 960px) {
  /* Urutan di HP/tablet: foto pengasuh → Selayang Pandang → foto kegiatan santri */
  .about__grid { grid-template-areas: "text" "media"; }
  .about__grid--pengasuh { grid-template-areas: "peng" "text" "media"; }
  .about__pengasuh { margin: 0 auto -18px; width: 100%; max-width: 560px; }
  .about__pengasuh .about__arab--atas { width: min(320px, 84%); margin: 0 auto 8px; }
  .about__pengasuh-foto { height: clamp(320px, 50vh, 480px); }   /* ± setengah layar */
  .about__pengasuh-cap strong { font-size: calc(18px * var(--fs-h)); }
  .about__pengasuh-cap span { font-size: calc(14px * var(--fs-t)); }
  /* Selayang Pandang: kaligrafi, label, dan judul di tengah; paragraf rata kiri-kanan */
  .about__text { text-align: center; }
  .about__arab { margin-inline: auto; }
  .about__text .eyebrow::after { content: ""; width: 28px; height: 2px; background: var(--accent); }
  .about__text .title { text-wrap: balance; }
  .tabs__head { gap: 4px; justify-content: center; }   /* Komitmen, Motto, Nilai Santri rata tengah */
  .tabs__head button { padding: 10px 12px; font-size: 15px; white-space: nowrap; }   /* "Nilai Santri" satu baris */
  .about__text .tabs__body, .about__text .about__leader { text-align: left; }
  .about__media { gap: 12px; width: 100%; margin: -20px auto 0; }
}

/* ---------- Program ---------- */
.programs { background: var(--bg-soft); }
.programs__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.program { background: var(--white); border-radius: var(--radius); overflow: hidden; transition: transform .35s, box-shadow .35s; }
.program:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.program__img { aspect-ratio: 16 / 9; transition: background-size .5s; }   /* foto mendatar tampil utuh, orang di tepi tidak terpotong */
.program__tag {
  position: absolute; left: 16px; top: 16px; background: var(--accent); color: var(--ink);
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 20px;
}
.program__body { padding: 24px; }
.program h3 { font-size: calc(20px * var(--fs-h)); }
.program p { font-size: calc(15px * var(--fs-t)); }
.program__meta { display: flex; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: calc(14px * var(--fs-t)); }
.program__meta li { display: flex; align-items: center; gap: 6px; }
.program__meta svg { color: var(--primary); }

/* ---------- Statistik ---------- */
.stats {
  background: linear-gradient(120deg, var(--primary-dark), var(--primary));
  padding: 70px 0; position: relative; overflow: hidden;
}
.stats::after {
  content: ""; position: absolute; inset: 0; opacity: .06;
  background: conic-gradient(from 45deg, #fff 0 25%, transparent 0 50%, #fff 0 75%, transparent 0) 0 0 / 48px 48px;
}
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; z-index: 1; }
.stat { text-align: center; color: rgba(255,255,255,.85); }
.stat svg { font-size: 44px; color: var(--accent); margin-bottom: 10px; }
.stat strong { display: block; font-size: calc(46px * var(--fs-h)); color: var(--white); font-weight: 800; line-height: 1.1; }
.stat strong::after { content: attr(data-suffix); color: var(--accent); font-size: .55em; }

/* ---------- PSB ---------- */
.psb__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.psb__info { display: flex; gap: 16px; margin: 26px 0; }
.psb__info div { flex: 1; padding: 16px 20px; border-radius: var(--radius); background: var(--primary-soft); border-left: 4px solid var(--primary); }
.psb__info small { display: block; color: var(--muted); font-weight: 600; }
.psb__info strong { color: var(--ink); }
.psb__btns { display: flex; gap: 14px; flex-wrap: wrap; }
.steps { counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; left: 28px; top: 20px; bottom: 20px; width: 2px; background: var(--line); }
.steps li { display: flex; gap: 22px; position: relative; padding: 14px 0; }
.steps li > span {
  width: 58px; height: 58px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); border: 2px solid var(--primary); color: var(--primary); font-weight: 800; transition: .3s;
}
.steps li:hover > span { background: var(--primary); color: var(--white); }
.steps h4 { font-size: calc(18px * var(--fs-h)); margin-bottom: 4px; }
.steps p { margin: 0; font-size: calc(15px * var(--fs-t)); }

/* ---------- Agenda ---------- */
.agenda { background: var(--bg-soft); }
.agenda__list { display: grid; gap: 18px; }
.event {
  display: flex; align-items: center; gap: 28px; background: var(--white); padding: 22px 28px;
  border-radius: var(--radius); transition: box-shadow .3s, transform .3s;
}
.event:hover { box-shadow: var(--shadow); transform: translateX(6px); }
.event__date { width: 96px; flex: none; text-align: center; background: var(--primary); color: var(--white); border-radius: 12px; padding: 12px 6px; }
.event__date strong { display: block; font-size: 34px; line-height: 1; font-weight: 800; }
.event__date span { font-size: 13px; color: var(--accent); font-weight: 600; }
.event__body { flex: 1; }
.event h3 { font-size: 20px; margin-bottom: 8px; }
.event ul { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; }
.event ul li { display: flex; gap: 6px; align-items: center; }
.event ul svg { color: var(--primary); }
.event__link {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--primary-soft); color: var(--primary); font-size: 20px; transition: .3s;
}
.event:hover .event__link { background: var(--accent); color: var(--ink); }

/* ---------- Testimoni ---------- */
.testi { background: var(--navy); position: relative; overflow: hidden; }
.testi::before {
  content: ""; position: absolute; width: 600px; height: 600px; border-radius: 50%;
  right: -200px; top: -200px; background: radial-gradient(circle, rgba(201,162,39,.18), transparent 70%);
}
.testi__slider { overflow: hidden; position: relative; }
.testi__track { display: flex; transition: transform .6s ease; }
.testi__card {
  flex: 0 0 calc(100% / 3); margin: 0; padding: 0 13px;
}
.testi__card > * { position: relative; }
.testi__card { color: rgba(255,255,255,.85); }
.testi__card p {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  padding: 34px 28px 28px; border-radius: var(--radius); font-size: 16px; margin-bottom: 22px; min-height: 190px;
}
.testi__q { position: absolute; top: -18px; left: 40px; font-size: 40px; color: var(--accent); z-index: 1; }
.testi__card footer { display: flex; align-items: center; gap: 14px; padding-left: 10px; }
.testi__card footer .ph { border: 3px solid var(--accent); }
.testi__card strong { display: block; color: var(--white); }
.testi__card span { font-size: 14px; color: var(--accent); }
.testi__dots { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.testi__dots button { width: 10px; height: 10px; border-radius: 10px; background: rgba(255,255,255,.3); transition: .3s; }
.testi__dots button.is-active { width: 30px; background: var(--accent); }

/* ---------- Berita ---------- */
.news__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: .35s; background: var(--white); }
.post:hover { box-shadow: var(--shadow); border-color: transparent; transform: translateY(-6px); }
.post__img { aspect-ratio: 16/10; }
.post__date {
  position: absolute; left: 16px; bottom: 16px; display: inline-flex; gap: 6px; align-items: center;
  background: var(--white); color: var(--primary); font-weight: 700; font-size: 13px; padding: 6px 14px; border-radius: 30px;
}
.post__body { padding: 26px; }
.post__cat { color: var(--accent-dark); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.post h3 { font-size: 20px; margin: 6px 0 10px; }
.post h3 a:hover { color: var(--primary); }
.post p { font-size: 15px; }
.more { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; color: var(--primary); }
.more:hover { gap: 12px; }

/* ---------- CTA ---------- */
.cta { background: var(--accent); padding: 40px 0; }   /* tinggi pas dengan isi, sedikit ruang di atas-bawah */
.cta__inner { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.cta h2 { margin-bottom: 6px; }
.cta p { margin: 0; color: var(--ink); opacity: .8; }
.cta .btn--light { background: var(--primary); color: var(--white); }
.cta .btn--light:hover { background: var(--primary-dark); color: var(--white); }

/* ---------- Footer ---------- */
.footer { background: var(--navy-dark); color: rgba(255,255,255,.7); padding-top: 70px; font-size: calc(15px * var(--fs-t)); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 44px; }
.footer__about p { margin: 16px 0; }
.footer h4 { color: var(--white); font-size: calc(18px * var(--fs-h)); margin-bottom: 14px; position: relative; padding-bottom: 10px; }
.footer h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 2px; background: var(--accent); }
/* Jarak antarbaris tautan: rapat tapi tetap mudah diklik/diketuk */
.footer ul { line-height: 1.5; }
.footer ul li a { display: inline-block; padding: 4px 0; transition: color .25s, padding .25s; }
.footer ul a:hover { color: var(--accent); padding-left: 4px; }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.footer__contact svg { color: var(--accent); margin-top: 5px; }
.footer__social { display: flex; gap: 10px; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); transition: .3s;
}
.footer__social a:hover { background: var(--accent); color: var(--ink); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; font-size: calc(14px * var(--fs-t)); text-align: center; }
.footer__bottom p { margin: 0; }

/* ---------- Floating ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 48px; height: 48px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center; font-size: 26px;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.4);
}
.to-top {
  position: fixed; right: 20px; bottom: 78px; z-index: 60; width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 20px;
  opacity: 0; visibility: hidden; transform: translateY(16px); transition: .3s;
}
.to-top svg { transform: rotate(-90deg); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); color: var(--ink); }

/* ---------- Modal video ---------- */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.85); display: none; place-items: center; padding: 20px; }
.modal.is-open { display: grid; }
.modal__box { position: relative; width: min(960px, 100%); }
.modal__frame { aspect-ratio: 16/9; background: #000; }
.modal__frame iframe { width: 100%; height: 100%; border: 0; }
.modal__close { position: absolute; top: -48px; right: 0; color: #fff; font-size: 34px; }

/* ---------- Animasi muncul ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s, transform .8s; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Responsif
   ========================================================= */
@media (max-width: 1100px) {
  .nav > ul > li > a { padding-inline: 10px; }
  .header__cta { display: none; }
  .programs__grid { grid-template-columns: repeat(2, 1fr); }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(2) { border-right: 0; }
  .feature:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 960px) {
  .section { padding: 80px 0; }
  .cta { padding: 34px 0; }
  .cta__inner { gap: 20px; }

  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: clamp(180px, 50vw, 380px); background: var(--white); z-index: 80;   /* setengah layar */
    padding: 84px 18px 26px; transform: translateX(100%); transition: transform .35s; overflow-y: auto;
    box-shadow: -20px 0 40px rgba(0,0,0,.2);
  }
  .nav.is-open { transform: none; }
  .nav > ul { flex-direction: column; gap: 0; }
  .nav > ul > li > a { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
  .nav > ul > li > a.active::after { display: none; }
  .sub { position: static; min-width: 0; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 4px 0 6px 10px; display: none; }
  .sub a { padding: 7px 0; font-size: 14px; }
  .sub a:hover { padding-left: 4px; background: none; }
  .has-sub.is-open .sub { display: block; }
  .nav__cta-mobile { display: flex; margin-top: 22px; width: 100%; padding: 11px 12px; font-size: 14px; white-space: normal; text-align: center; line-height: 1.3; }
  .nav-toggle { position: relative; z-index: 90; }
  /* Tanpa lapisan gelap saat menu dibuka; ketuk di luar menu untuk menutup (main.js). */

  .about__grid, .psb__grid { grid-template-columns: 1fr; gap: 50px; }
  .about__media { max-width: 560px; }
  .news__grid { grid-template-columns: 1fr 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .testi__card { flex-basis: 50%; }
}

/* HP & tablet tegak (iPad): foto slide tampil utuh selebar layar di atas tulisan (tidak dipotong seperti di laptop),
   semua slide dengan bentuk yang sama. --ratio-hp (tinggi/lebar) diisi index.php dari pengaturan admin
   "Bentuk foto slider di HP & tablet". Ukuran tulisan khusus HP ada di blok 640px. */
@media (max-width: 960px) {
  .hero { container-type: inline-size; }
  .hero__slides { min-height: 0; }
  .hero__slide {
    --img-h: calc(100vw * var(--ratio-hp, .45));
    background-image: none !important; background-color: var(--primary-dark);
    align-items: flex-start; padding: calc(var(--img-h) + 36px) 0 160px;   /* bawah: kartu keunggulan (90) + tombol geser */
  }
  @supports (width: 1cqw) { .hero__slide { --img-h: calc(100cqw * var(--ratio-hp, .45)); } }
  .hero__photo {
    display: block; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: var(--img-h);
    background-color: var(--primary-dark); background-size: cover; background-position: center; background-repeat: no-repeat;
  }
  /* Foto "utuh": seluruh foto terlihat (contain), sisa ruang diisi foto yang sama versi buram. */
  .hero__photo { overflow: hidden; }
  .hero__photo::before, .hero__photo::after {
    content: ""; position: absolute; background-image: var(--img); background-position: center; background-repeat: no-repeat;
  }
  .hero__photo::before { inset: -24px; background-size: cover; filter: blur(14px) brightness(.8); }
  .hero__photo::after { inset: 0; background-size: contain; }
  .hero__photo::before, .hero__photo::after { background-image: var(--img-hp); }
  .hero__slide::before { top: var(--img-h); background: linear-gradient(180deg, var(--navy), var(--primary-dark)); }
  .hero__slide::after { top: var(--img-h); }
  .hero .hero__title { font-size: calc(clamp(26px, 4.4vw, 36px) * var(--fs-h)); }
  .hero__arab { width: min(300px, 60%); }
}

@media (max-width: 640px) {
  .header__inner { height: 82px; }
  .logo__mark { width: 42px; height: 42px; font-size: 15px; }
  .logo__text strong { font-size: 20px; }
  .logo { gap: 10px; }
  .logo__text small { font-size: 12px; }
  .topbar { font-size: 12px; }
  .hero__slide { padding: calc(var(--img-h) + 24px) 0 120px; }   /* bawah: kartu keunggulan (70) + tombol geser */
  .hero .hero__title { font-size: calc(clamp(21px, 6vw, 25px) * var(--fs-h)); line-height: 1.22; margin-bottom: 12px; }
  .hero p { font-size: calc(15px * var(--fs-t)); line-height: 1.65; margin-bottom: 22px; }
  .hero__arab { width: min(240px, 66%); margin-bottom: 14px; }
  .hero__btns { gap: 10px; flex-wrap: nowrap; }   /* dua tombol selalu berdampingan */
  .hero .btn--lg, .page-banner .btn--lg { padding: 11px 16px; font-size: 14px; flex: 0 1 auto; min-width: 0; white-space: normal; text-align: center; line-height: 1.25; }
  .hero__nav { right: 20px; bottom: 82px; gap: 8px; }
  .hero__arrow { width: 32px; height: 32px; font-size: 14px; }
  .hero__dots button { width: 7px; height: 7px; }
  .hero__dots button.is-active { width: 18px; }
  .features { margin-top: -70px; }
  .programs__grid, .news__grid, .footer__grid { grid-template-columns: 1fr; }
  /* Pita ajakan (emas): tinggi pas dengan isinya, sedikit ruang di atas-bawah */
  .cta { padding: 30px 0; }
  .cta__inner { gap: 16px; }
  .cta p { font-size: calc(14.5px * var(--fs-t)); line-height: 1.6; }
  .cta .btn--lg { padding: 11px 20px; font-size: 14px; }
  /* Footer di HP: jarak antarbaris tautan lebih rapat, tetap mudah diketuk */
  .footer { padding-top: 56px; }
  .footer__grid { gap: 30px; padding-bottom: 36px; }
  .footer__about p { margin: 14px 0; }
  .footer h4 { font-size: calc(17px * var(--fs-h)); margin-bottom: 12px; }
  .footer ul li a { padding: 3px 0; }
  /* Kartu keunggulan: 2 kolom berdampingan, ringkas */
  .feature { padding: 20px 16px; }
  .feature__icon { width: 44px; height: 44px; border-radius: 12px; font-size: 22px; margin-bottom: 12px; }
  .feature h3 { font-size: calc(15px * var(--fs-h)); line-height: 1.3; margin-bottom: 6px; }
  .feature p { font-size: calc(13px * var(--fs-t)); line-height: 1.55; }
  .section { padding: 56px 0; }   /* jarak antarbagian di HP lebih rapat */
  .about__leader { flex-wrap: wrap; }
  .about__leader .btn { margin-left: 0; width: 100%; }
  .psb__info { flex-direction: column; }
  .event { flex-wrap: wrap; gap: 16px; padding: 20px; }
  .event__link { display: none; }
  .testi__card { flex-basis: 100%; }
  /* Angka statistik: ringkas */
  .stats { padding: 34px 0; }
  .stats__grid { gap: 12px; row-gap: 22px; }
  .stat svg { font-size: 28px; margin-bottom: 4px; }
  .stat strong { font-size: calc(26px * var(--fs-h)); }
  .stat span { display: block; font-size: calc(13px * var(--fs-t)); line-height: 1.35; margin-top: 2px; }
}

/* =========================================================
   Kontak & peta
   ========================================================= */
.contact__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: center; }
.contact__list { display: grid; gap: 18px; margin-top: 26px; }
.contact__list li { display: flex; gap: 16px; align-items: flex-start; }
.contact__list li > span {
  width: 50px; height: 50px; flex: none; border-radius: 12px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-size: 22px;
}
.contact__list strong { display: block; color: var(--ink); }
.contact__list a:hover { color: var(--primary); }
.contact__map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 420px; background: var(--primary-soft); }
.contact__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* =========================================================
   Halaman PSB
   ========================================================= */
.page-banner {
  position: relative; padding: 90px 0 80px; color: rgba(255,255,255,.85); overflow: hidden;
  background: linear-gradient(120deg, rgba(16,36,59,.95), rgba(16,63,56,.85)), var(--navy) center / cover;
}
.page-banner::after {
  content: ""; position: absolute; inset: 0; opacity: .07;
  background: conic-gradient(from 45deg, #fff 0 25%, transparent 0 50%, #fff 0 75%, transparent 0) 0 0 / 60px 60px;
  -webkit-mask-image: linear-gradient(270deg, #000, transparent 70%); mask-image: linear-gradient(270deg, #000, transparent 70%);
}
.page-banner .container { position: relative; z-index: 1; }
.page-banner h1 { color: var(--white); font-size: calc(clamp(32px, 4.6vw, 54px) * var(--fs-h)); font-weight: 800; }
.page-banner h1 em { font-style: normal; color: var(--accent); }
.page-banner p { max-width: 620px; font-size: calc(18px * var(--fs-t)); }
.crumb { display: flex; gap: 8px; font-size: calc(14px * var(--fs-t)); margin-bottom: 18px; }
.crumb a { color: var(--accent); }
.page-banner .hero__btns { margin-top: 28px; }

.subnav { position: sticky; top: calc(94px + var(--topbar-h)); z-index: 40; background: var(--white); border-bottom: 1px solid var(--line); }
.subnav ul { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.subnav a { display: block; padding: 16px 16px; font-weight: 600; white-space: nowrap; color: var(--muted); border-bottom: 3px solid transparent; }
.subnav a:hover, .subnav a.active { color: var(--primary); border-color: var(--accent); }

.waves { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.wave {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px 18px; background: var(--white); position: relative;
}
.wave__label { display: inline-block; font-size: calc(12px * var(--fs-t)); font-weight: 700; padding: 4px 11px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); }
.wave--open { border-color: var(--primary); box-shadow: var(--shadow); }
.wave--open .wave__label { background: var(--accent); color: var(--ink); }
.wave h3 { font-size: calc(19px * var(--fs-h)); margin: 12px 0 10px; }
.wave dl { margin: 0; display: grid; gap: 8px; font-size: calc(14.5px * var(--fs-t)); }
.wave dl div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 7px; }
.wave dt { color: var(--muted); }
.wave dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }

.tabbar { display: inline-flex; gap: 6px; padding: 6px; background: var(--bg-soft); border-radius: 50px; margin-bottom: 34px; flex-wrap: wrap; }
.tabbar button { padding: 10px 22px; border-radius: 50px; font-weight: 700; color: var(--muted); transition: .25s; }
.tabbar button.is-active { background: var(--primary); color: var(--white); }
.tabpane { display: none; }
.tabpane.is-active { display: block; animation: fade .4s; }

.req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.card { background: var(--white); border-radius: var(--radius); padding: 30px; border: 1px solid var(--line); }
.card h3 { font-size: calc(20px * var(--fs-h)); display: flex; gap: 10px; align-items: center; }
.card h3 svg { color: var(--primary); font-size: 24px; }
.card .checklist li { font-size: calc(15px * var(--fs-t)); }

.fee-wrap { overflow-x: auto; }
.fee-wrap, .fee-wrap ~ .bank, .fee-wrap ~ .note { max-width: 880px; margin-left: auto; margin-right: auto; }
.fee { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--white); border-radius: var(--radius); overflow: hidden; }
.fee th, .fee td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--line); font-size: calc(15px * var(--fs-t)); }
.fee thead th { background: var(--primary); color: var(--white); font-weight: 700; }
.fee td:not(:first-child), .fee th:not(:first-child) { text-align: right; white-space: nowrap; }
.fee tbody tr:nth-child(even) { background: var(--bg-soft); }
.fee tfoot td { font-weight: 800; color: var(--ink); background: var(--primary-soft); }
.fee__unit { display: none; }   /* "(Rp)" di judul kolom, hanya HP */
.note { font-size: calc(14px * var(--fs-t)); color: var(--muted); margin-top: 14px; }

.brosur {
  display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center;
  background: var(--primary-dark); color: rgba(255,255,255,.85); border-radius: 20px; padding: 44px; position: relative; overflow: hidden;
}
.brosur::before { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(201,162,39,.25), transparent 70%); }
.brosur__cover {
  aspect-ratio: 3/4; border-radius: 10px; background: var(--accent) center / cover; display: grid; place-items: center;
  color: var(--primary-dark); font-weight: 800; text-align: center; font-size: 18px; transform: rotate(-4deg);
  box-shadow: 0 20px 40px -10px rgba(0,0,0,.5); position: relative;
}
.brosur h2 { color: var(--white); }
.brosur .hero__btns { margin-top: 20px; position: relative; }

.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 14px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: box-shadow .3s; }
.faq details[open] { box-shadow: var(--shadow); border-color: transparent; }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 24px; font-weight: 700; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); transition: transform .3s; }
.faq details[open] summary svg { transform: rotate(45deg); background: var(--accent); color: var(--ink); }
.faq details p { padding: 0 24px 20px; margin: 0; }

.panitia { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.panitia .card { text-align: center; }
.panitia .card > svg { font-size: 40px; color: #25d366; margin-bottom: 12px; }
.panitia .card p { margin-bottom: 18px; }

@media (max-width: 960px) {
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .waves, .panitia { grid-template-columns: 1fr; }
  .req-grid { grid-template-columns: 1fr; }
  .brosur { grid-template-columns: 1fr; padding: 32px; text-align: center; }
  .brosur__cover { width: 180px; margin: 0 auto; }
  .brosur .hero__btns { justify-content: center; }
  .subnav { top: calc(94px + var(--topbar-h)); }
}
@media (max-width: 640px) {
  .subnav { top: calc(82px + var(--topbar-h)); }
  .page-banner { padding: 60px 0; }
  .page-banner h1 { font-size: calc(clamp(26px, 7.4vw, 32px) * var(--fs-h)); text-wrap: balance; }
  /* Kotak gelombang & cara pendaftaran: lebih ringkas di HP */
  .waves { gap: 14px; }
  .wave { padding: 18px 18px 12px; }
  .wave__label { font-size: calc(11.5px * var(--fs-t)); padding: 3px 10px; }
  .wave h3 { font-size: calc(17px * var(--fs-h)); margin: 10px 0 8px; }
  .wave dl { gap: 7px; font-size: calc(13.5px * var(--fs-t)); line-height: 1.5; }
  .wave dl div { padding-bottom: 7px; }
  /* Tabel biaya: muat selebar layar HP, tidak perlu digeser; "Rp" pindah ke judul kolom */
  .fee { min-width: 0; }
  .fee th, .fee td { padding: 11px 8px; font-size: calc(13.5px * var(--fs-t)); line-height: 1.45; vertical-align: middle; }
  .fee th:first-child, .fee td:first-child { padding-left: 14px; }
  .fee th:last-child, .fee td:last-child { padding-right: 14px; }
  .fee__rp { display: none; }
  .fee__unit { display: inline; }
}

/* =========================================================
   Identitas: logo, kaligrafi, aksen merah
   ========================================================= */
.logo__img { width: 62px; height: 62px; object-fit: contain; flex: none; }
.logo__text small { display: block; line-height: 1.2; }
.logo__text em { display: block; font-style: normal; font-size: 13.5px; color: #4B5563; font-weight: 700; line-height: 1.25; margin-top: 2px; }
.logo--light .logo__text em { color: rgba(255,255,255,.7); }
.about__arab { width: min(340px, 80%); height: auto; margin-bottom: 18px; }
.footer__arab { width: 240px; height: auto; margin: 20px 0 4px; opacity: .9; }
.motto {
  margin: 0; padding: 18px 22px; border-left: 4px solid var(--accent); background: var(--bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0; font-size: calc(18px * var(--fs-t)); font-weight: 700; color: var(--navy); font-style: italic;
}
.badge-red { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 20px; background: var(--red); color: #fff; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.dot-live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-right: 6px; box-shadow: 0 0 0 0 rgba(239,68,68,.7); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }

/* Program pembinaan (chip) */
.chips { margin-top: 56px; text-align: center; }
.chips h3 { font-size: calc(20px * var(--fs-h)); margin-bottom: 18px; }
.chips ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 40px;
  background: var(--white); border: 1px solid var(--line); font-weight: 600; color: var(--navy); font-size: calc(15px * var(--fs-t));
}
.chips svg { color: var(--primary); font-size: 18px; }

/* Fasilitas */
.facilities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.facilities li {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--white); font-weight: 700; color: var(--navy); transition: .3s;
}
.facilities li:hover { border-color: transparent; box-shadow: var(--shadow); transform: translateY(-4px); }
.facilities span {
  width: 52px; height: 52px; flex: none; border-radius: 14px; display: grid; place-items: center;
  background: var(--primary-dark); color: var(--accent); font-size: 24px;
}

/* Galeri */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; gap: 14px; }
.gallery__item {
  aspect-ratio: 741 / 397; border-radius: 12px; background: var(--primary) center / cover; cursor: zoom-in;
  position: relative; overflow: hidden;
}
.gallery__item::after { content: ""; position: absolute; inset: 0; background: rgba(16,36,59,.0); transition: .3s; }
.gallery__item:hover::after { background: rgba(16,36,59,.25); }
.gallery__item:nth-child(1) { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery__more { text-align: center; margin-top: 30px; }
.gallery__more a { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; color: var(--primary); }
.modal__frame img { width: 100%; height: 100%; object-fit: contain; }
.modal__frame--img { aspect-ratio: auto; background: transparent; }

/* Alur ringkas 7 langkah */
.steps--compact li { padding: 8px 0; }
.steps--compact li > span { width: 48px; height: 48px; font-size: 14px; }
.steps--compact::before { left: 23px; }
.steps--compact h4 { font-size: calc(17px * var(--fs-h)); margin: 10px 0 2px; }
.steps--compact p { font-size: calc(14px * var(--fs-t)); }
.steps__title {   /* judul "Alur Pendaftaran" di atas daftar langkah (beranda) */
  display: flex; align-items: center; gap: 10px; font-size: calc(20px * var(--fs-h)); margin-bottom: 10px;
}
.steps__title::before { content: ""; width: 28px; height: 3px; border-radius: 2px; background: var(--accent); }

/* Brosur di halaman PSB */
.brosur-pages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.brosur-pages button {
  aspect-ratio: 900 / 1277; border-radius: 10px; background: var(--navy) center / cover; cursor: zoom-in;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.5); transition: transform .3s;
}
.brosur-pages button:hover { transform: translateY(-6px) rotate(-1deg); }

/* Rekening */
.bank {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 26px; padding: 22px 26px;
  border-radius: var(--radius); background: var(--navy); color: rgba(255,255,255,.8);
}
.bank > svg { font-size: 36px; color: var(--accent); }
.bank strong { display: block; color: var(--white); font-size: calc(22px * var(--fs-t)); letter-spacing: .04em; }
.bank small { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

@media (max-width: 1100px) {
}
@media (max-width: 960px) {
  /* Semua judul bagian di tablet seragam (HP: lihat blok 640px di bawah) */
  .title, .cta h2, .brosur h2 { font-size: calc(26px * var(--fs-h)); text-wrap: balance; }
  .facilities { grid-template-columns: 1fr 1fr; }
  .brosur-pages { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  /* Semua judul bagian di HP seukuran judul Selayang Pandang (label kecil di atasnya tetap 14px).
     Judul besar di spanduk halaman dan judul artikel tidak termasuk. */
  .title, .cta h2, .brosur h2 { font-size: calc(clamp(18px, 5.4vw, 22px) * var(--fs-h)); text-wrap: balance; }
  /* Fasilitas: 2 kolom berdampingan, ringkas */
  .facilities { grid-template-columns: 1fr 1fr; gap: 10px; }
  .facilities li { gap: 10px; padding: 12px; font-size: calc(13.5px * var(--fs-t)); line-height: 1.3; }
  .facilities span { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
  /* Program pembinaan: 2 kolom berdampingan */
  .chips { margin-top: 40px; }
  .chips ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .chips li { justify-content: flex-start; gap: 8px; padding: 11px 12px; border-radius: 12px; font-size: calc(13.5px * var(--fs-t)); line-height: 1.3; text-align: left; }
  .chips svg { font-size: 17px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery__item:nth-child(1) { grid-column: span 2; grid-row: auto; aspect-ratio: 741 / 397; }
  .gallery__item:nth-child(12) { display: none; }
  .logo__img { width: 54px; height: 54px; }
  .logo__text em { font-size: 12.5px; }
}

/* Halaman PSB — tambahan */
.wave__label--red, .wave--open .wave__label--red { background: var(--red); color: #fff; }
.wave dd a { color: var(--primary); }
.docs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 26px; max-width: 980px; margin: 0 auto; }
.docs li {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 12px;
  background: var(--bg-soft); font-weight: 600; color: var(--navy);
}
.docs span {
  width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 800;
}
.docs b { margin-left: auto; color: var(--accent-dark); font-size: calc(14px * var(--fs-t)); white-space: nowrap; }
.panitia .card > svg.ic-teal { color: var(--primary); }
.modal__frame--img img { max-height: 86vh; width: auto; max-width: 100%; margin: 0 auto; display: block; border-radius: 8px; }
@media (max-width: 640px) { .docs { grid-template-columns: 1fr; } }
.contact__route { margin-top: 28px; }

/* =========================================================
   Berita kegiatan santri (beranda, berita.php, artikel.php)
   ========================================================= */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.news-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s, box-shadow .35s, border-color .35s; }
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.news-card__link { display: flex; flex-direction: column; height: 100%; }
.news-card__img { aspect-ratio: 16 / 10; background: var(--primary-soft) center / cover no-repeat; transition: transform .6s; }
.news-card:hover .news-card__img { transform: scale(1.04); }
.news-card__body { position: relative; flex: 1; display: flex; flex-direction: column; padding: 22px 24px 24px; background: var(--white); }
.news-card time { display: inline-flex; align-items: center; gap: 6px; font-size: calc(13px * var(--fs-t)); font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.news-card h3 { font-size: calc(19px * var(--fs-h)); line-height: 1.4; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card:hover h3 { color: var(--primary); }
.news-card p { font-size: calc(15px * var(--fs-t)); margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: calc(14px * var(--fs-t)); font-weight: 700; color: var(--accent-dark); }
.news-empty { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 40px 20px; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.news-empty svg { font-size: 22px; color: var(--primary); }
.news-empty a { color: var(--primary); font-weight: 600; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 50px; }
.pager a, .pager span { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager span { background: var(--primary); border-color: var(--primary); color: var(--white); }
.page-banner--sm { padding-top: 70px; padding-bottom: 70px; }

.container--narrow { width: min(100% - 40px, 820px); }
.preview-bar { background: var(--accent); color: var(--navy); text-align: center; padding: 10px 20px; font-size: 14px; }
.article__head { background: var(--bg-soft); padding: 60px 0 120px; }
.article__head h1 { font-size: calc(clamp(28px, 4vw, 44px) * var(--fs-h)); font-weight: 800; }
.article__head .crumb a { color: var(--primary); }
.article__meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; margin: 0; }
.article__meta svg { color: var(--primary); }
.article__cover { margin: -90px 0 40px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.article__cover img { width: 100%; }
.article__body { font-size: calc(18px * var(--fs-t)); line-height: 1.85; color: #333B45; padding-bottom: 10px; }
.article__head + .container .article__body:first-child { margin-top: 40px; }
.article__body > * { margin: 0 0 1.2em; }
.article__body h2 { font-size: calc(26px * var(--fs-h)); margin-top: 1.6em; }
.article__body h3 { font-size: calc(21px * var(--fs-h)); margin-top: 1.4em; }
.article__body a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.article__body ul, .article__body ol { padding-left: 1.4em; }
.article__body li { margin-bottom: .4em; }
.article__body blockquote { border-left: 4px solid var(--accent); background: var(--bg-soft); padding: 16px 22px; border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--ink); }
.article__body figure { margin: 1.8em 0; }
.article__body img { width: 100%; height: auto; border-radius: var(--radius); }
.article__body figcaption { text-align: center; font-size: calc(14px * var(--fs-t)); color: var(--muted); margin-top: 10px; }
.article__body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.article__share { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 26px 0 80px; margin-top: 30px; border-top: 1px solid var(--line); }
.article__share span { font-weight: 700; color: var(--ink); }

@media (max-width: 960px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; gap: 20px; }
  .article__head { padding: 40px 0 90px; }
  .article__cover { margin-top: -70px; }
  .article__body { font-size: calc(17px * var(--fs-t)); }
  .article__share .btn { flex: 1; }
}

/* =========================================================
   Formulir Pendaftaran Santri Baru (daftar.php)
   ========================================================= */
.reg-wrap { background: var(--bg-soft); padding-top: 50px; }
.reg-container { max-width: 840px; }
.reg-card { background: var(--white); border-radius: 18px; box-shadow: var(--shadow); padding: 34px 38px; }
.reg [hidden], .reg-step[hidden] { display: none !important; }
.reg-intro {
  display: flex; gap: 12px; align-items: flex-start; margin: 0 0 22px; padding: 14px 16px; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary-dark); font-size: calc(14.5px * var(--fs-t)); line-height: 1.6;
}
.reg-intro svg { font-size: 20px; color: var(--primary); margin-top: 2px; }
.reg-alert { margin-bottom: 20px; padding: 12px 16px; border-radius: 12px; background: #FEF2F2; border: 1px solid #FECACA; color: var(--red); font-weight: 600; font-size: 14.5px; }

/* Penanda langkah */
.reg-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.reg-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--muted); }
.reg-steps span {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: var(--bg-soft); border: 2px solid var(--line); color: var(--muted); transition: .25s;
}
.reg-steps em { font-style: normal; }
.reg-steps li.is-done span { background: var(--primary); border-color: var(--primary); color: var(--white); }
.reg-steps li.is-active { color: var(--ink); }
.reg-steps li.is-active span { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.reg-steps li.is-link { cursor: pointer; }
.reg-steps li.is-link:hover span { border-color: var(--primary); }
.reg-progress { height: 4px; margin-bottom: 28px; border-radius: 4px; background: var(--line); overflow: hidden; }
.reg-progress span { display: block; width: 20%; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .35s; }
.reg:not(.is-js) .reg-steps, .reg:not(.is-js) .reg-progress, .reg:not(.is-js) [data-next], .reg:not(.is-js) [data-prev] { display: none; }
.reg:not(.is-js) .reg-step + .reg-step { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line); }

.reg-step__head { margin-bottom: 20px; }
.reg-step__head span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); }
.reg-step__head h2 { font-size: calc(24px * var(--fs-h)); margin: 4px 0; }
.reg-step__head p { margin: 0; color: var(--muted); font-size: calc(14px * var(--fs-t)); }

/* Isian */
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.reg-grid > * { grid-column: 1 / -1; }
.reg-grid > .ff--half { grid-column: auto; }
.reg-sub { margin: 8px 0 -6px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: calc(16px * var(--fs-h)); color: var(--primary); }
.reg-grid > .reg-sub:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.ff { min-width: 0; margin: 0; padding: 0; border: 0; }
.ff__label, .ff legend { display: block; margin-bottom: 7px; padding: 0; font-weight: 700; font-size: calc(14.5px * var(--fs-t)); line-height: 1.4; color: var(--ink); }
.ff__req { color: var(--red); }
.ff input[type="text"], .ff input[type="tel"], .ff input[type="number"], .ff input[type="date"], .ff select, .ff textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background-color: var(--white);
  font: inherit; font-size: 16px; color: var(--ink); transition: border-color .2s, box-shadow .2s;   /* 16px: iPhone tidak memperbesar layar */
}
.ff textarea { min-height: 72px; resize: vertical; line-height: 1.5; }
.ff select {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20 20%22 fill=%22%230F766E%22%3E%3Cpath d=%22M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z%22/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.ff input:focus, .ff select:focus, .ff textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,118,110,.15); }
.ff ::placeholder { color: #B4B9C0; }
.ff__hint { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.ff__err { margin: 6px 0 0; font-size: 13px; font-weight: 600; color: var(--red); }
.ff--err input, .ff--err select, .ff--err textarea { border-color: var(--red); }
.ff--err .choice__item > span, .ff--err .ff-check { border-color: #FCA5A5; }

/* Pilihan (radio) berbentuk tombol */
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice__item { position: relative; cursor: pointer; }
.choice__item input { position: absolute; opacity: 0; pointer-events: none; }
.choice__item > span {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border: 1.5px solid var(--line); border-radius: 30px;
  background: var(--white); font-size: calc(14.5px * var(--fs-t)); font-weight: 600; line-height: 1.35; color: var(--text); transition: .2s;
}
.choice__item > span::before { content: ""; flex: none; width: 16px; height: 16px; border: 2px solid #C9CDD3; border-radius: 50%; transition: .2s; }
.choice__item:hover span { border-color: var(--primary); }
.choice__item input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.choice__item input:checked + span::before { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px var(--white); }
.choice__item input:focus-visible + span { box-shadow: 0 0 0 3px rgba(15,118,110,.25); }
.choice--cards { display: grid; grid-template-columns: 1fr 1fr; }
.choice--cards .choice__item > span { width: 100%; height: 100%; padding: 14px 16px; border-radius: 12px; }
.ff-check {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg-soft); cursor: pointer; font-size: calc(14.5px * var(--fs-t)); line-height: 1.6;
}
.ff-check input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }

/* Pasfoto */
.photo-pick { display: flex; gap: 16px; align-items: center; }
.photo-pick__prev {
  position: relative; flex: none; width: 90px; aspect-ratio: 3 / 4; overflow: hidden; display: grid; place-items: center;
  border: 1.5px dashed #C9CDD3; border-radius: 10px; background: var(--bg-soft); color: #C9CDD3; font-size: 34px;
}
.photo-pick__prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-pick.has-photo .photo-pick__prev { border-style: solid; border-color: var(--primary); }
.photo-pick__ctl { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.photo-pick__ctl input[type="file"] { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; }
.photo-pick__ctl .btn { padding: 9px 16px; font-size: 14px; gap: 8px; }
.photo-pick__name { font-size: 13px; font-weight: 600; color: var(--primary); }

/* Tombol pindah langkah */
.reg-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.reg-nav .btn { min-width: 150px; justify-content: center; }
.reg-nav .btn:disabled { opacity: .7; cursor: wait; transform: none; }

/* Ringkasan sebelum kirim */
.reg-summary { display: grid; gap: 12px; margin-bottom: 24px; }
.reg-sum { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.reg-sum__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-soft); font-size: 14.5px; color: var(--ink); }
.reg-sum__head button { font-size: 13px; font-weight: 700; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.reg-sum dl { margin: 0; padding: 4px 14px 8px; font-size: 13.5px; line-height: 1.5; }
.reg-sum dl div { display: grid; grid-template-columns: 42% 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.reg-sum dl div:last-child { border-bottom: 0; }
.reg-sum dt { color: var(--muted); }
.reg-sum dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Bukti pendaftaran & formulir ditutup */
.reg-done, .reg-closed { text-align: center; }
.reg-closed h2 { font-size: calc(24px * var(--fs-h)); }
.reg-done__icon { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--white); font-size: 34px; }
.reg-done__label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.reg-done__no { display: block; margin: 4px 0 20px; font-size: clamp(28px, 6vw, 38px); font-weight: 800; letter-spacing: .04em; color: var(--primary-dark); }
.reg-done__list { max-width: 460px; margin: 0 auto 22px; text-align: left; font-size: 14.5px; }
.reg-done__list div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.reg-done__list dt { color: var(--muted); }
.reg-done__list dd { margin: 0; text-align: right; font-weight: 700; color: var(--ink); }
.reg-done__next { max-width: 540px; margin: 0 auto 24px; padding: 14px 18px; border-radius: 12px; background: var(--primary-soft); text-align: left; font-size: 14.5px; color: var(--primary-dark); }
.reg-done__next p { margin: 4px 0 0; }
.reg-done__btns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.reg-done__tip { margin: 18px 0 0; font-size: 13px; color: var(--muted); }

@media (max-width: 640px) {
  .reg-wrap { padding-top: 24px; }
  .reg-card { padding: 22px 18px; border-radius: 16px; }
  .reg-steps { gap: 2px; }
  .reg-steps em { display: none; }            /* judul langkah sudah tampil di atas isian */
  .reg-steps span { width: 30px; height: 30px; font-size: 13px; }
  .reg-progress { margin-bottom: 22px; }
  .reg-step__head h2 { font-size: calc(20px * var(--fs-h)); }
  .reg-grid { gap: 16px 12px; }
  .reg-grid > .ff--half { grid-column: 1 / -1; }
  .reg-grid > .ff--short { grid-column: auto; }  /* RT/RW, anak ke-/bersaudara tetap berdampingan */
  .choice__item > span { padding: 9px 13px; font-size: calc(14px * var(--fs-t)); }
  .choice--cards .choice__item > span { padding: 12px; }
  .reg-nav .btn { flex: 1; min-width: 0; padding: 12px 14px; font-size: 14.5px; }
  .reg-sum dl div { grid-template-columns: 1fr; gap: 0; }
  .reg-done__btns .btn { width: 100%; justify-content: center; }
}

/* RT/RW dan anak ke-/bersaudara: kotak isian tetap sejajar walau judulnya dua baris */
.reg-grid > .ff--short { display: flex; flex-direction: column; }
.reg-grid > .ff--short .ff__label { margin-top: auto; }

/* =========================================================
   Spanduk berfoto (halaman PSB & formulir pendaftaran)
   Laptop/tablet: foto di belakang tulisan. HP: foto utuh selebar layar di atas, tulisan ringkas di bawahnya.
   --banner & --banner-r diisi banner_style() (includes/bootstrap.php).
   ========================================================= */
.page-banner--foto {
  background-image: linear-gradient(110deg, rgba(16,36,59,.95) 30%, rgba(16,63,56,.55)), var(--banner);
  background-size: cover; background-position: center 16%; background-repeat: no-repeat;   /* kepala/peci tidak terpotong */
}
@media (max-width: 960px) {
  .page-banner--foto { padding: 60px 0 54px; }
}
@media (max-width: 640px) {
  .page-banner--foto {
    --foto-h: calc(100vw * var(--banner-r, .4));
    padding: calc(var(--foto-h) + 18px) 0 26px;
    /* warna tepat di bawah foto = warna akhir pudaran foto (navy), baru setelah itu bergradasi: tidak ada garis batas */
    background: linear-gradient(180deg, var(--navy) 0, var(--navy) calc(var(--foto-h) + 1px), var(--primary-dark) 100%);
  }
  .page-banner--foto::before {   /* foto utuh, bagian bawahnya memudar halus ke warna spanduk */
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(var(--foto-h) + 1px);
    background:
      /* sudah navy penuh sebelum tepi bawah foto, sehingga menyatu dengan latar spanduk tanpa garis */
      linear-gradient(180deg, rgba(16,36,59,0) 55%, rgba(16,36,59,.28) 68%, rgba(16,36,59,.66) 80%, rgba(16,36,59,.9) 88%, var(--navy) 95%),
      var(--banner) center / cover no-repeat;
  }
  .page-banner--foto::after { top: var(--foto-h); }   /* motif kotak halus hanya di bawah foto (foto tanpa blur) */
  .page-banner--foto .crumb { margin-bottom: 8px; font-size: calc(13px * var(--fs-t)); }
  .page-banner--foto h1 { margin-bottom: 8px; font-size: calc(clamp(22px, 6.4vw, 26px) * var(--fs-h)); line-height: 1.22; }
  .page-banner--foto p { margin: 0; font-size: calc(14.5px * var(--fs-t)); line-height: 1.6; }
  .page-banner--foto .hero__btns { margin-top: 18px; }
}

/* Ikon jenis kelamin pada pilihan Laki-laki / Perempuan */
.choice__icon { flex: none; width: 22px; height: 22px; }
.choice__icon--male { color: #2563A8; }
.choice__icon--female { color: #C0457E; }
.choice__txt { display: flex; flex-direction: column; line-height: 1.25; }
.choice__txt b { font-size: 1.08em; font-weight: 800; color: var(--ink); }
.choice__txt small { font-size: .84em; font-weight: 600; color: var(--muted); }
.choice__item input:checked + span .choice__txt small { color: var(--primary); }

/* Foto santri: tombol Foto Selfie / Ganti Foto / Dari Galeri HP */
.photo-pick__ctl { flex: 1; min-width: 0; }
.photo-pick__prev { width: 96px; }
.photo-pick__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-pick__btns .btn { padding: 9px 14px; font-size: 14px; gap: 7px; line-height: 1.2; }
.photo-pick__btns .btn svg { width: 17px; height: 17px; }
.photo-pick__btns .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; border-color: #C9CDD3; color: var(--muted); background: none; }
@media (max-width: 640px) {
  .photo-pick { align-items: flex-start; gap: 14px; }
  .photo-pick__prev { width: 92px; }
  .photo-pick__btns { flex-direction: column; width: 100%; gap: 7px; }
  .photo-pick__btns .btn { width: 100%; justify-content: flex-start; padding: 9px 12px; font-size: 13.5px; }
}

/* Kamera di halaman (laptop/komputer) untuk tombol "Foto Selfie" */
body.cam-open { overflow: hidden; }
.cam { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(10,20,32,.86); }
.cam__box { width: min(440px, 100%); padding: 16px; border-radius: 18px; background: var(--white); box-shadow: 0 30px 80px rgba(0,0,0,.45); text-align: center; }
.cam__view { position: relative; width: min(100%, calc(64vh * .75)); aspect-ratio: 3 / 4; margin: 0 auto; overflow: hidden; border-radius: 12px; background: #0B1622; }
.cam__view video, .cam__view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam__view video { transform: scaleX(-1); }   /* pratinjau seperti cermin; hasil foto tidak dicerminkan */
.cam__guide { position: absolute; left: 50%; top: 45%; width: 56%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%); border: 2px dashed rgba(255,255,255,.75); border-radius: 50%; pointer-events: none; }
.cam__msg { margin: 12px 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.cam__btns { display: flex; gap: 10px; }
.cam__btns .btn { flex: 1; justify-content: center; padding: 11px 14px; font-size: 14.5px; }
.cam__btns .btn:disabled { opacity: .5; cursor: wait; transform: none; }
.cam [hidden] { display: none !important; }

/* Tombol Kirim Pendaftaran: tebal; di HP dua baris agar tidak keluar kotak */
.reg-submit { font-weight: 800; }
.reg-submit__txt { text-align: center; }
@media (max-width: 640px) {
  .reg-submit { white-space: normal; gap: 10px; padding-top: 9px; padding-bottom: 9px; }
  .reg-submit__txt { line-height: 1.2; }
  .reg-submit__txt span { display: block; }
  .reg-submit svg { flex: none; }
}

/* Isian dengan huruf otomatis */
[data-huruf="besar"] { text-transform: uppercase; }
[data-huruf="awal"] { text-transform: capitalize; }
[data-huruf]::placeholder { text-transform: none; }

/* ---------- Slider: foto di atas, tulisan di bawahnya (tidak menutupi foto) ---------- */
/* Judul diperkecil */
.hero h1, .hero .hero__title { font-size: calc(clamp(26px, 2.5vw, 36px) * var(--fs-h)); line-height: 1.22; margin-bottom: 0; }

@media (min-width: 961px) {
  /* Laptop: foto pas sampai tepi kiri-kanan, tinggi sama untuk semua slide (bentuk 2,7:1 seperti foto santri PSB).
     Foto berbentuk lain terpangkas sedikit; di layar pendek tinggi dibatasi dan pangkasan jatuh ke bagian bawah. */
  .hero { --foto-h: clamp(300px, min(37.04vw, calc(100vh - 376px)), 760px); }
  .hero__slides { min-height: 0; }
  .hero__slide { background-image: none !important; background-color: var(--primary-dark); align-items: flex-start; padding: calc(var(--foto-h) + 18px) 0 150px; }
  .hero__photo { display: block; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: var(--foto-h); overflow: hidden; background-color: var(--navy); }
  .hero__photo::after { content: ""; position: absolute; inset: 0; background: var(--img) center var(--fokus, 15%) / cover no-repeat; }
  .hero__slide::before { top: var(--foto-h); background: linear-gradient(90deg, var(--navy), var(--primary-dark)); }
  .hero__slide::after { top: var(--foto-h); }
  .hero__content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 48px; align-items: center; }
  .hero__content .eyebrow { margin-bottom: 10px; }
  .hero__isi p { margin-bottom: 18px; }
  .hero .btn--lg { padding: 13px 26px; font-size: 15px; }
  .hero__arab { width: min(200px, 60%); margin-bottom: 6px; }
}
@media (max-width: 960px) {
  .hero__judul { margin-bottom: 14px; }
  .hero .hero__title { font-size: calc(clamp(24px, 3.8vw, 30px) * var(--fs-h)); }
}
@media (max-width: 640px) {
  .hero__judul { margin-bottom: 12px; }
  .hero .hero__title { font-size: calc(clamp(19px, 5.4vw, 23px) * var(--fs-h)); }
}

/* Slide utama (berkaligrafi): kaligrafi dan nama pondok ditonjolkan */
.hero .hero__slide--utama .hero__title { font-size: calc(clamp(34px, 3.3vw, 50px) * var(--fs-h)); line-height: 1.16; }
.hero__slide--utama .hero__arab { width: min(370px, 85%); margin-bottom: 6px; }
@media (max-width: 960px) {
  .hero .hero__slide--utama .hero__title { font-size: calc(clamp(30px, 5vw, 40px) * var(--fs-h)); }
  .hero__slide--utama .hero__arab { width: min(380px, 80%); }
}
@media (max-width: 640px) {
  .hero .hero__slide--utama .hero__title { font-size: calc(clamp(25px, 7.6vw, 32px) * var(--fs-h)); }
  .hero__slide--utama .hero__arab { width: min(320px, 88%); }
}

/* Jarak kartu keunggulan -> Selayang Pandang dirapatkan (hanya sisi atas) */
.section.about { padding-top: 52px; }
@media (max-width: 960px) { .section.about { padding-top: 42px; } }
@media (max-width: 640px) { .section.about { padding-top: 32px; } }

/* Beranda, khusus laptop: jarak antarbagian dirapatkan (HP & tablet tidak berubah) */
@media (min-width: 961px) {
  .hero ~ .section { padding-top: 64px; padding-bottom: 64px; }
  .hero ~ .section.about { padding-top: 52px; }
}

/* Khusus laptop: footer lebih pendek, dan jarak peta/petunjuk arah ke footer dirapatkan */
@media (min-width: 961px) {
  .hero ~ .section.contact { padding-bottom: 40px; }
  .footer { padding-top: 34px; }
  .footer__grid { padding-bottom: 22px; }
  .footer__arab { margin-top: 14px; }
  .footer__about p { margin: 10px 0 12px; }
  .footer__bottom { padding: 13px 0; }
}

/* ---------- HP: label slider satu baris; WhatsApp mengambang di kiri bawah ---------- */
@media (max-width: 640px) {
  .hero__content .eyebrow { gap: 8px; font-size: clamp(9.5px, 2.9vw, 12px); letter-spacing: .08em; }
  .hero__content .eyebrow::before { width: 18px; flex: none; }
  .wa-float { left: 14px; right: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 54px; height: 54px; font-size: 30px; transition: transform .3s, opacity .3s; }
  .wa-float.is-away { transform: translateY(110px); opacity: 0; pointer-events: none; }   /* menyingkir saat membaca ke bawah */
  .to-top { right: 14px; bottom: 17px; }
  .footer__bottom { padding-bottom: 84px; }   /* ruang agar tombol tidak menutupi tulisan paling bawah */
}
