/* ==========================================================================
   SC Sekolah HTML — Desain 07 "Madrasah" (MA Sharecode Al-Hikmah)
   Template oleh sharecode.id · Lisensi MIT
   Daftar isi:
   1. Font & variabel   2. Dasar   3. Utilitas & tombol   4. Topbar & header
   5. Menu mobile   6. Hero beranda   7. Ornamen (bintang 8, arkade, lengkung)
   8. Section beranda   9. Halaman dalam   10. Komponen (tab, akordeon, tabel, form)
   11. Galeri, lightbox, modal   12. Footer   13. Animasi & responsif
   ========================================================================== */

/* 1. Font & variabel ------------------------------------------------------ */
@font-face { font-family: "El Messiri"; src: url("../fonts/el-messiri-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "El Messiri"; src: url("../fonts/el-messiri-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Palet utama — ganti di sini untuk mengubah warna seluruh template */
  --emerald: #065f46;
  --emerald-700: #064e3b;
  --emerald-900: #022c22;
  --emerald-soft: #d8ede4;
  --gold: #d4a017;
  --gold-light: #e9c46a;
  --gold-soft: #f6e7b4;
  --gold-text: #8a6508;           /* emas gelap untuk teks di latar terang (kontras AA) */
  --cream: #faf6ec;
  --cream-2: #f1e8d2;
  --paper: #fffdf8;
  --ink: #1b2a24;
  --muted: #56655e;
  --line: #e5dac0;
  --danger: #b42318;
  --success: #067647;

  --font-head: "El Messiri", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --arch: 50% 50% var(--radius) var(--radius) / 34% 34% var(--radius) var(--radius); /* lengkung kubah */
  --shadow: 0 10px 30px -12px rgba(6, 78, 59, .25);
  --shadow-lg: 0 24px 60px -20px rgba(2, 44, 34, .35);
  --container: 1200px;
  --header-h: 78px;

  /* Ornamen sebagai data-URI (warna emas) */
  --pattern-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23d4a017' stroke-width='1'%3E%3Crect x='18' y='18' width='20' height='20'/%3E%3Crect x='18' y='18' width='20' height='20' transform='rotate(45 28 28)'/%3E%3Ccircle cx='28' cy='28' r='4'/%3E%3Cpath d='M0 0l8 8M56 0l-8 8M0 56l8-8M56 56l-8-8'/%3E%3C/g%3E%3C/svg%3E");
  --mask-arcade: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='28' viewBox='0 0 56 28'%3E%3Cpath d='M0 0H56V28H53V21Q53 7 28 2Q3 7 3 21V28H0Z'/%3E%3C/svg%3E");
  --mask-domes: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='28' viewBox='0 0 56 28'%3E%3Cpath d='M3 28V21Q3 7 28 2Q53 7 53 21V28Z'/%3E%3C/svg%3E");
}

/* 2. Dasar ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.7; color: var(--ink);
  background: var(--cream); overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--emerald); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--emerald-700); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; color: var(--emerald-900); }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.7rem); }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.32rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: 1rem; top: -60px; z-index: 999; background: var(--gold); color: var(--emerald-900); padding: .6rem 1rem; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 1rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; display: inline-block; vertical-align: -.2em; }
.icon-fill { fill: currentColor; stroke: none; }

/* 3. Utilitas & tombol ---------------------------------------------------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; position: relative; }
.section-alt { background: var(--paper); }
.section-dark { background: var(--emerald-900); color: #e6f2ec; }
.section-dark h2, .section-dark h3 { color: #fff; }
.pattern-bg { position: relative; isolation: isolate; }
.pattern-bg::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-star); background-size: 56px; opacity: .14; z-index: -1; pointer-events: none; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 2rem; } .mb-0 { margin-bottom: 0; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.btn {
  display: inline-flex; align-items: center; gap: .55rem; padding: .85rem 1.5rem; border-radius: 999px;
  font-weight: 700; font-size: .95rem; text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--emerald-900); box-shadow: 0 8px 20px -8px rgba(212, 160, 23, .7); }
.btn-gold:hover { background: var(--gold-light); color: var(--emerald-900); }
.btn-emerald { background: var(--emerald); color: #fff; }
.btn-emerald:hover { background: var(--emerald-700); color: #fff; }
.btn-outline { border-color: var(--emerald); color: var(--emerald); background: transparent; }
.btn-outline:hover { background: var(--emerald); color: #fff; }
.btn-ghost-light { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--emerald-900); }
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; }
.link-more { display: inline-flex; gap: .4rem; align-items: center; font-weight: 700; text-decoration: none; color: var(--emerald); }
.link-more:hover .icon { transform: translateX(4px); }
.link-more .icon { transition: transform .2s; }

.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .7rem; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--emerald-soft); color: var(--emerald-700); letter-spacing: .02em; }
.badge-gold { background: var(--gold-soft); color: #6b4e05; }
.badge-red { background: #fde8e6; color: var(--danger); }

/* 4. Topbar & header ------------------------------------------------------ */
.topbar { background: var(--emerald-900); color: #cfe6dc; font-size: .8rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; flex-wrap: wrap; }
.topbar a { color: #cfe6dc; text-decoration: none; }
.topbar a:hover { color: var(--gold-light); }
.topbar-date { display: flex; gap: .5rem; align-items: center; }
.topbar-date .icon { color: var(--gold-light); }
.prayer { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.prayer li { padding: .15rem .6rem; border-radius: 999px; white-space: nowrap; }
.prayer li b { font-weight: 600; color: #fff; margin-left: .25rem; }
.prayer li.is-next { background: var(--gold); color: var(--emerald-900); }
.prayer li.is-next b { color: var(--emerald-900); }
.topbar-contact { display: flex; gap: 1rem; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(250, 246, 236, .97); border-bottom: 1px solid var(--line); transition: box-shadow .25s; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent); opacity: 0; transition: opacity .25s; }
.site-header.is-scrolled { box-shadow: 0 8px 24px -14px rgba(2, 44, 34, .45); }
.site-header.is-scrolled::after { opacity: 1; }
.nav-wrap { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--emerald-900); margin-right: auto; }
.brand img { width: 52px; height: 52px; }
.brand-text strong { display: block; font-family: var(--font-head); font-size: 1.32rem; line-height: 1.1; }
.brand-text small { display: block; font-size: .72rem; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.main-nav > ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.main-nav a, .main-nav .sub-toggle { display: flex; align-items: center; gap: .3rem; padding: .55rem .8rem; font-weight: 600; font-size: .92rem; color: var(--ink); text-decoration: none; border-radius: 10px; background: none; border: 0; cursor: pointer; position: relative; }
.main-nav > ul > li > a:hover, .main-nav .sub-toggle:hover { color: var(--emerald); background: var(--emerald-soft); }
.main-nav [aria-current="page"], .main-nav .is-active > .sub-toggle { color: var(--emerald); }
.main-nav > ul > li > [aria-current="page"]::after, .main-nav .is-active > .sub-toggle::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; width: 10px; height: 10px; transform: translateX(-50%) rotate(45deg);
  background: var(--gold); box-shadow: 0 0 0 2px var(--cream);
}
.has-sub { position: relative; }
.submenu { position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%, 8px); min-width: 230px; list-style: none; margin: 0; padding: .6rem; background: var(--paper); border: 1px solid var(--line); border-radius: 18px 18px 14px 14px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: .2s; }
.submenu::before { content: ""; position: absolute; left: 50%; top: -7px; width: 12px; height: 12px; background: var(--paper); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.has-sub:hover > .submenu, .has-sub:focus-within > .submenu, .has-sub.open > .submenu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.submenu a { padding: .55rem .8rem; font-size: .9rem; }
.submenu a:hover, .submenu a[aria-current="page"] { background: var(--emerald-soft); color: var(--emerald); }
.sub-toggle .icon { width: .9em; transition: transform .2s; }
.nav-cta { display: flex; gap: .6rem; align-items: center; }
.burger { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); align-items: center; justify-content: center; cursor: pointer; color: var(--emerald-900); }
.burger .icon { width: 24px; height: 24px; }

/* 5. Menu mobile (di luar header agar fixed tidak terkurung) --------------- */
.mnav-overlay { position: fixed; inset: 0; background: rgba(2, 44, 34, .55); z-index: 190; opacity: 0; visibility: hidden; transition: .25s; }
.mnav { position: fixed; top: 0; right: 0; bottom: 0; width: min(88vw, 360px); z-index: 200; background: var(--emerald-900); color: #fff; transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; overflow-y: auto; }
.mnav::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-star); background-size: 56px; opacity: .1; pointer-events: none; }
body.mnav-open .mnav { transform: none; }
body.mnav-open .mnav-overlay { opacity: 1; visibility: visible; }
body.mnav-open { overflow: hidden; }
.mnav-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, .12); position: relative; }
.mnav-head strong { font-family: var(--font-head); font-size: 1.2rem; }
.mnav-close { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.mnav ul { list-style: none; margin: 0; padding: .5rem 1rem; position: relative; }
.mnav li a { display: block; padding: .7rem .75rem; color: #e6f2ec; text-decoration: none; border-radius: 10px; font-weight: 600; }
.mnav li a:hover, .mnav li a[aria-current="page"] { background: rgba(212, 160, 23, .18); color: var(--gold-light); }
.mnav .mnav-group { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); padding: 1rem .75rem .25rem; font-weight: 700; }
.mnav-foot { margin-top: auto; padding: 1.25rem; position: relative; }
.mnav-foot .btn { width: 100%; justify-content: center; }

/* 6. Hero beranda ---------------------------------------------------------- */
.hero { position: relative; padding: clamp(2.5rem, 5vw, 4.5rem) 0 0; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-star); background-size: 56px; opacity: .13; }
.hero::after { content: ""; position: absolute; right: -10%; top: -20%; width: 60%; aspect-ratio: 1; background: radial-gradient(circle, rgba(212, 160, 23, .22), transparent 65%); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: end; }
.hero-copy { padding-bottom: clamp(2.5rem, 6vw, 5.5rem); }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); }
.eyebrow::before { content: ""; width: 12px; height: 12px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 3px var(--gold-soft); }
.hero h1 { margin: .9rem 0 1.1rem; }
.hero h1 em { font-style: normal; color: var(--emerald); position: relative; white-space: nowrap; }
.hero h1 em { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: .08em; text-underline-offset: .14em; }
.hero-lead { font-size: 1.1rem; color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.8rem 0 2.2rem; }
.hero-trust { display: flex; gap: 1.6rem; flex-wrap: wrap; padding-top: 1.4rem; border-top: 1px dashed var(--line); }
.hero-trust div { display: flex; align-items: center; gap: .65rem; font-size: .88rem; color: var(--muted); line-height: 1.35; }
.hero-trust strong { display: block; color: var(--emerald-900); font-family: var(--font-head); font-size: 1.15rem; }
.hero-trust .ic { width: 42px; height: 42px; display: grid; place-items: center; color: var(--emerald); background: var(--paper); border: 1px solid var(--line); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }

.hero-visual { position: relative; align-self: stretch; display: flex; align-items: flex-end; justify-content: center; }
.dome-frame { position: relative; width: min(100%, 470px); padding: 12px 12px 0; background: linear-gradient(180deg, var(--gold), #b98a10); border-radius: 50% 50% 0 0 / 34% 34% 0 0; box-shadow: var(--shadow-lg); }
.dome-frame::before { content: ""; position: absolute; left: 50%; top: -30px; width: 34px; height: 34px; transform: translateX(-50%); background: var(--gold); clip-path: polygon(50% 0, 62% 26%, 85% 15%, 74% 38%, 100% 50%, 74% 62%, 85% 85%, 62% 74%, 50% 100%, 38% 74%, 15% 85%, 26% 62%, 0 50%, 26% 38%, 15% 15%, 38% 26%); }
.dome-frame img { width: 100%; aspect-ratio: 640 / 820; object-fit: cover; border-radius: 50% 50% 0 0 / 33% 33% 0 0; border: 4px solid var(--cream); border-bottom: 0; }
.float-card { position: absolute; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow-lg); padding: .9rem 1.1rem; display: flex; gap: .75rem; align-items: center; font-size: .85rem; line-height: 1.35; border: 1px solid var(--line); }
.float-card strong { display: block; font-family: var(--font-head); font-size: 1.1rem; color: var(--emerald-900); }
.float-card .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--emerald); color: var(--gold-light); display: grid; place-items: center; }
.float-card.one { left: -6%; top: 26%; }
.float-card.two { right: -4%; bottom: 14%; }
.float-card.two .ic { background: var(--gold); color: var(--emerald-900); }

/* 7. Ornamen ---------------------------------------------------------------- */
/* Pembatas section bintang 8 */
.star-divider { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .5rem 0; color: var(--gold); }
.star-divider::before, .star-divider::after { content: ""; flex: 1; max-width: 360px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.star-divider::after { background: linear-gradient(90deg, var(--gold), transparent); }
.star-divider svg { width: 46px; height: 46px; }
.star-divider .sm { width: 18px; height: 18px; opacity: .7; }
/* Arkade: deretan lengkung di bawah hero halaman dalam */
.arcade { height: 28px; background: var(--emerald-900); -webkit-mask: var(--mask-arcade) repeat-x 0 0 / 56px 28px; mask: var(--mask-arcade) repeat-x 0 0 / 56px 28px; margin-top: -1px; }
.domes { height: 28px; background: var(--emerald-900); -webkit-mask: var(--mask-domes) repeat-x 0 0 / 56px 28px; mask: var(--mask-domes) repeat-x 0 0 / 56px 28px; margin-bottom: -1px; }

.section-head { max-width: 680px; margin: 0 auto 2.75rem; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head p { color: var(--muted); }
.section-dark .section-head p { color: #b9d4c8; }
.kicker { display: inline-flex; align-items: center; gap: .6rem; font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-text); margin-bottom: .6rem; }
.section-dark .kicker { color: var(--gold-light); }
.kicker svg { width: 16px; height: 16px; color: var(--gold); }
.head-row { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2.2rem; flex-wrap: wrap; }
.head-row .section-head { margin: 0; }

/* Kartu lengkung (kubah) */
.arch-img { border-radius: var(--arch); overflow: hidden; background: var(--cream-2); }
.arch-img img { width: 100%; height: 100%; object-fit: cover; }

/* 8. Section beranda -------------------------------------------------------- */
/* Statistik */
.stats-band { background: var(--emerald-900); color: #fff; position: relative; padding: 0 0 3.5rem; }
.stats-band::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-star); background-size: 56px; opacity: .1; }
.stats-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; transform: translateY(-1px); }
.stat { text-align: center; padding: 2.4rem 1rem 1.6rem; background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); border: 1px solid rgba(212, 160, 23, .35); border-radius: 50% 50% 16px 16px / 26% 26% 16px 16px; border-top: 0; }
.stat .ic { width: 54px; height: 54px; margin: 0 auto .8rem; display: grid; place-items: center; color: var(--emerald-900); background: var(--gold); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.stat .ic .icon { width: 26px; height: 26px; }
.stat-num { font-family: var(--font-head); font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; color: var(--gold-light); }
.stat p { margin: .4rem 0 0; color: #c9ded4; font-size: .92rem; }

/* Sambutan */
.welcome { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.welcome-photo { position: relative; }
.welcome-photo .arch-img { aspect-ratio: 4 / 5; border: 8px solid var(--paper); box-shadow: var(--shadow-lg); }
.welcome-photo::before { content: ""; position: absolute; inset: -18px 18px 18px -18px; border: 2px solid var(--gold); border-radius: var(--arch); z-index: -1; }
.welcome-photo .name-tag { position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%); background: var(--emerald); color: #fff; padding: .7rem 1.4rem; border-radius: 999px; text-align: center; white-space: nowrap; box-shadow: var(--shadow); line-height: 1.3; }
.name-tag strong { display: block; font-family: var(--font-head); font-size: 1.05rem; }
.name-tag small { color: var(--gold-light); font-size: .78rem; }
.welcome blockquote { margin: 1.4rem 0; padding: 1.2rem 1.4rem; background: var(--paper); border-right: 4px solid var(--gold); border-radius: 14px; font-family: var(--font-head); font-size: 1.25rem; color: var(--emerald-700); line-height: 1.5; }
.signature { font-family: var(--font-head); font-size: 1.4rem; color: var(--emerald); margin-top: 1rem; }

/* Program unggulan */
.program-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.program { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 120px 120px var(--radius-lg) var(--radius-lg); padding: 2.8rem 1.6rem 1.8rem; text-align: center; transition: transform .25s, box-shadow .25s, border-color .25s; }
.program:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.program .ic { width: 76px; height: 76px; margin: 0 auto 1.1rem; display: grid; place-items: center; color: var(--gold-light); background: var(--emerald); border-radius: 50% 50% 14px 14px / 60% 60% 14px 14px; box-shadow: 0 0 0 6px var(--emerald-soft); }
.program .ic .icon { width: 32px; height: 32px; }
.program p { color: var(--muted); font-size: .94rem; margin-bottom: 0; }
.program .num { position: absolute; top: 1.1rem; right: 1.6rem; font-family: var(--font-head); color: var(--gold-text); opacity: .5; font-size: .9rem; }

/* Tahfidz band */
.tahfidz-band { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.juz-list { display: grid; gap: 1rem; margin: 1.6rem 0; }
.juz-row { display: grid; grid-template-columns: 120px 1fr 64px; gap: 1rem; align-items: center; font-size: .92rem; }
.bar { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar span { display: block; height: 100%; width: var(--w, 50%); background: linear-gradient(90deg, var(--gold), var(--gold-light)); border-radius: inherit; transition: width 1.2s ease; }
.section:not(.section-dark) .bar { background: var(--cream-2); }
.juz-row b { color: var(--gold-light); text-align: right; font-family: var(--font-head); font-size: 1.1rem; }
.tahfidz-figure { position: relative; }
.tahfidz-figure .arch-img { aspect-ratio: 800 / 600; border: 2px solid var(--gold); padding: 10px; background: transparent; }
.tahfidz-figure .arch-img img { border-radius: 50% 50% 8px 8px / 34% 34% 8px 8px; }
.hafiz-badge { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); background: var(--gold); color: var(--emerald-900); border-radius: 999px; padding: .65rem 1.4rem; font-weight: 700; display: flex; gap: .5rem; align-items: center; white-space: nowrap; box-shadow: var(--shadow); }

/* Berita */
.news-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.6rem; }
.news-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s; }
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.news-card .thumb { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 0 0 50% 50% / 0 0 14% 14%; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.news-card:hover .thumb img { transform: scale(1.05); }
.news-body { padding: 1.3rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.news-body h3 { margin: 0; font-size: 1.25rem; }
.news-body h3 a { color: var(--emerald-900); text-decoration: none; }
.news-body h3 a:hover { color: var(--emerald); }
.news-body p { color: var(--muted); font-size: .93rem; margin: 0; }
.meta { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted); align-items: center; }
.meta span { display: inline-flex; align-items: center; gap: .3rem; }
.news-feature .news-body h3 { font-size: 1.6rem; }
.news-list { display: grid; gap: 1rem; }
.news-mini { display: grid; grid-template-columns: 130px 1fr; gap: 1rem; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: .7rem; transition: border-color .2s; }
.news-mini:hover { border-color: var(--gold); }
.news-mini .arch-img { aspect-ratio: 1 / 1; border-radius: 50% 50% 10px 10px / 40% 40% 10px 10px; }
.news-mini h3 { font-size: 1.05rem; margin: .25rem 0 0; line-height: 1.3; }
.news-mini h3 a { color: var(--emerald-900); text-decoration: none; }

/* Agenda & pengumuman */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; padding-bottom: .9rem; border-bottom: 1px dashed var(--line); }
.panel-head h3 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.panel-head h3 .icon { color: var(--gold); }
.agenda-item { display: grid; grid-template-columns: 66px 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.agenda-item:last-child { border-bottom: 0; }
.date-arch { background: var(--emerald); color: #fff; text-align: center; border-radius: 50% 50% 10px 10px / 34% 34% 10px 10px; padding: .7rem 0 .45rem; line-height: 1; height: max-content; }
.date-arch b { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--gold-light); }
.date-arch small { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.agenda-item h4 { margin: 0 0 .2rem; font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; color: var(--ink); }
.agenda-item .meta { font-size: .8rem; }
.announce { display: flex; gap: .9rem; padding: .85rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.announce:last-child { border-bottom: 0; }
.announce .ic { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--gold-soft); color: #6b4e05; }
.announce h4 { margin: 0; font-family: var(--font-body); font-size: .98rem; font-weight: 700; color: var(--ink); }
.announce:hover h4 { color: var(--emerald); }

/* Prestasi strip */
.achieve-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.achieve { position: relative; padding: 1.5rem 1.3rem 1.3rem; border-radius: var(--radius-lg); background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.achieve::after { content: ""; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; background: var(--gold-soft); clip-path: polygon(50% 0, 62% 26%, 85% 15%, 74% 38%, 100% 50%, 74% 62%, 85% 85%, 62% 74%, 50% 100%, 38% 74%, 15% 85%, 26% 62%, 0 50%, 26% 38%, 15% 15%, 38% 26%); opacity: .8; }
.achieve .medal { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--emerald); color: var(--gold-light); margin-bottom: .8rem; }
.achieve h4 { margin: 0 0 .3rem; font-size: 1.08rem; }
.achieve p { margin: 0; font-size: .85rem; color: var(--muted); }

/* Galeri ringkas (mosaik lengkung) */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 1rem; }
.mosaic a { position: relative; display: block; overflow: hidden; border-radius: 16px; }
.mosaic a:nth-child(1) { grid-row: span 2; border-radius: var(--arch); }
.mosaic a:nth-child(6) { grid-column: 4; grid-row: 1 / span 2; border-radius: var(--arch); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.mosaic a:hover img { transform: scale(1.06); }
.mosaic span { position: absolute; left: .8rem; bottom: .8rem; background: rgba(2, 44, 34, .82); color: #fff; font-size: .78rem; padding: .3rem .7rem; border-radius: 999px; }

/* Testimoni slider */
.testi-wrap { position: relative; max-width: 860px; margin: 0 auto; }
.testi-track { display: flex; transition: transform .5s ease; }
.testi-viewport { overflow: hidden; }
.testi { flex: 0 0 100%; padding: 0 .5rem; text-align: center; }
.testi blockquote { margin: 0 auto 1.5rem; font-family: var(--font-head); font-size: clamp(1.25rem, 2.4vw, 1.65rem); line-height: 1.55; color: #fff; max-width: 760px; }
.testi .who { display: inline-flex; align-items: center; gap: .9rem; text-align: left; }
.testi .who img { width: 60px; height: 60px; border-radius: 50% 50% 10px 10px / 45% 45% 10px 10px; border: 2px solid var(--gold); object-fit: cover; }
.testi .who strong { display: block; color: #fff; }
.testi .who small { color: var(--gold-light); }
.quote-mark { width: 54px; height: 54px; margin: 0 auto 1.2rem; color: var(--gold); }
.slider-ctrl { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.slider-ctrl button.nav { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(212, 160, 23, .5); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.slider-ctrl button.nav:hover { background: var(--gold); color: var(--emerald-900); }
.dots { display: flex; gap: .5rem; }
.dots button { width: 12px; height: 12px; border: 0; padding: 0; background: rgba(255, 255, 255, .3); transform: rotate(45deg); cursor: pointer; border-radius: 2px; }
.dots button[aria-current="true"] { background: var(--gold); }

/* CTA SPMB */
.cta { position: relative; background: var(--emerald); color: #fff; border-radius: 200px 200px var(--radius-lg) var(--radius-lg) / 90px 90px var(--radius-lg) var(--radius-lg); padding: clamp(3rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem); text-align: center; overflow: hidden; isolation: isolate; }
.cta::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-star); background-size: 56px; opacity: .15; z-index: -1; }
.cta::after { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(233, 196, 106, .5); border-radius: inherit; z-index: -1; pointer-events: none; }
.cta h2 { color: #fff; max-width: 720px; margin-inline: auto; }
.cta p { color: #d3e8de; max-width: 620px; margin-inline: auto; }
.countdown { display: flex; justify-content: center; gap: .8rem; margin: 1.6rem 0 2rem; flex-wrap: wrap; }
.countdown div { min-width: 82px; padding: .8rem .6rem; background: rgba(2, 44, 34, .45); border: 1px solid rgba(233, 196, 106, .4); border-radius: 40px 40px 12px 12px / 26px 26px 12px 12px; }
.countdown b { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--gold-light); line-height: 1.1; }
.countdown small { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: #c5dcd2; }
.cta .actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* 9. Halaman dalam ----------------------------------------------------------- */
.page-hero { position: relative; background: var(--emerald-900); color: #d3e8de; padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); text-align: center; overflow: hidden; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-star); background-size: 56px; opacity: .12; z-index: -1; }
.page-hero::after { content: ""; position: absolute; left: 50%; top: 18px; width: min(680px, 92%); height: 130%; transform: translateX(-50%); border: 1px solid rgba(233, 196, 106, .45); border-radius: 50% 50% 0 0 / 160px 160px 0 0; z-index: -1; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.2rem); margin: .4rem 0 .6rem; }
.page-hero p { max-width: 620px; margin: 0 auto; }
.breadcrumb { display: flex; justify-content: center; gap: .5rem; list-style: none; padding: 0; margin: 0; font-size: .85rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--gold-light); text-decoration: none; }
.breadcrumb li + li::before { content: "✦"; margin-right: .5rem; color: var(--gold); font-size: .7rem; }

.prose { max-width: 760px; }
.prose h2 { font-size: 1.8rem; margin-top: 2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose p, .prose li { color: #33443d; }
.two-col > *, .grid > *, .split-2 > *, .welcome > *, .tahfidz-band > *, .contact-grid > *, .news-grid > *, .hero-grid > * { min-width: 0; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.sticky-side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 1.5rem; }

.vm-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.6rem; }
.vm-card { background: var(--paper); border: 1px solid var(--line); border-radius: 160px 160px var(--radius-lg) var(--radius-lg) / 70px 70px var(--radius-lg) var(--radius-lg); padding: 3rem 2rem 2rem; }
.vm-card.dark { background: var(--emerald); color: #e3f1ea; border-color: var(--emerald); }
.vm-card.dark h3 { color: var(--gold-light); }
.vm-card.dark blockquote { font-family: var(--font-head); font-size: 1.5rem; color: #fff; margin: 0; line-height: 1.5; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.check-list li { display: flex; gap: .7rem; align-items: flex-start; }
.check-list li::before { content: ""; flex: none; width: 12px; height: 12px; margin-top: .5em; background: var(--gold); transform: rotate(45deg); }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 22px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--gold), var(--emerald)); }
.timeline li { position: relative; padding: 0 0 1.6rem 64px; }
.timeline li::before { content: ""; position: absolute; left: 12px; top: 4px; width: 22px; height: 22px; background: var(--paper); border: 3px solid var(--gold); transform: rotate(45deg); }
.timeline .year { font-family: var(--font-head); font-size: 1.3rem; color: var(--emerald); font-weight: 700; }

.id-table { width: 100%; border-collapse: collapse; }
.id-table th, .id-table td { text-align: left; padding: .7rem .4rem; border-bottom: 1px dashed var(--line); vertical-align: top; font-size: .94rem; }
.id-table th { width: 42%; color: var(--muted); font-weight: 600; }

.accred { display: flex; align-items: center; gap: 1.4rem; padding: 1.6rem; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--emerald), var(--emerald-900)); color: #e3f1ea; }
.accred .seal { flex: none; width: 110px; height: 110px; display: grid; place-items: center; background: var(--gold); color: var(--emerald-900); font-family: var(--font-head); font-size: 3rem; font-weight: 700; clip-path: polygon(50% 0, 62% 26%, 85% 15%, 74% 38%, 100% 50%, 74% 62%, 85% 85%, 62% 74%, 50% 100%, 38% 74%, 15% 85%, 26% 62%, 0 50%, 26% 38%, 15% 15%, 38% 26%); }
.accred h3 { color: #fff; margin-bottom: .3rem; }

.facility { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.facility .arch-img { aspect-ratio: 16 / 10; border-radius: 0 0 50% 50% / 0 0 12% 12%; }
.facility div.body { padding: 1.1rem 1.3rem 1.3rem; }
.facility h3 { font-size: 1.15rem; margin: 0 0 .3rem; }
.facility p { margin: 0; color: var(--muted); font-size: .9rem; }

/* Toolbar pencarian & filter */
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 2rem; padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search .icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; padding: .75rem 1rem .75rem 2.8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--cream); }
.search input:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-soft); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--cream); font-weight: 600; font-size: .86rem; cursor: pointer; color: var(--ink); }
a.chip { text-decoration: none; }
.chip:hover { border-color: var(--emerald); color: var(--emerald); }
.chip[aria-pressed="true"] { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); display: none; }
.empty-state.show { display: block; }
.result-count { font-size: .85rem; color: var(--muted); }

/* Direktori guru */
.teacher-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.teacher { background: var(--paper); border: 1px solid var(--line); border-radius: 110px 110px var(--radius-lg) var(--radius-lg) / 90px 90px var(--radius-lg) var(--radius-lg); padding: 1rem 1rem 1.3rem; text-align: center; transition: transform .25s, box-shadow .25s; }
.teacher:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.teacher .arch-img { aspect-ratio: 4 / 5; margin-bottom: 1rem; }
.teacher h3 { font-size: 1.08rem; margin: 0 0 .15rem; }
.teacher p { margin: 0 0 .5rem; font-size: .85rem; color: var(--muted); }
.teacher .tags { display: flex; justify-content: center; gap: .35rem; flex-wrap: wrap; }

/* Kartu konten umum */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; }
.card h3 { font-size: 1.2rem; }
.card-arch { border-radius: 140px 140px var(--radius-lg) var(--radius-lg) / 60px 60px var(--radius-lg) var(--radius-lg); padding-top: 2.4rem; text-align: center; }
.icon-box { width: 56px; height: 56px; display: grid; place-items: center; background: var(--emerald-soft); color: var(--emerald); border-radius: 50% 50% 12px 12px / 55% 55% 12px 12px; margin-bottom: 1rem; }
.card-arch .icon-box { margin-inline: auto; }
.icon-box .icon { width: 26px; height: 26px; }
.price { font-family: var(--font-head); font-size: 1.8rem; color: var(--emerald); }

/* Jurusan */
.major { display: grid; grid-template-columns: 220px 1fr; gap: 1.6rem; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.3rem; }
.major .arch-img { aspect-ratio: 1; }

/* Tabel data */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--paper); }
.table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .92rem; }
.table th { background: var(--emerald); color: #fff; text-align: left; padding: .9rem 1rem; font-weight: 600; white-space: nowrap; }
.table th:first-child { border-top-left-radius: calc(var(--radius-lg) - 1px); }
.table th:last-child { border-top-right-radius: calc(var(--radius-lg) - 1px); }
.table td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:nth-child(even) { background: #fbf8f0; }
.table tbody tr:hover { background: var(--emerald-soft); }
.table tr:last-child td { border-bottom: 0; }

/* Halaman detail berita */
.article-hero { border-radius: var(--arch); overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 2rem; }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-body { font-size: 1.04rem; }
.article-body blockquote { margin: 1.6rem 0; padding: 1.2rem 1.5rem; border-left: 4px solid var(--gold); background: var(--paper); border-radius: 0 14px 14px 0; font-family: var(--font-head); font-size: 1.25rem; color: var(--emerald-700); }
.share { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: 1rem 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); margin: 2rem 0; }
.share button, .share a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--paper); color: var(--emerald); cursor: pointer; text-decoration: none; }
.share button:hover, .share a:hover { background: var(--emerald); color: #fff; }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { padding: .6rem 0; border-bottom: 1px dashed var(--line); }
.side-list a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .94rem; }
.side-list a:hover { color: var(--emerald); }
.pager { display: flex; justify-content: center; gap: .4rem; margin-top: 2.5rem; }
.pager a, .pager span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; background: var(--paper); font-weight: 700; color: var(--ink); padding: 0 .6rem; }
.pager [aria-current="page"] { background: var(--emerald); color: #fff; border-color: var(--emerald); }

/* Unduhan dokumen */
.doc-list { display: grid; gap: .8rem; }
.doc { display: grid; grid-template-columns: 48px 1fr auto; gap: 1rem; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1.1rem; }
.doc .ic { width: 48px; height: 48px; display: grid; place-items: center; background: var(--emerald-soft); color: var(--emerald); border-radius: 50% 50% 10px 10px / 50% 50% 10px 10px; }
.doc h3 { font-size: 1rem; margin: 0; font-family: var(--font-body); color: var(--ink); }
.doc .meta { font-size: .78rem; }

/* 10. Komponen ------------------------------------------------------------------ */
/* Tab */
.tabs [role="tablist"] { display: flex; gap: .4rem; flex-wrap: wrap; padding: .4rem; background: var(--cream-2); border-radius: 999px; width: max-content; max-width: 100%; margin: 0 auto 2rem; }
.tabs [role="tab"] { padding: .6rem 1.2rem; border: 0; border-radius: 999px; background: transparent; font-weight: 700; cursor: pointer; color: var(--muted); font-size: .9rem; }
.tabs [role="tab"][aria-selected="true"] { background: var(--emerald); color: #fff; box-shadow: var(--shadow); }
.tabs [role="tabpanel"][hidden] { display: none; }

/* Akordeon */
.accordion { display: grid; gap: .8rem; }
.acc-item { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.acc-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.05rem 1.3rem; background: none; border: 0; font-weight: 700; text-align: left; cursor: pointer; font-size: 1rem; color: var(--emerald-900); }
.acc-btn .icon { transition: transform .25s; color: var(--gold-text); }
.acc-btn[aria-expanded="true"] .icon { transform: rotate(45deg); }
.acc-panel { padding: 0 1.3rem 1.1rem; color: var(--muted); }
.acc-panel[hidden] { display: none; }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field label .req { color: var(--danger); }
.field input, .field select, .field textarea { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; width: 100%; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-soft); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field .error { color: var(--danger); font-size: .8rem; min-height: 0; display: none; }
.field.invalid .error { display: block; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: .35rem; accent-color: var(--emerald); }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; }
.radio-cards label { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: .9rem; cursor: pointer; background: #fff; font-weight: 600; font-size: .9rem; }
.radio-cards input { accent-color: var(--emerald); margin-top: .3rem; }
.radio-cards label:has(input:checked) { border-color: var(--emerald); background: var(--emerald-soft); }
.radio-cards small { display: block; font-weight: 400; color: var(--muted); }

/* Form multi-langkah */
.steps { display: flex; list-style: none; padding: 0; margin: 0 0 2rem; gap: .5rem; counter-reset: s; }
.steps li { flex: 1; text-align: center; font-size: .8rem; font-weight: 600; color: var(--muted); position: relative; padding-top: 3rem; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 40px; height: 40px; display: grid; place-items: center; background: var(--cream-2); color: var(--muted); font-family: var(--font-head); font-size: 1.1rem; border-radius: 50% 50% 8px 8px / 55% 55% 8px 8px; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 20px; left: calc(-50% + 24px); right: calc(50% + 24px); height: 2px; background: var(--line); }
.steps li:first-child::after { display: none; }
.steps li.done::before, .steps li.current::before { background: var(--emerald); color: var(--gold-light); }
.steps li.done::after, .steps li.current::after { background: var(--emerald); }
.steps li.current { color: var(--emerald-900); }
.step-panel[hidden] { display: none; }
.step-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; }
.summary { background: var(--cream); border-radius: 14px; padding: 1rem 1.2rem; }
.summary dl { display: grid; grid-template-columns: 180px 1fr; gap: .4rem 1rem; margin: 0; font-size: .92rem; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
.success-box { text-align: center; padding: 2rem 1rem; }
.success-box .seal { width: 90px; height: 90px; margin: 0 auto 1rem; display: grid; place-items: center; background: var(--emerald); color: var(--gold-light); clip-path: polygon(50% 0, 62% 26%, 85% 15%, 74% 38%, 100% 50%, 74% 62%, 85% 85%, 62% 74%, 50% 100%, 38% 74%, 15% 85%, 26% 62%, 0 50%, 26% 38%, 15% 15%, 38% 26%); }
.success-box .seal .icon { width: 36px; height: 36px; }
.reg-no { display: inline-block; font-family: var(--font-head); font-size: 1.5rem; padding: .4rem 1.2rem; border: 2px dashed var(--gold); border-radius: 12px; color: var(--emerald); margin: .5rem 0 1rem; }

/* SPMB jalur & alur */
.path-card { position: relative; }
.path-card .quota { position: absolute; top: 1rem; right: 1rem; }
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; counter-reset: f; }
.flow li { position: relative; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 80px 80px 16px 16px / 50px 50px 16px 16px; padding: 2.4rem 1rem 1.2rem; font-size: .9rem; }
.flow li::before { counter-increment: f; content: counter(f); position: absolute; top: -18px; left: 50%; transform: translateX(-50%); width: 38px; height: 38px; display: grid; place-items: center; background: var(--gold); color: var(--emerald-900); font-weight: 700; font-family: var(--font-head); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.flow h4 { margin: 0 0 .3rem; font-size: 1.02rem; }
.flow p { margin: 0; color: var(--muted); font-size: .84rem; }

/* Cek kelulusan */
.grad-box { max-width: 640px; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 200px 200px var(--radius-lg) var(--radius-lg) / 90px 90px var(--radius-lg) var(--radius-lg); padding: 3.5rem 2rem 2rem; text-align: center; box-shadow: var(--shadow-lg); }
.grad-form { display: flex; gap: .6rem; margin-top: 1.4rem; }
.grad-form input { flex: 1; padding: .9rem 1.1rem; border: 1px solid var(--line); border-radius: 999px; font-size: 1.05rem; letter-spacing: .08em; text-align: center; }
.grad-form input:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-soft); }
.grad-result { margin-top: 1.6rem; text-align: left; }
.grad-result .res { border-radius: 18px; padding: 1.4rem; }
.res.ok { background: var(--emerald); color: #e3f1ea; }
.res.ok h3 { color: var(--gold-light); }
.res.nf { background: #fdf2f1; color: #7a271a; border: 1px solid #f4c7c2; }
.res dl { display: grid; grid-template-columns: 150px 1fr; gap: .3rem 1rem; margin: .8rem 0 0; font-size: .92rem; }
.res dd { margin: 0; font-weight: 700; }
.res-status { display: inline-block; font-family: var(--font-head); font-size: 2rem; letter-spacing: .1em; background: var(--gold); color: var(--emerald-900); padding: .1rem 1.2rem; border-radius: 12px; margin: .3rem 0; }

/* Alumni */
.alumni-card { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 1rem; }
.alumni-card .arch-img { aspect-ratio: 4 / 5; }
.alumni-card h3 { font-size: 1.08rem; margin: 0; }
.alumni-card p { margin: .2rem 0 0; font-size: .86rem; color: var(--muted); }

/* Tahfidz halaman */
.halaqah-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.hafalan-target { display: grid; gap: 1.1rem; }
.hafalan-target .juz-row { grid-template-columns: 160px 1fr 80px; }
.hafalan-target .juz-row b { color: var(--emerald); }

/* Ekstrakurikuler */
.ekskul { display: flex; gap: 1rem; align-items: flex-start; }
.ekskul .icon-box { margin: 0; flex: none; }
.ekskul h3 { font-size: 1.1rem; margin: 0 0 .2rem; }
.ekskul p { margin: 0; font-size: .88rem; color: var(--muted); }
.osis-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; text-align: center; }
.osis-grid .arch-img { aspect-ratio: 4 / 5; margin-bottom: .7rem; border: 4px solid var(--paper); box-shadow: var(--shadow); }
.osis-grid h4 { margin: 0; font-size: 1rem; }
.osis-grid p { margin: 0; font-size: .82rem; color: var(--muted); }

/* Kontak */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2rem; }
.contact-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px dashed var(--line); }
.contact-item .icon-box { margin: 0; flex: none; }
.contact-item h3 { font-size: 1.05rem; margin: 0; font-family: var(--font-body); }
.contact-item p { margin: 0; color: var(--muted); font-size: .92rem; }
.map-frame { border: 0; width: 100%; height: 360px; border-radius: var(--radius-lg); display: block; filter: saturate(.85); }

/* 11. Galeri, lightbox, modal -------------------------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.g-item { position: relative; display: block; padding: 0; border: 0; cursor: zoom-in; overflow: hidden; border-radius: 16px; background: var(--cream-2); aspect-ratio: 4 / 3; text-align: left; }
.g-item:nth-child(5n + 1) { border-radius: var(--arch); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.g-item:hover img { transform: scale(1.06); }
.g-item .cap { position: absolute; inset: auto 0 0 0; padding: 2.4rem 1rem .9rem; background: linear-gradient(transparent, rgba(2, 44, 34, .88)); color: #fff; font-weight: 600; font-size: .9rem; }
.g-item .cap small { display: block; color: var(--gold-light); font-weight: 500; font-size: .76rem; }
.g-item.hide { display: none; }
.video-item { cursor: pointer; }
.video-item .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -60%); width: 70px; height: 70px; display: grid; place-items: center; background: var(--gold); color: var(--emerald-900); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); transition: transform .25s; }
.video-item:hover .play { transform: translate(-50%, -60%) scale(1.1); }
.video-item .play .icon { width: 26px; height: 26px; margin-left: 3px; }

.lightbox, .modal { position: fixed; inset: 0; z-index: 300; background: rgba(2, 20, 15, .92); display: none; align-items: center; justify-content: center; padding: 4rem 1rem 2rem; }
.lightbox.open, .modal.open { display: flex; }
.lightbox figure { margin: 0; max-width: min(1000px, 100%); text-align: center; }
.lightbox img { max-height: 75vh; width: auto; margin: 0 auto; border-radius: 14px; }
.lightbox figcaption { color: #e3f1ea; margin-top: .9rem; }
.lb-btn { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(233, 196, 106, .5); background: rgba(2, 44, 34, .6); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: var(--gold); color: var(--emerald-900); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.modal-box { width: min(960px, 100%); }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%); background: var(--emerald-900); color: #fff; padding: .9rem 1.3rem; border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 400; display: flex; gap: .6rem; align-items: center; border-left: 4px solid var(--gold); transition: transform .35s ease; max-width: calc(100% - 2rem); }
.toast.show { transform: translate(-50%, 0); }
.toast .icon { color: var(--gold-light); }
.to-top { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 150; width: 50px; height: 56px; border: 0; cursor: pointer; background: var(--emerald); color: var(--gold-light); border-radius: 50% 50% 12px 12px / 45% 45% 12px 12px; box-shadow: var(--shadow-lg); display: grid; place-items: center; opacity: 0; visibility: hidden; transform: translateY(12px); transition: .25s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--gold); color: var(--emerald-900); }

/* 404 */
.notfound { text-align: center; padding: clamp(3rem, 8vw, 6rem) 0; }
.notfound img { width: min(420px, 90%); margin: 0 auto 1.5rem; }
.notfound .code { font-family: var(--font-head); font-size: clamp(4rem, 10vw, 7rem); color: var(--emerald); line-height: 1; }

/* 12. Footer -------------------------------------------------------------------- */
.site-footer { background: var(--emerald-900); color: #b9d4c8; position: relative; isolation: isolate; font-size: .92rem; }
.site-footer::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern-star); background-size: 56px; opacity: .07; z-index: -1; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.site-footer h3 { color: #fff; font-size: 1.15rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }
.site-footer h3::before { content: ""; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }
.site-footer a { color: #b9d4c8; text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); }
.footer-brand { display: flex; gap: .8rem; align-items: center; margin-bottom: 1rem; }
.footer-brand img { width: 58px; height: 58px; }
.footer-brand strong { font-family: var(--font-head); color: #fff; font-size: 1.3rem; display: block; line-height: 1.2; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.footer-contact li { display: flex; gap: .6rem; }
.footer-contact .icon { color: var(--gold-light); margin-top: .25rem; }
.socials { display: flex; gap: .5rem; margin-top: 1rem; }
.socials a { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(233, 196, 106, .35); border-radius: 50% 50% 8px 8px / 50% 50% 8px 8px; }
.socials a:hover { background: var(--gold); color: var(--emerald-900); }
.newsletter { display: flex; gap: .4rem; margin-top: .8rem; }
.newsletter input { flex: 1; min-width: 0; padding: .7rem .9rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #fff; }
.newsletter input::placeholder { color: #9dbcae; }
.newsletter button { padding: .7rem 1rem; }
.footer-bottom { border-top: 1px solid rgba(233, 196, 106, .18); padding: 1.2rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .84rem; }
.footer-bottom a { color: var(--gold-light); }

/* 13. Animasi & responsif ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 1180px) {
  .main-nav a, .main-nav .sub-toggle { padding: .5rem .55rem; font-size: .88rem; }
  .prayer li:nth-child(1), .prayer li:nth-child(5) { display: none; }
}
@media (max-width: 1060px) {
  .main-nav, .nav-cta .btn-label-hide { display: none; }
  .burger { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero-visual { max-width: 480px; margin: 0 auto; width: 100%; }
  .program-grid, .grid-3, .halaqah-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid, .grid-4, .achieve-grid, .teacher-grid, .osis-grid { grid-template-columns: repeat(2, 1fr); }
  .welcome, .tahfidz-band, .two-col, .contact-grid, .vm-grid { grid-template-columns: 1fr; }
  .welcome-photo { max-width: 380px; margin: 0 auto 2rem; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: repeat(3, 1fr); row-gap: 2rem; }
  .sticky-side { position: static; }
  .topbar-contact { display: none; }
}
@media (max-width: 760px) {
  .news-grid, .split-2, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .mosaic a:nth-child(n) { grid-column: auto; grid-row: auto; border-radius: 16px; }
  .mosaic a:nth-child(1) { grid-row: span 2; border-radius: var(--arch); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .major { grid-template-columns: 1fr; }
  .major .arch-img { max-width: 220px; }
  .prayer { display: none; }
  .float-card.one { left: 0; }
  .float-card.two { right: 0; }
  .summary dl, .res dl { grid-template-columns: 1fr; }
  .summary dt, .res dt { margin-top: .4rem; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .container { width: min(100% - 1.75rem, var(--container)); }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 1.1rem; }
  .brand img { width: 44px; height: 44px; }
  .nav-cta .btn { display: none; }
  .program-grid, .grid-3, .grid-4, .halaqah-grid, .gallery, .footer-top { grid-template-columns: 1fr; }
  .teacher-grid, .achieve-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .achieve { padding: 1.1rem .9rem; }
  .stats-grid, .osis-grid { grid-template-columns: repeat(2, 1fr); gap: .8rem; }
  .stat { padding: 1.8rem .6rem 1.2rem; }
  .flow { grid-template-columns: 1fr 1fr; }
  .news-mini { grid-template-columns: 96px 1fr; }
  .juz-row { grid-template-columns: 90px 1fr 48px; gap: .6rem; font-size: .85rem; }
  .hafalan-target .juz-row { grid-template-columns: 110px 1fr 58px; }
  .grad-form { flex-direction: column; }
  .float-card { position: static; margin-top: .8rem; }
  .hero-visual { flex-direction: column; align-items: center; }
  .steps li { font-size: 0; }
  .doc { grid-template-columns: 40px 1fr; }
  .doc .btn { grid-column: 1 / -1; justify-content: center; }
  .tabs [role="tablist"] { border-radius: 18px; }
  .welcome-photo .name-tag { white-space: normal; width: 90%; }
  .cta { border-radius: 120px 120px var(--radius-lg) var(--radius-lg) / 60px 60px var(--radius-lg) var(--radius-lg); }
}
