/* ============================================================================
 *  Tema Modern SMAN 14 Medan — lapisan kustom di atas Tailwind
 *
 *  Berkas ini dimuat SETELAH assets/css/tailwind.css dan hanya berisi hal yang
 *  tidak bisa (atau tidak rapi) dikerjakan utility class:
 *    1. Perilaku menu (flyout desktop, akordeon drawer seluler).
 *    2. Animasi masuk saat elemen tergulir.
 *    3. Gaya isi artikel (HTML dari editor admin).
 *    4. Pagination, karena markup-nya dihasilkan sw_pagination() di PHP.
 * ========================================================================== */

/* ------------------------------------------------------------- dasar dokumen */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

/* ---------------------------------------------------------------- menu desktop */
@media (min-width: 1024px) {
  .has-sub > .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 60;
    min-width: 15rem;
    padding: .4rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: .85rem;
    box-shadow: 0 24px 60px -20px rgba(8, 46, 110, .35);
  }
  .has-sub:hover > .submenu,
  .has-sub:focus-within > .submenu { display: block; }

  .submenu li { position: relative; }
  .submenu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .55rem .8rem;
    border-radius: .5rem;
    font-size: .875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
  }
  .submenu a:hover { background: #eff5ff; color: #0b3d91; }

  /* Anak dari anak: flyout ke samping. */
  .submenu .submenu {
    top: -.4rem;
    left: 100%;
  }
}

/* ------------------------------------------------------------- menu seluler */
.mobile-sub { display: none; }
.mobile-item.is-open > .mobile-sub { display: block; }
.mobile-item.is-open > div > button svg { transform: rotate(180deg); }

/* Drawer: geser masuk-keluar. `visibility` ikut ditransisikan dengan jeda saat
 * menutup, supaya animasi keluar sempat tampil sebelum elemen disembunyikan
 * dari pembaca layar dan urutan fokus. */
#mobileNav {
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .3s;
}
#mobileNav.is-open {
  visibility: visible;
  transform: translateX(0);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), visibility 0s;
}

#navBackdrop {
  transition: opacity .3s ease;
}
#navBackdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* -------------------------------------------------------------- panel cari */
#searchPanel.is-open { display: block; }

/* ------------------------------------------------------------ header padat */
#siteHeader.is-stuck {
  box-shadow: 0 10px 30px -12px rgba(8, 46, 110, .18);
}

/* ------------------------------------------------------------------ hero */
[data-hero-slide] { display: none; }
[data-hero-slide].is-active { display: block; animation: heroFade .7s ease both; }

[data-hero-dot] { transition: width .25s ease, background-color .25s ease; }
[data-hero-dot].is-active { width: 1.75rem; background: #f0a500; }

@keyframes heroFade {
  from { opacity: .35; }
  to   { opacity: 1; }
}

/* Latar buram di belakang foto; hanya ditampilkan di ponsel. */
.hero-photo-bg { display: none; }

@keyframes heroZoom {
  from { transform: scale(1.045); }
  to   { transform: scale(1); }
}
@keyframes heroZoomOut {
  from { transform: scale(1.07); }
  to   { transform: scale(1); }
}

/* Ponsel: seluruh foto ditampilkan utuh (object-contain) di atas latar
 * buram, lalu zoom-out cepat 0,75 detik saat slide aktif. Efek ini membuat
 * isi foto langsung terbaca tanpa ada bagian yang terpotong. */
@media (max-width: 639.98px) {
  .hero-photo-bg {
    display: block;
    filter: blur(18px) saturate(1.08);
    transform: scale(1.14);
    opacity: .5;
  }
  [data-hero-img] {
    object-fit: contain;
  }
  [data-hero-slide].is-active [data-hero-img] {
    animation: heroZoomOut .75s cubic-bezier(.22, .61, .36, 1) both;
  }
}

/* Layar besar: foto memenuhi tinggi hero dengan gerakan Ken Burns halus. */
@media (min-width: 640px) {
  [data-hero-slide].is-active [data-hero-img] {
    animation: heroZoom 9s ease-out both;
  }
}

/* ------------------------------------------------------- muncul saat gulir */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------ ke atas */
[data-to-top] { display: none; }
[data-to-top].is-visible { display: grid; }

/* ============================================================================
 *  Isi artikel (dari editor admin, class tidak bisa dikendalikan)
 * ========================================================================== */
.article-content { font-size: 1.0125rem; line-height: 1.85; color: #46536b; }
.article-content > * + * { margin-top: 1.05em; }
.article-content h2,
.article-content h3,
.article-content h4 {
  color: #12203a;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 1.8em;
  margin-bottom: .6em;
}
.article-content h2 { font-size: 1.5rem; }
.article-content h3 { font-size: 1.22rem; }
.article-content h4 { font-size: 1.05rem; }

.article-content a { color: #1d3ed8; text-decoration: underline; text-underline-offset: 2px; }
.article-content a:hover { color: #0b3d91; }

.article-content ul,
.article-content ol { padding-left: 1.5rem; margin: 1em 0; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin: .45em 0; }

.article-content img {
  border-radius: .85rem;
  margin: 1.4em auto;
  box-shadow: 0 10px 30px -12px rgba(8, 46, 110, .18);
}
.article-content figure { margin: 1.4em 0; }
.article-content figcaption {
  font-size: .82rem;
  color: #7c8798;
  text-align: center;
  margin-top: .6em;
}

.article-content blockquote {
  margin: 1.4em 0;
  padding: .9rem 1.25rem;
  border-left: 4px solid #f0a500;
  background: #f8fafc;
  border-radius: 0 .75rem .75rem 0;
  color: #12203a;
  font-style: italic;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  margin: 1.4em 0;
}
.article-content th,
.article-content td {
  border: 1px solid #e2e8f0;
  padding: .55rem .75rem;
  text-align: left;
}
.article-content th { background: #f1f5f9; font-weight: 700; color: #12203a; }

.article-content iframe { max-width: 100%; border-radius: .75rem; }
.article-content pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: .75rem;
  overflow-x: auto;
  font-size: .85rem;
}
.article-content code { font-size: .9em; }

/* ============================================================================
 *  Aksesibilitas
 * ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  [data-hero-slide].is-active { animation: none !important; }
}

/* Fokus keyboard yang jelas di atas latar apa pun. */
:focus-visible {
  outline: 2px solid #f0a500;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================================================
 *  Pagination
 *
 *  sw_pagination() menghasilkan <ul class="pagination"> dengan class Bootstrap
 *  (active/disabled). Markup-nya dipakai bersama semua halaman daftar, jadi
 *  gayanya ditempatkan di sini alih-alih utility per elemen.
 * ========================================================================== */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination li { display: block; }
.pagination a {
  display: grid;
  place-items: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .65rem;
  border: 1px solid #e2e8f0;
  border-radius: .6rem;
  background: #fff;
  font-size: .8125rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.pagination a:hover {
  border-color: #bfd6fe;
  background: #eff5ff;
  color: #0b3d91;
}
.pagination li.active a {
  border-color: #0b3d91;
  background: #0b3d91;
  color: #fff;
}
.pagination li.disabled a {
  border-style: dashed;
  color: #cbd5e1;
  pointer-events: none;
}

/* Baris yang dibungkus helper tetap menjadi satu blok di tengah. */
.pagination-wrap { display: flex; justify-content: center; }

/* ============================================================================
 *  Kanal Instagram
 *
 *  Embed resmi Instagram membawa inline style (min-width:326px, margin auto)
 *  yang bisa melebar keluar kartu di layar 360px. Di sini nilainya dipaksa
 *  mengikuti lebar kartu agar tidak menimbulkan gulir mendatar.
 *
 *  Di desktop bingkai feed dibuat selebar konten (bukan kartu 430px) supaya
 *  grid foto Instagram terasa seperti etalase penuh.
 * ========================================================================== */
[data-instagram-channel] blockquote.instagram-media {
  margin: 0 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  background: #fff;
  border: 0;
  border-radius: .85rem;
  box-shadow: none;
}
[data-instagram-channel] iframe {
  width: 100% !important;
  max-width: 100% !important;
  border: 0;
}

.sw-ig {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3.25rem, 6.5vw, 5.25rem) 0;
  background:
    radial-gradient(900px 480px at 50% -18%, rgba(238, 42, 123, .26), transparent 64%),
    radial-gradient(680px 420px at 92% 112%, rgba(98, 40, 215, .30), transparent 62%),
    linear-gradient(180deg, #041a42 0%, #072a63 52%, #041a42 100%);
  color: #fff;
}
.sw-ig__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .35;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 72%);
}
.sw-ig__aura {
  position: absolute;
  z-index: -1;
  width: 26rem;
  height: 26rem;
  right: -8rem;
  top: -9rem;
  border-radius: 50%;
  background: rgba(240, 165, 0, .16);
  filter: blur(70px);
  pointer-events: none;
}
.sw-ig__head {
  max-width: 44rem;
  margin: 0 auto clamp(1.9rem, 4vw, 2.9rem);
  text-align: center;
}
.sw-ig__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .8rem;
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #f6c453;
}
.sw-ig__eyebrow-line {
  width: 1.5rem;
  height: 1px;
  background: #f0a500;
}
.sw-ig__title {
  font-size: clamp(1.55rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: #fff;
}
.sw-ig__desc {
  max-width: 34rem;
  margin: .85rem auto 0;
  font-size: .9375rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, .70);
}
.sw-ig__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: 1.5rem;
}
.sw-ig__follow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem 1.15rem;
  border-radius: .85rem;
  font-size: .8125rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(100deg, #f9ce34, #ee2a7b 46%, #6228d7);
  box-shadow: 0 18px 38px -18px rgba(238, 42, 123, .85);
  transition: filter .18s ease, transform .18s ease;
}
.sw-ig__follow:hover { filter: brightness(1.06); transform: translateY(-1px); }
.sw-ig__follow svg { width: 1rem; height: 1rem; }

/* Bingkai feed: garis gradien tipis + bayangan lembut. */
.sw-ig__frame {
  position: relative;
  padding: 3px;
  border-radius: 1.6rem;
  background: linear-gradient(115deg, #f9ce34, #ee2a7b 48%, #6228d7);
  box-shadow: 0 50px 110px -60px rgba(238, 42, 123, .75), 0 30px 70px -50px rgba(0, 0, 0, .9);
}
.ig-embed {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: calc(1.6rem - 3px);
  background: #fff;
}
.ig-embed iframe {
  display: block;
  width: 100%;
  height: clamp(540px, 58vw, 660px);
  border: 0;
  background: #fff;
}
@media (min-width: 900px) {
  .ig-embed iframe { height: clamp(660px, 62vh, 780px); }
}
@media (max-width: 400px) {
  .ig-embed iframe { height: 500px; }
}
.sw-ig__note {
  margin-top: 1.1rem;
  text-align: center;
  font-size: .75rem;
  color: rgba(255, 255, 255, .45);
}

/* ============================================================================
 *  Lightbox galeri
 *
 *  Satu lapisan dipakai semua galeri: halaman /gallery, beranda, dan foto
 *  prestasi. Tombol navigasi selalu tersedia, termasuk lewat papan ketik.
 * ========================================================================== */
.sw-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  padding: 1rem;
  background: rgba(4, 12, 28, .94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sw-lightbox.is-open { display: flex; }
.sw-lightbox__stage {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  min-width: 0;
}
.sw-lightbox__img {
  max-width: min(100%, 1180px);
  max-height: calc(100vh - 10rem);
  max-height: calc(100svh - 10rem);
  width: auto;
  height: auto;
  border-radius: .9rem;
  object-fit: contain;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.sw-lightbox__caption {
  max-width: 46rem;
  margin: 0;
  text-align: center;
  font-size: .875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, .82);
}
.sw-lightbox__count {
  position: absolute;
  top: .25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .55);
}
.sw-lightbox__btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.sw-lightbox__btn:hover { background: #f0a500; color: #041a42; }
.sw-lightbox__btn[disabled] { opacity: .35; cursor: default; }
.sw-lightbox__close {
  position: absolute;
  top: .25rem;
  right: .25rem;
  z-index: 2;
}
.sw-lightbox__nav {
  display: flex;
  align-items: center;
  gap: .75rem;
}
@media (min-width: 900px) {
  .sw-lightbox__nav {
    position: absolute;
    inset: 0;
    justify-content: space-between;
    pointer-events: none;
  }
  .sw-lightbox__nav .sw-lightbox__btn { pointer-events: auto; }
}
body.sw-lightbox-open { overflow: hidden; }

/* ============================================================================
 *  Sambutan kepala sekolah (beranda)
 *
 *  Satu panel putih di atas latar bergradasi halus dan pola garis samar.
 *  Kolom kiri memuat judul, kutipan sapaan, dan ringkasan sambutan; kolom
 *  kanan memuat foto portrait dengan bingkai object-fit: contain supaya
 *  seluruh badan kepala sekolah terlihat, plus kartu identitas di bawahnya.
 * ========================================================================== */
.sw-welcome {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3.25rem, 7vw, 5.5rem) 0;
  background:
    radial-gradient(820px 420px at 84% -8%, rgba(240, 165, 0, .10), transparent 68%),
    radial-gradient(720px 420px at 0% 108%, rgba(11, 61, 145, .10), transparent 70%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 58%, #f8fafc 100%);
}
.sw-welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(15, 35, 70, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 35, 70, .05) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 42%, #000 10%, transparent 78%);
          mask-image: radial-gradient(ellipse 80% 60% at 50% 42%, #000 10%, transparent 78%);
  opacity: .55;
  pointer-events: none;
}

.sw-welcome__card {
  position: relative;
  display: grid;
  gap: 2.25rem;
  overflow: hidden;
  padding: clamp(1.25rem, 3.2vw, 3rem);
  border: 1px solid #e7eef9;
  border-radius: 1.75rem;
  background: rgba(255, 255, 255, .9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 12px 30px -24px rgba(8, 46, 110, .28),
    0 40px 90px -60px rgba(8, 46, 110, .55);
}
/* Aksen emas tipis di sudut kiri atas panel. */
.sw-welcome__card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 132px;
  height: 3px;
  border-radius: 0 0 3px 0;
  background: linear-gradient(90deg, #f0a500, rgba(240, 165, 0, 0));
}
@media (min-width: 1024px) {
  .sw-welcome__card {
    grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
    align-items: start;
    gap: clamp(2rem, 4.5vw, 4.5rem);
    border-radius: 2rem;
  }
}

.sw-welcome__text {
  position: relative;
  z-index: 1;
  min-width: 0;
}
/* Tanda kutip raksasa sebagai hiasan latar kolom teks. */
.sw-welcome__text::before {
  content: "\201C";
  position: absolute;
  top: -3.4rem;
  right: -.5rem;
  z-index: -1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9.5rem;
  line-height: 1;
  color: rgba(11, 61, 145, .05);
  pointer-events: none;
}

.sw-welcome__eyebrow {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: 0 0 1rem;
  font-size: .688rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #8a5c00;
}
.sw-welcome__eyebrow-line {
  width: 2.25rem;
  height: 1px;
  background: linear-gradient(90deg, #f0a500, rgba(240, 165, 0, .2));
}

.sw-welcome__title { margin: 0; }
.sw-welcome__title-lead {
  display: block;
  font-size: clamp(.9rem, 1.15vw, 1.05rem);
  font-weight: 700;
  letter-spacing: .01em;
  color: #64748b;
}
.sw-welcome__school {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: .3rem;
  padding-bottom: .1em;
  font-size: clamp(1.6rem, calc(1.05rem + 1.65vw), 2.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.025em;
  color: #0b3d91;
  background-image: linear-gradient(180deg, transparent 74%, rgba(240, 165, 0, .32) 74%);
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}

.sw-welcome__salam {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin: 1.15rem 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.5;
  color: #0b3d91;
}
.sw-welcome__quote {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: .2rem;
  color: #f0a500;
}

.sw-welcome__body {
  max-width: 60ch;
  margin-top: 1.15rem;
  font-size: .9375rem;
  line-height: 1.85;
  color: #475569;
}
.sw-welcome__body p { margin: 0; }
.sw-welcome__body p + p { margin-top: .9rem; }
/* Huruf pertama paragraf pembuka dibuat besar seperti artikel majalah. */
.sw-welcome__body .sw-welcome__lead::first-letter {
  float: left;
  margin: .14em .14em 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.1rem;
  font-weight: 700;
  line-height: .82;
  color: #0b3d91;
}
/* Salam penutup dipisah halus dari isi sambutan. */
.sw-welcome__body .sw-welcome__closing {
  margin-top: 1.05rem;
  font-style: italic;
  color: #64748b;
}

.sw-welcome__media {
  position: relative;
  isolation: isolate;
  min-width: 0;
}
/* Titik-titik halus di sudut kanan atas bingkai foto. */
.sw-welcome__media::before {
  content: "";
  position: absolute;
  top: -1.1rem;
  right: -.4rem;
  width: 7rem;
  height: 7rem;
  background-image: radial-gradient(rgba(11, 61, 145, .18) 1px, transparent 1.6px);
  background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(135deg, #000, transparent 75%);
          mask-image: linear-gradient(135deg, #000, transparent 75%);
  pointer-events: none;
}
.sw-welcome__glow {
  position: absolute;
  inset: 12% -6% -8% 10%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(240, 165, 0, .18), rgba(11, 61, 145, .10) 55%, transparent 72%);
  filter: blur(28px);
  pointer-events: none;
}

.sw-welcome__frame {
  position: relative;
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  padding: .6rem;
  border-radius: 1.6rem;
  outline: 1px solid rgba(240, 165, 0, .4);
  outline-offset: 7px;
  background: linear-gradient(165deg, #ffffff 0%, #f2f7ff 55%, #e6eefc 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .9),
    inset 0 0 0 2px rgba(11, 61, 145, .05),
    0 32px 60px -38px rgba(8, 46, 110, .55);
}
.sw-welcome__frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 33rem;
  object-fit: contain;
  border-radius: 1.1rem;
  background: #eef4ff;
}

.sw-welcome__badge {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: .7rem;
  width: fit-content;
  max-width: 100%;
  margin: -1rem auto 0;
  padding: .8rem 1rem;
  border: 1px solid #e7eef9;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 20px 45px -32px rgba(8, 46, 110, .6);
}
.sw-welcome__badge-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .75rem;
  color: #0b3d91;
  background: linear-gradient(140deg, rgba(240, 165, 0, .18), rgba(11, 61, 145, .10));
}
.sw-welcome__badge-icon svg { width: 1.35rem; height: 1.35rem; }
.sw-welcome__badge-text { min-width: 0; }
.sw-welcome__badge-role {
  display: block;
  font-size: .625rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8a5c00;
}
.sw-welcome__badge-name {
  display: block;
  margin-top: .15rem;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
}
.sw-welcome__badge-nip {
  display: block;
  margin-top: .1rem;
  font-size: .7rem;
  color: #64748b;
}

@media (max-width: 1023.98px) {
  .sw-welcome__media { order: -1; }
  .sw-welcome__text::before { display: none; }
}
@media (max-width: 389.98px) {
  /* Ponsel kecil: nama sekolah tetap satu baris. */
  .sw-welcome__school { font-size: 1.28rem; }
}
@media (max-width: 639.98px) {
  .sw-welcome__card { border-radius: 1.35rem; }
  .sw-welcome__frame {
    max-width: 20rem;
    padding: .5rem;
    outline-offset: 5px;
  }
  .sw-welcome__frame img { max-height: 27rem; }
  .sw-welcome__badge {
    width: 100%;
    max-width: 20rem;
    margin: .95rem auto 0;
  }
}

/* ============================================================================
 *  Carousel siswa berprestasi (beranda)
 *
 *  Mengandalkan scroll-snap native: geser dengan jari, roda tetikus, atau
 *  tombol panah. theme.js hanya menambah putaran otomatis dan titik navigasi.
 * ========================================================================== */
[data-ach-track] {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: .5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
[data-ach-track]::-webkit-scrollbar { display: none; }

/* Geser dengan tetikus: kursor berubah dan snap dimatikan sementara supaya
 * posisi mengikuti pointer tanpa perlawanan. */
[data-ach-track] { cursor: grab; }
[data-ach-track].is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
}
[data-ach-track].is-dragging * { user-select: none; }

[data-ach-card] {
  flex: 0 0 auto;
  width: 76%;
  max-width: 320px;
  scroll-snap-align: start;
  transition: border-color .3s ease;
}
[data-ach-card]:hover { border-color: rgba(240, 165, 0, .42); }
@media (min-width: 640px) {
  [data-ach-card] { width: 300px; }
}

[data-ach-dot] {
  height: .5rem;
  width: .5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  cursor: pointer;
  transition: width .25s ease, background-color .25s ease;
}
[data-ach-dot].is-active {
  width: 1.6rem;
  background: #f0a500;
}



