/* ==========================================================================
   Tema "Buku Tulis" — tema bawaan CMS Sekolah
   Kertas bergaris, tinta biru, garis margin merah.
   Ubah warna & font cukup lewat variabel di :root.
   ========================================================================== */

:root {
    --paper: #ffffff;
    --tint: #f3f6fb;
    --rule: #d9e2f1;          /* garis buku */
    --ink: #1f3a93;           /* tinta biru */
    --ink-deep: #142763;
    --text: #1d2333;
    --muted: #5a6274;
    --margin: #d63a44;        /* garis margin merah */
    --pencil: #f6c945;        /* stabilo / pensil kuning */
    --ok: #1e7a4f;

    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --line: 2rem;             /* jarak garis buku */
    --radius: 6px;
    --wrap: 1180px;
    --wrap-narrow: 760px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
    margin: 0;
    font-family: var(--font);
    font-size: var(--base-size, 1.0625rem);
    line-height: 1.65;
    color: var(--text);
    background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: .18em; }
a:hover { color: var(--ink-deep); }
h1, h2, h3 { line-height: 1.2; color: var(--ink-deep); margin: 0 0 .5em; font-family: var(--font-head, var(--font)); }
.brand__name, .section__title, .post-card__title, .notice__title, .site-footer__name, .result__title { font-family: var(--font-head, var(--font)); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--pencil); outline-offset: 2px; border-radius: 2px; }

.container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.container--narrow { max-width: var(--wrap-narrow); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; }
.muted { color: var(--muted); }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { margin-bottom: .35rem; }

/* ---------- Tombol & label ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .7rem 1.25rem; border-radius: var(--radius);
    font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none;
    border: 2px solid var(--ink); cursor: pointer; transition: background .15s, color .15s;
}
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--ink-deep); border-color: var(--ink-deep); color: #fff; }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--small { padding: .4rem .85rem; font-size: .85rem; }

.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 3px; background: var(--tint); color: var(--muted); }
.tag--pencil { background: var(--pencil); color: #4a3a00; }

/* ---------- Topbar & header ---------- */
.topbar { background: var(--ink-deep); color: #d9e2ff; font-size: .85rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.5rem; }
.topbar a { color: inherit; text-decoration: none; margin-right: 1.25rem; }
.topbar a:hover { color: #fff; }
.topbar__search input {
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff;
    border-radius: 999px; padding: .3rem .9rem; font: inherit; font-size: .85rem; width: 15rem;
}
.topbar__search input::placeholder { color: #aebbe6; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.75rem; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink-deep); }
.brand__logo { width: var(--logo-size, 3rem); height: var(--logo-size, 3rem); object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-size: 1.1rem; font-weight: 800; }
.brand__tagline { font-size: .8rem; color: var(--muted); }

.nav__list { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link {
    display: block; padding: .5rem .8rem; font-weight: 600; font-size: .95rem;
    text-decoration: none; color: var(--text); border-radius: var(--radius);
}
.nav__link:hover { color: var(--ink); background: var(--tint); }
.nav__link.is-active { color: var(--ink); box-shadow: inset 0 -3px 0 var(--margin); border-radius: 0; }
.has-children > .nav__link::after { content: ""; display: inline-block; margin-left: .35rem; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.nav__sub {
    position: absolute; top: 100%; left: 0; min-width: 14rem; list-style: none; margin: 0; padding: .4rem;
    background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
    box-shadow: 0 12px 30px -12px rgba(20, 39, 99, .25);
    opacity: 0; visibility: hidden; transform: translateY(4px); transition: .15s;
}
.nav__item:hover > .nav__sub, .nav__item:focus-within > .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__sub a { display: block; padding: .45rem .7rem; text-decoration: none; color: var(--text); border-radius: 4px; font-size: .92rem; }
.nav__sub a:hover, .nav__sub a.is-active { background: var(--tint); color: var(--ink); }

.nav-toggle { display: none; background: none; border: 0; padding: .75rem; cursor: pointer; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after { display: block; width: 24px; height: 2px; background: var(--ink-deep); position: relative; transition: .2s; }
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -7px; } .nav-toggle__bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
    .topbar__contact { display: none; }
    .topbar__search, .topbar__search input { width: 100%; }
    .nav-toggle { display: block; }
    .nav {
        position: absolute; top: 100%; left: 0; right: 0; background: var(--paper);
        border-bottom: 1px solid var(--rule); display: none; max-height: calc(100vh - 7rem); overflow-y: auto;
    }
    .nav.is-open { display: block; }
    .nav__list { flex-direction: column; padding: .75rem 1.25rem 1.25rem; }
    .nav__sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; border-left: 2px solid var(--rule); border-radius: 0; margin-left: .8rem; }
    .nav__link.is-active { box-shadow: inset 3px 0 0 var(--margin); }
}

/* ---------- Kertas bergaris (dipakai hero & judul halaman) ---------- */
.hero, .page-header {
    position: relative;
    background-color: var(--paper);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--line) - 1px), var(--rule) calc(var(--line) - 1px), var(--rule) var(--line));
}
.hero::before, .page-header::before {
    /* garis margin merah ganda */
    content: ""; position: absolute; top: 0; bottom: 0; left: max(1rem, calc((100% - var(--wrap)) / 2 - 1.5rem));
    width: 5px; border-left: 2px solid var(--margin); border-right: 1px solid var(--margin); opacity: .75;
}

/* ---------- Hero beranda ---------- */
.hero { padding: calc(var(--line) * 2) 0 calc(var(--line) * 2.5); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero__paper { padding-left: 1.5rem; }
.hero__kicker { font-weight: 600; color: var(--margin); line-height: var(--line); margin: 0; }
.hero__title {
    font-size: clamp(2.25rem, 5.5vw, 4.25rem); font-weight: 800; letter-spacing: -.02em;
    line-height: calc(var(--line) * 2); color: var(--ink); margin: 0;
}
.hero__tagline { font-size: 1.2rem; color: var(--muted); line-height: var(--line); margin: var(--line) 0 0; max-width: 34ch; }
.hero__actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: calc(var(--line) * 1.25); }

.hero__photos { position: relative; aspect-ratio: 4 / 3; }
.hero__photo {
    position: absolute; inset: 0; margin: 0; background: #fff; padding: .75rem .75rem 0;
    box-shadow: 0 18px 40px -18px rgba(20, 39, 99, .45); transform: rotate(2deg);
    opacity: 0; transition: opacity .7s ease; display: flex; flex-direction: column;
}
.hero__photo.is-active { opacity: 1; z-index: 1; }
.hero__photo::before {
    /* selotip */
    content: ""; position: absolute; top: -12px; left: 50%; width: 110px; height: 26px; transform: translateX(-50%) rotate(-3deg);
    background: rgba(246, 201, 69, .75); z-index: 2;
}
.hero__photo img { width: 100%; flex: 1; min-height: 0; object-fit: cover; }
.hero__photo figcaption { padding: .6rem .2rem .8rem; font-size: .9rem; line-height: 1.4; display: flex; flex-direction: column; gap: .15rem; }
.hero__photo figcaption strong { color: var(--ink-deep); }
.hero__photo figcaption span { color: var(--muted); }
.hero__photo figcaption a { font-weight: 700; font-size: .85rem; }
.hero__dots { position: absolute; bottom: -2.25rem; left: 0; right: 0; display: flex; justify-content: center; gap: .5rem; }
.hero__dots button { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; padding: 0; cursor: pointer; }
.hero__dots button.is-active { background: var(--ink); }
.hero--small { padding-block: calc(var(--line) * 3); }

@media (max-width: 860px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__photos { margin-top: 1rem; }
}

/* ---------- Section umum ---------- */
.section { padding-block: 3.5rem; }
.section--tinted { background: var(--tint); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section__title { font-size: 1.6rem; font-weight: 800; margin: 0 0 1.25rem; }
.section__head .section__title { margin: 0; }
.section__title--spaced { margin-top: 3rem; }
.section__more { font-weight: 600; font-size: .95rem; white-space: nowrap; }
.empty { padding: 2rem; text-align: center; color: var(--muted); border: 2px dashed var(--rule); border-radius: var(--radius); }

/* ---------- Papan pengumuman ---------- */
.board { border-bottom: 1px solid var(--rule); }
.board__list { list-style: none; margin: 0; padding: 0; }
.board__item { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: 1rem; align-items: baseline; padding: .8rem 0; border-top: 1px solid var(--rule); }
.board__item time { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.board__item a { font-weight: 600; text-decoration: none; color: var(--text); }
.board__item a:hover { color: var(--ink); text-decoration: underline; }
.board__item.is-important a { background: linear-gradient(transparent 55%, rgba(246, 201, 69, .55) 55%); }
@media (max-width: 600px) { .board__item { grid-template-columns: 1fr auto; } .board__item time { grid-column: 1 / -1; } }

/* ---------- Sambutan ---------- */
.welcome__inner { display: grid; grid-template-columns: 240px 1fr; gap: 3rem; align-items: start; }
.welcome__photo { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); box-shadow: 10px 10px 0 var(--tint); }
.welcome__message { font-size: 1.1rem; max-width: 62ch; }
.welcome__name { margin-top: 1.5rem; font-weight: 800; color: var(--ink-deep); }
.welcome__name span { display: block; font-weight: 500; color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) { .welcome__inner { grid-template-columns: 1fr; } .welcome__photo { max-width: 200px; } }

/* ---------- Angka sekolah ---------- */
.facts { background: var(--ink); color: #dfe6ff; }
.facts__list { display: flex; flex-wrap: wrap; gap: .5rem 2.5rem; padding-block: 1.25rem; justify-content: center; }
.facts__item { margin: 0; font-size: .95rem; }
.facts__item strong { color: #fff; font-size: 1.35rem; margin-right: .3rem; font-variant-numeric: tabular-nums; }

/* ---------- Kartu berita ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem 1.75rem; }
.post-card { display: flex; flex-direction: column; }
.post-card__media { display: block; aspect-ratio: 16 / 10; background: var(--tint); border-radius: var(--radius); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-card__media img { transform: scale(1.03); }
.post-card__placeholder { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 3rem; font-weight: 800; color: var(--rule); }
.post-card__body { padding-top: .9rem; }
.post-card__meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.post-card__meta a { font-weight: 700; text-decoration: none; color: var(--margin); }
.post-card__title { font-size: 1.15rem; margin-bottom: .4rem; }
.post-card__title a { color: var(--ink-deep); text-decoration: none; }
.post-card__title a:hover { color: var(--ink); text-decoration: underline; }
.post-card__excerpt { color: var(--muted); font-size: .95rem; margin: 0; }

@media (min-width: 900px) {
    .post-grid--lead { grid-template-columns: repeat(3, 1fr); }
    .post-grid--lead .post-card:first-child { grid-column: span 2; grid-row: span 2; }
    .post-grid--lead .post-card:first-child .post-card__media { aspect-ratio: 16 / 9; }
    .post-grid--lead .post-card:first-child .post-card__title { font-size: 1.6rem; }
}

/* ---------- Agenda & galeri mini ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.event-row { display: flex; gap: 1rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--text); }
.event-row strong { display: block; color: var(--ink-deep); }
.event-row small { color: var(--muted); font-size: .88rem; }
.event-row:hover strong { color: var(--ink); text-decoration: underline; }
.event-row.is-past { opacity: .7; }
.date-badge { flex: none; width: 3.75rem; text-align: center; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: #fff; line-height: 1.1; }
.date-badge__day { display: block; font-size: 1.4rem; font-weight: 800; color: var(--ink); padding: .3rem 0 .1rem; }
.date-badge__month { display: block; font-size: .72rem; font-weight: 700; background: var(--ink); color: #fff; padding: .15rem 0; }

.thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.thumb { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: var(--rule); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__label { position: absolute; inset: auto 0 0; padding: 1.5rem .5rem .4rem; font-size: .78rem; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(10, 20, 50, .8)); line-height: 1.3; }

/* ---------- Judul halaman ---------- */
.page-header { padding: calc(var(--line) * 1.5) 0 calc(var(--line) * 1.5); border-bottom: 1px solid var(--rule); }
.page-header .container { padding-left: 2.75rem; }
.page-header__title { font-size: clamp(1.8rem, 4vw, 2.75rem); font-weight: 800; color: var(--ink); line-height: var(--line); margin: var(--line) 0 0; }
@media (max-width: 600px) { .page-header__title { line-height: 1.25; } }
.page-header__sub { color: var(--muted); line-height: var(--line); margin: calc(var(--line) / 2) 0 0; max-width: 60ch; }
.crumbs { font-size: .85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem; line-height: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Artikel ---------- */
.article-head { padding-top: 2.5rem; }
.article-head__title { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -.015em; margin: .75rem 0 1rem; }
.article-head__meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--muted); font-size: .92rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }
.article-figure { margin: 2rem auto; }
.article-figure img { width: 100%; max-height: 560px; object-fit: cover; border-radius: var(--radius); }

.prose { font-size: 1.1rem; line-height: 1.8; padding-block: 1.5rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose h3 { font-size: 1.25rem; margin-top: 1.75rem; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.prose ul, .prose ol { padding-left: 1.4rem; margin-bottom: 1em; }
.prose blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 3px solid var(--margin); color: var(--muted); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--rule); padding: .5rem .75rem; text-align: left; }
.prose th { background: var(--tint); }
.prose a { font-weight: 600; }

.share { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; padding: 1.25rem 0 2.5rem; border-top: 1px solid var(--rule); font-size: .92rem; }
.share span { color: var(--muted); }
.share a, .share button { font: inherit; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }

/* ---------- Chips kategori ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip { padding: .35rem .9rem; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; font-size: .9rem; font-weight: 600; color: var(--text); }
.chip span { color: var(--muted); font-weight: 500; margin-left: .2rem; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-active span { color: #c9d4ff; }

/* ---------- Pagination ---------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.pagination__btn { font-weight: 700; text-decoration: none; padding: .5rem 1rem; border: 2px solid var(--ink); border-radius: var(--radius); }
.pagination__btn:hover { background: var(--ink); color: #fff; }
.pagination__btn.is-disabled { border-color: var(--rule); color: var(--rule); }
.pagination__info { color: var(--muted); font-size: .9rem; }

/* ---------- Pengumuman ---------- */
.notice { padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.notice.is-important { padding-left: 1.25rem; border-left: 4px solid var(--pencil); }
.notice__meta { display: flex; gap: .6rem; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: .4rem; }
.notice__title { font-size: 1.3rem; margin-bottom: .4rem; }
.notice__title a { text-decoration: none; color: var(--ink-deep); }
.notice__title a:hover { color: var(--ink); text-decoration: underline; }
.callout { padding: 1rem 1.25rem; border-radius: var(--radius); font-weight: 600; }
.callout--pencil { background: #fff6d6; border-left: 4px solid var(--pencil); color: #5c4700; }
.callout--ok { background: #e6f4ec; border-left: 4px solid var(--ok); color: #124b31; }
.attachment { margin: 1rem 0 2rem; }
.related-list { margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--ink); }
.related-list h2 { font-size: 1.2rem; }

/* ---------- Agenda detail ---------- */
.facts-box { display: grid; gap: .1rem; margin: 0 0 1.5rem; border: 1px solid var(--rule); border-radius: var(--radius); }
.facts-box > div { display: grid; grid-template-columns: 7rem 1fr; padding: .7rem 1rem; }
.facts-box > div + div { border-top: 1px solid var(--rule); }
.facts-box dt { color: var(--muted); font-size: .92rem; }
.facts-box dd { margin: 0; font-weight: 600; }

/* ---------- Galeri ---------- */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2rem 1.5rem; }
.album { text-decoration: none; color: var(--text); }
.album__cover { display: block; aspect-ratio: 4 / 3; background: var(--tint); border-radius: var(--radius); overflow: hidden; box-shadow: 6px 6px 0 var(--rule); }
.album__cover img { width: 100%; height: 100%; object-fit: cover; }
.album__title { display: block; margin-top: .8rem; color: var(--ink-deep); font-size: 1.05rem; }
.album__meta { color: var(--muted); }
.album:hover .album__title { text-decoration: underline; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.media-item { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: var(--tint); }
.media-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.media-item:hover img { transform: scale(1.04); }
.media-item__play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: rgba(214, 58, 68, .92); }
.media-item__play::after { content: ""; position: absolute; left: 26px; top: 20px; border: 12px solid transparent; border-left: 18px solid #fff; }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8, 14, 35, .92); display: flex; align-items: center; justify-content: center; padding: 3rem 4rem; }
.lightbox[hidden] { display: none; }
.lightbox__stage { margin: 0; max-width: 1100px; width: 100%; text-align: center; color: #fff; }
.lightbox__stage img { max-height: 78vh; margin: 0 auto; border-radius: 4px; }
.lightbox__stage iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }
.lightbox__stage figcaption { margin-top: .75rem; color: #cfd6ee; }
.lightbox__close, .lightbox__nav { position: absolute; background: none; border: 0; color: #fff; font-size: 2.5rem; cursor: pointer; padding: .5rem 1rem; line-height: 1; }
.lightbox__close { top: .5rem; right: .75rem; }
.lightbox__nav--prev { left: .25rem; } .lightbox__nav--next { right: .25rem; }

/* ---------- Guru & staf ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2rem 1.5rem; }
.person { text-align: center; }
.person__photo { width: 140px; height: 140px; margin: 0 auto .9rem; border-radius: 50%; overflow: hidden; background: var(--tint); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--rule); display: flex; align-items: center; justify-content: center; }
.person__photo img { width: 100%; height: 100%; object-fit: cover; }
.person__photo span { font-size: 2.25rem; font-weight: 800; color: var(--ink); opacity: .45; }
.person__name { font-size: 1rem; margin-bottom: .2rem; }
.person__role { font-size: .88rem; font-weight: 700; color: var(--margin); margin: 0; }
.person__subject { font-size: .88rem; color: var(--muted); margin: 0; }

/* ---------- Unduhan ---------- */
.file-list { list-style: none; margin: 0; padding: 0; }
.file { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.file__ext { flex: none; width: 3.25rem; height: 3.75rem; display: flex; align-items: flex-end; justify-content: center; padding-bottom: .45rem; font-size: .72rem; font-weight: 800; color: var(--ink); background: var(--tint); border: 1px solid var(--rule); border-radius: 3px 14px 3px 3px; }
.file__info { flex: 1; display: flex; flex-direction: column; }
.file__info strong { color: var(--ink-deep); }
.file__info small { font-size: .88rem; }

/* ---------- Form ---------- */
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.form__hp { position: absolute; left: -9999px; }
.field { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .95rem; }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .search-form input {
    font: inherit; font-weight: 400; padding: .7rem .85rem; border: 1.5px solid #c8d2e6; border-radius: var(--radius); background: #fff; color: var(--text);
}
.field input:focus, .field textarea:focus, .search-form input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(31, 58, 147, .15); }
.field__error { color: var(--margin); font-style: normal; font-weight: 500; font-size: .88rem; }
.form .btn { justify-self: start; }

.split--contact { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 860px) { .split--contact { grid-template-columns: 1fr; } }
.contact-info { background: var(--tint); padding: 1.75rem; border-radius: var(--radius); align-self: start; }
.contact-info h2 { font-size: 1.1rem; }
.contact-info dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 1.25rem 0; }
.contact-info dt { color: var(--muted); font-size: .92rem; }
.contact-info dd { margin: 0; font-weight: 600; }
.map iframe { width: 100%; height: 260px; border: 0; border-radius: var(--radius); }

/* ---------- Pencarian ---------- */
.search-form { display: flex; gap: .6rem; margin-bottom: 1.5rem; }
.search-form input { flex: 1; }
.result { padding: 1.25rem 0; border-bottom: 1px solid var(--rule); }
.result__type { font-size: .85rem; font-weight: 700; color: var(--margin); margin-bottom: .25rem; }
.result__title { font-size: 1.2rem; margin-bottom: .35rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-deep); color: #c9d3f2; font-size: .95rem; margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; padding-block: 3.5rem 2.5rem; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer__name { font-size: 1.15rem; font-weight: 800; color: #fff; }
.site-footer__heading { font-weight: 700; color: #fff; margin-bottom: .75rem; }
.site-footer__meta { font-size: .88rem; color: #9fb0e0; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 1.25rem; font-size: .85rem; color: #9fb0e0; }

/* ---------- Penyesuaian ---------- */
.welcome__inner--text { grid-template-columns: 1fr; }
.board__item a { justify-self: start; }
.nav__link { white-space: nowrap; }
@media (max-width: 600px) { .hero__title { line-height: 1.15; margin-bottom: .5rem; } }

/* ---------- Slider beranda ----------
   Tinggi, efek, panah & titik diatur di Kustomisasi Tema → Slider.
   Warna lapisan & tombol mengikuti warna tema (--ink-deep, --pencil). */
.banner { position: relative; background: var(--ink-deep); }
.banner__track { position: relative; max-width: 1600px; margin: 0 auto; aspect-ratio: var(--banner-ratio, 8 / 3); overflow: hidden; }
.banner__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.banner__slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.banner--slide .banner__slide { opacity: 1; visibility: visible; transform: translateX(100%); transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.banner--slide .banner__slide.is-before { transform: translateX(-100%); }
.banner--slide .banner__slide.is-active { transform: none; }
.banner__image-link { display: block; width: 100%; height: 100%; }
.banner__image { width: 100%; height: 100%; object-fit: cover; }
.banner__slide--left .banner__image { object-position: 70% center; }
.banner__slide--right .banner__image { object-position: 30% center; }

/* Lapisan gelap di belakang teks, memakai warna gelap tema */
.banner__slide.has-overlay::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.banner__slide--left.has-overlay::after { background: linear-gradient(90deg, color-mix(in srgb, var(--ink-deep) 88%, transparent) 0%, color-mix(in srgb, var(--ink-deep) 55%, transparent) 42%, transparent 70%); }
.banner__slide--right.has-overlay::after { background: linear-gradient(270deg, color-mix(in srgb, var(--ink-deep) 88%, transparent) 0%, color-mix(in srgb, var(--ink-deep) 55%, transparent) 42%, transparent 70%); }
.banner__slide--center.has-overlay::after { background: color-mix(in srgb, var(--ink-deep) 58%, transparent); }

.banner__content {
    position: absolute; inset: 0; z-index: 2; display: flex; align-items: center;
    padding: 2rem max(1.25rem, calc((100% - var(--wrap)) / 2 + 1.25rem));
}
.banner__slide--center .banner__content { justify-content: center; text-align: center; }
.banner__slide--right .banner__content { justify-content: flex-end; }
.banner__text { max-width: min(36rem, 52%); color: #fff; }
.banner__slide--center .banner__text { max-width: min(42rem, 80%); }
.banner__kicker { margin: 0 0 .5rem; font-weight: 700; font-size: clamp(.85rem, 1.3vw, 1.05rem); color: var(--pencil); letter-spacing: .01em; }
.banner__title {
    margin: 0; font-family: var(--font-head, var(--font)); font-weight: 800; color: #fff;
    font-size: clamp(1.6rem, 3.8vw, 3.3rem); line-height: 1.1; letter-spacing: -.01em; text-wrap: balance;
}
.banner__subtitle { margin: .75rem 0 0; font-size: clamp(.95rem, 1.5vw, 1.2rem); color: rgba(255, 255, 255, .9); line-height: 1.5; }
.banner__buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.banner__slide--center .banner__buttons { justify-content: center; }
.banner__btn {
    display: inline-flex; align-items: center; padding: .75rem 1.35rem; border-radius: var(--radius);
    font-weight: 700; font-size: .98rem; text-decoration: none; border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.banner__btn--primary { background: var(--pencil); color: #1f1a05; }
.banner__btn--primary:hover { background: #fff; color: var(--ink-deep); }
.banner__btn--secondary { border-color: rgba(255, 255, 255, .85); color: #fff; }
.banner__btn--secondary:hover { background: #fff; color: var(--ink-deep); border-color: #fff; }
.banner__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.banner__nav {
    position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, .88); color: var(--ink-deep); font-size: 1.8rem; line-height: 1; cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}
.banner__nav:hover { background: #fff; }
.banner__nav--prev { left: 1rem; } .banner__nav--next { right: 1rem; }
.banner__dots { position: absolute; z-index: 3; bottom: .9rem; left: 0; right: 0; display: flex; justify-content: center; gap: .5rem; }
.banner__dots button { width: 11px; height: 11px; border-radius: 6px; border: 2px solid #fff; background: rgba(255, 255, 255, .3); padding: 0; cursor: pointer; transition: width .2s; }
.banner__dots button.is-active { background: #fff; width: 28px; }

/* Bila ada panah, teks digeser agar tidak tertutup panah */
@media (min-width: 701px) {
    .banner__content { padding-inline: max(4.5rem, calc((100% - var(--wrap)) / 2 + 1.25rem)); }
}
@media (max-width: 700px) {
    /* HP: gambar tampil UTUH (mengecil mengikuti lebar layar), teks & tombol di bawah gambar */
    .banner__nav { display: none; } /* cukup geser jari atau ketuk titik */
    .banner__track, .banner--has-text .banner__track { aspect-ratio: auto; height: auto; display: grid; }
    .banner__slide { position: relative; inset: auto; grid-area: 1 / 1; display: flex; flex-direction: column; }
    .banner__image-link { height: auto; }
    .banner__image, .banner__slide--left .banner__image, .banner__slide--right .banner__image {
        height: auto; aspect-ratio: auto; object-fit: contain; object-position: center;
    }
    .banner__slide.has-overlay::after { display: none; }
    .banner__content, .banner__slide--center .banner__content, .banner__slide--right .banner__content {
        position: static; flex: 1; display: block; padding: 1rem 1.25rem 2.4rem; background: var(--ink-deep);
    }
    .banner__slide--right .banner__content { text-align: left; }
    .banner__text, .banner__slide--center .banner__text { max-width: 100%; }
    .banner__kicker { margin-bottom: .3rem; }
    .banner__title { font-size: 1.35rem; }
    .banner__subtitle { margin-top: .4rem; font-size: .92rem; }
    .banner__buttons { margin-top: .85rem; }
    .banner__btn { padding: .55rem .95rem; font-size: .88rem; }
    .banner__dots { bottom: .7rem; }
    /* slide tanpa teks: titik penunjuk di atas gambar */
    .banner:not(.banner--has-text) .banner__dots { bottom: .5rem; }
}

/* Hero lebih ringkas bila ada banner di atasnya */
.hero--compact { padding: calc(var(--line) * 1.5) 0 calc(var(--line) * 1.5); }
.hero--compact .hero__title { font-size: clamp(2rem, 4vw, 3rem); line-height: calc(var(--line) * 1.5); }
.hero--compact .hero__tagline { margin-top: calc(var(--line) / 2); }
.hero--compact .hero__actions { margin-top: var(--line); }

/* ---------- Opsi dari Kustomisasi Tema ---------- */
.no-lines .hero, .no-lines .page-header { background-image: none; }
.no-lines .hero::before, .no-lines .page-header::before { display: none; }
.no-lines .page-header { background: var(--tint); }
.no-lines .hero__title, .no-lines .hero__kicker, .no-lines .hero__tagline, .no-lines .page-header__title, .no-lines .page-header__sub { line-height: 1.25; }
.no-lines .hero__tagline { margin-top: .75rem; }
.header-static .site-header { position: static; }
.site-footer__note { color: #c9d3f2; font-style: italic; }

/* ---------- Slider gaya "ditempel di halaman buku" (Kustomisasi → Gaya slider: kertas) ---------- */
.hero--with-banner { padding-bottom: calc(var(--line) * 2); }
.hero--with-banner .hero__paper { margin-bottom: calc(var(--line) * 1.5); }
.hero__banner { padding-left: 1.5rem; }
.hero--banner-only { padding-block: calc(var(--line) * 1.5) calc(var(--line) * 2); }
.banner--kertas {
    background: #fff; padding: .75rem; border-radius: 2px;
    box-shadow: 0 18px 40px -18px rgba(20, 39, 99, .45); transform: rotate(-.5deg);
}
.banner--kertas .banner__track { max-width: none; }
.banner--kertas .banner__content { padding-inline: 5.5rem; }
.banner--kertas::before, .banner--kertas::after {
    /* selotip di dua sudut atas */
    content: ""; position: absolute; z-index: 3; top: -14px; width: 130px; height: 30px;
    background: color-mix(in srgb, var(--pencil) 78%, transparent);
}
.banner--kertas::before { left: 6%; transform: rotate(-4deg); }
.banner--kertas::after { right: 6%; transform: rotate(3deg); }
.banner--kertas .banner__dots { bottom: 1.4rem; }
.banner--kertas .banner__nav--prev { left: 1.6rem; } .banner--kertas .banner__nav--next { right: 1.6rem; }
@media (max-width: 700px) {
    .hero__banner { padding-left: 0; }
    .banner--kertas { padding: .4rem; transform: none; }
    .banner--kertas::before, .banner--kertas::after { width: 70px; height: 18px; top: -9px; }
    .banner--kertas .banner__dots { bottom: .8rem; }
}
.no-lines .hero__banner { padding-left: 0; }
@media (max-width: 700px) { .banner--kertas .banner__content { padding-inline: 1rem; } }
.banner--kertas .banner__title { font-size: clamp(1.5rem, 3vw, 2.6rem); }

/* ---------- Slider guru & staf di beranda ---------- */
.t-slider { position: relative; }
.t-slider__track {
    list-style: none; margin: 0; padding: .25rem .1rem 1rem; display: grid; grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 1.25rem) / 4); gap: 1.25rem;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
}
.t-slider__track::-webkit-scrollbar { display: none; }
.t-slider__track:focus-visible { outline: 3px solid var(--pencil); outline-offset: 4px; }
.t-card {
    scroll-snap-align: start; text-align: center; background: var(--paper); border: 1px solid var(--rule);
    border-radius: calc(var(--radius) * 1.5); padding: 1.5rem 1rem 1.25rem;
}
.t-card__photo {
    width: 120px; height: 120px; margin: 0 auto .9rem; border-radius: 50%; overflow: hidden; background: var(--tint);
    border: 3px solid var(--paper); box-shadow: 0 0 0 2px var(--rule); display: flex; align-items: center; justify-content: center;
}
.t-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.t-card__photo span { font-size: 2rem; font-weight: 800; color: var(--ink); opacity: .45; }
.t-card__name { margin: 0 0 .2rem; font-weight: 700; color: var(--ink-deep); font-family: var(--font-head, var(--font)); line-height: 1.3; }
.t-card__role { margin: 0; font-size: .88rem; font-weight: 700; color: var(--margin); }
.t-card__subject { margin: .1rem 0 0; font-size: .88rem; color: var(--muted); }
.t-slider__nav {
    position: absolute; top: calc(50% - .5rem); z-index: 2; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font-size: 1.7rem; line-height: 1; cursor: pointer;
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .35);
}
.t-slider__nav:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.t-slider__nav[disabled] { opacity: 0; pointer-events: none; }
.t-slider__nav--prev { left: -1.1rem; } .t-slider__nav--next { right: -1.1rem; }
@media (max-width: 960px) { .t-slider__track { grid-auto-columns: calc((100% - 2 * 1.25rem) / 3); } }
@media (max-width: 700px) {
    .t-slider__track { grid-auto-columns: 44%; gap: 1rem; }
    .t-slider__nav { display: none; }
    .t-card__photo { width: 96px; height: 96px; }
}

/* Slider berita (Kustomisasi → Beranda → Tampilan berita: Slider) */
.t-slider--posts .t-slider__track { grid-auto-columns: calc((100% - 2 * 1.25rem) / 3); align-items: stretch; }
.t-slider__item { scroll-snap-align: start; display: flex; }
.t-slider__item .post-card { width: 100%; background: var(--paper); border: 1px solid var(--rule); border-radius: calc(var(--radius) * 1.5); overflow: hidden; }
.t-slider__item .post-card__media { border-radius: 0; }
.t-slider__item .post-card__body { padding: .9rem 1.1rem 1.2rem; }
.t-slider--posts .t-slider__nav { top: 30%; }
@media (max-width: 960px) { .t-slider--posts .t-slider__track { grid-auto-columns: calc((100% - 1.25rem) / 2); } }
@media (max-width: 700px) { .t-slider--posts .t-slider__track { grid-auto-columns: 84%; } }
