/* =========================================================================
   MTsN 8 Padang Pariaman — Stylesheet
   Arah desain: palet "marawa" Minangkabau (marun · emas · arang) di atas
   latar bersih. Tanda khas: pembatas gonjong (atap Rumah Gadang) di header.
   ========================================================================= */

:root {
  --green:       #15803D;
  --green-dark:  #0F5C2E;
  --green-deep:  #0B3B22;
  --lime:        #BFD33A;
  --gold:        #C8902A;
  --gold-soft:   #E8C77E;
  --ink:         #1C2A24;
  --muted:       #5E6B63;
  --cream:       #F5F8F0;
  --line:        #E2E8DD;
  --white:       #FFFFFF;

  --font-ui:   'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-read: 'Lora', Georgia, 'Times New Roman', serif;

  --wrap: 1120px;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(33, 27, 25, 0.08);
}

/* ---- Reset ringan ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--green); color: #fff; padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---- Header ----------------------------------------------------------- */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { width: 50px; height: 50px; flex: 0 0 50px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; }
.brand-text small { color: var(--muted); font-size: .76rem; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a { color: var(--ink); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.site-nav a:hover { background: var(--cream); text-decoration: none; }
.site-nav a.is-active { color: var(--green); }
.site-nav .nav-cta {
  background: var(--green); color: #fff; margin-left: 6px;
  box-shadow: inset 0 0 0 1px var(--green-dark);
}
.site-nav .nav-cta:hover { background: var(--green-dark); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

/* Tanda khas: pembatas gonjong */
.gonjong-divider { background: var(--green); line-height: 0; }
.gonjong-divider svg { display: block; }

/* ---- Tombol ----------------------------------------------------------- */
.btn {
  display: inline-block; font-family: var(--font-ui); font-weight: 700; font-size: .95rem;
  padding: 12px 22px; border-radius: 10px; border: 0; cursor: pointer; text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.btn-ghost:hover { background: var(--green); color: #fff; }
.btn-block { display: block; width: 100%; }

/* ---- Hero ------------------------------------------------------------- */
.hero { background: linear-gradient(180deg, var(--cream), var(--white)); padding: 72px 0 64px; }
.hero-inner { max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 700; color: var(--gold); margin: 0 0 14px; }
.hero-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -.02em; }
.hero-title em { font-style: normal; color: var(--green); box-shadow: inset 0 -.32em 0 var(--gold-soft); }
.hero-lead { font-family: var(--font-read); font-size: 1.18rem; color: #443c38; margin: 18px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero dengan slideshow foto latar */
.hero { position: relative; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; }
.hero-slideshow { position: absolute; inset: 0; z-index: 1; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease; }
.hero-slide.is-active { opacity: 1; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(11,59,34,.88) 0%, rgba(11,59,34,.68) 45%, rgba(11,59,34,.42) 100%); }
.hero--slides { padding: 92px 0 80px; }
.hero--slides .eyebrow { color: var(--gold-soft); }
.hero--slides .hero-title { color: #fff; }
.hero--slides .hero-title em { color: #fff; box-shadow: inset 0 -.3em 0 rgba(200,144,42,.55); }
.hero--slides .hero-lead { color: #eef4ec; }
.hero--slides .btn-ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.hero--slides .btn-ghost:hover { background: #fff; color: var(--green-dark); }

/* Badge Zona Integritas */
.hero-badges { margin-bottom: 16px; }
.badge-zi { display: inline-flex; align-items: center; gap: 9px; background: rgba(21,128,61,.10); color: var(--green-dark); border: 1px solid rgba(21,128,61,.30); padding: 7px 15px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.badge-zi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(200,144,42,.28); }
.hero--slides .badge-zi { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.4); }
.badge-zi-img { height: 60px; width: auto; }
.badge-akreditasi { background: rgba(200,144,42,.12); color: #8a6516; border-color: rgba(200,144,42,.38); }
.hero--slides .badge-akreditasi { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.4); }

/* Bagian Prestasi (angka beranimasi) */
.prestasi { background: var(--green); color: #fff; padding: 60px 0; }
.prestasi-title { text-align: center; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: #fff; margin: 0 0 38px; }
.prestasi-title::after { content: ""; display: block; width: 56px; height: 4px; background: var(--gold); border-radius: 2px; margin: 12px auto 0; }
.prestasi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.prestasi-item { text-align: center; }
.prestasi-num-wrap { display: inline-flex; align-items: baseline; line-height: 1; color: var(--gold-soft); }
.prestasi-num { font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 800; font-variant-numeric: tabular-nums; }
.prestasi-plus { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.prestasi-label { display: block; margin-top: 10px; font-size: 1rem; color: #e7f1ea; }
.prestasi-cta { text-align: center; margin-top: 42px; }
.btn-gold { background: var(--gold); color: #2A1E04; }
.btn-gold:hover { background: #b07f20; color: #2A1E04; }

/* ---- Bagian umum ------------------------------------------------------ */
.section { padding: 64px 0; }
.section-cream { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.01em; margin: 0; }
.section-title::after { content: ""; display: block; width: 56px; height: 4px; background: var(--gold); border-radius: 2px; margin-top: 10px; }
.link-more { font-weight: 700; white-space: nowrap; }

.page-head { background: var(--cream); border-bottom: 1px solid var(--line); padding: 48px 0; }
.page-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin: 0 0 8px; }
.page-sub { color: var(--muted); margin: 0; font-size: 1.05rem; }

.empty { color: var(--muted); background: var(--cream); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; }

/* ---- Kartu berita ----------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--cream); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.card-date { color: var(--gold); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.card-title { font-size: 1.15rem; margin: 0; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--green); }
.card-excerpt { color: var(--muted); margin: 0; font-size: .96rem; }

/* ---- Highlight (beranda) ---------------------------------------------- */
.highlight { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.highlight-text p { font-family: var(--font-read); color: #443c38; font-size: 1.08rem; }
.highlight-text em { color: var(--green); font-style: italic; }
.highlight-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat strong { display: block; font-size: 1.8rem; font-weight: 800; color: var(--green); }
.stat span { color: var(--muted); font-size: .9rem; }

/* ---- Artikel & prosa -------------------------------------------------- */
.back-link { display: inline-block; font-weight: 700; margin-bottom: 16px; }
.article-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }
.article-meta { color: var(--gold); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 22px; }
.article-img { width: 100%; border-radius: var(--radius); margin: 0 0 26px; border: 1px solid var(--line); }
.article-body, .prose { font-family: var(--font-read); font-size: 1.12rem; color: #2c2521; }
.article-body p, .prose p { margin: 0 0 1.1em; }
.prose h2 { font-family: var(--font-ui); font-size: 1.4rem; margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin: .35em 0; }
.signoff { color: var(--green); font-weight: 600; }
.signoff span { color: var(--muted); font-weight: 400; font-size: .95rem; }

.callout { background: var(--cream); border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; padding: 22px 24px; margin: 28px 0 0; }
.callout p { font-family: var(--font-ui); }

/* ---- Reveal saat scroll ---------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; transition-delay: var(--d, 0ms); }
[data-reveal].reveal-in { opacity: 1; transform: none; }

/* ---- Profil: timeline sejarah ---------------------------------------- */
.timeline { list-style: none; padding: 0; margin: 38px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.timeline::before { content: ""; position: absolute; top: 30px; left: 16%; right: 16%; height: 2px; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); }
.timeline-item { text-align: center; position: relative; padding: 0 10px; }
.timeline-item::before { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--green); border: 3px solid var(--gold); margin: 22px auto 16px; position: relative; z-index: 1; }
.timeline-year { display: block; font-weight: 800; font-size: 1.6rem; color: var(--green); }
.timeline-label { display: block; color: var(--muted); font-size: .9rem; margin-top: 4px; }

/* ---- Profil: visi ---------------------------------------------------- */
.visi-card { background: var(--green); color: #fff; border-radius: 16px; padding: 38px 42px; position: relative; overflow: hidden; }
.visi-card::after { content: "\201C"; position: absolute; top: -16px; right: 26px; font-size: 7rem; color: rgba(255,255,255,.12); font-family: Georgia, serif; }
.visi-eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--gold-soft); margin-bottom: 10px; }
.visi-text { font-family: var(--font-read); font-size: 1.3rem; line-height: 1.5; margin: 0; }

/* ---- Profil: misi ---------------------------------------------------- */
.misi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.misi-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; gap: 14px; align-items: flex-start; }
.misi-num { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; background: rgba(21,128,61,.1); color: var(--green); font-weight: 800; display: grid; place-items: center; }
.misi-item p { margin: 0; color: #33403a; }

/* ---- Profil: sambutan ------------------------------------------------ */
.sambutan { display: grid; grid-template-columns: 150px 1fr; gap: 34px; align-items: center; }
.sambutan-foto { width: 150px; height: 150px; border-radius: 50%; background: var(--green); color: var(--gold-soft); display: grid; place-items: center; font-size: 3.4rem; font-weight: 800; box-shadow: inset 0 0 0 4px var(--gold); overflow: hidden; }
.sambutan-foto img { width: 100%; height: 100%; object-fit: cover; }
.sambutan-body h2 { margin-top: 0; }
.sambutan-body p { font-family: var(--font-read); color: #2c2521; }

/* ---- Profil: struktur organisasi ------------------------------------- */
.struktur-figure { margin: 26px auto 0; text-align: center; max-width: 960px; }
.struktur-figure img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: #fff; }
.struktur-figure figcaption { color: var(--muted); font-size: .9rem; margin-top: 12px; }

/* ---- Profil: akreditasi ---------------------------------------------- */
.akreditasi-box { display: flex; align-items: center; gap: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px; box-shadow: var(--shadow); max-width: 760px; margin: 0 auto; }
.akreditasi-seal { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 96px; padding: 16px 22px; border-radius: 16px; background: var(--green); color: #fff; box-shadow: inset 0 0 0 3px var(--gold); flex-shrink: 0; }
.akreditasi-seal-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.akreditasi-seal-val { font-size: 1.7rem; font-weight: 800; line-height: 1.1; text-align: center; }
.akreditasi-info .eyebrow { color: var(--gold); }
.akreditasi-info h2 { margin: .15rem 0 .35rem; }
.akreditasi-info p { color: var(--muted); margin: 0 0 .4rem; }
@media (max-width: 560px) { .akreditasi-box { flex-direction: column; text-align: center; gap: 18px; } }

/* ---- Tenaga Pendidik & Kependidikan (PTK) ---------------------------- */
.ptk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0 38px; }
.ptk-card { display: flex; align-items: center; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.ptk-ava { display: grid; place-items: center; width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; background: var(--green); color: var(--gold-soft); font-weight: 800; font-size: 1.2rem; }
.ptk-nama { font-weight: 700; margin: 0; line-height: 1.25; }
.ptk-ket { color: var(--muted); font-size: .9rem; margin: 2px 0 0; }
@media (max-width: 820px) { .ptk-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ptk-grid { grid-template-columns: 1fr; } }

/* ---- Album (galeri & program) ---------------------------------------- */
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 18px 0 40px; }
.album-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.album-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(33,27,25,.12); }
.album-cover { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--cream); overflow: hidden; }
.album-photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1s ease; }
.album-photo.is-active { opacity: 1; }
.album-cover-empty { position: absolute; inset: 0; background: linear-gradient(135deg, var(--green), var(--green-dark)); opacity: .16; }
.album-count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.album-body { padding: 14px 16px; }
.album-title { display: block; font-weight: 700; line-height: 1.3; }
.album-desc { display: block; color: var(--muted); font-size: .88rem; margin-top: 3px; }
@media (max-width: 820px) { .album-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .album-grid { grid-template-columns: 1fr; } }

.link-back { display: inline-block; color: var(--green); font-weight: 700; text-decoration: none; margin-bottom: 8px; }
.link-back:hover { text-decoration: underline; }

/* Daftar dokumen PDF (publik) */
.doc-list { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 10px; max-width: 640px; }
.doc-list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; transition: border-color .2s ease; }
.doc-list a:hover { border-color: var(--green); }
.doc-ic { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px; background: rgba(179,38,30,.10); color: #b3261e; font-weight: 800; font-size: .68rem; }

/* Pengelola isi album (admin) */
.item-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.item-admin { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--white); }
.item-admin img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; display: block; }
.item-admin input[type="text"] { width: 100%; }
.doc-admin-list { display: grid; gap: 10px; margin-bottom: 30px; }
.doc-admin-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--white); }
.doc-admin-edit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 240px; }
.doc-admin-judul { min-width: 220px; flex: 1; }

/* ---- Sambutan di beranda --------------------------------------------- */
.sambutan-home .eyebrow { margin-bottom: 8px; }
.sambutan-kutip { font-family: var(--font-read); font-size: 1.2rem; line-height: 1.65; color: #2c2521; margin: 8px 0 14px; }
.sambutan-home .signoff { margin-bottom: 10px; }

/* ---- Strip statistik madrasah (ringkas) ------------------------------ */
.fakta-strip { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 0; }
.fakta-strip-inner { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.fakta-item { text-align: center; padding: 0 26px; }
.fakta-item strong { display: block; font-size: 2.1rem; font-weight: 800; color: var(--green); line-height: 1.1; }
.fakta-item span { color: var(--muted); font-size: .9rem; }
.fakta-item-link { text-decoration: none; padding: 10px 18px; border-radius: 14px; transition: background .2s ease, transform .2s ease; }
.fakta-item-link:hover { background: rgba(21,128,61,.07); transform: translateY(-2px); }
.fakta-arrow { color: var(--green); font-weight: 800; opacity: 0; transition: opacity .2s ease; }
.fakta-item-link:hover .fakta-arrow { opacity: 1; }
.fakta-sep { width: 1px; height: 42px; background: var(--line); }

/* ---- Galeri ----------------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-item { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.gallery-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery-item figcaption { padding: 12px 14px; font-size: .92rem; color: var(--muted); }

/* ---- Paginasi --------------------------------------------------------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 36px; }
.pagination a { min-width: 42px; text-align: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-weight: 700; }
.pagination a:hover { background: var(--cream); text-decoration: none; }
.pagination a.is-active { background: var(--green); color: #fff; border-color: var(--green); }

/* ---- Formulir --------------------------------------------------------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.field .opsional { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--font-ui); font-size: 1rem; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--white);
}
.field input:focus, .field textarea:focus { border-color: var(--green); outline: 2px solid var(--gold-soft); }
.field-hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.kontak-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.kontak-info h2 { font-size: 1.1rem; margin: 1.2em 0 .2em; }
.kontak-info h2:first-child { margin-top: 0; }
.kontak-form h2 { font-size: 1.3rem; margin-bottom: 16px; }
.sosial-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.sosial-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: .95rem; width: fit-content; color: #fff; }
.sosial-wa { background: #25D366; }
.sosial-ig { background: #E4405F; }
.sosial-fb { background: #1877F2; }
.sosial-btn:hover { text-decoration: none; filter: brightness(.95); color: #fff; }
.footer-sosial { display: flex; gap: 10px; margin-top: 16px; }
.footer-sosial a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); color: #d9cfc6; display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.footer-sosial a svg { display: block; }
.footer-sosial a:hover { background: var(--gold); color: #2A1E04; }
.pesan-wa { display: block; color: var(--green); font-size: .85rem; font-weight: 600; margin-top: 3px; }

/* ---- Pesan kilat ------------------------------------------------------ */
.flash { border-radius: 10px; padding: 14px 18px; margin: 24px 0; font-weight: 600; }
.flash-sukses { background: #E7F4EC; color: #1c5a3c; border: 1px solid #BFE3CC; }
.flash-error  { background: #FBEAEA; color: #8a1f24; border: 1px solid #F0C5C5; }

/* ---- Program Madrasah (publik) --------------------------------------- */
.program-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.program-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.program-icon { width: 52px; height: 52px; border-radius: 12px; background: rgba(21,128,61,.1); color: var(--green); display: grid; place-items: center; }
.program-title { font-size: 1.25rem; margin: 0; }
.program-empty { color: var(--muted); font-style: italic; font-size: .95rem; }

/* ---- Program Madrasah (admin) ---------------------------------------- */
.program-admin { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.program-admin-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.program-admin-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.program-admin-head strong { font-size: 1.05rem; }
.badge-ok { background: #E7F4EC; color: #1c5a3c; border: 1px solid #BFE3CC; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge-empty { background: #F3EFE6; color: var(--muted); border: 1px solid var(--line); font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.program-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-primary-sm { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary-sm:hover { background: var(--green-dark); }

/* ---- Banner pengumuman ------------------------------------------------ */
.announce { background: var(--green); color: #fff; border-bottom: 3px solid var(--gold); }
.announce-inner { display: flex; align-items: center; gap: 14px; padding: 13px 20px; flex-wrap: wrap; }
.announce-badge { background: var(--gold); color: var(--green-dark); font-weight: 800; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.announce-text { margin: 0; font-weight: 600; flex: 1; min-width: 200px; }
.announce-link { color: var(--gold-soft); font-weight: 700; white-space: nowrap; }
.announce-link:hover { color: #fff; text-decoration: none; }

.check-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.check-row input { width: auto; }

/* ---- Footer ----------------------------------------------------------- */
.site-footer { background: var(--ink); color: #d9cfc6; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 56px 20px 40px; }
.footer-col strong { display: block; color: #fff; margin-bottom: 12px; font-size: .95rem; }
.footer-brand { font-size: 1.05rem !important; }
.footer-logo { width: 58px; height: 58px; object-fit: contain; margin-bottom: 14px; background: #fff; padding: 6px; border-radius: 10px; }
.footer-col p { color: #b6aaa0; font-size: .92rem; margin: 0 0 8px; }
.footer-col a { display: block; color: #d9cfc6; font-size: .92rem; padding: 3px 0; }
.footer-col a:hover { color: var(--gold-soft); }
.footer-base { border-top: 1px solid rgba(255,255,255,.1); }
.footer-base .container { padding: 18px 20px; font-size: .85rem; color: #9a8e84; }

/* =========================================================================
   PANEL ADMIN
   ========================================================================= */
body.admin { background: #F3EEE6; }
.admin-top { background: var(--green); color: #fff; }
.admin-top-inner { max-width: 1180px; margin: 0 auto; padding: 0 20px; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-brand { color: #fff; font-weight: 800; }
.admin-brand:hover { text-decoration: none; color: var(--gold-soft); }
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.admin-nav a { color: #f1e3e3; font-weight: 600; font-size: .9rem; padding: 7px 11px; border-radius: 7px; }
.admin-nav a:hover { background: var(--green-dark); text-decoration: none; }
.admin-nav a.is-active { background: var(--green-dark); color: #fff; }
.admin-nav .admin-logout { color: var(--gold-soft); }

.admin-main { padding: 32px 0 60px; }
.admin-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.admin-h1 { font-size: 1.6rem; font-weight: 800; margin: 0 0 6px; }
.admin-lead { color: var(--muted); margin: 0 0 26px; }
.admin-head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }

.admin-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 26px; }
.admin-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--ink); }
.admin-card:hover { box-shadow: var(--shadow); text-decoration: none; }
.admin-card-num { display: block; font-size: 2.2rem; font-weight: 800; color: var(--green); }
.admin-card-label { color: var(--muted); font-size: .9rem; }
.admin-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.admin-form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; max-width: 760px; }
.admin-form-wide { max-width: 1040px; background: transparent; border: 0; padding: 0; }
.setting-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; }
.setting-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.setting-card .admin-h2 { font-size: 1.1rem; margin-bottom: 14px; }
.setting-card .field:last-child { margin-bottom: 0; }
.setting-card-wide { grid-column: 1 / -1; }
.prestasi-admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 8px; }
.current-img img { max-width: 220px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 8px; }
.admin-h2 { font-size: 1.2rem; font-weight: 800; margin: 0 0 4px; }
.form-sep { border: 0; border-top: 1px solid var(--line); margin: 28px 0 22px; }
.prestasi-row { display: grid; grid-template-columns: 140px 1fr; gap: 16px; }

.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.admin-table th { background: var(--cream); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.admin-table tr:last-child td { border-bottom: 0; }
.col-aksi { white-space: nowrap; }

.btn-sm { display: inline-block; font-size: .82rem; font-weight: 700; padding: 6px 11px; border-radius: 7px; border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; }
.btn-sm:hover { background: var(--cream); text-decoration: none; }
.btn-danger { color: #fff; background: #9a2b2b; border-color: #9a2b2b; }
.btn-danger:hover { background: #7e1f1f; }
.inline-form { display: inline; }

.admin-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.admin-gallery-item { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.admin-gallery-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.admin-gallery-item figcaption { padding: 8px 12px; font-size: .85rem; color: var(--muted); }
.admin-gallery-item .inline-form { display: block; padding: 0 12px 12px; }

.pesan-list { display: flex; flex-direction: column; gap: 14px; }
.pesan-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.pesan-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.pesan-email { display: block; color: var(--muted); font-size: .88rem; font-weight: 400; }
.pesan-head time { color: var(--muted); font-size: .85rem; }
.pesan-isi { margin: 0 0 12px; color: #2c2521; }

.admin-foot { border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: .85rem; }
.admin-foot .admin-container { padding-top: 0; padding-bottom: 0; }

/* ---- Halaman login ---------------------------------------------------- */
.admin-login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--green), var(--green-dark)); }
.login-wrap { width: 100%; max-width: 400px; padding: 24px; }
.login-card { background: var(--white); border-radius: 16px; padding: 34px 30px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-title { font-size: 1.5rem; font-weight: 800; margin: 0; }
.login-sub { color: var(--muted); margin: 2px 0 22px; }
.login-back { text-align: center; margin: 18px 0 0; font-size: .9rem; }

/* =========================================================================
   DEKORASI KHAS MINANGKABAU (motif songket + siluet Rumah Gadang)
   Memakai CSS mask agar warna & opacity bisa diatur; halus demi keterbacaan.
   ========================================================================= */

/* page-head di semua halaman dalam */
.page-head { position: relative; overflow: hidden; }
.page-head .container { position: relative; z-index: 1; }
.page-head::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  -webkit-mask: url("../img/songket.svg") repeat; mask: url("../img/songket.svg") repeat;
  -webkit-mask-size: 58px 58px; mask-size: 58px 58px;
  background: var(--green); opacity: .10;  /* MOTIF page-head (songket) — ubah % di sini, mis .05=5% .15=15% */
}
.page-head::after {
  content: ""; position: absolute; right: -14px; bottom: -12px; z-index: 0; pointer-events: none;
  width: 280px; height: 175px;
  -webkit-mask: url("../img/rumah-gadang.svg") center/contain no-repeat;
  mask: url("../img/rumah-gadang.svg") center/contain no-repeat;
  background: var(--green); opacity: .13;  /* WATERMARK page-head (Rumah Gadang) */
}

/* Strip statistik — showcase grafis */
.fakta-strip { position: relative; overflow: hidden; }
.fakta-strip-inner { position: relative; z-index: 1; }
.fakta-strip::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  -webkit-mask: url("../img/songket.svg") repeat; mask: url("../img/songket.svg") repeat;
  -webkit-mask-size: 54px 54px; mask-size: 54px 54px;
  background: var(--gold); opacity: .12;   /* MOTIF strip statistik (songket emas) */
}
.fakta-strip::after {
  content: ""; position: absolute; left: 50%; bottom: -24px; transform: translateX(-50%); z-index: 0; pointer-events: none;
  width: 360px; height: 225px;
  -webkit-mask: url("../img/rumah-gadang.svg") center/contain no-repeat;
  mask: url("../img/rumah-gadang.svg") center/contain no-repeat;
  background: var(--green); opacity: .11;  /* WATERMARK strip statistik (Rumah Gadang) */
}

/* Band prestasi — tekstur songket putih tipis di atas hijau */
.prestasi { position: relative; overflow: hidden; }
.prestasi > .container { position: relative; z-index: 1; }
.prestasi::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  -webkit-mask: url("../img/songket.svg") repeat; mask: url("../img/songket.svg") repeat;
  -webkit-mask-size: 58px 58px; mask-size: 58px 58px;
  background: #ffffff; opacity: .09;       /* MOTIF band prestasi (songket putih) */
}

/* Hero — watermark Rumah Gadang (tampak saat tanpa slideshow) */
.hero::after {
  content: ""; position: absolute; right: -20px; bottom: 0; z-index: 0; pointer-events: none;
  width: 300px; height: 188px;
  -webkit-mask: url("../img/rumah-gadang.svg") center/contain no-repeat;
  mask: url("../img/rumah-gadang.svg") center/contain no-repeat;
  background: var(--green); opacity: .10;  /* WATERMARK hero (Rumah Gadang) */
}

/* Ornamen songket di bawah judul halaman */
.page-title::after {
  content: ""; display: block; width: 64px; height: 12px; margin-top: 12px;
  -webkit-mask: url("../img/songket.svg") repeat-x left center; mask: url("../img/songket.svg") repeat-x left center;
  -webkit-mask-size: 24px 24px; mask-size: 24px 24px;
  background: var(--gold); opacity: .9;
}

/* Profil — foto sambutan lebih besar/penuh */
.sambutan-lg { grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.sambutan-lg .sambutan-foto { width: 300px; height: 380px; border-radius: 18px; font-size: 5rem; }

/* =========================================================================
   RESPONSIF
   ========================================================================= */
@media (max-width: 920px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .misi-grid { grid-template-columns: repeat(2, 1fr); }
  .highlight { grid-template-columns: 1fr; gap: 28px; }
  .kontak-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-cards { grid-template-columns: 1fr; }
  .admin-gallery { grid-template-columns: repeat(3, 1fr); }
  .setting-grid { grid-template-columns: 1fr; }
  .prestasi-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 12px 16px; box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 14px; }
  .site-nav .nav-cta { margin: 6px 0 0; text-align: center; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .prestasi-grid { grid-template-columns: 1fr; gap: 30px; }
  .prestasi-row { grid-template-columns: 1fr; gap: 0; }
  .program-grid { grid-template-columns: 1fr; }
  .program-admin { grid-template-columns: 1fr; }
  .misi-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; gap: 22px; }
  .timeline::before { display: none; }
  .timeline-item::before { margin-top: 0; }
  .sambutan { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .sambutan-lg { grid-template-columns: 1fr; }
  .sambutan-lg .sambutan-foto { width: 100%; max-width: 300px; height: 360px; }
  .fakta-sep { display: none; }
  .fakta-strip-inner { gap: 18px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 40px 20px 32px; }
  .admin-gallery { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 52px 0 44px; }
  .section { padding: 48px 0; }
}

/* ---- Hormati preferensi gerak berkurang ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
