/* =========================================
   SMK NEGERI 1 AMPELGADING - Main Stylesheet
   Palet: Navy + Biru cerah + aksen emas (terinspirasi gaya "index-3")
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
  /* -- Navy & biru: warna dasar institusional, lebih hidup/cerah -- */
  --navy-deep: #071c3a;
  --navy: #0b2545;
  --navy-steel: #1e5fcc;
  --blue-light: #4a90e2;
  --sky: #eaf2ff;

  /* -- Emas: aksen seremonial, dipakai hemat -- */
  --gold: #d4a94c;
  --gold-soft: #f0ddb0;
  --gold-deep: #ad8330;

  /* -- Oranye: dipakai sebagai warna latar bar menu kategori (nav.primary-menu),
     didefinisikan di atas sini (bukan hanya di --orange baris ~5600) supaya
     tersedia sejak nav dirender, bukan menunggu definisi --orange di bawah. -- */
  --nav-category-bg: #ff6b00;
  --nav-category-bg-hover: rgba(255,255,255,0.16);

  /* -- Netral -- */
  /* --paper disamakan dengan --surface (putih solid) di mode terang.
     Sebelumnya --paper: #f5f8fc (abu-abu kebiruan pucat) dipakai sebagai
     background body/halaman, sedangkan kotak konten (.container.narrow)
     pakai --surface: #ffffff (putih solid) -- bedanya tipis tapi membuat
     pembatas antara area banner, latar halaman, dan kotak konten putih
     terlihat seperti lapisan warna yang tidak menyatu. */
  --paper: #ffffff;
  --ink: #152238;
  --ink-muted: #5a6b85;
  --white: #ffffff;
  --card-border: rgba(11,37,69,0.08);
  --hairline: rgba(11,37,69,0.08);
  --grid-line: rgba(255,255,255,0.08);
  --surface: #ffffff;
  --surface-alt: #f5f8fc;
  /* -- Teks di atas background navy/gelap SOLID (hero, footer, stats, tombol dsb).
     Berbeda dari --white: --white ikut berbalik gelap di mode malam (karena juga
     dipakai sebagai warna "surface" terbalik), sedangkan --on-dark HARUS tetap
     terang di kedua mode karena backgroundnya tetap gelap di kedua mode. -- */
  --on-dark: #ffffff;

  /* -- Pasangan --navy-steel yang DIKUNCI tetap gelap di kedua mode, khusus
     untuk elemen solid bertuliskan putih (tombol, FAB, hover ikon sosial).
     --navy-steel sendiri SENGAJA ikut terang di mode malam (dipakai luas
     sebagai warna teks/ikon di atas background gelap), tapi itu membuat
     kontras teks putih di atasnya memudar kalau dipakai sebagai background
     solid. --navy-steel-fixed menghindari itu tanpa mengubah --navy-steel. -- */
  --navy-steel-fixed: #1e5fcc;

  /* -- Alias lama (kompatibilitas dengan style di bawah) -- */
  --primary: var(--navy-steel);
  --primary-dark: var(--navy);
  --primary-light: var(--blue-light);
  --accent: var(--gold);
  --text-dark: var(--ink);
  --text-muted: var(--ink-muted);
  --bg-light: var(--paper);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow: 0 8px 24px -12px rgba(11, 37, 69, 0.18);
  --shadow-lg: 0 20px 50px -20px rgba(11, 37, 69, 0.28);
  --transition: all 0.25s cubic-bezier(.16,.84,.44,1);
  --ease: cubic-bezier(.16,.84,.44,1);
  --header-h: 0px;

  --font-display: 'Sora', 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;

  color-scheme: light;
}

/* ============ DARK MODE ============
   Aktif otomatis mengikuti tema perangkat (prefers-color-scheme),
   atau dipaksa lewat data-theme="dark" / "light" via toggle manual (tersimpan di localStorage). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy-deep: #050f22;
    --navy: #0b1e3c;
    --navy-steel: #4a90e2;
    --blue-light: #6ea8ec;
    --sky: #142a4a;

    --gold: #e0bd6c;
    --gold-soft: #f0e0ae;
    --gold-deep: #b3903a;

    --paper: #0c1424;
    --ink: #eef1f6;
    --ink-muted: #93a5c4;
    --white: #101c30;
    --card-border: rgba(255,255,255,0.08);
    --hairline: rgba(255,255,255,0.08);
    --grid-line: rgba(255,255,255,0.06);
    --surface: #101c30;
    --surface-alt: #0c1424;
    --on-dark: #f7f5ef;
    --navy-steel-fixed: #1558c2;

    --shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.65);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --navy-deep: #050f22;
  --navy: #0b1e3c;
  --navy-steel: #4a90e2;
  --blue-light: #6ea8ec;
  --sky: #142a4a;

  --gold: #e0bd6c;
  --gold-soft: #f0e0ae;
  --gold-deep: #b3903a;

  --paper: #0c1424;
  --ink: #eef1f6;
  --ink-muted: #93a5c4;
  --white: #101c30;
  --card-border: rgba(255,255,255,0.08);
  --hairline: rgba(255,255,255,0.08);
  --grid-line: rgba(255,255,255,0.06);
  --surface: #101c30;
  --surface-alt: #0c1424;
  --on-dark: #f7f5ef;
  --navy-steel-fixed: #1558c2;

  --shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.65);

  color-scheme: dark;
}

body {
  transition: background-color 0.35s ease, color 0.35s ease;
}

*::selection {
  background: var(--gold-soft);
  color: var(--navy-deep);
}

html {
  scroll-behavior: smooth;
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
  overflow-x: hidden;
  max-width: 100%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
  position: relative;
}

/* ============ EFEK GLOSSY LATAR BELAKANG (MODE MALAM) ============
   Sapuan cahaya lembut yang diam di tempat (bukan animasi berat) di
   belakang seluruh halaman, memberi kesan "glossy"/berkilau halus khas
   UI gelap modern, tanpa mengganggu kontras teks di atasnya. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body::before {
    content: "";
    position: fixed;
    inset: -10%;
    z-index: 0;
    pointer-events: none;
    background:
      radial-gradient(1000px 560px at 12% -8%, rgba(74,144,226,0.16), transparent 60%),
      radial-gradient(900px 620px at 96% 18%, rgba(224,189,108,0.08), transparent 55%),
      radial-gradient(1200px 700px at 50% 108%, rgba(74,144,226,0.10), transparent 60%);
    animation: glossyDrift 26s ease-in-out infinite;
    will-change: transform;
  }
}
:root[data-theme="dark"] body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 560px at 12% -8%, rgba(74,144,226,0.16), transparent 60%),
    radial-gradient(900px 620px at 96% 18%, rgba(224,189,108,0.08), transparent 55%),
    radial-gradient(1200px 700px at 50% 108%, rgba(74,144,226,0.10), transparent 60%);
  animation: glossyDrift 26s ease-in-out infinite;
  will-change: transform;
}

/* Sapuan cahaya bergerak sangat lambat & halus â€” kesan "glossy" hidup
   tanpa mengganggu keterbacaan teks di atasnya. */
@keyframes glossyDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-1.5%, 1.5%) scale(1.04); }
  100% { transform: translate(0, 0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  :root:not([data-theme="light"]) body::before,
  :root[data-theme="dark"] body::before {
    animation: none;
  }
}

body > main,
body > footer {
  position: relative;
  z-index: 1;
}
/* header SENGAJA tidak dimasukkan ke rule gabungan di atas: header punya
   definisi position/z-index sendiri (position:sticky; z-index:1000; lihat
   blok "HEADER" di bawah) supaya ia tetap sticky & selalu di atas konten
   lain (termasuk dropdown submenu-nya). Rule gabungan "body > header"
   sebelumnya (specificity-nya lebih tinggi dari selector "header" polos)
   TIDAK SENGAJA menimpa itu jadi position:relative; z-index:1 -- akibatnya
   stacking context header kolaps dan submenu dropdown desktop bisa
   tertutup visual oleh konten section lain (mis. video hero) meski
   dropdown-nya sendiri sudah dalam status terbuka/opacity:1. */

/* ============ LATAR BELAKANG HIDUP (live-bg) ============
   Lapisan animasi ambient di belakang seluruh konten, berganti total
   sesuai mode: gelembung emas melayang di mode malam, angin & cahaya
   matahari di mode terang. Murni CSS (transform/opacity) supaya ringan
   dan tetap berjalan mulus di perangkat mobile. */
.live-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.live-bg-dark,
.live-bg-light {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Default (mode terang eksplisit ATAU sistem terang tanpa override) */
.live-bg-light { opacity: 1; }
.live-bg-dark { opacity: 0; }

:root[data-theme="dark"] .live-bg-dark { opacity: 1; }
:root[data-theme="dark"] .live-bg-light { opacity: 0; }
:root[data-theme="light"] .live-bg-dark { opacity: 0; }
:root[data-theme="light"] .live-bg-light { opacity: 1; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .live-bg-dark { opacity: 1; }
  :root:not([data-theme="light"]) .live-bg-light { opacity: 0; }
}

/* ---- Mode malam: gelembung mengambang ---- */
.bubble {
  position: absolute;
  bottom: -80px;
  border-radius: 50%;
  display: block;
  animation: bubbleFloat linear infinite;
  will-change: transform, opacity;
}

.bubble--gold {
  background: radial-gradient(circle at 32% 28%, rgba(240, 221, 176, 0.85), rgba(212, 169, 76, 0.32) 60%, transparent 78%);
  box-shadow: 0 0 18px rgba(212, 169, 76, 0.35);
}

.bubble--blue {
  background: radial-gradient(circle at 32% 28%, rgba(160, 200, 245, 0.7), rgba(74, 144, 226, 0.25) 60%, transparent 78%);
  box-shadow: 0 0 16px rgba(74, 144, 226, 0.3);
}

@keyframes bubbleFloat {
  0% { transform: translate(0, 0) scale(0.9); opacity: 0; }
  8% { opacity: 0.9; }
  92% { opacity: 0.7; }
  100% { transform: translate(var(--drift, 40px), -112vh) scale(1.05); opacity: 0; }
}

.b1  { left: 4%;  width: 22px; height: 22px; --drift: 30px;  animation-duration: 17s; animation-delay: 0s; }
.b2  { left: 16%; width: 14px; height: 14px; --drift: -20px; animation-duration: 13s; animation-delay: 2s; }
.b3  { left: 27%; width: 30px; height: 30px; --drift: 45px;  animation-duration: 22s; animation-delay: 1s; }
.b4  { left: 39%; width: 10px; height: 10px; --drift: -15px; animation-duration: 11s; animation-delay: 4s; }
.b5  { left: 51%; width: 26px; height: 26px; --drift: 25px;  animation-duration: 19s; animation-delay: 3s; }
.b6  { left: 62%; width: 18px; height: 18px; --drift: -35px; animation-duration: 15s; animation-delay: 6s; }
.b7  { left: 71%; width: 12px; height: 12px; --drift: 20px;  animation-duration: 12s; animation-delay: 0.5s; }
.b8  { left: 82%; width: 24px; height: 24px; --drift: -25px; animation-duration: 20s; animation-delay: 5s; }
.b9  { left: 91%; width: 16px; height: 16px; --drift: 30px;  animation-duration: 14s; animation-delay: 7s; }
.b10 { left: 8%;  width: 20px; height: 20px; --drift: -40px; animation-duration: 18s; animation-delay: 9s; }

/* ---- Mode terang: hembusan angin + cahaya matahari ---- */
.sun-glow {
  position: absolute;
  top: -18%;
  right: -12%;
  width: 60vw;
  height: 60vw;
  max-width: 620px;
  max-height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 200, 0.55), rgba(255, 224, 130, 0.18) 45%, transparent 72%);
  animation: sunPulse 9s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes sunPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.08); opacity: 1; }
}

.wind-streak {
  position: absolute;
  height: 2px;
  width: 160px;
  left: -220px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.28), rgba(255, 255, 255, 0.55), transparent);
  animation: windBlow linear infinite;
  will-change: transform, opacity;
}

@keyframes windBlow {
  0%   { transform: translateX(0) scaleX(0.8); opacity: 0; }
  10%  { opacity: 0.8; }
  85%  { opacity: 0.5; }
  100% { transform: translateX(calc(100vw + 400px)) scaleX(1.3); opacity: 0; }
}

.w1 { top: 18%; width: 180px; animation-duration: 7s;  animation-delay: 0s; }
.w2 { top: 34%; width: 120px; animation-duration: 9s;  animation-delay: 2.2s; }
.w3 { top: 52%; width: 200px; animation-duration: 6.5s; animation-delay: 1.1s; }
.w4 { top: 68%; width: 140px; animation-duration: 8.4s; animation-delay: 3.5s; }
.w5 { top: 82%; width: 170px; animation-duration: 7.6s; animation-delay: 4.6s; }

@media (prefers-reduced-motion: reduce) {
  .bubble, .sun-glow, .wind-streak { animation: none; }
  .live-bg-dark .bubble { opacity: 0.5; }
  .sun-glow { opacity: 0.85; }
  .wind-streak { display: none; }
}

@media (max-width: 600px) {
  .sun-glow { width: 80vw; height: 80vw; }
}

/* .menu-panel, .menu-backdrop, dan .page-loader HARUS tetap position:fixed
   (masing-masing sudah didefinisikan pada kelasnya sendiri di bawah) supaya
   mengambang di atas seluruh halaman dan tidak ikut mendorong alur dokumen.
   Sengaja TIDAK disentuh di sini agar tidak menimpa position/z-index aslinya. */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Kunci halaman saat menu hamburger terbuka. overflow:hidden saja TIDAK cukup
   di HP (iOS Safari & sebagian Android): latar belakang masih ikut bergeser
   saat panel digeser. Body dikunci position:fixed (top diisi JS = -scrollY
   supaya posisi halaman tidak lompat), dan html diberi overscroll none. */
html.menu-open-lock { overflow-y: scroll; }   /* scrollbar desktop tetap ada (inert) -> layout tidak bergeser */
body.menu-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}
/* touch-action:none di body tidak boleh memblokir geser di dalam panel menu */
body.menu-open .menu-panel-list { touch-action: pan-y; }

/* BUG FIX (header hilang saat menu hamburger dibuka setelah halaman di-scroll):
   body dikunci position:fixed dengan top:-scrollY, dan header yang
   position:sticky ikut terbawa ke atas layar (top = -scrollY) sehingga
   menghilang. Selama menu terbuka header dipindah ke position:fixed di atas
   viewport, dan tingginya digantikan padding-top di body (--menu-hdr-h diisi
   JS di openMenu) supaya tata letak halaman di belakang panel tidak bergeser. */
body.menu-open { padding-top: var(--menu-hdr-h, 0px); }
body.menu-open header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto !important;
  padding: 0 20px !important;
  width: 100%;
}

.container.narrow {
  max-width: 800px;
}

/* Desktop besar / layar lebar: beri container sedikit ruang lebih
   supaya proporsi tetap nyaman dan tidak terasa "mengambang" sempit
   di tengah layar yang sangat lebar. */
@media (min-width: 1440px) {
  .container {
    max-width: 1320px;
  }
  .container.narrow {
    max-width: 860px;
  }
  nav.primary-menu ul > li > a {
    padding: 10px 18px;
  }
}

@media (max-width: 1200px) and (min-width: 993px) {
  nav.primary-menu ul > li > a {
    padding: 10px 12px;
    font-size: 13.5px;
  }
}

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--navy-steel-fixed);
  color: var(--on-dark);
  padding: 14px 26px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14.5px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 12px 26px -10px rgba(30, 95, 204, 0.55);
}

.btn-primary:hover {
  background: var(--navy);
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -10px rgba(11, 37, 69, 0.5);
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s var(--ease);
  pointer-events: none;
}

.btn-primary:hover::after {
  left: 130%;
}

.btn-primary:active {
  transform: translateY(0) scale(0.97);
}

/* ripple element injected by JS */
.btn-primary .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: rippleGrow 0.6s ease-out forwards;
  pointer-events: none;
  z-index: -1;
}

@keyframes rippleGrow {
  to {
    transform: scale(2.8);
    opacity: 0;
  }
}

/* ============ PAGE LOADER ============ */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background:
    radial-gradient(circle at 50% 40%, rgba(212,169,76,0.10), transparent 60%),
    var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.6s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-mark {
  display: flex;
  gap: 10px;
}

.loader-mark span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--gold-soft), var(--gold-deep));
  box-shadow: 0 0 14px rgba(212,169,76,0.45);
  animation: loaderBounce 0.9s ease-in-out infinite;
}

.loader-mark span:nth-child(2) { animation-delay: 0.12s; }
.loader-mark span:nth-child(3) { animation-delay: 0.24s; }

/* Kunci scroll body selagi splash sambutan tampil, supaya konten
   beranda di belakangnya tidak ikut ter-scroll oleh pengunjung. */
html.splash-active,
html.splash-active body {
  overflow: hidden;
  height: 100%;
}

/* ============ SPLASH SAMBUTAN ============ */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10001; /* di atas .page-loader */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.7s ease;
}

.splash-screen.splash-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(212,169,76,0.16), transparent 55%),
    radial-gradient(circle at 85% 85%, rgba(74,144,226,0.18), transparent 55%),
    linear-gradient(160deg, var(--navy-deep), var(--navy) 60%, var(--navy-steel));
}

.splash-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  margin: auto;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  padding: 36px 28px 28px;
  text-align: center;
  color: var(--on-dark);
  box-shadow: var(--shadow-lg);
  animation: splashCardIn 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes splashCardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto 14px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
}

.splash-eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 6px;
}

.splash-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 14px;
  color: var(--on-dark);
}

.splash-greeting {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  margin: 0 0 20px;
}

.splash-weather {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  text-align: left;
  min-height: 40px;
}

.splash-weather-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  text-align: center;
}

.splash-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: var(--gold-soft);
  animation: splashSpin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes splashSpin {
  to { transform: rotate(360deg); }
}

.splash-weather-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.splash-weather-emoji {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.splash-weather-main {
  flex: 1;
  min-width: 0;
}

.splash-weather-loc {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 2px;
}

.splash-weather-desc {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--on-dark);
  margin: 0 0 2px;
}

.splash-weather-detail {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  margin: 0;
}

.splash-weather-temp {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--on-dark);
  flex-shrink: 0;
}

.splash-weather-error {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  text-align: center;
}

.splash-datetime {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 22px;
}

.splash-actions {
  display: flex;
  justify-content: center;
}

.splash-skip {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-deep);
  background: linear-gradient(150deg, var(--gold-soft), var(--gold-deep));
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.splash-skip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -8px rgba(212,169,76,0.55);
}

.splash-progress {
  margin-top: 16px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  overflow: hidden;
}

.splash-progress-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold-deep));
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform 10s linear;
}

@media (prefers-reduced-motion: reduce) {
  .splash-progress-bar { transition: none; }
  .splash-card { animation: none; }
}

@keyframes loaderBounce {
  0%, 80%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
  40% { transform: translateY(-14px) scale(1.08); opacity: 1; }
}

/* ============ HEADER ============ */
/* Solid (bukan kaca/transparan) supaya logo & teks "SMK N 1 AMPELGADING"
   selalu terbaca jelas di atas latar apa pun, baik diam maupun scrolled. */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--paper);
  box-shadow: none;
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow 0.3s var(--ease);
}

header.scrolled {
  box-shadow: 0 10px 30px -18px rgba(11, 37, 69, 0.25);
}

.top-bar {
  background: var(--navy-deep);
  color: var(--on-dark);
  font-size: 13px;
  padding: 8px 0;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(201, 161, 59, 0.25);
}

.top-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(201,161,59,0.10) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: topbarSheen 7s linear infinite;
  pointer-events: none;
}

@keyframes topbarSheen {
  0% { background-position: 200% 0; }
  100% { background-position: -50% 0; }
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.top-bar .contact-info span {
  margin-right: 18px;
  transition: var(--transition);
}

.top-bar .contact-info span:hover {
  color: var(--accent);
}

.top-bar .contact-info i {
  margin-right: 6px;
}

.top-bar .socials a {
  margin-left: 10px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: var(--transition);
}

.top-bar .socials a:hover {
  background: var(--accent);
  color: var(--primary-dark);
  transform: translateY(-2px) rotate(8deg);
}

.main-nav {
  padding: 14px 0;
}

.main-nav .flex {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-wrap .logo-media {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 50%;
  transition: var(--transition);
  animation: logoIdlePulse 5s ease-in-out infinite;
}

.logo-wrap:hover .logo-media {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 0 0 4px rgba(212,169,76,0.18);
  animation-play-state: paused;
}

@keyframes logoIdlePulse {
  0%, 88%, 100% { box-shadow: 0 0 0 0 rgba(212,169,76,0); }
  92% { box-shadow: 0 0 0 5px rgba(212,169,76,0.18); }
  96% { box-shadow: 0 0 0 2px rgba(212,169,76,0.12); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-wrap .logo-media { animation: none; }
}

.logo-text .school-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.logo-text small {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.nav-search {
  margin-left: auto;
  display: flex;
}

.nav-search input {
  border: 1px solid var(--card-border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
  width: 150px;
  transition: var(--transition);
}

.nav-search input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.12);
}

.nav-search button {
  border: none;
  background: var(--navy-steel-fixed);
  color: var(--on-dark);
  padding: 0 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
  transition: var(--transition);
}

.nav-search button:hover {
  background: var(--navy);
}

/* ---- Theme toggle (mode terang / gelap) ---- */
.theme-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--surface-alt);
  color: var(--primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 8px;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(10, 31, 68, 0.18);
}

.theme-toggle i {
  position: absolute;
  font-size: 16px;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle .icon-sun {
  opacity: 0;
  transform: scale(0.4) rotate(-90deg);
}

.theme-toggle .icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    opacity: 0;
    transform: scale(0.4) rotate(90deg);
  }
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0);
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: scale(0.4) rotate(90deg);
}

/* ---- Toggle Bahasa ID/EN (bentuk pil, selaras dengan theme-toggle) ---- */
.lang-toggle {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
}

.lang-toggle-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 62px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--surface-alt);
  transition: var(--transition);
  overflow: hidden;
}

.lang-toggle:hover .lang-toggle-track {
  border-color: var(--gold);
  box-shadow: 0 6px 16px rgba(10, 31, 68, 0.18);
}

.lang-toggle-opt {
  position: relative;
  z-index: 2;
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  transition: color 0.3s ease;
  pointer-events: none;
}

.lang-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 28px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  box-shadow: 0 3px 8px -2px rgba(11, 37, 69, 0.4);
  transition: transform 0.35s var(--ease);
  z-index: 1;
}

.lang-toggle[aria-pressed="true"] .lang-toggle-thumb {
  transform: translateX(30px);
}

.lang-toggle[aria-pressed="true"] .lang-opt-en {
  color: var(--navy-deep);
  font-weight: 800;
}

.lang-toggle[aria-pressed="false"] .lang-opt-id {
  color: var(--navy-deep);
  font-weight: 800;
}

@media (max-width: 600px) {
  .lang-toggle-track { width: 54px; height: 26px; }
  .lang-toggle-thumb { width: 24px; height: 20px; }
  .lang-toggle[aria-pressed="true"] .lang-toggle-thumb { transform: translateX(26px); }
  .lang-toggle-opt { font-size: 13px; }
}

/* ---- Menu "titik tiga" (lainnya) di jejeran kategori: rumah baru utk toggle bahasa ---- */
.nav-more {
  margin-left: 2px;
}

.nav-more-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  transition: var(--transition);
}

.nav-more-trigger:hover,
.nav-more.dropdown:hover .nav-more-trigger,
.nav-more.dropdown:focus-within .nav-more-trigger {
  background: rgba(255, 255, 255, 0.12);
  color: var(--on-dark);
}

.dropdown-content--right {
  left: auto;
  right: 0;
  transform: translateY(8px);
  min-width: 220px;
  padding: 8px;
}

.dropdown.dropdown-open .dropdown-content--right,
.dropdown:focus-within .dropdown-content--right {
  transform: translateY(0);
}

.nav-more-panel {
  /* Dulu cuma berisi satu item (toggle bahasa) jadi cukup flex baris.
     Sekarang ada juga link "Authority" di atasnya, jadi disusun sebagai
     kolom supaya keduanya tersusun rapi, bukan berdempetan sejajar. */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.nav-more-panel > a {
  display: block;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
}

.nav-more-panel > a:hover {
  background: var(--sky);
  color: var(--navy-steel);
}

.nav-more-panel .lang-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  margin: 0;
}

.nav-more-panel .lang-toggle:hover {
  background: var(--sky);
}

.nav-more-lang-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

/* ============ MODAL "SELAMAT BELAJAR" (E-LEARNING) ============ */
.elearning-modal {
  position: fixed;
  inset: 0;
  z-index: 10002; /* di atas splash & page-loader */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), visibility 0.3s ease;
}

.elearning-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.elearning-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 28, 58, 0.68);
  backdrop-filter: blur(3px);
}

.elearning-modal-card {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-lg);
  padding: 28px 24px 24px;
  text-align: center;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

.elearning-modal.is-open .elearning-modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.elearning-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.elearning-modal-close:hover {
  background: var(--sky);
  color: var(--primary);
}

.elearning-modal-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  box-shadow: 0 0 0 4px rgba(212,169,76,0.18), 0 8px 20px -8px rgba(11,37,69,0.35);
}

.elearning-modal-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}

.elearning-modal-title {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.elearning-modal-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

.elearning-modal-countdown {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 14px;
}

.elearning-modal-goto {
  width: 100%;
  justify-content: center;
}

/* ---- Modal "Pesan dari Pembuat Website" ---- */
/* ---- Toggle bahasa versi panel menu mobile ---- */
.menu-panel-lang {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-panel-lang .lang-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
}

.menu-panel-lang .nav-more-lang-label {
  color: #fff;
}

@media (max-width: 768px) {
  .nav-more { display: none; }
}

/* ---- Hamburger button ---- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  margin-left: auto;
  /* FIX sentuh terasa lag/kurang sensitif: tanpa ini browser mobile bisa
     menunda respons tap sejenak untuk mendeteksi gestur double-tap-zoom /
     pan di atas tombol. "manipulation" bilang ke browser area ini cuma
     untuk tap biasa, jadi responsnya instan. */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  width: 26px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.6,0.1,0.3,1), opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

nav.primary-menu {
  /* Full-bleed: warna oranye membentang penuh dari ujung ke ujung layar,
     bukan dibatasi max-width seperti .container biasa (lihat permintaan
     desain: menu kategori melebar penuh seperti referensi). */
  background: var(--nav-category-bg, var(--navy));
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* .container di dalam primary-menu dikecualikan dari max-width global,
   supaya baris menu kategori melebar penuh selebar layar. Padding kiri-
   kanan tetap diberi langsung di sini supaya item pertama/terakhir tidak
   menempel persis ke tepi layar. */
nav.primary-menu > .container {
  max-width: none !important;
  padding: 0 20px !important;
}

@media (min-width: 1440px) {
  nav.primary-menu > .container {
    padding: 0 32px !important;
  }
}

nav.primary-menu ul {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 0;
}

nav.primary-menu ul > li {
  position: relative;
}

nav.primary-menu ul > li > a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  color: rgba(255,255,255,0.88);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  border-bottom: none;
  text-align: left;
}

nav.primary-menu ul > li > a:hover,
nav.primary-menu ul > li.active > a {
  background: rgba(255,255,255,0.12);
  color: var(--on-dark);
  border-bottom-color: transparent;
}

.dropdown {
  position: relative;
  /* z-index dasar rendah, dinaikkan saat aktif di bawah -- supaya <li>
     dropdown yang sedang dibuka (termasuk jembatan ::after & panel
     .dropdown-content di dalamnya, yang keduanya absolute & "menggantung"
     keluar kotak <li>) PASTI tercat di ATAS <li> tetangga, bukan tertutup
     olehnya. <li> lain bertetangga juga position:relative (perlu untuk
     ::after sendiri milik mereka), jadi tanpa ini z-index:99 pada ::after
     cuma berlaku di dalam stacking context <li>-nya sendiri dan tetap
     bisa ditutupi <li> tetangga yang urutannya lebih belakangan di DOM. */
  z-index: 1;
}

.dropdown:hover,
.dropdown.dropdown-open,
.dropdown:focus-within {
  z-index: 50;
}

/* JEMBATAN HOVER ANTI-CELAH-MATI -- SELALU ADA, bukan cuma saat panel
   terbuka. Ini anak langsung dari <li>.dropdown (bukan dari
   .dropdown-content), jadi dia TIDAK ikut opacity/visibility/pointer-events
   panel yang disembunyikan -- dia sendiri selalu punya pointer-events
   normal & selalu ada di DOM, hanya transparan secara visual (tanpa
   background/border, tidak pernah terlihat). Posisinya menempel PERSIS
   dari tepi bawah <li> (top:100%) sampai ke tepi atas panel (menutup jarak
   10px sebelum panel), dan selebar penuh panel (lewat left:50% +
   translateX(-50%) + min-width yang sama seperti .dropdown-content).
   Karena ini selalu "ada" (bukan muncul belakangan setelah hover
   terdeteksi), kursor yang bergerak diagonal dari link turun ke isi
   submenu SELALU singgah di atas elemen descendant dari <li>.dropdown di
   sepanjang rute -- :hover pada <li> tidak pernah putus di celah mana pun,
   termasuk tepat di bawah teks link sebelum panel sempat muncul. */
.dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 290px;
  height: 14px;
  z-index: 99;
}

.dropdown-content {
  display: block;
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 10px;
  transform: translate(-50%, 4px);
  background: var(--surface);
  min-width: 280px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md, 14px);
  overflow: hidden;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0s linear 0.18s;
  /* Klik/hover tidak "menghilang": saat tersembunyi, elemen sungguh tidak
     bisa menerima event mouse, jadi tidak ada celah mati yang menjebak kursor. */
  pointer-events: none;
}

/* Dasar buka/tutup: :hover murni -- bekerja langsung begitu halaman
   termuat, tidak bergantung JS apa pun selesai jalan lebih dulu, dan tidak
   pernah putus di celah berkat .dropdown::after di atas. .dropdown-open
   (di-toggle oleh JS, js/main.js initDesktopDropdowns) menambah dukungan
   klik/tap & menjaga submenu tetap terbuka sesudah diklik; :focus-within
   jadi cadangan aksesibilitas keyboard (Tab). */
.dropdown:hover .dropdown-content,
.dropdown.dropdown-open .dropdown-content,
.dropdown:focus-within .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0s;
}

.dropdown-content a {
  display: block;
  padding: 12px 18px;
  font-size: 14.5px;
  color: var(--text-dark);
  border-bottom: none;
  border-radius: 10px;
  margin: 2px 0;
  transition: var(--transition);
}

.dropdown-content a:hover {
  background: var(--sky);
  color: var(--navy-steel);
  padding-left: 24px;
}

/* ============ MOBILE MENU PANEL (slide-in overlay) ============ */
.menu-backdrop {
  position: fixed;
  inset: 0;
  overscroll-behavior: contain;
  touch-action: none;
  background: rgba(8, 48, 107, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.menu-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  height: 100dvh;
  max-width: 100vw;
  overflow: hidden;
  overscroll-behavior: contain;
  width: min(360px, 88vw);
  background: #2b2f36;
  color: #fff;
  z-index: 1999;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,0.25);
  /* FIX sentuh lag/tersendat saat panel pertama kali dibuka: tanpa ini
     browser baru membuat layer GPU terpisah untuk panel PAS transisi
     mulai berjalan, bikin frame pertama nge-drop/kelihatan lag tersentak
     (terutama di HP kelas bawah). will-change menyiapkan layer-nya dari
     awal supaya transform langsung mulus di-compositor sejak tap pertama. */
  will-change: transform;
}

.menu-panel.open {
  transform: translateX(0);
}

.menu-panel-head {
  background: var(--white);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}

.menu-panel-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-panel-logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-light);
}

.menu-panel-logo .school-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.menu-panel-logo small {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.menu-panel-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-light);
  color: var(--primary);
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

@media (hover: hover) {
  .menu-panel-close:hover {
    background: var(--accent);
    color: var(--primary-dark);
    transform: rotate(90deg);
  }
}

.menu-panel-search {
  margin: 18px 20px 6px;
  display: flex;
}

.menu-panel-search input {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 13px 16px;
  font-size: 15px;
  outline: none;
}

.menu-panel-search button {
  border: none;
  background: var(--primary-light);
  color: var(--on-dark);
  padding: 0 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
}

.menu-panel-list {
  list-style: none;
  overflow-y: auto;
  overflow-x: hidden;            /* animasi item (translateX) tidak boleh bikin daftar bisa digeser ke samping */
  overscroll-behavior: contain;  /* geser sampai ujung tidak "bocor" menggerakkan latar belakang */
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  padding: 8px 0 24px;
  flex: 1;
}

.menu-panel-list > li {
  border-bottom: 1px solid rgba(255,255,255,0.08);
  opacity: 0;
  transform: translateX(24px);
}

.menu-panel.open .menu-panel-list > li {
  animation: menuItemIn 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}

.menu-panel.open .menu-panel-list > li:nth-child(1) { animation-delay: 0.08s; }
.menu-panel.open .menu-panel-list > li:nth-child(2) { animation-delay: 0.13s; }
.menu-panel.open .menu-panel-list > li:nth-child(3) { animation-delay: 0.18s; }
.menu-panel.open .menu-panel-list > li:nth-child(4) { animation-delay: 0.23s; }
.menu-panel.open .menu-panel-list > li:nth-child(5) { animation-delay: 0.28s; }
.menu-panel.open .menu-panel-list > li:nth-child(6) { animation-delay: 0.33s; }
.menu-panel.open .menu-panel-list > li:nth-child(7) { animation-delay: 0.38s; }
.menu-panel.open .menu-panel-list > li:nth-child(8) { animation-delay: 0.43s; }

@keyframes menuItemIn {
  to { opacity: 1; transform: translateX(0); }
}

.menu-panel-list > li > a,
.menu-panel-list .sub-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 16px 22px;
  font-size: 16px;
  color: #fff;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, padding-left 0.2s ease, color 0.2s ease;
  /* FIX sentuh kurang sensitif di item menu, TANPA memblokir scroll:
     "manipulation" mematikan panning di sumbu manapun yang tidak disebut,
     dan ternyata itu bikin gestur scroll yang MULAI persis di atas item
     menu (termasuk submenu) tidak diteruskan ke .menu-panel-list yang
     scrollable -- jadinya menu tidak mau scroll kalau jari menyentuh
     tulisan menu duluan. "pan-y" tetap menghilangkan jeda deteksi gestur
     double-tap-zoom (sama seperti manipulation) tapi tetap mengizinkan
     panning vertikal diteruskan ke scroll container induknya. */
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.menu-panel-list .sub-toggle {
  justify-content: space-between;
}

/* :hover digeser ke belakang media query (hover: hover) -- di layar sentuh,
   :hover biasa "nyangkut" aktif setelah item disentuh (sampai item lain
   disentuh), membuat tap berikutnya terasa aneh/lambat merespons seolah
   ada transisi tertunda. Di perangkat sungguhan bermouse, hover tetap jalan
   normal seperti sebelumnya. */
@media (hover: hover) {
  .menu-panel-list > li > a:hover,
  .menu-panel-list .sub-toggle:hover {
    background: rgba(255,255,255,0.06);
    padding-left: 28px;
    color: var(--accent);
  }
}
.menu-panel-list > li > a:active,
.menu-panel-list .sub-toggle:active {
  background: rgba(255,255,255,0.1);
}

.menu-panel-list > li > a.active {
  color: var(--accent);
  font-weight: 700;
}

.menu-panel-list .sub-toggle i {
  transition: transform 0.3s ease;
  font-size: 12px;
  opacity: 0.7;
}

.menu-panel-list li.has-sub.open .sub-toggle i {
  transform: rotate(180deg);
}

/* FIX sentuh terasa lag di submenu: transition pada "max-height" memaksa
   browser menghitung ulang LAYOUT tiap frame (bukan cuma compositor),
   paling terasa berat/patah-patah di HP kelas bawah. Interpolasi tinggi
   tetap lewat max-height (supaya ruang di dokumen ikut collapse pas
   tertutup -- item menu di bawahnya tidak boleh ikut terdorong turun saat
   submenu tertutup), tapi durasi dipersingkat + easing dibuat lebih tajam
   di awal supaya terasa langsung merespons jari alih-alih "ketinggalan".
   will-change disiapkan dari awal supaya browser sudah menaruhnya di layer
   compositor sebelum transisi pertama dimulai (bukan baru dibuat saat itu
   juga, yang menyebabkan tersendat di tap pertama). */
.menu-panel-list .sub-list {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(0,0,0,0.18);
  will-change: max-height;
  transition: max-height 0.28s cubic-bezier(0.22,1,0.36,1);
}

.menu-panel-list li.has-sub.open .sub-list {
  max-height: 400px;
}

.menu-panel-list .sub-list a {
  display: block;
  padding: 12px 22px 12px 36px;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  transition: var(--transition);
  /* lihat catatan di atas (.menu-panel-list > li > a): "pan-y", bukan
     "manipulation", supaya scroll yang mulai di atas link submenu tetap
     diteruskan ke .menu-panel-list. */
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .menu-panel-list .sub-list a:hover {
    color: var(--accent);
  }
}

.menu-panel-list .sub-list .elearning-link-btn {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  padding: 12px 22px 12px 36px;
  font-size: 14px;
  font-family: inherit;
  color: rgba(255,255,255,0.8);
  transition: var(--transition);
}

.menu-panel-list .sub-list .elearning-link-btn:hover {
  color: var(--accent);
  padding-left: 42px;
}

/* ============ HERO / BANNER ============ */
.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(1100px 600px at 82% -10%, rgba(74,144,226,0.22), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--on-dark);
  overflow: hidden;
  padding: 72px 0 88px;
}

/* Video latar hero: cuplikan gerbang sekolah, diputar mengulang tanpa suara.
   Diredupkan (opacity rendah + luminosity) persis seperti hero-bg.jpg
   sebelumnya, supaya teks & tombol di atasnya tetap sangat kontras. */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.16;
  mix-blend-mode: luminosity;
  z-index: 0;
}

/* Di layar sangat kecil atau saat pengguna meminta hemat data/animasi,
   video disembunyikan dan digantikan gambar statis sebagai cadangan
   ringan (tetap redup dengan cara yang sama). */
@media (max-width: 480px), (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }

  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('../assets/hero-video-poster.jpg') center/cover;
    opacity: 0.16;
    mix-blend-mode: luminosity;
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,31,68,0.1) 0%, var(--navy-deep) 96%);
  z-index: 1;
}

/* Bola cahaya lembut yang melayang perlahan di sudut hero, menambah kedalaman visual */
.hero-glow {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74,144,226,0.35), transparent 68%);
  top: -200px;
  right: -140px;
  filter: blur(10px);
  z-index: 0;
  animation: heroFloat 9s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(24px); }
}

/* Grid tipis, bergerak turun tanpa putus (loop mulus: jarak geser = 1 sel grid), memudar ke arah tengah/bawah */
.hero-grid {
  position: absolute;
  inset: 0;
  height: 100%;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  animation: heroGridFall 6s linear infinite;
  pointer-events: none;
  z-index: 1;
  /* Layer GPU terpisah: animasi background-position tidak ikut ter-reflow
     oleh elemen lain di atasnya (mis. dropdown menu yang buka/tutup),
     sehingga animasi tidak pernah terlihat tersendat/berhenti. */
  will-change: background-position;
  transform: translateZ(0);
  /* grid nampak penuh di atas, memudar total sebelum mencapai tengah/bawah */
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.9) 22%, transparent 58%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.9) 22%, transparent 58%);
}

/* Menggeser tepat 1 sel grid (46px) sehingga frame akhir identik dengan frame awal: tidak ada lompatan/putus saat loop mengulang */
@keyframes heroGridFall {
  0% { background-position: 0 0; }
  100% { background-position: 0 46px; }
}

/* Gaussian blur lembut di bagian bawah grid, menyatu ke warna latar section
   (mengikuti mode terang/gelap lewat var(--navy-deep)) supaya transisi dari
   pola grid ke konten di bawahnya terasa halus, bukan terpotong tegas. */
.hero-grid-blur {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  z-index: 1;
  pointer-events: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.95) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-content .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  padding-bottom: 0;
  border-bottom: none;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 50px);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: 16.5px;
  line-height: 1.7;
  color: rgba(234, 242, 255, 0.82);
  margin-bottom: 32px;
  max-width: 52ch;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 26px;
  margin-top: 40px;
  max-width: 520px;
}

.hero-stats div {
  padding-right: 18px;
}

.hero-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--on-dark);
}

.hero-stats div > span {
  font-size: 12px;
  color: rgba(234, 242, 255, 0.65);
  font-weight: 500;
}

/* Penyesuaian khusus layar PC lebar: beri hero lebih banyak ruang napas
   (padding atas-bawah & jarak antar elemen sedikit dilonggarkan, angka
   statistik sedikit dibesarkan) supaya tidak terasa padat seperti di
   layar sempit yang dipaksakan ke lebar besar. */
@media (min-width: 993px) {
  .hero {
    padding: 96px 0 108px;
  }
  .hero-content {
    max-width: 680px;
  }
  .hero-content h1 {
    margin-bottom: 24px;
  }
  .hero-content p {
    margin-bottom: 40px;
  }
  .hero-stats {
    gap: 8px;
    padding-top: 30px;
    margin-top: 48px;
    max-width: 560px;
  }
  .hero-stats strong {
    font-size: 27px;
  }
  .hero-stats div > span {
    font-size: 12.5px;
  }
}

/* ============ GENERIC PAGE BANNER (inner pages) ============ */
.page-banner {
  position: relative;
  padding: 68px 0 54px;
  background:
    radial-gradient(900px 500px at 85% -20%, rgba(74,144,226,0.2), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--on-dark);
  overflow: hidden;
}

/* Gaussian blur di bagian bawah grid pola titik-titik banner, sama seperti hero */
.page-banner-grid-blur {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  z-index: 1;
  pointer-events: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.95) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.95) 100%);
}

.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  height: 100%;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 42px 42px;
  animation: pageGridFall 5.5s linear infinite;
  will-change: background-position;
  transform: translateZ(0);
  /* FIX jarak shape grid vs teks (Alumni dkk): mask lama pakai persen murni
     (0%..18%..55%) yang diukur dari TINGGI BANNER. Masalahnya posisi teks
     (eyebrow/h1/p) jaraknya TETAP dalam px dari atas (padding-top 68px),
     sedangkan titik "mulai pudar" (18%) ikut mengecil kalau banner pendek
     -- hasilnya grid pattern masih garis solid tepat MEPET di belakang
     eyebrow/judul/paragraf, bukannya sudah memudar di sana.
     FIX: titik awal fade digeser mundur jadi anchor-px (96px, melewati
     area teks) sebelum mulai meluruh ke transparent, supaya grid pasti
     sudah redup/pudar persis di belakang teks di tinggi banner berapa pun
     -- grid tetap tampil penuh hanya di strip tipis paling atas (dekat
     header), lalu meluruh sebelum masuk area konten teks. */
  mask-image: linear-gradient(180deg,
    rgba(0,0,0,0.85) 0,
    rgba(0,0,0,0.85) 40px,
    rgba(0,0,0,0.3) 96px,
    transparent 150px);
  -webkit-mask-image: linear-gradient(180deg,
    rgba(0,0,0,0.85) 0,
    rgba(0,0,0,0.85) 40px,
    rgba(0,0,0,0.3) 96px,
    transparent 150px);
}

/* Sel grid page-banner 42px: geser tepat 1 sel agar loop mulus tanpa putus */
@keyframes pageGridFall {
  0% { background-position: 0 0; }
  100% { background-position: 0 42px; }
}

.page-banner .container {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.page-banner .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  padding-bottom: 0;
  border-bottom: none;
}

.page-banner h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-banner p {
  color: rgba(234, 242, 255, 0.8);
  max-width: 560px;
  line-height: 1.6;
}

.page-body {
  padding: 56px 0 70px;
}

.page-body .container.narrow {
  background: var(--surface, #fff);
  border: 1px solid rgba(11,37,69,0.12);
  border-radius: 16px;
  padding: 40px 44px;
  box-shadow: 0 12px 32px rgba(11,37,69,0.08);
}

@media (min-width: 993px) {
  .page-body {
    padding: 64px 0 80px;
  }
  .page-body .container.narrow {
    padding: 48px 56px;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .page-body .container.narrow {
    border-color: var(--card-border);
    box-shadow: 0 12px 32px rgba(0,0,0,0.28);
  }
}
:root[data-theme="dark"] .page-body .container.narrow {
  border-color: var(--card-border);
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
}

.page-body h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin: 32px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--card-border);
}

.page-body h2:first-child {
  margin-top: 0;
}

.page-body p {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.8;
  margin-bottom: 14px;
  text-align: left;
}

.page-body p:last-child {
  margin-bottom: 0;
}

.bullet-list {
  list-style: none;
  margin-top: 10px;
}

.bullet-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-dark);
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bullet-list li i {
  color: var(--primary);
  width: 18px;
}

.kompetensi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.kompetensi-card.feature-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s ease;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(7,28,58,0) 55%, rgba(7,28,58,0.55) 100%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 1;
}

.gallery-item:hover {
  transform: scale(1.04) rotate(-1deg);
  box-shadow: 0 16px 34px rgba(7,28,58,0.28);
  border-color: transparent;
}

.gallery-item:hover::after,
.gallery-item:hover::before {
  opacity: 1;
  transform: scale(1);
}

/* ============ FEATURE CARDS ============ */
.features {
  padding: 64px 0;
  background: var(--paper);
}

.features .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 10px;
}

.feature-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: left;
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s var(--ease);
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(160deg, rgba(30,95,204,0.06), transparent 60%);
  transition: opacity 0.3s ease;
  width: auto;
  height: auto;
  left: 0;
  top: 0;
  transform: none;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card .icon {
  width: 52px;
  height: 52px;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--sky);
  border: none;
  color: var(--navy-steel);
  font-size: 21px;
  transition: transform 0.3s var(--ease), background 0.3s ease, color 0.3s ease;
  position: relative;
  z-index: 1;
  animation: featureIconFloat 3.6s ease-in-out infinite;
}

.feature-card:nth-child(2) .icon { animation-delay: 0.4s; }
.feature-card:nth-child(3) .icon { animation-delay: 0.8s; }
.feature-card:nth-child(4) .icon { animation-delay: 1.2s; }

.feature-card:hover .icon {
  background: var(--navy);
  color: var(--on-dark);
  transform: rotate(-6deg) scale(1.06);
  animation-play-state: paused;
}

@keyframes featureIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .feature-card .icon { animation: none; }
}

.feature-card p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

/* ============ SECTION HEADINGS ============ */
.section-heading {
  margin-bottom: 44px;
  max-width: 640px;
}

.section-heading .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy-steel);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 0;
  border-bottom: none;
}

.section-heading h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800;
  margin: 14px 0 10px;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.section-heading p {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.7;
}

/* ============ PROFIL SECTION ============ */
.profile-section {
  padding: 70px 0;
}

.profile-section .flex {
  display: flex;
  gap: 40px;
  align-items: center;
}

.profile-section .img-wrap {
  flex: 0 0 42%;
  position: relative;
}

.profile-section .img-wrap::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1.5px solid var(--gold);
  border-radius: calc(var(--radius) + 8px);
  opacity: 0.45;
  transition: inset 0.45s var(--ease), opacity 0.45s ease;
  pointer-events: none;
  z-index: 0;
}

.profile-section .img-wrap:hover::before {
  inset: -16px;
  opacity: 0.8;
}

.profile-section .img-wrap img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.profile-section .img-wrap:hover img {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.profile-section .content {
  flex: 1;
}

.profile-section .content .tag {
  color: var(--primary);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.08em;
}

.profile-section .content h3 {
  font-size: 24px;
  margin-bottom: 14px;
  color: var(--primary);
}

.profile-section .content p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 15.5px;
  line-height: 1.7;
}

/* ============ STATS ============ */
.stats {
  background:
    radial-gradient(circle at 85% 15%, rgba(212,169,76,0.08), transparent 55%),
    var(--navy-deep);
  color: #f7f5ef;
  padding: 54px 0;
  border-top: 1px solid rgba(201, 161, 59, 0.3);
  border-bottom: 1px solid rgba(201, 161, 59, 0.3);
  position: relative;
  overflow: visible;
}

/* Transisi lembut (blur + fade) di perbatasan bawah .stats agar tidak
   terlihat sebagai garis tegas ke section berikutnya, di mode terang & malam. */
.stats::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 90px;
  transform: translateY(100%);
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(180deg, var(--navy-deep) 0%, transparent 100%);
  filter: blur(22px);
  opacity: 0.55;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .stats::after { opacity: 0.85; }
}
:root[data-theme="dark"] .stats::after { opacity: 0.85; }

.stats .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  gap: 20px;
}

.stats .grid > div {
  position: relative;
  padding: 8px;
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease);
}

.stats .grid > div:hover {
  transform: translateY(-4px);
}

.stats .grid > div:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(201, 161, 59, 0.25);
}

.stats .num {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  color: var(--gold-soft);
  text-shadow: 0 0 24px rgba(212,169,76,0.25);
  animation: statGlow 3.2s ease-in-out 1;   /* V21: sekali saja saat load, tidak looping */
}

@keyframes statGlow {
  0%, 100% { text-shadow: 0 0 24px rgba(212,169,76,0.25); }
  50% { text-shadow: 0 0 34px rgba(212,169,76,0.5); }
}

.stats .label {
  font-size: 12.5px;
  color: rgba(247, 245, 239, 0.7);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

/* ============ NEWS / BERITA ============ */
.news-section {
  padding: 70px 0;
  background: var(--bg-light);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Bungkus daftar berita lengkap (#/berita) agar tetap bisa di-scroll
   ke bawah saat jumlah berita sudah sangat banyak, tanpa memanjangkan
   halaman tanpa batas. */
.news-grid-scroll {
  max-height: 1180px;
  overflow-y: auto;
  padding-right: 6px;
  margin-right: -6px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-deep) transparent;
}

.news-grid-scroll::-webkit-scrollbar {
  width: 8px;
}

.news-grid-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.news-grid-scroll::-webkit-scrollbar-thumb {
  background: var(--gold-deep);
  border-radius: 20px;
}

.news-grid-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ============ TOOLBAR SORTING & FILTER KATEGORI (halaman berita) ============ */
.news-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.news-toolbar-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-toolbar-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-toolbar-field select {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text-dark);
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  transition: var(--transition);
}

.news-toolbar-field select:hover,
.news-toolbar-field select:focus {
  border-color: var(--gold);
  outline: none;
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s ease, box-shadow 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}

.news-card .thumb {
  height: 190px;
  background-size: cover;
  background-position: center;
  background-color: var(--navy);
  position: relative;
  transition: transform 0.5s var(--ease);
}

/* Badge kategori di pojok kartu berita */
.kategori-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px -4px rgba(11, 37, 69, 0.4);
}

.kategori-badge-detail {
  position: static;
  display: inline-block;
  margin-bottom: 14px;
}

.news-card .thumb::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.news-card:hover .thumb::after {
  transform: scaleX(1);
}

.news-card:hover .thumb {
  transform: scale(1.03);
}

/* ---- Animasi looping premium untuk kartu Berita & Prestasi:
   garis emas tipis mengitari tepi kartu + denyut cahaya lembut di badge/border.
   Selalu berjalan (bukan hanya saat hover) supaya kartu terasa "hidup"
   tanpa mengganggu keterbacaan; dihentikan otomatis oleh prefers-reduced-motion. ---- */
.news-card {
  position: relative;
  isolation: isolate;
}

.news-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1.5px;
  background: conic-gradient(
    from var(--orbit-angle, 0deg),
    transparent 0%,
    transparent 78%,
    var(--gold-soft) 88%,
    var(--gold) 92%,
    var(--gold-soft) 96%,
    transparent 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  animation: orbitLine 5.5s linear infinite;
  pointer-events: none;
  z-index: 3;
}

.news-card.reveal-visible::before {
  opacity: 1;
}

.news-card:hover::before {
  animation-duration: 2.6s;
}

@property --orbit-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes orbitLine {
  from { --orbit-angle: 0deg; }
  to { --orbit-angle: 360deg; }
}

/* Denyut cahaya lembut pada badge kategori & meta ikon medali,
   supaya elemen kecil pun terasa "bernapas" tanpa berlebihan. */
.news-card .kategori-badge {
  animation: cardGlowPulse 2.8s ease-in-out infinite;
}

.news-card .meta .fa-medal {
  color: var(--gold-deep);
  animation: cardGlowPulse 2.8s ease-in-out infinite;
  animation-delay: 0.4s;
}

@keyframes cardGlowPulse {
  0%, 100% { box-shadow: 0 4px 12px -4px rgba(11, 37, 69, 0.4); }
  50% { box-shadow: 0 4px 16px -2px rgba(212, 169, 76, 0.65); }
}

.news-card .body {
  padding: 22px;
  flex: 1;
}

.news-card .meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.news-card .meta i {
  margin-right: 4px;
  color: var(--navy-steel);
}

.news-card h5 {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.01em;
}

.news-card h5 a:hover {
  color: var(--navy-steel);
}

.news-card .footer {
  padding: 14px 22px;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.news-card .share a {
  margin-left: 8px;
  color: var(--primary);
  transition: var(--transition);
}

.news-card .share a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* ============ PENCARIAN GABUNGAN (kolom search: Sekolah + Internet) ============ */
.pencarian-keterangan {
  background: rgba(212, 169, 76, 0.12);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  font-size: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
}

.berita-internet-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy-deep);
  margin: 4px 0 14px;
}

.berita-internet-label i {
  color: var(--primary);
}

.btn-reset-pencarian {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--surface);
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
}

.btn-reset-pencarian:hover {
  border-color: var(--primary-light);
  color: var(--primary);
}

/* Kartu Berita Internet mewarisi tampilan .news-card, dibedakan lewat
   badge sumber (nama media) di pojok thumbnail dan tautan keluar. */
.berita-internet-card .thumb {
  cursor: pointer;
}

.berita-internet-card .kategori-badge {
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.berita-internet-card .footer {
  justify-content: flex-start;
}

.berita-internet-card .footer a {
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

.berita-internet-card .footer a:hover {
  color: var(--accent);
}

/* ============ TOMBOL LIKE & SHARE (kartu berita & halaman detail) ============ */
.news-actions {
  display: flex;
  gap: 10px;
}

.btn-like,
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 6px 13px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-like:hover,
.btn-share:hover {
  border-color: var(--gold);
  color: var(--navy-steel);
  transform: translateY(-2px);
}

.btn-like:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.btn-like.liked {
  color: #e0456b;
  border-color: #e0456b;
  background: rgba(224, 69, 107, 0.08);
}

.btn-like.liked i {
  color: #e0456b;
}

.btn-like i,
.btn-share i {
  font-size: 13px;
}

.news-actions-detail {
  margin: 22px 0 30px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}

.news-actions-detail .btn-like,
.news-actions-detail .btn-share {
  font-size: 13.5px;
  padding: 9px 18px;
}

.view-all {
  text-align: center;
  margin-top: 36px;
}

/* ============ LOKASI (beranda) ============ */
.location-section {
  padding: 70px 0 90px;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.location-wrap {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.map-embed.home-map {
  position: relative;
  border-radius: var(--radius-lg);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}

.map-embed.home-map:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(212,169,76,0.25);
}

.map-embed.home-map iframe {
  min-height: 380px;
}

.location-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.loc-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s ease;
}

.loc-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
  border-color: rgba(212,169,76,0.35);
}

.loc-icon {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sky);
  color: var(--navy-steel);
  font-size: 18px;
  transition: transform 0.35s var(--ease), background 0.35s ease, color 0.35s ease;
}

.loc-item:hover .loc-icon {
  background: var(--navy);
  color: var(--gold-soft);
  transform: rotate(-8deg) scale(1.08);
}

.loc-item h4 {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.loc-item p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .location-wrap {
    grid-template-columns: 1fr;
  }
}

/* ============ BERITA: dynamic states (API) ============ */
.loading-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
  position: relative;
}

.loading-msg:not(.error)::after {
  content: "...";
  display: inline-block;
  width: 1.4em;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  vertical-align: bottom;
  animation: loadingDots 1.3s steps(4, jump-none) infinite;
}

@keyframes loadingDots {
  0% { width: 0; }
  100% { width: 1.4em; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-msg:not(.error)::after { animation: none; width: 1.4em; }
}

.loading-msg.error {
  color: #c0392b;
}

.news-card .excerpt {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============ PAMFLET: kartu & badge kategori ============ */
/* .thumb-pamflet dipakai di elemen <a> (bukan <div> seperti berita),
   supaya seluruh gambar pamflet bisa diklik langsung menuju detail.
   Mewarisi semua styling .thumb yang sudah ada (ukuran, hover, dsb),
   ini hanya memastikan perilaku block link-nya benar. */
.thumb-pamflet {
  display: block;
  cursor: pointer;
}

/* Warna badge kategori dibedakan tipis per jenis konten, supaya
   pengunjung bisa membedakan sekilas tanpa membaca teksnya dulu. */
.pamflet-card .kategori-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pamflet-card[data-pamflet-id] .kategori-badge i {
  font-size: 12px;
}

/* ============ PAMFLET: detail view (gambar penuh + caption) ============ */
#pamfletDetailView {
  padding-top: 8px;
}

#pamfletDetailView .meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

#pamfletDetailView .detail-content {
  white-space: pre-line;
}


/* ============ BERITA: detail view ============ */
#beritaDetailView {
  padding-top: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.back-link:hover {
  gap: 12px;
  color: var(--primary-dark);
}

.detail-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.35;
}

.detail-title i {
  color: var(--primary);
  margin-right: 10px;
}

#beritaDetailView .meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.detail-image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.detail-content {
  font-size: 15px;
  color: var(--text-dark);
  line-height: 1.8;
}

.detail-content p {
  margin-bottom: 14px;
}

/* Konten ini berasal dari textarea admin dan kadang tersimpan dengan warna
   inline (mis. tempelan dari Word/Google Docs, atau ketikan manual
   style="color:#000"). Paksa semua elemen teks di dalamnya ikut tema
   terang/gelap situs, supaya tidak ada teks hitam yang tenggelam saat
   mode malam aktif. */
.detail-content,
.detail-content * {
  color: var(--text-dark) !important;
  background-color: transparent !important;
}
.detail-content a {
  color: var(--primary) !important;
  text-decoration: underline;
}
/* Kartu Struktur Organisasi punya pewarnaan desain sendiri (nama vs
   jabatan) yang harus tetap terjaga meski ada di dalam .detail-content. */
.detail-content .struktur-item h5 {
  color: var(--ink) !important;
}
.detail-content .struktur-item p {
  color: var(--primary) !important;
}

/* ============ SPMB / PPDB (halaman status pendaftaran) ============ */
:root {
  --spmb-illus-bg: rgba(74,144,226,0.14);
  --spmb-illus-body: var(--navy-steel);
  --spmb-illus-skin: var(--gold-soft);
  --spmb-illus-hair: var(--navy-deep);
  --spmb-illus-x: #e0554a;
}
:root[data-theme="dark"],
:root:not([data-theme="light"]) {
  --spmb-illus-bg: rgba(74,144,226,0.12);
}

.spmb-hero {
  position: relative;
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(1100px 600px at 82% -10%, rgba(74,144,226,0.22), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--on-dark);
  overflow: hidden;
  padding: 64px 0;
  text-align: center;
}

.spmb-grid {
  position: absolute;
  inset: 0;
  height: 100%;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  animation: heroGridFall 6s linear infinite;
  pointer-events: none;
  z-index: 0;
  will-change: background-position;
  transform: translateZ(0);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, rgba(0,0,0,0.85) 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, rgba(0,0,0,0.85) 0%, transparent 72%);
}

.spmb-grid-blur {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  z-index: 0;
  pointer-events: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.95) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.95) 100%);
}

.spmb-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.spmb-state .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.spmb-state h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.2vw, 40px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.spmb-illustration {
  max-width: 260px;
  margin: 0 auto 30px;
  filter: drop-shadow(0 16px 30px rgba(0,0,0,0.25));
  animation: spmbIllusBreathe 3.4s ease-in-out infinite;
  transform-origin: 50% 85%;
}
.spmb-illustration svg { display: block; width: 100%; height: auto; }

@keyframes spmbIllusBreathe {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(-6px) rotate(-1.2deg) scale(1.015); }
}

@media (prefers-reduced-motion: reduce) {
  .spmb-illustration { animation: none; }
}

.spmb-text {
  font-size: 15.5px;
  line-height: 1.75;
  color: rgba(234, 242, 255, 0.82);
  max-width: 52ch;
  margin: 0 auto 14px;
}
.spmb-text strong { color: var(--on-dark); }

.spmb-thanks {
  margin-bottom: 28px;
  font-weight: 600;
  color: rgba(234, 242, 255, 0.92);
}

.spmb-text-small {
  font-size: 13px;
  color: rgba(234, 242, 255, 0.6);
  margin-top: 14px;
}
.spmb-text-small a { color: var(--gold-soft); text-decoration: underline; }

.spmb-countdown {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 84px);
  font-weight: 800;
  color: var(--gold-soft);
  line-height: 1;
  margin: 8px 0 6px;
  animation: spmbPulse 1s ease-in-out infinite;
}

@keyframes spmbPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.82; }
}

/* countdown besar untuk status "belum dibuka" */
.spmb-countdown-long {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 800;
  color: var(--gold-soft);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  margin: 18px 0 14px;
}

/* pastikan atribut hidden selalu menyembunyikan panel SPMB */
.spmb-state[hidden] { display: none !important; }

.spmb-state-loading .loading-msg {
  color: rgba(234, 242, 255, 0.75);
}

@media (max-width: 640px) {
  .spmb-hero { min-height: calc(100vh - 110px); padding: 48px 0; }
  .spmb-illustration { max-width: 210px; }
}

/* ============ GALERI: grid button reset + modal ============ */
.gallery-item {
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.galeri-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.galeri-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.galeri-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 28, 58, 0.72);
  backdrop-filter: blur(3px);
}

.galeri-modal-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-light, #fff);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--card-border);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s var(--ease);
}

.galeri-modal.open .galeri-modal-box {
  transform: translateY(0) scale(1);
}

:root[data-theme="dark"] .galeri-modal-box {
  background: var(--paper);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .galeri-modal-box {
    background: var(--paper);
  }
}

.galeri-modal-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(7, 28, 58, 0.55);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.galeri-modal-x:hover {
  background: rgba(7, 28, 58, 0.8);
}

.galeri-modal-img-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--navy-deep);
}

.galeri-modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.galeri-modal-body {
  padding: 20px 22px 24px;
}

.galeri-modal-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
}

/* Kunci scroll halaman saat modal terbuka. overflow:hidden saja tidak cukup
   di iOS Safari & beberapa browser mobile (latar tetap bisa digeser lewat
   sentuhan), jadi body dibekukan dengan position:fixed. Posisi scroll disimpan
   di --scroll-lock-y oleh JS dan dikembalikan saat modal ditutup. */
body.modal-open {
  position: fixed;
  top: calc(var(--scroll-lock-y, 0px) * -1);
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}
body.modal-open .sosmed-modal-box {
  touch-action: pan-y;
  overscroll-behavior: contain;
}

/* ============ KOMENTAR: berita & galeri (anonim "Pengunjung Website") ============ */
.komentar-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--card-border);
}

.komentar-section h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.komentar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  max-height: 320px;
  overflow-y: auto;
}

.komentar-kosong {
  font-size: 13.5px;
  color: var(--text-muted);
  padding: 6px 0 2px;
}

.komentar-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.komentar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--card-border);
  background: var(--paper);
}

.komentar-bubble {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.komentar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.komentar-nama {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
}

.komentar-waktu {
  font-size: 12px;
  color: var(--text-muted);
}

.komentar-isi {
  font-size: 13.5px;
  color: var(--text-dark);
  line-height: 1.6;
  word-break: break-word;
}

/* Balasan resmi admin (di bawah komentar pengunjung) */
.komentar-balasan {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 10px;
  margin-left: 28px;
  padding-left: 14px;
  border-left: 2px solid var(--gold-soft, #d9a441);
}
.komentar-avatar--admin {
  width: 34px;
  height: 34px;
  border-color: var(--gold-soft, #d9a441);
}
.komentar-bubble--admin {
  background: linear-gradient(135deg, rgba(217,164,65,0.10), rgba(74,144,226,0.06));
  border-color: rgba(217,164,65,0.45);
}
.komentar-badge-admin {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--gold-soft, #d9a441);
  color: #1a1a1a;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  vertical-align: middle;
}
@media (max-width: 480px) {
  .komentar-balasan { margin-left: 12px; padding-left: 10px; }
}

.komentar-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.komentar-form textarea {
  width: 100%;
  min-height: 74px;
  resize: vertical;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--paper);
  color: var(--text-dark);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.6;
}

.komentar-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.komentar-form button {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  min-width: 128px;
  padding: 12px 26px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}

.komentar-form button:hover {
  background: var(--primary-dark);
}

.komentar-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============ KONTAK: socials & peta ============ */
.contact-socials {
  display: flex;
  gap: 12px;
  margin: 26px 0 34px;
}

.contact-socials a {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--on-dark);
  background: var(--navy-deep);
  border: 1px solid var(--card-border);
  transition: var(--transition);
}

.contact-socials a:hover {
  animation: contactSocialBounce 0.5s var(--ease);
  box-shadow: var(--shadow);
}

@keyframes contactSocialBounce {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(-7px) scale(1.08); }
  60% { transform: translateY(-2px) scale(0.98); }
  100% { transform: translateY(-4px) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-socials a:hover { animation: none; transform: translateY(-4px); }
}

.contact-socials .cs-youtube:hover { background: #ff0000; }
.contact-socials .cs-instagram:hover { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.contact-socials .cs-tiktok:hover { background: #010101; }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--card-border);
}

.map-embed iframe {
  display: block;
  filter: grayscale(0.15) contrast(1.02);
}

:root[data-theme="dark"] .map-embed iframe {
  filter: grayscale(0.3) invert(0.92) contrast(0.9) hue-rotate(180deg);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .map-embed iframe {
    filter: grayscale(0.3) invert(0.92) contrast(0.9) hue-rotate(180deg);
  }
}

.map-embed-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: var(--navy-deep);
  color: var(--on-dark);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.map-embed-cta i {
  transition: transform 0.35s var(--ease);
}

.map-embed-cta:hover {
  background: var(--gold-deep);
}

.map-embed-cta:hover i {
  animation: mapPinNudge 0.7s ease-in-out infinite;
}

@keyframes mapPinNudge {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .map-embed-cta:hover i { animation: none; }
}

/* ============ FOOTER ============ */
footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 20px;
}

footer .grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 30px;
  margin-bottom: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

footer h4 {
  color: var(--on-dark);
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 18px;
}

footer ul {
  list-style: none;
}

footer ul li {
  margin-bottom: 10px;
  font-size: 13.5px;
}

footer ul li a {
  transition: var(--transition);
  color: rgba(255,255,255,0.65);
}

footer ul li a:hover {
  color: var(--on-dark);
  padding-left: 4px;
}

footer .about img {
  width: 55px;
  margin-bottom: 12px;
}

footer .about p {
  font-size: 13.5px;
  line-height: 1.7;
  opacity: 0.75;
  max-width: 300px;
}

footer .socials a {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  margin-right: 8px;
  margin-top: 10px;
  color: rgba(255,255,255,0.85);
  transition: var(--transition);
}

footer .socials a:hover {
  background: var(--navy-steel-fixed);
  color: var(--on-dark);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  padding-top: 22px;
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-bottom p {
  margin: 0;
  max-width: 620px;
}

.footer-copyright {
  opacity: 0.65;
}

.footer-copyright-legal {
  line-height: 1.7;
  opacity: 0.72;
}

/* Blok "Thanks To" + "Tim Pengembang Website": dua kartu kecil rapi,
   berdampingan di layar lebar (desktop/PC) dan bertumpuk di mobile,
   dengan latar var(--surface-alt) yang otomatis menyesuaikan mode
   terang maupun gelap, senada dengan kartu-kartu lain di situs. */
.footer-credits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  max-width: 620px;
}

@media (min-width: 640px) {
  .footer-credits-grid {
    grid-template-columns: 1fr 1fr;
    max-width: 680px;
  }
}

.footer-credit-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 12px 16px;
}

.footer-credit-box-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}

.footer-credit-box-title i {
  font-size: 12px;
}

.footer-credit-box--thanks .footer-credit-box-title i {
  color: var(--gold);
}

.footer-credit-ref {
  font-size: 12px;
  font-style: italic;
  line-height: 1.6;
  opacity: 0.75;
  margin: 0;
}

.footer-credit-ref strong {
  font-style: normal;
  font-weight: 600;
  opacity: 1;
  color: rgba(255,255,255,0.85);
}

.footer-maker {
  font-size: 12px;
  opacity: 0.75;
  margin: 0;
}

.footer-bottom a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: var(--transition);
}

.footer-bottom a:hover {
  color: var(--gold);
  opacity: 1;
}

.footer-maker-message {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.6;
  opacity: 0.55;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: 560px;
}

.footer-maker-message i {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--gold-deep);
  opacity: 0.9;
}

.footer-presented-by {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-presented-by-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  opacity: 0.6;
  transition: var(--transition);
  cursor: pointer;
  width: fit-content;
}

.footer-presented-by-link img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.footer-presented-by-link:hover,
.footer-presented-by-link:focus-visible {
  opacity: 1;
  color: var(--gold-soft, #d4a94c);
}

.footer-presented-by-link:focus-visible {
  outline: 2px solid var(--gold-soft, #d4a94c);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (max-width: 480px) {
  .footer-maker-message {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ============ BACK TO TOP ============ */
.totop {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 46px;
  height: 46px;
  background: linear-gradient(150deg, var(--navy-steel), var(--navy));
  color: var(--gold-soft);
  border: 1px solid rgba(212,169,76,0.35);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow), 0 0 0 rgba(212,169,76,0);
  z-index: 999;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s ease;
}

.totop:hover {
  background: linear-gradient(150deg, var(--gold), var(--gold-deep));
  color: var(--navy-deep);
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-lg), 0 0 18px rgba(212,169,76,0.35);
}

.totop.show {
  display: flex;
  animation: totopIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes totopIn {
  from { opacity: 0; transform: translateY(14px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Motion blur saat tombol ditekan untuk kembali scroll ke atas ----
   Tombol sendiri "melesat" turun sekilas dengan blur ala kecepatan, dan
   seluruh viewport ikut mendapat sedikit blur vertikal yang cepat memudar,
   menegaskan kesan "meluncur ke atas" secara halus & profesional. */
.totop.is-scrolling-up {
  animation: totopBoost 0.5s var(--ease);
}

@keyframes totopBoost {
  0% { transform: translateY(0) scale(1); filter: blur(0); }
  35% { transform: translateY(6px) scale(0.94); filter: blur(2.5px); }
  100% { transform: translateY(0) scale(1); filter: blur(0); }
}

body.is-scroll-top-blurring #app,
body.is-scroll-top-blurring header,
body.is-scroll-top-blurring footer {
  animation: scrollTopMotionBlur 0.5s var(--ease);
}

@keyframes scrollTopMotionBlur {
  0% { filter: blur(0); }
  30% { filter: blur(3px); }
  100% { filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  .totop.is-scrolling-up { animation: none; }
  body.is-scroll-top-blurring #app,
  body.is-scroll-top-blurring header,
  body.is-scroll-top-blurring footer { animation: none; }
}

/* ============ OVERLAY TRANSISI GANTI KATEGORI/SECTION ============
   Gimmick yang tampil setiap kali pindah section nav (bukan sekadar
   tiap perubahan hash lain seperti sub-halaman berita), berupa loading
   scene dengan grid bulat emas. Latar mengikuti mode: PUTIH bersih di
   mode terang, BIRU navy (sesuai palet web) di mode malam. Masuk/keluar
   dibuat lebih halus (blur + scale) dan berdurasi lebih lega supaya
   animasi gimmick-nya benar-benar terasa, bukan sekadar kedip. */
.section-transition {
  position: fixed;
  inset: 0;
  z-index: 9500; /* di bawah page-loader/splash, di atas header & konten */
  display: flex;
  align-items: center;
  justify-content: center;
  /* latar solid di bawah gradasi, supaya konten web di belakangnya tidak terlihat */
  background-color: #ffffff;
  background:
    radial-gradient(circle at 50% 45%, rgba(30, 95, 204, 0.10), transparent 62%),
    linear-gradient(160deg, #ffffff, #e8f1fb 130%);
  opacity: 0;
  visibility: hidden;
  /* saat tampil, overlay menangkap semua sentuhan/klik & tidak bisa digeser */
  pointer-events: none;
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition:
    opacity 0.6s var(--ease),
    visibility 0.6s ease,
    backdrop-filter 0.6s var(--ease);
}

:root[data-theme="dark"] .section-transition {
  background-color: #0b1a2e;
  background:
    radial-gradient(circle at 50% 45%, rgba(74, 144, 226, 0.35), transparent 62%),
    linear-gradient(160deg, #0b1a2e, #14304f 130%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .section-transition {
    background-color: #0b1a2e;
    background:
      radial-gradient(circle at 50% 45%, rgba(74, 144, 226, 0.35), transparent 62%),
      linear-gradient(160deg, #0b1a2e, #14304f 130%);
  }
}

.section-transition.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.section-transition-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.6s var(--ease) 0.05s, opacity 0.6s var(--ease) 0.05s;
}

.section-transition.is-active .section-transition-grid {
  transform: scale(1);
  opacity: 1;
}

.section-transition-grid span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-soft), var(--gold-deep) 75%);
  box-shadow: 0 0 16px rgba(212, 169, 76, 0.55);
  animation: sectionGridPulse 1.3s ease-in-out infinite;
}

/* delay berjalan diagonal supaya terlihat seperti gelombang loading,
   bukan berkedip bersamaan */
.section-transition-grid span:nth-child(1) { animation-delay: 0s; }
.section-transition-grid span:nth-child(2) { animation-delay: 0.1s; }
.section-transition-grid span:nth-child(3) { animation-delay: 0.2s; }
.section-transition-grid span:nth-child(4) { animation-delay: 0.1s; }
.section-transition-grid span:nth-child(5) { animation-delay: 0.2s; }
.section-transition-grid span:nth-child(6) { animation-delay: 0.3s; }
.section-transition-grid span:nth-child(7) { animation-delay: 0.2s; }
.section-transition-grid span:nth-child(8) { animation-delay: 0.3s; }
.section-transition-grid span:nth-child(9) { animation-delay: 0.4s; }

@keyframes sectionGridPulse {
  0%, 100% { transform: scale(0.55); opacity: 0.35; }
  50% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .section-transition-grid span { animation: none; opacity: 0.9; }
  .section-transition-grid { transition: none; transform: none; opacity: 1; }
  .section-transition { transition: opacity 0.2s ease, visibility 0.2s ease; backdrop-filter: none !important; }
}

/* ============ ROUTING / PAGE TRANSITIONS ============ */
#app {
  position: relative;
}

.page {
  display: none;
}

.page.page-active {
  display: block;
  animation: pageIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ SCROLL REVEAL ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-zoom {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-zoom.reveal-visible {
  opacity: 1;
  transform: scale(1);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.reveal-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.reveal-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--stagger-i, 0) * 70ms);
}

.reveal-stagger.reveal-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback jika --stagger-i belum sempat di-set oleh JS (mis. JS gagal load) */
.reveal-stagger.reveal-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.reveal-visible > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.reveal-visible > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.reveal-visible > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.reveal-visible > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.reveal-visible > *:nth-child(6) { transition-delay: 0.4s; }

/* ---- Reveal Scale-Fade premium: untuk card grid (kompetensi, galeri, berita) ---- */
.reveal-scale-fade {
  opacity: 0;
  transform: translateY(22px) scale(0.93);
  filter: blur(4px);
  transition:
    opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.5s ease;
  transition-delay: calc(var(--stagger-i, 0) * 80ms);
}

.reveal-scale-fade.reveal-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* ---- Stats "pop" reveal: kartu angka beranda (Siswa/Kompetensi/dst)
   muncul dengan efek pop-scale + cincin cahaya keemasan sekilas, terpisah
   dari reveal-stagger biasa (yang hanya fade+translateY) supaya terasa
   lebih hidup begitu section statistik masuk layar. Angka scramble di
   dalamnya tidak diubah -- ini hanya membungkus animasi kemunculan card. ---- */
.stats-pop {
  opacity: 0;
  transform: translateY(18px) scale(0.85);
  transition:
    opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: calc(var(--stagger-i, 0) * 90ms);
}

.reveal-visible .stats-pop,
.stats-pop-group.reveal-visible .stats-pop {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.stats-pop::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: var(--radius);
  border: 1px solid rgba(212, 169, 76, 0.55);
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

.reveal-visible .stats-pop::before,
.stats-pop-group.reveal-visible .stats-pop::before {
  animation: statsPopRing 0.9s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--stagger-i, 0) * 90ms + 0.15s) 1;
}

@keyframes statsPopRing {
  0% { opacity: 0.9; transform: scale(0.9); }
  70% { opacity: 0; transform: scale(1.12); }
  100% { opacity: 0; transform: scale(1.12); }
}

/* Perf tier rendah (lihat perf-detect.js): lewati ring cahaya & bounce,
   sisakan fade+scale sederhana saja supaya ringan di HP low-end. */
:root[data-perf="low"] .stats-pop {
  transition: opacity 0.4s ease, transform 0.4s ease;
}
:root[data-perf="low"] .stats-pop::before {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .stats-pop {
    opacity: 1 !important;
    transform: none !important;
  }
  .stats-pop::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-zoom, .reveal-left, .reveal-right, .reveal-stagger > *, .reveal-scale-fade,
  .page.page-active, .menu-panel-list > li, .img-fade {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
  }
  .hero, .top-bar, .hero::after, .page-banner, .page-banner::after,
  .hero-shapes .shape, .totop.show, .loader-mark span {
    animation: none !important;
  }
  .news-card::before, .news-card .kategori-badge, .news-card .meta .fa-medal {
    animation: none !important;
    opacity: 0 !important;
  }
}

/* ============ CLICK BURST EFFECT ============ */
.click-burst {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.click-ring {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  border: 2px solid var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: clickRingExpand 0.7s cubic-bezier(0.25, 0.8, 0.35, 1) forwards;
}

@keyframes clickRingExpand {
  0% { width: 0; height: 0; opacity: 1; }
  100% { width: 140px; height: 140px; opacity: 0; }
}

.click-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: particleFly 0.8s ease-out forwards;
}

@keyframes particleFly {
  0% { opacity: 1; transform: translate(-50%, -50%) translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(0.2); }
}

/* ============ ASSISTANT AIGA ============ */
.aiga-banner .eyebrow i {
  color: var(--gold);
  margin-right: 4px;
}

.aiga-shell {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.aiga-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--on-dark);
  border-bottom: 2px solid var(--gold-deep);
}

.aiga-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: linear-gradient(150deg, var(--gold-soft), var(--gold-deep));
  color: var(--navy-deep);
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  overflow: hidden;
}

.aiga-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  max-width: none;
}

.aiga-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.aiga-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
}

.aiga-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ddb8a;
  box-shadow: 0 0 0 3px rgba(77,219,138,0.2);
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .aiga-head {
    flex-wrap: wrap;
  }
}

.aiga-chat {
  padding: 22px 24px;
  min-height: 320px;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    radial-gradient(circle at 15% 0%, rgba(30,95,204,0.05), transparent 55%),
    var(--surface-alt);
  scrollbar-width: thin;
  scrollbar-color: var(--gold-deep) transparent;
}

.aiga-chat::-webkit-scrollbar { width: 6px; }
.aiga-chat::-webkit-scrollbar-thumb {
  background: var(--gold-deep);
  border-radius: 10px;
}

.aiga-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 82%;
}

.aiga-msg--bot { align-self: flex-start; }
.aiga-msg--user { align-self: flex-end; }

.aiga-msg-avatar {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  flex-shrink: 0;
  border: 1px solid var(--card-border);
}

.aiga-msg .bubble {
  position: static;
  bottom: auto;
  display: block;
  animation: none;
  will-change: auto;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  min-width: 0;
}

.aiga-msg--bot .bubble {
  background: var(--surface);
  border: 1px solid var(--card-border);
  color: var(--ink);
  border-bottom-left-radius: 4px;
}

.aiga-msg--user .bubble {
  background: linear-gradient(135deg, var(--navy-steel), var(--navy));
  color: var(--on-dark);
  border-bottom-right-radius: 4px;
}

.aiga-msg--in {
  animation: aigaMsgIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes aigaMsgIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.aiga-typing,
.aiga-typing-bubble {
  /* Override wajib: class ".bubble" global (gelembung dekorasi mode malam,
     lihat baris ~265) memberi "position: absolute; bottom: -80px;" yang
     ikut kena di sini karena elemen ini pakai class "bubble aiga-typing"
     sekaligus. Tanpa override ini, dot mengetik terdorong ke luar/bawah
     layar dan terlihat seolah animasinya tidak muncul sama sekali.
     Catatan: markup JS saat ini memakai class "aiga-typing-bubble" +
     "aiga-typing-dot" (bukan "aiga-typing" + <span>), jadi kedua nama
     class disatukan di sini supaya animasi selalu tampil walau markup
     berubah sedikit di masa depan. */
  position: static;
  bottom: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.aiga-typing span,
.aiga-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-deep);
  opacity: 0.5;
  animation: aigaTypingBounce 1s ease-in-out infinite;
}

.aiga-typing span:nth-child(2),
.aiga-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.aiga-typing span:nth-child(3),
.aiga-typing-dot:nth-child(3) { animation-delay: 0.3s; }

.aiga-msg--typing {
  animation: aigaMsgIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes aigaTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.aiga-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 16px;
  background: var(--surface-alt);
  transition: opacity 0.25s ease, max-height 0.25s ease;
}

.aiga-suggestions--hidden {
  display: none;
}

.aiga-chip {
  border: 1px solid var(--card-border);
  background: var(--surface);
  color: var(--navy-steel);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}

.aiga-chip:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--gold-soft);
  transform: translateY(-2px);
}

.aiga-input-row {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--card-border);
  background: var(--surface);
}

.aiga-input-row input {
  flex: 1;
  border: 1px solid var(--card-border);
  background: var(--surface-alt);
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14.5px;
  font-family: var(--font-body);
  transition: var(--transition);
}

.aiga-input-row input:focus {
  outline: none;
  border-color: var(--navy-steel);
  box-shadow: 0 0 0 3px rgba(30,95,204,0.12);
}

.aiga-input-row input:disabled {
  opacity: 0.6;
}

.aiga-input-row button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(150deg, var(--gold), var(--gold-deep));
  color: var(--navy-deep);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

.aiga-input-row button:hover {
  transform: scale(1.06) rotate(6deg);
  box-shadow: 0 6px 18px rgba(212,169,76,0.35);
}

.aiga-input-row button:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* ---- Pemilih mode balasan: Teks / Suara / English ---- */
.aiga-mode-switch {
  display: flex;
  gap: 6px;
  padding: 12px 24px 0;
  background: var(--surface);
}

.aiga-mode-btn {
  flex: 1;
  border: 1px solid var(--card-border);
  background: var(--surface-alt);
  color: var(--ink-muted);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.aiga-mode-btn:hover:not(:disabled) {
  border-color: var(--navy-steel);
  color: var(--ink);
}

.aiga-mode-btn.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--gold-soft);
}

.aiga-mode-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- Tombol putar suara di bubble balasan Aiga ---- */
.aiga-play-btn {
  margin-top: 8px;
  border: 1px solid var(--card-border);
  background: var(--surface);
  color: var(--navy);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  font-family: var(--font-body);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.aiga-play-btn:hover:not(:disabled) {
  background: var(--navy);
  color: var(--gold-soft);
}

.aiga-play-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.aiga-play-btn.is-playing {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-deep);
}

.aiga-disclaimer {
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted);
  padding: 12px 24px 20px;
  background: var(--surface);
}

/* ---- Mode Suara: bubble "sedang bicara" (tanpa teks balasan di chat) ----
   Dipakai sebagai pengganti bubble teks saat modeAktif === "suara": alih-alih
   mengetik jawaban huruf per huruf, Aiga langsung memutar audio TTS dan
   menampilkan garis-garis (bar) yang naik-turun-melebar-menepis mengikuti
   ritme bicara, mirip visualizer suara. */
.aiga-msg--bot .aiga-voice-bubble {
  background: var(--surface);
  border: 1px solid var(--card-border);
  color: var(--ink);
  border-bottom-left-radius: 4px;
  padding: 14px 18px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 128px;
}
.aiga-voice-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 26px;
}
.aiga-voice-bars span {
  display: block;
  width: 3.5px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  transform: scaleY(1) scaleX(1);
  animation: aigaVoiceBar 1.1s ease-in-out infinite;
  animation-play-state: paused;
}
/* "naik turun melebar menepis": tiap bar tumbuh tinggi (naik), menyusut
   (turun), sempat melebar (scaleX > 1) di puncaknya, lalu menepis/mengecil
   tipis -- dengan delay berbeda tiap bar supaya terlihat seperti gelombang
   suara yang hidup, bukan berdenyut serempak. */
@keyframes aigaVoiceBar {
  0%, 100% { height: 6px;  transform: scaleX(1); opacity: 0.7; }
  25%      { height: 22px; transform: scaleX(1.35); opacity: 1; }
  50%      { height: 11px; transform: scaleX(0.85); opacity: 0.85; }
  75%      { height: 26px; transform: scaleX(1.2); opacity: 1; }
}
.aiga-voice-bars span:nth-child(1) { animation-delay: 0s; }
.aiga-voice-bars span:nth-child(2) { animation-delay: 0.12s; }
.aiga-voice-bars span:nth-child(3) { animation-delay: 0.24s; }
.aiga-voice-bars span:nth-child(4) { animation-delay: 0.36s; }
.aiga-voice-bars span:nth-child(5) { animation-delay: 0.18s; }
.aiga-voice-bubble.is-speaking .aiga-voice-bars span { animation-play-state: running; }
.aiga-voice-bubble:not(.is-speaking) .aiga-voice-bars span { height: 6px; transform: scaleX(1); opacity: 0.4; }

.aiga-voice-status {
  font-size: 12.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}
.aiga-voice-bubble.is-loading .aiga-voice-status i { animation: aigaVoiceSpin 0.8s linear infinite; }
@keyframes aigaVoiceSpin { to { transform: rotate(360deg); } }
.aiga-voice-replay {
  margin-left: 2px;
  border: 1px solid var(--card-border);
  background: var(--surface-alt);
  color: var(--navy);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.aiga-voice-replay:hover:not(:disabled) { background: var(--navy); color: var(--gold-soft); }
.aiga-voice-replay:disabled { opacity: 0.5; cursor: wait; }

@media (prefers-reduced-motion: reduce) {
  .aiga-voice-bars span { animation: none !important; }
}

@media (max-width: 640px) {
  .aiga-chat { min-height: 260px; max-height: 60vh; padding: 18px 16px; }
  .aiga-head { padding: 16px 18px; }
  .aiga-input-row { padding: 12px 16px; }
  .aiga-suggestions { padding: 0 16px 14px; }
  .aiga-disclaimer { padding: 10px 16px 16px; }
  .aiga-msg { max-width: 90%; }
}

/* ---- Micro fade-in untuk gambar lazy-load ---- */
.img-fade {
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.img-fade.img-fade-in {
  opacity: 1;
  transform: scale(1);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 992px) {
  .features .grid,
  .stats .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  footer .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .profile-section .flex {
    flex-direction: column;
  }
  .profile-section .img-wrap {
    flex: 0 0 100%;
  }
  .kompetensi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-search { display: none; }
  .menu-toggle { display: flex; }
  nav.primary-menu { display: none; }

  .hero-content h1 { font-size: clamp(26px, 7.5vw, 32px); }
  .page-banner h1 { font-size: clamp(22px, 6.5vw, 28px); }
  .hero-content p { font-size: clamp(14px, 3.6vw, 15.5px); max-width: 100%; }
  .hero-content .eyebrow { font-size: 13px; }
  .page-banner { padding: 48px 0 36px; }
  .page-banner p { font-size: 14px; max-width: 100%; }
  .section-heading h2 { font-size: clamp(20px, 6vw, 26px) !important; }
  .section-heading p { font-size: 14px !important; }

  .features .grid,
  .stats .grid,
  .news-grid {
    grid-template-columns: 1fr;
  }
  footer .grid {
    grid-template-columns: 1fr;
  }
  .kompetensi-grid {
    grid-template-columns: 1fr !important;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-grid-scroll {
    max-height: 70vh;
  }
}

@media (max-width: 480px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .page-body .container.narrow { padding: 28px 22px; border-radius: 12px; }
  .hero-content h1 { font-size: clamp(24px, 8vw, 28px); }
  .page-banner h1 { font-size: clamp(20px, 7vw, 24px); }
  .page-banner { padding: 40px 0 30px; }
  .hero-content .eyebrow,
  .page-banner .eyebrow { font-size: 13px; letter-spacing: 0.06em; }
  .section-heading { margin-bottom: 30px; }
  .section-heading h2 { font-size: clamp(19px, 6.5vw, 22px) !important; margin: 10px 0 8px; }
  .section-heading .tag { font-size: 13px; }
  .section-heading p,
  .hero-content p,
  .page-banner p { font-size: 13.5px; line-height: 1.6; }
  .btn-primary, .btn-secondary, .btn { font-size: 13.5px; padding: 12px 20px; }
}

/* ============ PERSON CARDS (Guru, OSIS, Alumni) ============ */
.guru-grid,
.osis-grid,
.alumni-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.prestasi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 10px;
}

.person-card {
  padding: 22px 18px;
  text-align: center;
}

.person-photo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background-size: cover;
  background-position: center;
  background-color: var(--sky);
  border: 2px solid var(--card-border);
}

.person-card h5 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--navy);
  position: relative;
  z-index: 1;
}

.person-role {
  font-size: 13px;
  color: var(--gold, #b8860b);
  font-weight: 600;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.person-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .guru-grid,
  .osis-grid,
  .alumni-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .prestasi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .guru-grid,
  .osis-grid,
  .alumni-grid,
  .prestasi-grid {
    grid-template-columns: 1fr;
  }
}

/* ============ EKSTRAKURIKULER ============ */
.ekskul-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.ekskul-card.feature-card {
  padding: 22px 20px;
}

.ekskul-card .icon {
  width: 44px;
  height: 44px;
  font-size: 18px;
  margin-bottom: 14px;
}

.ekskul-card h5 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  line-height: 1.35;
}

.badge-baru {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
  background: var(--gold, #b8860b);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .ekskul-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .ekskul-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .ekskul-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   SOSIAL MEDIA â€” grid konten + filter platform + modal player
   ============================================================ */
.sosmed-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.sosmed-filter button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--transition);
}

.sosmed-filter button i { font-size: 15px; }

.sosmed-filter button.active,
.sosmed-filter button:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.sosmed-filter button[data-platform="youtube"].active { background: #ff0000; border-color: #ff0000; }
.sosmed-filter button[data-platform="instagram"].active { background: linear-gradient(135deg,#f58529,#dd2a7b,#8134af,#515bd4); border-color: transparent; }
.sosmed-filter button[data-platform="tiktok"].active { background: #111; border-color: #111; }

.sosmed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.sosmed-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.sosmed-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.sosmed-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--paper);
  overflow: hidden;
}

.sosmed-card[data-platform="instagram"] .sosmed-thumb-wrap,
.sosmed-card[data-platform="tiktok"] .sosmed-thumb-wrap {
  aspect-ratio: 4/5;
}

.sosmed-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.sosmed-card:hover .sosmed-thumb-wrap img { transform: scale(1.06); }

.sosmed-platform-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
}

.sosmed-platform-badge.youtube i { color: #ff4b4b; }
.sosmed-platform-badge.instagram i { color: #e1306c; }
.sosmed-platform-badge.tiktok i { color: #fff; }

.sosmed-play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.sosmed-play-btn span {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
  transition: transform 0.3s var(--ease);
}

.sosmed-card:hover .sosmed-play-btn span { transform: scale(1.12); }

.sosmed-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.sosmed-judul {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sosmed-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--card-border);
}

.sosmed-meta span { display: inline-flex; align-items: center; gap: 5px; }

.sosmed-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-muted);
}

/* ---------- Modal player sosmed ---------- */
.sosmed-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sosmed-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.sosmed-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7,15,30,0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sosmed-modal-box {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: min(880px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s var(--ease);
}

.sosmed-modal.open .sosmed-modal-box {
  transform: translateY(0) scale(1);
}

.sosmed-modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sosmed-modal-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.sosmed-modal-player.is-vertical {
  aspect-ratio: 9/16;
  max-height: 70vh;
  margin: 0 auto;
}

.sosmed-modal-player iframe,
.sosmed-modal-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sosmed-modal-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  text-align: center;
  padding: 20px;
}

.sosmed-modal-body {
  padding: 20px 24px 26px;
}

.sosmed-modal-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 6px;
  color: var(--ink);
}

.sosmed-modal-desc {
  color: var(--ink-muted);
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .sosmed-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .sosmed-grid { grid-template-columns: 1fr; gap: 16px; }
  .sosmed-filter button { padding: 8px 14px; font-size: 13px; }
}

/* ============================================================
   KRITIK & SARAN â€” form section
   ============================================================ */
.kritik-wrap {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.kritik-wrap::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(30,95,204,0.14), transparent 70%);
  pointer-events: none;
}

.kritik-form-group { margin-bottom: 20px; }

.kritik-form-group label {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink);
  margin-bottom: 8px;
}

.kritik-form-group input[type="text"],
.kritik-form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.kritik-form-group input[type="text"]:focus,
.kritik-form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(74,144,226,0.18);
}

.kritik-form-group textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.6;
}

.kritik-toggle-group {
  display: flex;
  gap: 10px;
}

.kritik-toggle-group button {
  flex: 1;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--paper);
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: var(--transition);
}

.kritik-toggle-group button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.kritik-kelas-wrap {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s var(--ease), opacity 0.3s ease, margin 0.35s ease;
}

.kritik-kelas-wrap.is-visible {
  max-height: 120px;
  opacity: 1;
  margin-bottom: 20px;
}

.kritik-counter {
  text-align: right;
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 6px;
}

.kritik-counter.is-over { color: #d64550; font-weight: 700; }

.kritik-submit-btn {
  width: 100%;
  min-height: 54px;
  padding: 16px 18px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--navy-steel), var(--blue-light));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  box-shadow: 0 10px 26px -8px rgba(30,95,204,0.5);
}

.kritik-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -8px rgba(30,95,204,0.6); }
.kritik-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.kritik-feedback {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  display: none;
}

.kritik-feedback.is-visible { display: flex; align-items: center; gap: 10px; }
.kritik-feedback.success { background: rgba(34,197,94,0.12); color: #16803c; border: 1px solid rgba(34,197,94,0.3); }
.kritik-feedback.error { background: rgba(214,69,80,0.1); color: #d64550; border: 1px solid rgba(214,69,80,0.28); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kritik-feedback.success { color: #4ade80; }
  :root:not([data-theme="light"]) .kritik-feedback.error { color: #f87171; }
}
:root[data-theme="dark"] .kritik-feedback.success { color: #4ade80; }
:root[data-theme="dark"] .kritik-feedback.error { color: #f87171; }

@media (max-width: 560px) {
  .kritik-wrap { padding: 26px 20px; }
  .kritik-toggle-group { flex-direction: column; }
}

/* ============================================================
   PROFIL SEKOLAH â€” sub-navigasi & sub-section terpisah
   (Sejarah / Visi & Misi / Fasilitas / Struktur Organisasi
   sekarang halaman terpisah masing-masing, bukan satu section
   panjang yang digabung).
   ============================================================ */
.profil-subnav {
  /* Dulu ada border-bottom lebar penuh; saat tombol wrap jadi 2 baris
     pendek, garis itu menggantung sendirian di ruang kosong. Sekarang
     subnav dibingkai jadi satu "tab bar" yang menyatu rapi dengan kartu
     konten di bawahnya lewat padding-bottom + border-bottom util, bukan
     mengambang terpisah seperti sebelumnya. */
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--card-border);
}

.profil-subnav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--surface-alt);
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  transition: var(--transition);
}

.profil-subnav a:hover {
  color: var(--primary);
  border-color: var(--primary-light);
}

.profil-subnav a.active {
  background: linear-gradient(135deg, var(--navy-steel), var(--blue-light));
  border-color: transparent;
  color: var(--on-dark);
  animation: subnavActivePop 0.35s var(--ease);
}

@keyframes subnavActivePop {
  0% { transform: scale(0.92); }
  60% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .profil-subnav a.active { animation: none; }
}

.profil-bagian h2:first-child { margin-top: 0; }

.profil-bagian:not([hidden]) {
  animation: profilBagianIn 0.45s var(--ease);
}

@keyframes profilBagianIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .profil-bagian:not([hidden]) { animation: none; }
}

/* ---- Struktur Organisasi: grid nama + jabatan ---- */
.struktur-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.struktur-item {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--navy-steel);
  transition: var(--transition);
}

.struktur-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-left-color: var(--gold);
}

.struktur-item h5 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.4;
}

.struktur-item p {
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
}

@media (max-width: 900px) {
  .struktur-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .profil-subnav { gap: 8px; }
  .profil-subnav a { padding: 9px 13px; font-size: 12.5px; }
  .struktur-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   ANIMASI TAMBAHAN (6 total)
   1) Scroll progress bar
   2) Touch/drag ripple trail (animasi geser layar)
   3) Magnetic hover pada card unggulan
   4) Pulse/glow looping pada badge Assistant Aiga di navbar
   5) Underline geser animasi pada nav link
   6) Icon "pop" bounce halus saat reveal masuk
   ===================================================================== */

/* ---- 1) SCROLL PROGRESS BAR ----
   Garis tipis di bawah header yang terisi mengikuti posisi scroll
   halaman, warna emas supaya senada dengan aksen situs. ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1201;
  background: transparent;
  pointer-events: none;
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-soft));
  box-shadow: 0 0 8px rgba(212,169,76,0.55);
  transition: width 0.12s linear;
}

/* ---- 2) TOUCH / DRAG RIPPLE TRAIL ----
   Lingkaran halus yang muncul & memudar mengikuti titik sentuh/geser
   jari (mobile) atau drag mouse (desktop). Elemen dibuat dinamis lewat
   JS (lihat main.js), di sini hanya definisi tampilan & animasinya. ---- */
.touch-ripple {
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  border: 1.5px solid rgba(212,169,76,0.55);
  background: radial-gradient(circle, rgba(212,169,76,0.22) 0%, rgba(212,169,76,0) 70%);
  pointer-events: none;
  z-index: 1200;
  will-change: transform, opacity;
  animation: touchRippleFade 0.65s var(--ease) forwards;
}

@keyframes touchRippleFade {
  0% {
    opacity: 0.9;
    transform: translate(var(--rx, 0), var(--ry, 0)) scale(0.4);
  }
  100% {
    opacity: 0;
    transform: translate(var(--rx, 0), var(--ry, 0)) scale(1.6);
  }
}

/* ---- 3) MAGNETIC HOVER (card unggulan) ----
   Sedikit mengikuti posisi kursor, memberi kesan interaktif/premium
   tanpa mengubah tata letak. Posisi X/Y diatur lewat custom property
   --mx/--my yang di-set oleh JS saat mousemove di atas card. Digabung
   dengan translateY hover yang sudah ada pada .feature-card lewat
   sebuah custom property tambahan supaya keduanya tidak saling timpa. ---- */
.magnetic-hover {
  --mx: 0px;
  --my: 0px;
}

.magnetic-hover:hover {
  transform: translateY(-8px) translate(var(--mx), var(--my));
}

/* ---- 4) PULSE / GLOW LOOPING (badge Assistant Aiga di navbar) ----
   Denyut cahaya lembut & berulang pada ikon sparkles supaya fitur AI
   terasa "hidup" tanpa mengganggu, looping halus tanpa henti. ---- */
nav.primary-menu ul > li[data-route="aiga"] > a i.fa-sparkles,
#menuPanel a[data-route-link="aiga"] i.fa-sparkles {
  display: inline-block;
  color: var(--gold-soft);
  animation: aigaSparklePulse 2.4s ease-in-out infinite;
}

@keyframes aigaSparklePulse {
  0%, 100% {
    opacity: 0.75;
    transform: scale(1);
    text-shadow: 0 0 0 rgba(212,169,76,0);
  }
  50% {
    opacity: 1;
    transform: scale(1.18);
    text-shadow: 0 0 10px rgba(212,169,76,0.85);
  }
}

/* ---- 5) UNDERLINE GESER ANIMASI (nav link) ----
   Garis emas yang meluncur masuk dari tengah saat link di-hover atau
   sedang aktif, keluar lagi secara halus saat mouse pergi. ---- */
nav.primary-menu ul > li > a {
  position: relative;
}

nav.primary-menu ul > li > a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0%;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

nav.primary-menu ul > li > a:hover::after,
nav.primary-menu ul > li.active > a::after {
  width: 60%;
}

/* ---- 6) ICON POP BOUNCE (saat reveal masuk) ----
   Pantulan kecil & singkat pada ikon-ikon fitur ketika kartunya muncul
   di viewport, melengkapi fade-in yang sudah ada di .reveal-scale-fade
   dengan sedikit "kehidupan" ekstra pada ikonnya saja. Tidak mengubah
   `display` supaya tidak menimpa layout icon yang sudah ada (flex/dll). ---- */
.reveal-visible .icon-pop,
.reveal-scale-fade.reveal-visible .icon-pop {
  animation: iconPopBounce 0.55s var(--ease) 0.15s both;
}

@keyframes iconPopBounce {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .touch-ripple,
  nav.primary-menu ul > li[data-route="aiga"] > a i.fa-sparkles,
  #menuPanel a[data-route-link="aiga"] i.fa-sparkles,
  .reveal-visible .icon-pop {
    animation: none !important;
  }
  .magnetic-hover {
    transform: none !important;
  }
}

@media (max-width: 900px) {
  .magnetic-hover:hover { transform: none; }
}


/* =====================================================================
   V17 â€” BLUR DASAR GRID (SEMUA SECTION BERGRID) â€” BERJENJANG & PROFESIONAL
   Basis: v9 (header/nav, grid gerak, dan teks angka TIDAK diubah).
   Blok ini hanya menyempurnakan blur di dasar grid pada:
   hero beranda, semua banner halaman dalam, dan hero SPMB.

   Teknik: dua lapis blur.
     - ::before  = blur ringan + lebar  (awal transisi, sangat lembut)
     - elemen    = blur kuat + sempit   (dasar, menyatu ke warna latar)
   Keduanya memakai mask gradasi bertingkat (banyak stop) supaya kekuatan
   blur naik mulus tanpa "pita" / garis tepi yang terlihat.
   Warna pemudaran memakai --navy-deep, jadi otomatis ikut mode terang/gelap.
   ===================================================================== */

:root {
  --gb-blur-soft: 6px;    /* lapis ringan */
  --gb-blur-strong: 16px; /* lapis kuat di dasar */
}

/* --- Basis bersama untuk ketiga jenis elemen blur --- */
.hero-grid-blur,
.page-banner-grid-blur,
.spmb-grid-blur {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  /* lapis KUAT (dasar) */
  -webkit-backdrop-filter: blur(var(--gb-blur-strong)) saturate(115%);
          backdrop-filter: blur(var(--gb-blur-strong)) saturate(115%);
  /* gradasi warna latar: blur "menyatu" ke warna section, bukan terpotong */
  background: linear-gradient(
    180deg,
    rgba(7, 28, 58, 0)    0%,
    rgba(7, 28, 58, 0.10) 40%,
    rgba(7, 28, 58, 0.38) 75%,
    rgba(7, 28, 58, 0.62) 100%
  );
  /* mask bertingkat: kekuatan blur naik halus (easing), tanpa tepi tegas */
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0,0,0,0.04) 14%,
    rgba(0,0,0,0.14) 28%,
    rgba(0,0,0,0.32) 44%,
    rgba(0,0,0,0.56) 60%,
    rgba(0,0,0,0.80) 78%,
    #000 100%
  );
          mask-image: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0,0,0,0.04) 14%,
    rgba(0,0,0,0.14) 28%,
    rgba(0,0,0,0.32) 44%,
    rgba(0,0,0,0.56) 60%,
    rgba(0,0,0,0.80) 78%,
    #000 100%
  );
}

/* --- Lapis RINGAN (lebih tinggi, blur tipis) di atas lapis kuat --- */
.hero-grid-blur::before,
.page-banner-grid-blur::before,
.spmb-grid-blur::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 165%;           /* naik ke atas elemen induk: awal blur sangat lembut */
  pointer-events: none;
  -webkit-backdrop-filter: blur(var(--gb-blur-soft));
          backdrop-filter: blur(var(--gb-blur-soft));
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0,0,0,0.10) 30%,
    rgba(0,0,0,0.35) 60%,
    rgba(0,0,0,0.70) 85%,
    #000 100%
  );
          mask-image: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0,0,0,0.10) 30%,
    rgba(0,0,0,0.35) 60%,
    rgba(0,0,0,0.70) 85%,
    #000 100%
  );
}

/* --- Tinggi zona blur per jenis section --- */
.hero-grid-blur        { height: 46%; }
.page-banner-grid-blur { height: 52%; }
.spmb-grid-blur        { height: 46%; z-index: 0; } /* sama seperti v9 */

/* --- Warna pemudaran mengikuti mode gelap (navy lebih pekat) --- */
:root[data-theme="dark"] .hero-grid-blur,
:root[data-theme="dark"] .page-banner-grid-blur,
:root[data-theme="dark"] .spmb-grid-blur {
  background: linear-gradient(
    180deg,
    rgba(5, 15, 34, 0)    0%,
    rgba(5, 15, 34, 0.12) 40%,
    rgba(5, 15, 34, 0.42) 75%,
    rgba(5, 15, 34, 0.68) 100%
  );
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-grid-blur,
  :root:not([data-theme="light"]) .page-banner-grid-blur,
  :root:not([data-theme="light"]) .spmb-grid-blur {
    background: linear-gradient(
      180deg,
      rgba(5, 15, 34, 0)    0%,
      rgba(5, 15, 34, 0.12) 40%,
      rgba(5, 15, 34, 0.42) 75%,
      rgba(5, 15, 34, 0.68) 100%
    );
  }
}

/* --- HP: blur lebih ringan agar tetap mulus & hemat GPU --- */
@media (max-width: 768px) {
  :root { --gb-blur-soft: 4px; --gb-blur-strong: 11px; }
  .hero-grid-blur        { height: 42%; }
  .page-banner-grid-blur { height: 55%; }
  .spmb-grid-blur        { height: 42%; }
}

/* --- Browser tanpa backdrop-filter: cukup pemudaran warna (tanpa blur) --- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero-grid-blur,
  .page-banner-grid-blur,
  .spmb-grid-blur {
    background: linear-gradient(
      180deg,
      rgba(7, 28, 58, 0)    0%,
      rgba(7, 28, 58, 0.35) 55%,
      rgba(7, 28, 58, 0.80) 100%
    );
  }
  .hero-grid-blur::before,
  .page-banner-grid-blur::before,
  .spmb-grid-blur::before { display: none; }
}

/* --- Hormati preferensi gerak-dikurangi: blur statis tetap tampil --- */
@media (prefers-reduced-motion: reduce) {
  .hero-grid, .spmb-grid, .page-banner::after { animation: none !important; }
}


/* =====================================================================
   V19 â€” HEADER SIMETRIS (label "SMK PUSAT KEUNGGULAN" tetap tampil),
   ANGKA HERO SEJAJAR 1 BARIS, BLUR GRID DIPERTAHANKAN & DIPERTEBAL.
   Animasi grid v17 (heroGridFall) & animasi header v17 (logoIdlePulse,
   hover logo, underline nav) TIDAK diubah/dipotong.
   ===================================================================== */

/* ---------- 1) HEADER (logo) â€” simetris, rata tengah, tanpa tombol baru ---------- */
.main-nav { padding: 10px 0; }
.main-nav .flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}
/* pill logo: logo + teks satu baris, ukuran seragam, sejajar tengah vertikal */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  box-shadow: none;
}
.logo-wrap .logo-media {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  object-fit: contain;      /* logo utuh, tidak terpotong/keluar lingkaran */
  border-radius: 50%;
  display: block;
}
.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.15;
}
.logo-text .school-name {
  font-size: 16px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.logo-text small {
  font-size: 12px;
  letter-spacing: 0.08em;
  margin-top: 2px;
  white-space: nowrap;
}
/* tombol kanan: ukuran sama (42px), satu baris, jarak konsisten */
.main-nav .theme-toggle,
.main-nav .menu-toggle {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  margin: 0;
}
.main-nav .menu-toggle { margin-left: 0; align-items: center; }
.main-nav .nav-search { margin-left: auto; }

@media (max-width: 768px) {
  .main-nav { padding: 8px 0; }
  .main-nav .container.flex { padding: 0 14px !important; gap: 10px; }
  .logo-wrap .logo-media { width: 42px; height: 42px; }
  .logo-text .school-name { font-size: 15px; }
  /* subtitle 13px = batas baca mobile; spasi huruf dirapatkan supaya
     tetap satu baris di layar 360-390px (nama sekolah tetap jadi judul) */
  .logo-text small { font-size: 13px; letter-spacing: 0.01em; font-weight: 500; margin-top: 1px; }
}
@media (max-width: 380px) {
  .logo-text .school-name { font-size: 14px; }
  .logo-text small { font-size: 13px; white-space: normal; line-height: 1.15; }
}

/* ---------- 2) GRID: animasi v17 tetap utuh, BLUR dipertahankan & dipertebal ---------- */
/* mask di .hero-grid TIDAK disentuh (dihapus dari override) supaya animasi
   heroGridFall v17 tampil penuh, tidak terpotong pendek. */
/* Blur bawaan v17 (.hero-grid-blur dkk) DIPERTAHANKAN, bahkan diperkuat:
   blur lebih tebal dan gradasi makin pekat menuju bawah. */
.hero-grid-blur,
.page-banner-grid-blur,
.spmb-grid-blur {
  -webkit-backdrop-filter: blur(20px) saturate(115%) !important;
          backdrop-filter: blur(20px) saturate(115%) !important;
  background: linear-gradient(
    180deg,
    rgba(7, 28, 58, 0)    0%,
    rgba(7, 28, 58, 0.22) 35%,
    rgba(7, 28, 58, 0.55) 65%,
    rgba(7, 28, 58, 0.82) 88%,
    rgba(7, 28, 58, 0.95) 100%
  ) !important;
}
:root[data-theme="dark"] .hero-grid-blur,
:root[data-theme="dark"] .page-banner-grid-blur,
:root[data-theme="dark"] .spmb-grid-blur {
  background: linear-gradient(
    180deg,
    rgba(5, 15, 34, 0)    0%,
    rgba(5, 15, 34, 0.26) 35%,
    rgba(5, 15, 34, 0.60) 65%,
    rgba(5, 15, 34, 0.88) 88%,
    rgba(5, 15, 34, 0.97) 100%
  ) !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-grid-blur,
  :root:not([data-theme="light"]) .page-banner-grid-blur,
  :root:not([data-theme="light"]) .spmb-grid-blur {
    background: linear-gradient(
      180deg,
      rgba(5, 15, 34, 0)    0%,
      rgba(5, 15, 34, 0.26) 35%,
      rgba(5, 15, 34, 0.60) 65%,
      rgba(5, 15, 34, 0.88) 88%,
      rgba(5, 15, 34, 0.97) 100%
    ) !important;
  }
}
.hero-grid-blur::before,
.page-banner-grid-blur::before,
.spmb-grid-blur::before {
  -webkit-backdrop-filter: blur(9px) !important;
          backdrop-filter: blur(9px) !important;
}
/* tinggi zona blur sedikit lebih besar supaya transisi ke bawah lebih pekat */
.hero-grid-blur        { height: 58%; }
.page-banner-grid-blur { height: 62%; }
.spmb-grid-blur        { height: 58%; }

/* ---------- 3) Deretan statistik hero: SELALU sejajar satu baris, bukan tumpuk ---------- */
.hero-stats,
.hero-stats.reveal-stagger {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: start !important;
  gap: 0 !important;
  max-width: 560px;
}
.hero-stats div { padding: 0 10px 0 0; min-width: 0; }
.hero-stats strong {
  font-size: clamp(18px, 5.2vw, 26px);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.hero-stats div > span {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  margin-top: 4px;
}
@media (max-width: 480px) {
  .hero-stats div { padding-right: 6px; }
  .hero-stats strong { font-size: clamp(16px, 5.6vw, 20px); }
}

/* ---------- 4) Angka scramble: lebar stabil, tanpa goyang ---------- */
.scramble { font-variant-numeric: tabular-nums; }
.scr-ch { display: inline-block; min-width: 0; font: inherit; color: inherit; letter-spacing: inherit; }
.scr-ch.scr-spin { opacity: 0.72; filter: blur(0.4px); transition: opacity .2s ease; }
.hero-stats .scr-ch:not(.scr-spin),
.stats .num .scr-ch:not(.scr-spin) { opacity: 1; transition: opacity .35s cubic-bezier(.4,0,.2,1); }

@media (prefers-reduced-motion: reduce) {
  .scr-ch.scr-spin { filter: none; }
}


/* =====================================================================
   TEMA ORANGE (porting dari v16) â€” aksen oren, fade hero, footer gelap,
   section Lokasi gelap, judul berita biru. Header nav TIDAK di-porting
   sesuai permintaan â€” header/nav tetap memakai tema emas (gold) yang ada.
   ===================================================================== */

:root {
  /* --- oren (aksen utama, di luar header) --- */
  --orange:        #ff6b00;
  --orange-hover:  #e85d00;
  --orange-soft:   rgba(255, 107, 0, 0.16);
  --orange-glow:   rgba(255, 107, 0, 0.45);

  /* --- latar section terang + ujung fade hero --- */
  --section-bg:     #dceefa;
  --section-bg-rgb: 220, 238, 250;
  --hero-fade:      170px;
  --banner-fade:    130px;
  --footer-fade:    150px;

  /* --- footer --- */
  --footer-bg:     #080d24;
  --footer-bg-rgb: 8, 13, 36;
}

:root[data-theme="dark"] {
  --section-bg:     #0c1424;
  --section-bg-rgb: 12, 20, 36;
  /* Mode malam: footer dibuat lebih terang (senada navy, bukan gelap total)
     supaya tetap kelihatan sebagai footer, bukan menyatu jadi hitam pekat.
     footer-bg-rgb WAJIB sama persis dengan komponen RGB footer-bg supaya
     gradient fade di footer::before berakhir tepat di warna solid ini,
     tidak ada garis/seam kelihatan di titik pertemuan. */
  --footer-bg:     #141f3d;
  --footer-bg-rgb: 20, 31, 61;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --section-bg:     #0c1424;
    --section-bg-rgb: 12, 20, 36;
    --footer-bg:     #141f3d;
    --footer-bg-rgb: 20, 31, 61;
  }
}

body { background-color: var(--section-bg); }

/* latar "hidup" diredam supaya biru muda bersih */
.live-bg { opacity: 0.35; }
:root[data-theme="dark"] .live-bg { opacity: 0.6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .live-bg { opacity: 0.6; }
}

/* ---------- TOMBOL UTAMA (Selengkapnya, dst) â€” oren ---------- */
.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 12px 26px -10px var(--orange-glow);
}
.btn-primary:hover {
  background: var(--orange-hover);
  color: #fff;
  box-shadow: 0 16px 32px -10px var(--orange-glow);
}
.btn-primary:focus-visible { outline: 3px solid rgba(255,107,0,.32); outline-offset: 3px; }
.btn-primary .ripple { background: rgba(255,255,255,.42); }

/* ---------- HERO: fade halus ke section di bawahnya ---------- */
.hero {
  background:
    radial-gradient(1100px 600px at 82% -10%, rgba(74,144,226,.28), transparent 60%),
    linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 50%, #143b73 100%);
  padding-bottom: calc(var(--hero-fade) - 30px);
  margin-bottom: -1px;
}
.hero::after {
  background: linear-gradient(
    180deg,
    rgba(var(--section-bg-rgb), 0)    calc(100% - var(--hero-fade)),
    rgba(var(--section-bg-rgb), .06)  calc(100% - var(--hero-fade) * .80),
    rgba(var(--section-bg-rgb), .22)  calc(100% - var(--hero-fade) * .60),
    rgba(var(--section-bg-rgb), .50)  calc(100% - var(--hero-fade) * .40),
    rgba(var(--section-bg-rgb), .82)  calc(100% - var(--hero-fade) * .20),
    rgba(var(--section-bg-rgb), 1)    100%
  );
  pointer-events: none;
}
.hero .container { position: relative; z-index: 5; }
.hero-content .eyebrow { color: var(--orange); }
.hero + section,
.hero + .profile-section,
.hero + .features { border-top: 0; box-shadow: none; }

/* ---------- PAGE-BANNER (semua halaman selain beranda): fade halus yang
   sama seperti di hero beranda, jadi transisi ke section berikutnya terlihat
   konsisten di seluruh "jejeran" halaman, bukan cuma di beranda. ---------- */
.page-banner {
  padding-bottom: calc(var(--banner-fade) - 20px);
  margin-bottom: -1px;
}
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(var(--section-bg-rgb), 0)    calc(100% - var(--banner-fade)),
    rgba(var(--section-bg-rgb), .06)  calc(100% - var(--banner-fade) * .80),
    rgba(var(--section-bg-rgb), .22)  calc(100% - var(--banner-fade) * .60),
    rgba(var(--section-bg-rgb), .50)  calc(100% - var(--banner-fade) * .40),
    rgba(var(--section-bg-rgb), .82)  calc(100% - var(--banner-fade) * .20),
    rgba(var(--section-bg-rgb), 1)    100%
  );
}
.page-banner + section,
.page-banner + .page-body { border-top: 0; box-shadow: none; }

/* Section terang memakai warna yang sama dengan ujung fade */
.features,
.profile-section,
.news-section { background-color: transparent; }
.features { background: rgba(var(--section-bg-rgb), 1); }

/* ---------- SHAPE OREN: garis pendek di bawah judul ---------- */
.section-heading h2::after,
.page-body h2::after,
footer h4::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--orange);
}
.section-heading h2::after { margin-left: 0; }
.section-heading .tag { color: var(--orange); }
.profile-section .content .tag { color: var(--orange); }

/* ---------- ICON KARTU FITUR ---------- */
.feature-card:hover .icon { background: var(--orange); color: #fff; }

/* ---------- BANNER HALAMAN DALAM ---------- */
.page-banner .eyebrow { color: var(--orange); }

/* menu di panel HP: hover oren (bukan bagian header/nav bar itu sendiri) */
.menu-panel-list > li > a:hover,
.menu-panel-list > li > a.active,
.menu-panel-list .sub-toggle:hover { color: var(--orange); }

/* ---------- FOOTER: gelap + aksen oren ---------- */
footer {
  position: relative;
  overflow: hidden;
  background: var(--footer-bg);
  color: rgba(255,255,255,.75);
  margin-top: -1px;
  padding-top: calc(var(--footer-fade) * .5 + 50px);
}
footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Fade dimulai dari warna section (atas) dan MEMUDAR ke transparan (0),
     sehingga di bagian bawahnya yang terlihat adalah warna solid
     "background: var(--footer-bg)" milik footer itu sendiri, bukan
     hasil campuran dua rgba yang berbeda nada. Ini yang membuat
     pertemuan section -> footer sinkron, tanpa garis/seam kelihatan. */
  background:
    linear-gradient(
      180deg,
      rgba(var(--section-bg-rgb), 1)   0,
      rgba(var(--section-bg-rgb), .90) calc(var(--footer-fade) * .12),
      rgba(var(--section-bg-rgb), .70) calc(var(--footer-fade) * .30),
      rgba(var(--section-bg-rgb), .42) calc(var(--footer-fade) * .52),
      rgba(var(--section-bg-rgb), .18) calc(var(--footer-fade) * .75),
      rgba(var(--section-bg-rgb), 0)   var(--footer-fade)
    ),
    radial-gradient(circle at 85% 40%, rgba(255,115,0,.10), transparent 40%);
}
footer > * { position: relative; z-index: 1; }

footer h4 { color: #fff; }
footer .about p { color: rgba(255,255,255,.68); opacity: 1; }
footer ul li a { color: rgba(255,255,255,.68); }
footer ul li a:hover { color: var(--orange); padding-left: 4px; }
footer ul li i { color: var(--orange); }
footer .grid { border-bottom-color: rgba(255,255,255,.09); }

footer .socials a {
  width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: #fff;
}
footer .socials a:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  transform: translateY(-3px);
}
.footer-bottom { border-top-color: rgba(255,255,255,.09); }
.footer-bottom a:hover { color: var(--orange); }
.footer-credit-box-title { color: var(--orange); }
.footer-credit-box--thanks .footer-credit-box-title i { color: var(--orange); }

@media (max-width: 768px) { :root { --hero-fade: 120px; --footer-fade: 110px; } }
@media (max-width: 480px) { :root { --hero-fade: 90px;  --footer-fade: 90px;  } }

/* ---------- HERO: tipografi & rata kiri ---------- */
.hero-content { text-align: left; margin-left: 0; margin-right: auto; align-items: flex-start; }
@media (min-width: 901px) {
  .hero .container { padding-left: 56px; padding-right: 56px; }
  .hero-content { max-width: 900px; }
  .hero-content h1 { max-width: 650px; }
  .hero-content p  { max-width: 900px; }
}
@media (max-width: 900px) { .hero .container { padding-left: 32px; padding-right: 32px; } }
@media (max-width: 600px) {
  .hero .container { padding-left: 22px; padding-right: 22px; }
  .hero-content h1 { font-size: clamp(32px, 9vw, 40px); line-height: 1.1; }
  .hero-content p  { font-size: 15px; line-height: 1.7; }
}

/* ---------- LOKASI: section gelap, aksen oren ---------- */
.location-section {
  background: var(--footer-bg);
  color: #fff;
  padding: 70px 0 75px;
}
.location-section .section-heading .tag { color: var(--orange); }
.location-section .section-heading h2 { color: #fff; }
.location-section .section-heading p { color: rgba(255,255,255,.90); }

.location-section .map-embed.home-map {
  border-radius: 18px;
  overflow: hidden;
  background: #11162e;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.location-section .map-embed.home-map:hover {
  box-shadow: 0 14px 36px rgba(0,0,0,.28), 0 0 0 1px rgba(255,114,0,.30);
}

.location-section .loc-item {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.12);
}
.location-section .loc-item:hover {
  border-color: rgba(255,114,0,.45);
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
}
.location-section .loc-icon { background: var(--orange-soft); color: var(--orange); }
.location-section .loc-item:hover .loc-icon { background: var(--orange); color: #fff; }
.location-section .loc-item h4 { color: #fff; }
.location-section .loc-item p { color: rgba(255,255,255,.72); }

/* beranda: footer menyatu dengan Lokasi gelap (tanpa pita terang di atasnya) */
/* (v68) lokasi kini ada di dalam footer; aturan footer khusus beranda dihapus */

@media (max-width: 600px) {
  .location-section { padding: 45px 0 50px; }
  .location-section .map-embed.home-map iframe { min-height: 300px; }
}

/* ---------- KARTU BERITA: judul biru, hover oren ---------- */
.news-card h5 a { color: var(--navy-steel); }
.news-card h5 a:hover { color: var(--orange); }

/* =====================================================================
   V21 - BATAS MINIMUM UKURAN TEKS
   Desktop  : tidak ada teks di bawah 12px  (ditangani di deklarasi dasar)
   Mobile   : tidak ada teks di bawah 13px  (blok di bawah ini, <= 768px)
   Ikon (<i>) tidak termasuk; hanya teks yang bisa dibaca.
   ===================================================================== */
@media (max-width: 768px) {
  .splash-eyebrow,
  .splash-weather-loc,
  .splash-weather-detail,
  .splash-weather-error,
  .splash-datetime,
  .elearning-modal-eyebrow,
  .kategori-badge,
  .hero-stats div > span,
  .page-banner .eyebrow,
  .hero-content .eyebrow,
  .section-heading .tag,
  .profile-section .content .tag,
  .stats .label,
  .news-toolbar-field label,
  .news-card .meta,
  .news-card .meta span,
  .news-card .footer,
  .btn-like,
  .btn-share,
  .spmb-state .eyebrow,
  .spmb-tahun,
  .footer-bottom,
  .footer-copyright,
  .footer-maker,
  .footer-maker a,
  .footer-maker strong,
  .footer-maker-message,
  .footer-credit-ref,
  .footer-credit-ref strong,
  .footer-credit-box-title,
  .footer-presented-by,
  .aiga-status,
  .aiga-disclaimer,
  .person-sub,
  .sosmed-platform-badge,
  .sosmed-meta,
  .kritik-counter,
  .komentar-waktu,
  .struktur-item p,
  .profil-subnav a,
  .menu-panel-logo small,
  .lang-toggle-opt {
    font-size: 13px;
  }
}


/* =====================================================================
   V23 â€” ANIMASI HEADER, BIRU CERAH (TERANG) / BIRU TUA (MALAM),
         TEKS GELAP DI MODE MALAM -> PUTIH, TRANSISI MATAHARI TERBIT/TENGGELAM
   Tidak mengubah struktur v17-v22; hanya menimpa warna & menambah animasi.
   ===================================================================== */

/* ---------- 0) TOKEN PER MODE ---------- */
:root {
  /* latar section ber-grid (hero, banner halaman, SPMB): BIRU CERAH */
  --gs-a: #0d5bd1;
  --gs-b: #1a6de0;
  --gs-c: #2b80ec;
  --gs-glow: rgba(150, 205, 255, 0.45);
  --gb-rgb: 26, 109, 224;               /* warna pemudaran blur grid */
  --grid-line: rgba(255, 255, 255, 0.17);
  --eyebrow-on-grid: #ffe6c2;           /* oren pucat: terbaca di atas biru cerah */

  /* teks judul: navy di mode terang, putih di mode malam */
  --heading-strong: var(--navy);

  /* animasi header: satu siklus, lalu jeda */
  --hdr-cycle: 7s;
  --ring-c1: rgba(47, 134, 240, 0.9);   /* ekor: biru */
  --ring-c2: #ff8a1f;                   /* kepala: oren */
  --fx-sweep: block;                    /* kilau diagonal (terang) */
  --fx-spark: none;                     /* bintang berkedip (malam) */
  --logo-img-anim: logoGlowLight var(--hdr-cycle) ease-in-out infinite;
}
:root[data-theme="dark"] {
  --gs-a: #050f22;
  --gs-b: #0b1e3c;
  --gs-c: #0f2a55;
  --gs-glow: rgba(74, 144, 226, 0.28);
  --gb-rgb: 5, 15, 34;
  --grid-line: rgba(255, 255, 255, 0.06);
  --eyebrow-on-grid: var(--orange);
  --heading-strong: #ffffff;
  --ring-c1: rgba(74, 144, 226, 0.9);
  --ring-c2: #f3d27a;
  --fx-sweep: none;
  --fx-spark: block;
  --logo-img-anim: logoBlinkDark var(--hdr-cycle) ease-in-out infinite;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --gs-a: #050f22;
    --gs-b: #0b1e3c;
    --gs-c: #0f2a55;
    --gs-glow: rgba(74, 144, 226, 0.28);
    --gb-rgb: 5, 15, 34;
    --grid-line: rgba(255, 255, 255, 0.06);
    --eyebrow-on-grid: var(--orange);
    --heading-strong: #ffffff;
    --ring-c1: rgba(74, 144, 226, 0.9);
    --ring-c2: #f3d27a;
    --fx-sweep: none;
    --fx-spark: block;
    --logo-img-anim: logoBlinkDark var(--hdr-cycle) ease-in-out infinite;
  }
}

/* ---------- 1) HEADER: logo bersinar + garis keliling ---------- */
.logo-wrap { position: relative; --logo-size: 46px; }
@media (max-width: 768px) { .logo-wrap { --logo-size: 42px; } }
.logo-wrap .logo-media {
  animation: var(--logo-img-anim);
}
.logo-wrap:hover .logo-media { animation-play-state: paused; }

/* MODE TERANG — sapuan kilau diagonal, kiri atas -> kanan bawah */
.logo-wrap::before {
  content: "";
  display: var(--fx-sweep);
  position: absolute;
  left: 0;
  top: 50%;
  width: var(--logo-size);
  height: var(--logo-size);
  margin-top: calc(var(--logo-size) / -2);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(135deg,
    transparent 40%,
    rgba(255, 255, 255, 0.0) 43%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0.0) 57%,
    transparent 60%) 80% 80% / 320% 320% no-repeat;
  opacity: 0;
  animation: logoSweep var(--hdr-cycle) linear infinite;
}
@keyframes logoSweep {
  0%   { background-position: 80% 80%; opacity: 0; }
  2%   { opacity: 1; }
  15%  { background-position: 20% 20%; opacity: 1; }
  17%, 100% { background-position: 20% 20%; opacity: 0; }
}
@keyframes logoGlowLight {
  0%, 2%, 22%, 100% { filter: none; }
  9%  { filter: brightness(1.16) saturate(1.2) drop-shadow(0 0 7px rgba(74, 144, 226, 0.7)); }
}

/* MODE MALAM — logo shiny berkedip + bintang kecil berkilau */
@keyframes logoBlinkDark {
  0%, 26%, 100% { filter: none; }
  4%  { filter: brightness(1.7) drop-shadow(0 0 10px rgba(243, 210, 122, 0.95)); }
  7%  { filter: brightness(1.0); }
  11% { filter: brightness(1.9) drop-shadow(0 0 14px rgba(243, 210, 122, 1)); }
  15% { filter: brightness(1.05); }
  19% { filter: brightness(1.5) drop-shadow(0 0 9px rgba(243, 210, 122, 0.85)); }
  23% { filter: brightness(1.0); }
}
.logo-wrap::after {
  content: "";
  display: var(--fx-spark);
  position: absolute;
  left: calc(var(--logo-size) * 0.66);
  top: calc(50% - var(--logo-size) * 0.5 - 4px);
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 3;
  background:
    radial-gradient(circle, #fff 0 2px, rgba(255, 255, 255, 0) 5px),
    linear-gradient(90deg, transparent 0, rgba(255, 240, 190, 0.95) 50%, transparent 100%) center / 100% 2px no-repeat,
    linear-gradient(0deg,  transparent 0, rgba(255, 240, 190, 0.95) 50%, transparent 100%) center / 2px 100% no-repeat;
  filter: drop-shadow(0 0 4px #ffd76a);
  opacity: 0;
  transform: scale(0) rotate(0deg);
  animation: sparkTwinkle var(--hdr-cycle) ease-in-out infinite;
}
@keyframes sparkTwinkle {
  0%, 26%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  4%  { opacity: 1; transform: scale(1)   rotate(30deg); }
  8%  { opacity: 0; transform: scale(0.2) rotate(60deg); }
  11% { opacity: 1; transform: scale(1.15) rotate(90deg); }
  15% { opacity: 0; transform: scale(0.2) rotate(120deg); }
  19% { opacity: 1; transform: scale(0.9) rotate(150deg); }
  23% { opacity: 0; transform: scale(0) rotate(180deg); }
}

/* Garis cahaya mengelilingi header (4 sisi, kecepatan rata):
   atas kiri->kanan, kanan atas->bawah, bawah kanan->kiri, kiri bawah->atas */
header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background-image:
    linear-gradient(to right,  transparent 38%, var(--ring-c1) 52%, var(--ring-c2) 56%, transparent 57%),
    linear-gradient(to bottom, transparent 38%, var(--ring-c1) 52%, var(--ring-c2) 56%, transparent 57%),
    linear-gradient(to left,   transparent 38%, var(--ring-c1) 52%, var(--ring-c2) 56%, transparent 57%),
    linear-gradient(to top,    transparent 38%, var(--ring-c1) 52%, var(--ring-c2) 56%, transparent 57%);
  background-size: 300% 2px, 2px 300%, 300% 2px, 2px 300%;
  background-repeat: no-repeat;
  background-position: 83% 0, 100% 83%, 17% 100%, 0 17%;
  filter: drop-shadow(0 0 3px var(--ring-c2));
  opacity: 0;
  animation: hdrRing var(--hdr-cycle) linear infinite;
}
@keyframes hdrRing {
  0%   { background-position: 83% 0, 100% 83%, 17% 100%, 0 17%; opacity: 1; }
  23%  { background-position: 17% 0, 100% 83%, 17% 100%, 0 17%; }
  26%  { background-position: 17% 0, 100% 17%, 17% 100%, 0 17%; }
  49%  { background-position: 17% 0, 100% 17%, 83% 100%, 0 17%; }
  53%  { background-position: 17% 0, 100% 17%, 83% 100%, 0 83%; opacity: 1; }
  55%, 100% { background-position: 17% 0, 100% 17%, 83% 100%, 0 83%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  header::after,
  .logo-wrap::before,
  .logo-wrap::after,
  .logo-wrap .logo-media { animation: none !important; }
  header::after, .logo-wrap::before, .logo-wrap::after { display: none; }
}

/* ---------- 2) SECTION BER-GRID: biru cerah (terang) / biru tua (malam) ---------- */
.hero {
  background:
    radial-gradient(1100px 600px at 82% -10%, var(--gs-glow), transparent 60%),
    linear-gradient(180deg, var(--gs-a) 0%, var(--gs-b) 50%, var(--gs-c) 100%);
}
.page-banner {
  background:
    radial-gradient(900px 500px at 85% -20%, var(--gs-glow), transparent 60%),
    linear-gradient(180deg, var(--gs-b) 0%, var(--gs-a) 100%);
}
.spmb-hero {
  background:
    radial-gradient(1100px 600px at 82% -10%, var(--gs-glow), transparent 60%),
    linear-gradient(180deg, var(--gs-b) 0%, var(--gs-a) 100%);
}
/* pemudaran blur di dasar grid mengikuti warna section */
.hero-grid-blur,
.page-banner-grid-blur,
.spmb-grid-blur {
  background: linear-gradient(180deg,
    rgba(var(--gb-rgb), 0)    0%,
    rgba(var(--gb-rgb), 0.10) 40%,
    rgba(var(--gb-rgb), 0.38) 75%,
    rgba(var(--gb-rgb), 0.62) 100%);
}
.hero-content .eyebrow,
.page-banner .eyebrow { color: var(--eyebrow-on-grid); }

/* ---------- 3) MODE MALAM: teks navy gelap -> putih (biru terang tetap biru) ---------- */
.section-heading h2,
.page-body h2,
.person-card h5,
.loc-item h4,
.berita-internet-label,
.back-link:hover { color: var(--heading-strong); }

/* ---------- 4) TRANSISI MODE: MATAHARI TENGGELAM / TERBIT ---------- */
.tfx {
  position: fixed;
  inset: 0;
  z-index: 100000;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
}
.tfx.is-on {
  visibility: visible;
  pointer-events: auto;
  animation: tfxOverlay 2.05s linear both;
}
@keyframes tfxOverlay {
  0%   { opacity: 0; }
  12%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}
.tfx > * { will-change: transform, opacity; }
.tfx-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    #4aa8ff 0%, #8fd0ff 12%, #cfe9ff 22%, #ffd9a0 34%, #ff9d5c 44%,
    #ff6f61 52%, #b04a8f 62%, #4b2f7a 72%, #1a2350 84%, #050f22 100%);
  background-size: 100% 420%;
  background-position: 0 0;
  animation: tfxSky 1.3s 0.25s ease-in-out both;
}
@keyframes tfxSky { from { background-position: 0 0; } to { background-position: 0 100%; } }

.tfx-stars {
  position: absolute;
  inset: 0 0 38% 0;
  opacity: 0;
  animation: tfxStars 1.3s 0.25s ease-in both;
}
@keyframes tfxStars { 0%, 40% { opacity: 0; } 100% { opacity: 1; } }
.tfx-star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
  animation: tfxTwinkle 1.6s ease-in-out infinite;
}
@keyframes tfxTwinkle { 0%, 100% { opacity: 0.35; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.25); } }

.tfx-moon {
  position: absolute;
  right: 14vw;
  top: 13vh;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  box-shadow: inset -18px -6px 0 0 #f6f1d5;
  filter: drop-shadow(0 0 14px rgba(246, 241, 213, 0.55));
  opacity: 0;
  animation: tfxMoon 1.3s 0.25s ease-out both;
}
@keyframes tfxMoon {
  0%, 45% { opacity: 0; transform: translateY(70px) scale(0.8); }
  100%    { opacity: 1; transform: translateY(0) scale(1); }
}

.tfx-sun {
  --S: min(30vmin, 220px);
  position: absolute;
  left: 50%;
  top: 22vh;
  width: var(--S);
  height: var(--S);
  margin-left: calc(var(--S) / -2);
  animation: tfxSun 1.3s 0.25s ease-in-out both;
}
@keyframes tfxSun { from { transform: translateY(0); } to { transform: translateY(66vh); } }
.tfx-rays {
  position: absolute;
  inset: -70%;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 230, 140, 0.55) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, transparent 0 22%, #000 27%, transparent 70%);
          mask: radial-gradient(circle, transparent 0 22%, #000 27%, transparent 70%);
  animation: tfxSpin 9s linear infinite;
}
@keyframes tfxSpin { to { transform: rotate(360deg); } }
.tfx-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fffbe0 0%, #ffe066 38%, #ffb020 72%, #ff8a00 100%);
  box-shadow: 0 0 40px 16px rgba(255, 190, 60, 0.65), 0 0 120px 60px rgba(255, 150, 40, 0.35);
  animation: tfxDisc 1.3s 0.25s ease-in-out both;
}
@keyframes tfxDisc { from { filter: none; } to { filter: hue-rotate(-28deg) saturate(1.5) brightness(0.92); } }

.tfx-hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 30vh;
}
.tfx-hills .h1 { fill: #2a6fb0; animation: tfxHill1 1.3s 0.25s ease-in-out both; }
.tfx-hills .h2 { fill: #12467f; animation: tfxHill2 1.3s 0.25s ease-in-out both; }
@keyframes tfxHill1 { from { fill: #2a6fb0; } to { fill: #0a1a38; } }
@keyframes tfxHill2 { from { fill: #12467f; } to { fill: #030a18; } }

/* Terbit = urutan yang sama dimainkan mundur */
.tfx.is-sunrise .tfx-sky,
.tfx.is-sunrise .tfx-stars,
.tfx.is-sunrise .tfx-moon,
.tfx.is-sunrise .tfx-sun,
.tfx.is-sunrise .tfx-disc,
.tfx.is-sunrise .tfx-hills .h1,
.tfx.is-sunrise .tfx-hills .h2 { animation-direction: reverse; }

@media (prefers-reduced-motion: reduce) { .tfx { display: none !important; } }

/* =========================================================================
   ADAPTIVE PERFORMANCE â€” mengikuti tier yang dideteksi js/perf-detect.js
   dari RAM, jumlah core CPU, dan kecepatan koneksi pengunjung. Diterapkan
   via atribut <html data-perf="low|mid|high"> yang di-set SANGAT AWAL
   (inline <script> di <head>, sebelum stylesheet ini dimuat) supaya tidak
   ada efek berat yang sempat kelihatan sebentar lalu tiba-tiba dimatikan.

   Prinsip: "mid" & "high" = tampilan penuh seperti sekarang (tidak diubah).
   "low" (RAM/CPU kecil dan/atau koneksi lambat/hemat data) = matikan efek
   yang paling mahal di GPU/CPU lemah -- terutama backdrop-filter (blur di
   belakang elemen, sangat berat di perangkat low-end) dan animasi dekoratif
   infinite yang terus-menerus memaksa repaint walau tidak esensial untuk
   memahami konten.
   ========================================================================= */
:root[data-perf="low"] * {
  /* backdrop-filter (topbar transparan, splash, modal, dsb) adalah salah
     satu efek termahal untuk GPU low-end -- matikan total di tier low. */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

:root[data-perf="low"] .hero-grid,
:root[data-perf="low"] .page-grid-blur,
:root[data-perf="low"] .hero-grid-blur,
:root[data-perf="low"] .spmb-grid,
:root[data-perf="low"] .top-bar::after,
:root[data-perf="low"] .logo-wrap .logo-media,
:root[data-perf="low"] .hero-glow,
:root[data-perf="low"] .news-card::before,
:root[data-perf="low"] .news-card .kategori-badge,
:root[data-perf="low"] .news-card .meta .fa-medal,
:root[data-perf="low"] .bubble--gold,
:root[data-perf="low"] .bubble--blue,
:root[data-perf="low"] .section-grid-pulse {
  animation: none !important;
}

:root[data-perf="low"] .hero-glow,
:root[data-perf="low"] .stats::after {
  filter: none !important;
}

/* Ripple klik & ledakan partikel klik: dekoratif murni, cukup mahal saat
   banyak elemen dibuat beruntun di CPU lemah -- nonaktifkan di tier low
   (link "aksesibilitas gerak" ditangani terpisah lewat prefers-reduced-motion,
   ini murni soal beban perangkat, bukan preferensi gerak pengguna).
   Catatan: .bubble di sini adalah gelembung dekorasi latar mode malam
   (.bubble--gold/.bubble--blue), BUKAN balon chat Aiga (.aiga-msg .bubble)
   -- keduanya kebetulan berbagi nama class, jadi disasar lewat modifier
   agar balon chat tidak ikut hilang. */
:root[data-perf="low"] .ripple,
:root[data-perf="low"] .click-burst,
:root[data-perf="low"] .bubble--gold,
:root[data-perf="low"] .bubble--blue {
  display: none !important;
}

/* Reveal & stats-pop tetap muncul (penting untuk keterbacaan konten),
   tapi versi lebih ringan: durasi lebih pendek, tanpa filter blur. */
:root[data-perf="low"] .reveal-scale-fade {
  filter: none !important;
  transition-duration: 0.35s !important;
}
:root[data-perf="low"] .reveal,
:root[data-perf="low"] .reveal-zoom,
:root[data-perf="low"] .reveal-left,
:root[data-perf="low"] .reveal-right,
:root[data-perf="low"] .reveal-stagger > * {
  transition-duration: 0.3s !important;
}

/* Efek magnetic-hover (kartu mengikuti kursor) hanya berlaku di perangkat
   dengan mouse presisi (lihat main.js), jadi tidak perlu digate di sini --
   HP tidak pernah menjalankannya sejak awal. */


/* =====================================================================
   DESKTOP FIX (>= 769px saja) â€” menu, logo, hero
   - Menu 1 baris (tidak turun ke baris kedua), posisi rapi & merata
   - Kotak menu aktif/hover jadi BIRU
   - Logo, teks logo, menu, dan hero rata kiri di garis yang sama
   - Ruang kosong berlebih di header & hero dipangkas
   Mobile (<= 768px) TIDAK tersentuh.
   ===================================================================== */
@media (min-width: 769px) {

  /* ---------- HEADER: logo + teks rata kiri, lebih ringkas ---------- */
  .main-nav { padding: 8px 0; }
  .main-nav .flex { min-height: 0; gap: 14px; justify-content: flex-start; }
  .logo-wrap {
    flex: 1 1 auto;
    justify-content: flex-start;
    text-align: left;
  }
  .logo-text { align-items: flex-start; text-align: left; }
  .main-nav .nav-search { margin-left: auto; }

  /* ---------- MENU: satu baris, rata & tidak ada sisa ruang ---------- */
  nav.primary-menu ul {
    flex-wrap: nowrap;              /* cegah turun ke baris 2 */
    justify-content: space-between; /* sebar rata dari kiri ke kanan container */
    align-items: center;
    gap: 0;
    padding: 5px 0;
  }
  nav.primary-menu ul > li { flex: 0 1 auto; }
  nav.primary-menu ul > li > a {
    white-space: nowrap;
    justify-content: center;
    gap: 6px;
    padding: 9px clamp(7px, 0.85vw, 15px);
    font-size: clamp(12.5px, 1.05vw, 14.5px);
    color: rgba(255, 255, 255, 0.92);
  }

  /* Kotak aktif & hover = BIRU */
  nav.primary-menu ul > li > a:hover {
    background: var(--blue-soft-desktop, rgba(74, 144, 226, 0.22));
    color: #fff;
  }
  nav.primary-menu ul > li.active > a,
  nav.primary-menu ul > li.active > a:hover {
    background: var(--accent-desktop, var(--navy-steel));
    color: #fff;
    box-shadow: 0 6px 14px -8px var(--blue-glow-desktop, rgba(30, 95, 204, 0.55));
  }
  /* garis bawah animasi: putih di atas kotak biru */
  nav.primary-menu ul > li > a::after { background: #fff; bottom: 3px; }

  /* tombol titik tiga ikut rapi */
  .nav-more { margin-left: 0; }
  .nav-more-trigger:hover,
  .nav-more.dropdown:hover .nav-more-trigger,
  .nav-more.dropdown:focus-within .nav-more-trigger {
    background: var(--blue-soft-desktop, rgba(74, 144, 226, 0.22));
  }

  /* ---------- HERO: rata kiri, sejajar dengan logo & menu ---------- */
  .hero {
    min-height: 0;                          /* tinggi ikut isi, tidak dipaksa 480px */
    padding: 56px 0 calc(var(--hero-fade, 170px) - 70px);
  }
  .hero .container {
    padding-left: 20px !important;          /* sama dengan container header */
    padding-right: 20px !important;
  }
  .hero-content {
    max-width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
    align-items: flex-start;
  }
  .hero-content .eyebrow { margin-bottom: 14px; }
  .hero-content h1 {
    max-width: none;                        /* "SMK Negeri 1 Ampelgading" muat 1 baris */
    margin: 0 0 14px;
    text-align: left;
  }
  .hero-content p {
    max-width: 62ch;
    margin: 0 0 24px;
    text-align: left;
  }
}


/* =====================================================================
   DESKTOP POLISH (>= 769px saja) â€” layout & komposisi warna
   Palet: NAVY (dasar) + BIRU (aksen & nav, sesuai permintaan header biru).
   Ritme jarak antar section dibuat seragam. Mobile tidak tersentuh.
   ===================================================================== */
@media (min-width: 769px) {

  :root {
    --section-pad: 64px;      /* jarak atas-bawah seragam antar section */
    --gap: 24px;              /* jarak antar kartu */
    --accent-desktop: var(--navy-steel, #ffffff);
    --blue-soft-desktop: rgba(74, 144, 226, 0.22);
    --blue-glow-desktop: rgba(30, 95, 204, 0.55);
  }

  /* ---------- 1) Container: satu lebar & satu garis kiri untuk semua ---------- */
  .container { max-width: 1240px; padding: 0 24px !important; }
  .container.narrow { max-width: 860px; }
  .hero .container { padding-left: 24px !important; padding-right: 24px !important; }

  /* ---------- 2) Header: bersih & ringkas ---------- */
  .main-nav { padding: 8px 0; }
  .logo-wrap .logo-media { width: 50px; height: 50px; }
  .logo-text .school-name { font-size: 18px; }
  .logo-text small { font-size: 12px; letter-spacing: 0.1em; }
  .nav-search input { width: 190px; }
  .nav-search button { background: var(--navy-steel); }
  .nav-search button:hover { background: var(--accent-desktop); }

  /* ---------- 3) Hero: aksen biru, tombol & teks konsisten ---------- */
  .hero-content .eyebrow { color: #ffffff, var(--accent-desktop); letter-spacing: 0.1em; }
  .hero-content h1 { font-size: clamp(36px, 3.6vw, 52px); }
  .hero-content p { color: rgba(255, 255, 255, 0.88); font-size: 17px; }
  .hero-stats { margin-top: 28px; padding-top: 20px; }

  /* ---------- 4) Ritme section seragam ---------- */
  .features,
  .profile-section,
  .news-section { padding: var(--section-pad) 0; }
  .stats { padding: 44px 0; }

  .section-heading {
    max-width: 720px;
    margin: 0 0 36px;
    text-align: left;
  }
  .section-heading .tag { color: var(--accent-desktop); }
  .section-heading h2 { margin: 10px 0 8px; color: var(--navy); }
  .section-heading p { font-size: 16px; }

  /* ---------- 5) Kartu: tinggi sama, jarak sama, tampilan sama ---------- */
  .features .grid { gap: var(--gap); margin-top: 0; align-items: stretch; }
  .feature-card {
    padding: 28px 26px;
    height: 100%;
    border-radius: var(--radius);
    box-shadow: 0 6px 18px -12px rgba(11, 37, 69, 0.18);
  }
  .feature-card:hover { transform: translateY(-5px); }
  .feature-card p { line-height: 1.65; }

  .news-grid { gap: var(--gap); align-items: stretch; }
  .news-card { border-radius: var(--radius); }

  /* ---------- 6) Profil: teks & gambar seimbang ---------- */
  .profile-section .flex { gap: 48px; align-items: center; }
  .profile-section .img-wrap { flex: 0 0 44%; }
  .profile-section .content { text-align: left; }
  .profile-section .content .tag { color: var(--accent-desktop); }
  .profile-section .content h3 { font-size: 26px; color: #ff6b00; }
  .profile-section .content p { margin-bottom: 16px; }

  /* ---------- 7) Stats: aksen biru senada dengan nav ---------- */
  .stats {
    background:
      radial-gradient(circle at 85% 15%, rgba(74, 144, 226, 0.16), transparent 55%),
      var(--navy-deep);
  }
  .stats .num {
    color: #fff;
    text-shadow: 0 0 24px rgba(74, 144, 226, 0.45);
    font-weight: 700;
  }
  .stats .label { color: rgba(255, 255, 255, 0.78); }
  .stats .grid > div:not(:last-child)::after { background: rgba(255, 255, 255, 0.14); }

  /* ---------- 8) Footer: rapi, tautan hover biru ---------- */
  footer { padding: 52px 0 18px; }
  footer .grid { gap: 36px; align-items: start; }
  footer h4 { color: #fff; }
  footer ul li a:hover { color: var(--blue-light, var(--accent-desktop)); }
  footer .socials a:hover { background: var(--accent-desktop); color: #fff; }

  /* ---------- 9) Ikon sparkles "Assistant Aiga" ikut biru muda ---------- */
  nav.primary-menu ul > li[data-route="aiga"] > a i.fa-sparkles { color: #9cc3ff; }
}


/* =====================================================================
   FIX BOX HALAMAN DALAM (Profil: Sejarah, Visi & Misi, dst) â€” DESKTOP
   Memperbaiki padding box yang tertimpa aturan .container sebelumnya,
   dan memberi napas yang cukup antara tab, judul, dan isi.
   ===================================================================== */
@media (min-width: 769px) {

  .page-body { padding: 48px 0 72px; }

  /* Box utama: padding sendiri, tidak ikut aturan .container umum */
  .page-body .container.narrow {
    max-width: 940px;
    padding: 40px 48px 44px !important;
    border-radius: 20px;
    box-sizing: border-box;
  }

  /* Tab Sejarah / Visi & Misi / Fasilitas / Struktur */
  .profil-subnav {
    gap: 12px;
    margin: 0 0 32px;
    padding: 0 0 24px;
    border-bottom: 1px solid var(--hairline);
  }
  .profil-subnav a {
    padding: 11px 20px;
    font-size: 14px;
  }

  /* Judul bagian */
  .page-body h2 {
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--hairline);
  }
  .page-body h2:first-child { margin-top: 0; }
  .page-body h2:not(:first-child) { margin-top: 40px; }
  .page-body h2::after { margin-top: 12px; }

  /* Paragraf: nyaman dibaca, ada jarak antar paragraf */
  .page-body p {
    line-height: 1.85;
    margin-bottom: 18px;
  }
  .page-body p:last-child { margin-bottom: 0; }

  /* Daftar & kartu di dalam box */
  .bullet-list { margin-top: 16px; }
  .struktur-grid { gap: 20px; margin-top: 24px; }
  .struktur-item { padding: 20px 22px; }
}


/* =====================================================================
   REVISI: FONT POPPINS, WARNA BAR MENU/STATS BIRU, HERO 2 BARIS,
           LOKASI + FORM "HUBUNGI KAMI" (ringkas), FOOTER GARIS TEGAS
   Semua DESKTOP saja (>= 769px).
   Sesuai permintaan: header & nav menu dibuat biru.
   ===================================================================== */
@media (min-width: 769px) {

  /* ---------- 1) Warna "kotak paling belakang" menu & stats (satu warna biru, senada) ---------- */
  :root {
    --bar-bg: linear-gradient(180deg, #0f3d8c 0%, #0a2552 100%);
    --bar-line: rgba(255, 255, 255, 0.12);
  }

  nav.primary-menu {
    background: var(--bar-bg);
    border-top: 1px solid var(--bar-line);
    border-bottom: 1px solid rgba(0, 0, 0, 0.18);
    box-shadow: 0 8px 20px -14px rgba(5, 20, 50, 0.55);
  }

  /* ---------- 2) Poppins: header, menu, hero, stats, lokasi ---------- */
  :is(header, nav.primary-menu, .hero, .stats, .location-section) {
    --font-display: 'Poppins', 'Segoe UI', Roboto, Arial, sans-serif;
    --font-body: 'Poppins', 'Segoe UI', Roboto, Arial, sans-serif;
    font-family: 'Poppins', 'Segoe UI', Roboto, Arial, sans-serif;
  }
  :is(header, nav.primary-menu, .hero, .stats, .location-section)
  :is(h1, h2, h3, h4, h5, p, a, span, strong, small, div, label, input, textarea, button, li) {
    font-family: 'Poppins', 'Segoe UI', Roboto, Arial, sans-serif;
  }

  /* Poppins lebih lebar dari Inter -> menu diperkecil sedikit agar tetap 1 baris */
  nav.primary-menu ul > li > a {
    font-weight: 500;
    font-size: clamp(11.5px, 0.9vw, 12.5px);
    padding: 9px clamp(5px, 0.5vw, 8px);
    gap: 5px;
  }
  .logo-text .school-name { font-weight: 700; letter-spacing: 0; }
  .logo-text small { font-weight: 500; }

  /* ---------- 3) Hero: judul 2 baris ---------- */
  .hero-content h1 {
    font-weight: 700;
    font-size: clamp(38px, 4vw, 56px);
    line-height: 1.12;
    letter-spacing: -0.01em;
    max-width: 9em;               /* memaksa pecah: "SMK Negeri 1" / "Ampelgading" */
  }
  .hero-content p { font-weight: 400; line-height: 1.75; }
  .hero-content .eyebrow { font-weight: 600; }
  .hero-stats strong { font-weight: 700; }

  /* ---------- 4) Stats: warna sama dengan menu (biru), semua teks putih ---------- */
  .stats {
    background: var(--bar-bg);
    border-top: 1px solid var(--bar-line);
    border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  }
  .stats .num {
    color: #fff;
    font-weight: 700;
  }
  .stats .label {
    color: #fff;
    font-weight: 500;
    font-size: 13.5px;
    letter-spacing: 0.02em;
    opacity: 0.95;
  }
  .stats .grid > div:not(:last-child)::after { background: rgba(255, 255, 255, 0.18); }

  /* ---------- 5) LOKASI: lebih ringkas ---------- */
  .location-section { padding: 44px 0 48px; }
  .location-section .section-heading { margin-bottom: 24px; max-width: 620px; }
  .location-section .section-heading .tag { font-size: 11.5px; }
  .location-section .section-heading h2 { font-size: clamp(22px, 2.2vw, 28px); margin: 8px 0 6px; }
  .location-section .section-heading h2::after { width: 40px; height: 3px; margin-top: 8px; }
  .location-section .section-heading p { font-size: 14px; line-height: 1.6; }

  .location-wrap { grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: stretch; }
  .location-section .map-embed.home-map { border-radius: 16px; }
  .location-section .map-embed.home-map iframe { min-height: 300px; height: 300px; }
  .location-section .map-embed-cta { padding: 11px; font-size: 13px; }

  /* ---------- 6) Form HUBUNGI KAMI ---------- */
  .location-section .hubungi-kami {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 22px 24px 24px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
  }
  .hubungi-kami h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
  }
  .hubungi-kami .hubungi-sub {
    margin: 0 0 16px;
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.70);
  }
  .hubungi-kami form { display: flex; flex-direction: column; gap: 12px; flex: 1; }
  .hubungi-kami .field { display: flex; flex-direction: column; gap: 5px; }
  .hubungi-kami label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
  }
  .hubungi-kami input,
  .hubungi-kami textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    font-size: 13.5px;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  }
  .hubungi-kami textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
  .hubungi-kami input::placeholder,
  .hubungi-kami textarea::placeholder { color: rgba(255, 255, 255, 0.40); }
  .hubungi-kami input:focus,
  .hubungi-kami textarea:focus {
    border-color: var(--blue-light, #4a90e2);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.25);
  }
  .hubungi-kami .btn-kirim {
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--navy-steel, #1e5fcc);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 10px 22px -12px rgba(30, 95, 204, 0.5);
    transition: background 0.2s ease, transform 0.2s ease;
  }
  .hubungi-kami .btn-kirim:hover { background: #164a9e; transform: translateY(-2px); }
  .hubungi-kami .form-status { min-height: 16px; margin: 0; font-size: 12px; color: #bcd6ff; }

  /* ---------- 7) FOOTER: tanpa blend, garis tegas biru ---------- */
  footer::before,
  body[data-route="beranda"] footer::before { background: none !important; }
  footer,
  body[data-route="beranda"] footer {
    margin-top: 0;
    padding-top: 52px;
    border-top: 3px solid var(--navy-steel, #1e5fcc);
  }
}


/* =====================================================================
   ANIMASI TAMBAHAN UNTUK ANGKA STATISTIK BERANDA (hero-stats + .stats)
   Melengkapi animasi scramble/count-up yang sudah ada di js/main.js â€”
   TIDAK menggantikannya. Efek ini murni visual (glow pulsa + pop-in
   ringan) yang menyala begitu angka selesai berhenti di nilai akhir,
   supaya perhatian pengunjung tertuju ke angka tanpa mengubah logika
   hitungnya. Dihormati prefers-reduced-motion bawaan browser.
   ===================================================================== */
@keyframes statNumberPopIn {
  0%   { transform: scale(0.82); opacity: 0; }
  60%  { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes statNumberGlowPulse {
  0%, 100% { text-shadow: 0 0 0 rgba(74, 144, 226, 0); }
  50%      { text-shadow: 0 0 22px rgba(74, 144, 226, 0.55); }
}

.hero-stats strong.scramble,
.stats .num.scramble {
  display: inline-block;
}

/* Glow pulsa dua kali setelah digit berhenti (durasi mendekati waktu
   scramble selesai di js/main.js: SPIN 1500ms + SETTLE antar-digit). */
.hero-stats strong.scramble {
  animation:
    statNumberPopIn 0.5s ease both,
    statNumberGlowPulse 1.1s ease-in-out 1.6s 2;
}

.stats .num.scramble {
  animation:
    statNumberPopIn 0.5s ease both,
    statNumberGlowPulse 1.1s ease-in-out 1.8s 2;
}

/* Garis bawah tipis yang "mengisi" di bawah tiap angka hero, sinkron
   dengan munculnya angka â€” penguat visual bahwa angka sedang "terisi". */
.hero-stats > div {
  position: relative;
}
.hero-stats > div::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--blue-light, #4a90e2), transparent);
  transform: scaleX(0);
  transform-origin: left;
  animation: heroStatUnderline 1.1s ease-out 0.15s both;
}
@keyframes heroStatUnderline {
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-stats strong.scramble,
  .stats .num.scramble,
  .hero-stats > div::before {
    animation: none !important;
  }
}

/* =====================================================================
   PROFIL SEKOLAH â€” pelebaran card putih supaya konten punya ruang lebih
   Hanya menyasar section Profil (data-page="profil"), tidak mengubah
   halaman .page-body lain yang memakai struktur .container.narrow sama.
   ===================================================================== */
section.page[data-page="profil"] .page-body .container.narrow {
  max-width: 1060px;
  padding: 32px 24px;
}

@media (min-width: 769px) {
  section.page[data-page="profil"] .page-body .container.narrow {
    max-width: 1100px;
    padding: 48px 64px 52px !important;
  }
}

@media (min-width: 1440px) {
  section.page[data-page="profil"] .page-body .container.narrow {
    max-width: 1180px;
  }
}

/* =========================================================
   KARTU KONTEN (Profil, Aiga, dll) â€” rapi, tidak mepet
   Kartu putih diberi jarak dari tepi layar di mobile, dan
   isi di dalamnya diberi padding dalam yang lega.
   ========================================================= */

/* Kartu profil / konten halaman: bingkai putih rapi dengan jarak tepi */
section.page[data-page="profil"] .page-body .container.narrow {
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 28px 24px !important;
  border-radius: 18px !important;
  border: 1px solid var(--card-border) !important;
  box-shadow: 0 12px 32px rgba(11,37,69,0.08) !important;
  background: var(--surface, #fff) !important;
}
@media (max-width: 480px) {
  section.page[data-page="profil"] .page-body .container.narrow {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    padding: 24px 20px !important;
    border-radius: 16px !important;
  }
}
@media (min-width: 993px) {
  section.page[data-page="profil"] .page-body .container.narrow {
    padding: 44px 52px !important;
  }
}

/* Halaman Aiga: tidak pakai bingkai kartu luar, cukup kotak chat-nya saja */
section.page[data-page="aiga"] .page-body .container.narrow {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  position: relative;
}

/* ---------------------------------------------------------------------
   Shape dekoratif tambahan di belakang aiga-shell: panel kotak bersudut
   tumpul, warna putih solid di mode terang dan navy gelap di mode malam
   (otomatis ikut var(--surface) seperti kartu lain), diposisikan dengan
   offset rapi di belakang kotak chat supaya terlihat seperti dua lapis
   kartu yang sinkron -- bukan background pengganti, murni aksen visual.
   Disembunyikan saat prefers-reduced-motion aktif kalau dianimasikan,
   dan otomatis menyesuaikan ukuran di breakpoint desktop/PC di bawah.
--------------------------------------------------------------------- */
section.page[data-page="aiga"] .page-body .container.narrow::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 20px);
  height: calc(100% + 20px);
  max-width: 620px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(11, 37, 69, 0.10);
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}

section.page[data-page="aiga"] .page-body .aiga-shell {
  position: relative;
  z-index: 1;
}

@media (min-width: 769px) {
  section.page[data-page="aiga"] .page-body .container.narrow::before {
    top: 26px;
    width: calc(100% - 36px);
    height: calc(100% + 32px);
    max-width: 680px;
    border-radius: 26px;
  }
}

@media (min-width: 1200px) {
  section.page[data-page="aiga"] .page-body .container.narrow::before {
    top: 32px;
    height: calc(100% + 40px);
    max-width: 720px;
    border-radius: 28px;
  }
}

@media (max-width: 480px) {
  section.page[data-page="aiga"] .page-body .container.narrow::before {
    top: 12px;
    width: calc(100% - 14px);
    height: calc(100% + 14px);
    border-radius: 18px;
  }
}

/* Isi kartu: jarak antar blok & tidak menempel ke tepi */
.profil-bagian.detail-content,
.detail-content {
  padding: 0;
}
.profil-subnav {
  margin-bottom: 26px;
  padding-bottom: 22px;
}
.profil-bagian h2 {
  margin-top: 28px;
}
.profil-bagian h2:first-child {
  margin-top: 0;
}
.profil-bagian p,
.profil-bagian li {
  margin-bottom: 14px;
}
.profil-bagian ul.bullet-list {
  padding-left: 22px;
  margin: 0 0 14px;
}

/* Kotak Aiga (chat): sama rapinya dengan kartu konten */
.aiga-shell {
  margin-left: auto;
  margin-right: auto;
  border-radius: 18px;
}
@media (max-width: 480px) {
  .aiga-shell {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    margin-left: auto;
    margin-right: auto;
    border-radius: 16px;
  }
}

/* =========================================================
   GAME CARD & GRID (halaman Game Edukatif: Catur & Tetris)
   Sebelumnya .game-grid/.game-card tidak punya styling sama
   sekali sehingga kartu tampil polos tanpa bingkai/bayangan.
   ========================================================= */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
  transition: var(--transition);
}
.game-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
:root[data-theme="dark"] .game-card {
  background: var(--paper);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .game-card {
    background: var(--paper);
  }
}

.game-thumb {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--on-dark);
  background: linear-gradient(145deg, var(--navy-steel), var(--navy));
  box-shadow: 0 6px 16px -6px rgba(11, 37, 69, 0.4);
}
.game-thumb--tetris {
  background: linear-gradient(145deg, #00d995, #0b2545);
}

.game-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.game-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-dark);
}
.game-body > p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.game-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.game-badge--live {
  background: rgba(16, 185, 129, 0.14);
  color: #0f9d6b;
}
:root[data-theme="dark"] .game-badge--live {
  background: rgba(16, 185, 129, 0.2);
  color: #4ade80;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .game-badge--live {
    background: rgba(16, 185, 129, 0.2);
    color: #4ade80;
  }
}

/* Wrapper game internal (catur-root / tetris-root) diberi jarak dari body card */
.game-body .catur-root,
.game-body .tetris-root {
  margin-top: 4px;
}

/* =========================================================
   PENCARIAN SITUS (tombol melayang + panel overlay)
   Sebelumnya tidak ada CSS sama sekali untuk .search-fab dan
   .site-search sehingga panel tampil berantakan di tengah halaman.
   ========================================================= */
.search-fab {
  position: fixed;
  left: 20px;
  bottom: 86px;
  z-index: 420;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--navy-steel-fixed);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: var(--transition);
}
.search-fab:hover {
  background: var(--navy);
  transform: translateY(-2px);
}
@media (max-width: 640px) {
  .search-fab {
    left: 16px;
    bottom: 76px;
    width: 46px;
    height: 46px;
    font-size: 16px;
  }
}

.site-search {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 20px 20px;
  opacity: 0;
  pointer-events: none;
  background: rgba(7, 28, 58, 0.55);
  backdrop-filter: blur(3px);
  transition: opacity 0.25s ease;
}
.site-search.open {
  opacity: 1;
  pointer-events: auto;
}

.site-search-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--card-border);
  overflow: hidden;
  transform: translateY(-12px);
  transition: transform 0.3s var(--ease);
}
.site-search.open .site-search-box {
  transform: translateY(0);
}
:root[data-theme="dark"] .site-search-box {
  background: var(--paper);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-search-box {
    background: var(--paper);
  }
}

.site-search-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-muted);
}
.site-search-head #siteSearchInput {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--text-dark);
  font-family: var(--font-body);
}
.site-search-close {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 8px;
  transition: var(--transition);
}
.site-search-close:hover {
  background: var(--surface-alt);
  color: var(--text-dark);
}

.site-search-results {
  overflow-y: auto;
  padding: 8px;
}
.site-search-hint {
  padding: 18px 12px;
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}
.site-search-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-dark);
  transition: background 0.15s ease;
}
.site-search-item:hover {
  background: var(--surface-alt);
}
.site-search-item .sr-tipe {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy-steel);
}
.site-search-item strong {
  font-size: 14.5px;
  font-weight: 600;
}
.site-search-item small {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* =========================================================
   MODAL DETAIL EKSTRAKURIKULER
   Sebelumnya tidak ada CSS untuk .ekskul-modal sehingga isi
   modal muncul sebagai teks polos menimpa halaman.
   ========================================================= */
.ekskul-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  background: rgba(7, 28, 58, 0.72);
  backdrop-filter: blur(3px);
  transition: opacity 0.3s ease;
}
.ekskul-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.ekskul-modal-box {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--card-border);
  padding: 24px 22px;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s var(--ease);
}
.ekskul-modal.open .ekskul-modal-box {
  transform: translateY(0) scale(1);
}
:root[data-theme="dark"] .ekskul-modal-box {
  background: var(--paper);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ekskul-modal-box {
    background: var(--paper);
  }
}

.ekskul-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface-alt);
  color: var(--text-dark);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.ekskul-close:hover {
  background: var(--card-border);
}

.ekskul-modal-body {
  padding-right: 6px;
  color: var(--text-dark);
}
.ekskul-modal-body h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 19px;
  padding-right: 32px;
}
.ekskul-modal-body h4 {
  margin: 16px 0 6px;
  font-size: 14px;
  color: var(--navy-steel);
}
.ekskul-modal-body p,
.ekskul-modal-body li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}
.ekskul-modal-body ul {
  padding-left: 20px;
  margin: 0;
}

.ekskul-foto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.ekskul-foto-grid img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: var(--radius-sm);
}
@media (max-width: 480px) {
  .ekskul-foto-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   KONTAK â€” kartu informasi (elemen, bukan teks polos)
   ============================================================ */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 10px 0 0;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  transition: var(--transition);
  min-width: 0;
}

a.contact-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

.contact-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-steel), var(--blue-light));
  color: #fff;
  font-size: 16px;
}

.contact-card-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-card-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-weight: 600;
}

.contact-card-value {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .contact-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   KRITIK & SARAN â€” gerbang login (sebelum card form muncul)
   ============================================================ */
.kritik-gate {
  max-width: 520px;
  margin: 0 auto 28px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  box-shadow: var(--shadow);
  text-align: center;
}

.kritik-gate[hidden],
.kritik-wrap[hidden] { display: none !important; }

.kritik-gate-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-steel), var(--blue-light));
  color: #fff;
  font-size: 20px;
}

.kritik-gate h3 { margin: 0 0 8px; }

.kritik-gate p {
  color: var(--ink-muted);
  font-size: 13.5px;
  margin: 0 0 22px;
  line-height: 1.6;
}

.kritik-gate form { text-align: left; }

.kritik-gate .kritik-feedback.is-visible { justify-content: center; }

/* ============================================================
   ASSISTANT AIGA â€” kartu chat dengan latar AI animatif
   Shape dekoratif memakai ::before bawaan halaman Aiga; wrapper
   dibuat transparan agar tidak ada kartu ganda.
   ============================================================ */
@property --aiga-c1 { syntax: "<color>"; inherits: true; initial-value: #1e5fcc; }
@property --aiga-c2 { syntax: "<color>"; inherits: true; initial-value: #e0bd6c; }
@property --aiga-c3 { syntax: "<color>"; inherits: true; initial-value: #4a90e2; }

section.page[data-page="aiga"] .page-body .container.narrow.aiga-stage {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 40px 28px !important;
  position: relative;
}

@media (max-width: 480px) {
  section.page[data-page="aiga"] .page-body .container.narrow.aiga-stage {
    padding: 24px 12px !important;
  }
}

.aiga-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  animation: aigaShellGlow 16s ease-in-out infinite;
  --aiga-c1: #1e5fcc;
  --aiga-c2: #e0bd6c;
  --aiga-c3: #4a90e2;
}

.aiga-fx {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--surface-alt);
}

.aiga-aurora {
  position: absolute;
  inset: -25%;
  opacity: 0.22;
  filter: blur(34px);
  background:
    radial-gradient(40% 36% at 14% 18%, var(--aiga-c1), transparent 72%),
    radial-gradient(36% 32% at 88% 26%, var(--aiga-c2), transparent 72%),
    radial-gradient(52% 42% at 52% 96%, var(--aiga-c3), transparent 75%);
  animation: aigaHueShift 16s ease-in-out infinite, aigaDrift 20s ease-in-out infinite alternate;
}

.aiga-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(30,95,204,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,95,204,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 50% 35%, #000 35%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 35%, transparent 90%);
  animation: aigaGridDrift 12s linear infinite;
}

.aiga-scan {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(100deg,
    transparent,
    color-mix(in srgb, var(--aiga-c2) 26%, transparent),
    color-mix(in srgb, var(--aiga-c1) 18%, transparent),
    transparent);
  filter: blur(4px);
  animation: aigaSweep 6.5s ease-in-out infinite;
}

:root[data-theme="dark"] .aiga-fx,
:root:not([data-theme="light"]) .aiga-fx {
  background: var(--paper);
}
:root[data-theme="dark"] .aiga-aurora,
:root:not([data-theme="light"]) .aiga-aurora { opacity: 0.32; }
:root[data-theme="dark"] .aiga-grid,
:root:not([data-theme="light"]) .aiga-grid {
  background-image:
    linear-gradient(rgba(120,170,255,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,170,255,0.10) 1px, transparent 1px);
}

.aiga-shell .aiga-chat {
  background: transparent;
}

@keyframes aigaHueShift {
  0%   { --aiga-c1: #1e5fcc; --aiga-c2: #e0bd6c; --aiga-c3: #4a90e2; }
  25%  { --aiga-c1: #7c3aed; --aiga-c2: #22d3ee; --aiga-c3: #1e5fcc; }
  50%  { --aiga-c1: #0ea5e9; --aiga-c2: #f472b6; --aiga-c3: #e0bd6c; }
  75%  { --aiga-c1: #22c55e; --aiga-c2: #60a5fa; --aiga-c3: #7c3aed; }
  100% { --aiga-c1: #1e5fcc; --aiga-c2: #e0bd6c; --aiga-c3: #4a90e2; }
}

@keyframes aigaDrift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(5%, -4%) scale(1.08); }
}

@keyframes aigaGridDrift {
  from { background-position: 0 0; }
  to   { background-position: 28px 28px; }
}

@keyframes aigaSweep {
  0%   { transform: translateX(0); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateX(360%); opacity: 0; }
}

@keyframes aigaShellGlow {
  0%, 100% {
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--aiga-c1) 35%, transparent),
      0 22px 50px -18px color-mix(in srgb, var(--aiga-c2) 45%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--aiga-c3) 45%, transparent),
      0 22px 56px -16px color-mix(in srgb, var(--aiga-c1) 50%, transparent);
  }
}

/* Gelembung bot ikut berkilau halus */
.aiga-msg--bot .bubble {
  box-shadow: 0 6px 18px -10px color-mix(in srgb, var(--aiga-c1) 55%, transparent);
}

:root[data-perf="low"] .aiga-aurora,
:root[data-perf="low"] .aiga-grid,
:root[data-perf="low"] .aiga-scan,
:root[data-perf="low"] .aiga-shell {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .aiga-aurora, .aiga-grid, .aiga-scan, .aiga-shell { animation: none !important; }
}

/* Animasi latar Aiga dimatikan khusus di mobile (berat untuk HP: 5 animasi
   infinite + 2 filter:blur berjalan bersamaan). Tetap aktif penuh di PC/tablet. */
@media (max-width: 768px) {
  .aiga-shell,
  .aiga-aurora,
  .aiga-grid,
  .aiga-scan {
    animation: none !important;
  }
  .aiga-aurora,
  .aiga-scan {
    filter: none !important;
  }
  .aiga-aurora { opacity: 0.14; }
  :root[data-theme="dark"] .aiga-aurora,
  :root:not([data-theme="light"]) .aiga-aurora { opacity: 0.2; }
  .aiga-scan { display: none; }
}

/* ============================================================
   BERITA â€” kartu konten dengan jarak dari tepi (pakai !important
   karena .container sudah memakai padding !important)
   ============================================================ */
.page-body > .container.konten-card {
  /* lebar & ruang dalam disamakan dengan kartu Profil (.container.narrow) */
  max-width: 800px;
  padding: 40px 44px !important;
  background: var(--surface, #fff);
  border: 1px solid rgba(11,37,69,0.12);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(11,37,69,0.08);
}

@media (min-width: 1440px) {
  .page-body > .container.konten-card { max-width: 860px; }
}

@media (min-width: 993px) {
  .page-body > .container.konten-card { padding: 48px 56px !important; }
}

:root[data-theme="dark"] .page-body > .container.konten-card,
:root:not([data-theme="light"]) .page-body > .container.konten-card {
  background: var(--paper, #0f1f36);
  border-color: var(--card-border);
}

/* ============================================================
   KOMPETENSI â€” detail jurusan jadi kartu dengan jarak lega
   ============================================================ */
#kompetensiDetailView.container.narrow {
  background: var(--surface, #fff);
  border: 1px solid rgba(11,37,69,0.12);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(11,37,69,0.08);
  padding: 36px 40px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

:root[data-theme="dark"] #kompetensiDetailView.container.narrow,
:root:not([data-theme="light"]) #kompetensiDetailView.container.narrow {
  background: var(--paper, #0f1f36);
  border-color: var(--card-border);
}

/* Ruang samping halaman di layar kecil agar kartu tidak nempel ke tepi layar */
@media (max-width: 640px) {
  .page-body {
    padding-left: 14px;
    padding-right: 14px;
  }
  #kompetensiDetailView.container.narrow {
    padding: 24px 20px !important;
  }
  .page-body > .container.konten-card {
    padding: 24px 18px !important;
  }
}

/* ============================================================
   TOMBOL KIRIM â€” mudah ditekan & tidak tertutup tombol melayang
   (berlaku untuk PC dan mobile; beranda tidak diubah)
   ============================================================ */
.komentar-form {
  padding-bottom: 4px;
}
.komentar-form button {
  width: auto;
}
.komentar-form .komentar-submit,
.komentar-form button[type="submit"] {
  min-height: 48px;
}

/* Kritik & Saran: beri ruang bawah agar tombol kirim tidak tertutup
   tombol pencarian (kiri bawah) dan kembali-ke-atas (kanan bawah). */
.kritik-wrap {
  padding-bottom: 110px;
}

@media (max-width: 560px) {
  .kritik-wrap { padding-bottom: 120px; }
  .kritik-submit-btn { min-height: 56px; font-size: 16.5px; }
  .komentar-form button {
    width: 100%;
    align-self: stretch;
    min-height: 50px;
    font-size: 15.5px;
  }
}

/* ============================================================
   NOTIFIKASI BERITA BARU â€” widget di halaman Berita (PC & mobile)
   ============================================================ */
.push-berita {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--paper, #f4f8ff);
  border: 1px solid var(--card-border);
}
.push-berita-teks {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink);
  min-width: 0;
}
.push-berita-teks i { color: var(--primary); }
.push-berita-btn {
  min-height: 44px;
  padding: 10px 20px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.push-berita-btn:disabled { opacity: .6; cursor: not-allowed; }
.push-berita-btn.is-on { background: #16a34a; }
.push-berita-btn.is-denied { background: #d64550; }
@media (max-width: 560px) {
  .push-berita { flex-direction: column; align-items: stretch; }
  .push-berita-btn { width: 100%; min-height: 50px; font-size: 15px; }
}

/* ============================================================
   CHAT AIGA â€” tombol kirim mudah ditekan (PC & mobile).
   Baris input diangkat di atas tombol melayang (cari & kembali
   ke atas) supaya tombol kirim tidak tertutup.
   ============================================================ */
.aiga-input-row {
  position: relative;
  z-index: 1001;
  align-items: center;
}
.aiga-input-row input {
  min-height: 50px;
  font-size: 15.5px;
}
.aiga-input-row button {
  width: 52px;
  height: 52px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 640px) {
  .aiga-input-row { padding: 12px 14px 14px; }
  .aiga-input-row button { width: 54px; height: 54px; font-size: 18px; }
}

/* =====================================================================
   NAVBAR PC â€” semua menu tampil langsung (termasuk Authority, Link
   Lainnya, dan switch bahasa). Tidak ada lagi menu titik-tiga.
   Di layar sempit (<= 768px) navbar tetap memakai menu hamburger.
   ===================================================================== */
@media (min-width: 769px) {
  nav.primary-menu ul {
    flex-wrap: nowrap;              /* PAKSA satu baris: jangan pernah wrap ke baris 2 */
    justify-content: space-between;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    overflow: visible; /* Submenu desktop harus dapat keluar dari tinggi bar navigasi. */
  }
  nav.primary-menu ul > li {
    flex: 0 0 auto;
  }
  nav.primary-menu ul > li > a {
    white-space: nowrap;
    font-size: clamp(12px, 0.9vw, 14px);
    padding: 8px clamp(6px, 0.7vw, 12px);
  }
  nav.primary-menu ul > li > .nav-links-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.92);
    font: inherit;
    font-size: clamp(12px, 0.9vw, 14px);
    font-weight: 600;
    padding: 8px clamp(6px, 0.7vw, 12px);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
  }
  nav.primary-menu ul > li > .nav-links-trigger:hover,
  nav.primary-menu ul > li.dropdown-open > .nav-links-trigger {
    background: var(--blue-soft-desktop, rgba(74, 144, 226, 0.22));
    color: #fff;
  }
  nav.primary-menu ul > li.nav-lang-item {
    display: flex;
    align-items: center;
    padding-left: 6px;
    margin-left: 2px;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
  }
  nav.primary-menu .nav-lang-item .lang-toggle {
    margin: 0;
  }
}

/* =====================================================================
   TOMBOL CARI MELAYANG (v49) â€” hanya ikon kaca pembesar, bulat, rapi.
   Muncul hanya di Berita, Guru, Siswa/Ekstrakurikuler, dan hanya saat
   pengguna sudah sampai ujung bawah halaman.
   ===================================================================== */
.search-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 420;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-steel), var(--navy));
  color: var(--gold-soft, #e0bd6c);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px -12px rgba(7, 28, 58, 0.6), 0 0 0 4px rgba(212, 169, 76, 0.08);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(0.9);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.35s ease, box-shadow 0.25s ease;
}
.search-fab.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.search-fab i {
  margin: 0;
  font-size: 18px;
  line-height: 1;
}
.search-fab:hover {
  box-shadow: 0 18px 36px -12px rgba(7, 28, 58, 0.7), 0 0 0 5px rgba(212, 169, 76, 0.14);
}
.search-fab:focus-visible {
  outline: 2px solid var(--gold-soft, #e0bd6c);
  outline-offset: 3px;
}
@media (max-width: 640px) {
  .search-fab {
    left: 14px;
    bottom: 16px;
    width: 46px;
    height: 46px;
  }
  .search-fab i { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .search-fab { transition: none; transform: none; }
}

/* ============ V51: pemberitahuan saat berganti bahasa ============ */
.lang-notice {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(92vw, 460px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--navy, #0b2545);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 16px 36px -14px rgba(7, 28, 58, 0.7), 0 0 0 1px rgba(212, 169, 76, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.3s ease;
}
.lang-notice.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.lang-notice i { color: var(--gold-soft, #e0bd6c); flex-shrink: 0; }
@media (max-width: 640px) {
  .lang-notice { bottom: 16px; font-size: 13px; padding: 11px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .lang-notice { transition: none; }
}

/* ============ V50: slider foto sorotan di halaman Pamflet (16:9, maks 10 foto) ============ */
.pamflet-sorotan {
  position: relative;
  margin: 0 0 26px;
  border-radius: var(--radius-lg, 22px);
  overflow: hidden;
  background: var(--navy, #0b2545);
  box-shadow: 0 18px 40px -22px rgba(7, 28, 58, 0.55);
}
.pamflet-sorotan[hidden] { display: none; }
.ps-viewport {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
}
.ps-viewport::-webkit-scrollbar { display: none; }
.ps-viewport.ps-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.ps-slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 16 / 9;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: block;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
}
.ps-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.ps-judul {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 36px 18px 14px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  background: linear-gradient(to top, rgba(7, 28, 58, 0.78), rgba(7, 28, 58, 0));
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}
.ps-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--navy, #0b2545);
  font-size: 15px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.5);
  transition: background 0.2s ease, transform 0.2s ease;
}
.ps-nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.ps-prev { left: 12px; }
.ps-next { right: 12px; }
.ps-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 7px;
  pointer-events: none;
}
.ps-dot {
  pointer-events: auto;
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}
.ps-dot.active { width: 22px; background: var(--gold, #d4a94c); }
.pamflet-sorotan.ps-single .ps-nav,
.pamflet-sorotan.ps-single .ps-dots { display: none; }
.pamflet-sorotan:has(.ps-judul) .ps-dots { bottom: 8px; justify-content: flex-end; padding-right: 16px; }
@media (max-width: 640px) {
  .pamflet-sorotan { margin-bottom: 20px; border-radius: var(--radius, 16px); }
  .ps-nav { width: 34px; height: 34px; font-size: 13px; }
  .ps-prev { left: 8px; }
  .ps-next { right: 8px; }
  .ps-judul { font-size: 13px; padding: 28px 14px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-viewport { scroll-behavior: auto; }
}

/* ============ V48: tombol Suka & Bagikan di BAWAH JUDUL (detail berita) ============
   Dipindah ke atas agar langsung terlihat tanpa harus scroll ke bawah isi berita. */
.news-actions-top {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
}
.news-actions-top .btn-like,
.news-actions-top .btn-share {
  font-size: 13.5px;
  padding: 9px 18px;
  color: var(--text-dark);
  border-color: var(--gold);
}


/* =====================================================================
   MODE MINIM ANIMASI (OTOMATIS, BERDASARKAN DETEKSI SPEK PERANGKAT)
   html[data-motion="reduced"] diterapkan OTOMATIS oleh perf-detect.js
   ketika perangkat pengunjung terdeteksi "low" (RAM kecil, CPU sedikit
   core, dan/atau koneksi lambat/mode hemat data) -- lihat js/perf-detect.js
   untuk logika deteksinya (data-perf="low|mid|high"). Tidak ada tombol
   manual: ini murni menyesuaikan diri dengan kondisi device, mengikuti
   deteksi yang sama yang sudah dipakai situs ini untuk hal lain.

   Daftar selector di bawah ini SENGAJA dibuat identik dengan seluruh blok
   @media (prefers-reduced-motion: reduce) yang sudah ada di file ini,
   supaya perilaku mode minim animasi otomatis == perilaku saat OS
   mengaktifkan "reduce motion": animasi dekoratif berat (grid jatuh, blob
   mengambang, shimmer, efek matahari terbit/tenggelam saat ganti tema, dsb)
   dimatikan, tapi transisi esensial untuk keterbacaan/orientasi (fade masuk
   konten, transisi warna tema, scroll) tetap dipertahankan.
   ===================================================================== */
html[data-motion="reduced"] :root:not([data-theme="light"]) body::before,
html[data-motion="reduced"] :root[data-theme="dark"] body::before {
  animation: none;
}

html[data-motion="reduced"] .bubble,
html[data-motion="reduced"] .sun-glow,
html[data-motion="reduced"] .wind-streak { animation: none; }
html[data-motion="reduced"] .live-bg-dark .bubble { opacity: 0.5; }
html[data-motion="reduced"] .sun-glow { opacity: 0.85; }
html[data-motion="reduced"] .wind-streak { display: none; }

html[data-motion="reduced"] .splash-progress-bar { transition: none; }
html[data-motion="reduced"] .splash-card { animation: none; }

html[data-motion="reduced"] .logo-wrap .logo-media { animation: none; }

html[data-motion="reduced"] .feature-card .icon { animation: none; }

html[data-motion="reduced"] .loading-msg:not(.error)::after { animation: none; width: 1.4em; }

html[data-motion="reduced"] .spmb-illustration { animation: none; }

html[data-motion="reduced"] .contact-socials a:hover { animation: none; transform: translateY(-4px); }

html[data-motion="reduced"] .map-embed-cta:hover i { animation: none; }

html[data-motion="reduced"] .totop.is-scrolling-up { animation: none; }
html[data-motion="reduced"] body.is-scroll-top-blurring #app,
html[data-motion="reduced"] body.is-scroll-top-blurring header,
html[data-motion="reduced"] body.is-scroll-top-blurring footer { animation: none; }

html[data-motion="reduced"] .section-transition-grid span { animation: none; opacity: 0.9; }
html[data-motion="reduced"] .section-transition-grid { transition: none; transform: none; opacity: 1; }
html[data-motion="reduced"] .section-transition { transition: opacity 0.2s ease, visibility 0.2s ease; backdrop-filter: none !important; }

html[data-motion="reduced"] .stats-pop {
  opacity: 1 !important;
  transform: none !important;
}
html[data-motion="reduced"] .stats-pop::before { display: none; }

html[data-motion="reduced"] .reveal,
html[data-motion="reduced"] .reveal-zoom,
html[data-motion="reduced"] .reveal-left,
html[data-motion="reduced"] .reveal-right,
html[data-motion="reduced"] .reveal-stagger > *,
html[data-motion="reduced"] .reveal-scale-fade,
html[data-motion="reduced"] .page.page-active,
html[data-motion="reduced"] .menu-panel-list > li,
html[data-motion="reduced"] .img-fade {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
  animation: none !important;
}
html[data-motion="reduced"] .hero,
html[data-motion="reduced"] .top-bar,
html[data-motion="reduced"] .hero::after,
html[data-motion="reduced"] .page-banner,
html[data-motion="reduced"] .page-banner::after,
html[data-motion="reduced"] .hero-shapes .shape,
html[data-motion="reduced"] .totop.show,
html[data-motion="reduced"] .loader-mark span {
  animation: none !important;
}
html[data-motion="reduced"] .news-card::before,
html[data-motion="reduced"] .news-card .kategori-badge,
html[data-motion="reduced"] .news-card .meta .fa-medal {
  animation: none !important;
  opacity: 0 !important;
}

html[data-motion="reduced"] .profil-subnav a.active { animation: none; }

html[data-motion="reduced"] .profil-bagian:not([hidden]) { animation: none; }

html[data-motion="reduced"] .touch-ripple,
html[data-motion="reduced"] nav.primary-menu ul > li[data-route="aiga"] > a i.fa-sparkles,
html[data-motion="reduced"] #menuPanel a[data-route-link="aiga"] i.fa-sparkles,
html[data-motion="reduced"] .reveal-visible .icon-pop {
  animation: none !important;
}
html[data-motion="reduced"] .magnetic-hover {
  transform: none !important;
}

html[data-motion="reduced"] .hero-grid,
html[data-motion="reduced"] .spmb-grid,
html[data-motion="reduced"] .page-banner::after { animation: none !important; }

html[data-motion="reduced"] .scr-ch.scr-spin { filter: none; }

html[data-motion="reduced"] header::after,
html[data-motion="reduced"] .logo-wrap::before,
html[data-motion="reduced"] .logo-wrap::after,
html[data-motion="reduced"] .logo-wrap .logo-media { animation: none !important; }
html[data-motion="reduced"] header::after,
html[data-motion="reduced"] .logo-wrap::before,
html[data-motion="reduced"] .logo-wrap::after { display: none; }

html[data-motion="reduced"] .tfx { display: none !important; }

html[data-motion="reduced"] .hero-stats strong.scramble,
html[data-motion="reduced"] .stats .num.scramble,
html[data-motion="reduced"] .hero-stats > div::before {
  animation: none !important;
}

html[data-motion="reduced"] .aiga-aurora,
html[data-motion="reduced"] .aiga-grid,
html[data-motion="reduced"] .aiga-scan,
html[data-motion="reduced"] .aiga-shell { animation: none !important; }

html[data-motion="reduced"] .search-fab { transition: none; transform: none; }

html[data-motion="reduced"] .lang-notice { transition: none; }

html[data-motion="reduced"] .ps-viewport { scroll-behavior: auto; }



/* ============================================================
   FIX: teks judul kartu ekskul & h2 beranda hitam di mode gelap.
   Dipasangkan dengan --heading-strong (putih di mode malam).
   ============================================================ */
.ekskul-card h5 { color: var(--heading-strong); }
section.page[data-page="beranda"] .container > h2 { color: var(--heading-strong); }

/* Tombol rute: sejajar dengan tombol "Buka Lokasi" */
.map-route-cta { margin-left: 8px; }

/* ============ FILTER TAHUN GALERI ============ */
.galeri-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.galeri-filter button {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.galeri-filter button:hover { border-color: var(--navy-steel); color: var(--navy-steel); }
.galeri-filter button.active {
  background: var(--navy-steel-fixed);
  border-color: transparent;
  color: #fff;
}

/* ============ TOMBOL MULAI CHAT BARU (Aiga) ============ */
.aiga-head { position: relative; }
.aiga-reset {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}
.aiga-reset:hover { border-color: var(--navy-steel); color: var(--navy-steel); }
.aiga-reset:disabled { opacity: .5; cursor: not-allowed; }
.aiga-reset i { font-size: 12px; }
@media (max-width: 480px) {
  .aiga-reset span { display: none; }
  .aiga-reset { padding: 8px 10px; }
}

/* ---------- Aksi komentar milik pengunjung (edit & hapus) ---------- */
.komentar-aksi {
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}
.komentar-aksi button {
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.komentar-aksi button:hover { color: var(--text-dark); border-color: var(--text-muted); }
.komentar-aksi .komentar-aksi-hapus:hover { color: #dc2626; border-color: #dc2626; }
.komentar-aksi button:disabled { opacity: 0.5; cursor: not-allowed; }

.komentar-edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.komentar-edit-form textarea {
  width: 100%;
  min-height: 70px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--surface);
  color: var(--text-dark);
  font: inherit;
  font-size: 13.5px;
  resize: vertical;
}
.komentar-edit-actions { display: flex; gap: 8px; justify-content: flex-end; }
.komentar-edit-actions button {
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--paper);
  color: var(--text-dark);
  cursor: pointer;
}
.komentar-edit-actions button[type="submit"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.komentar-badge-saya {
  font-size: 11px;
  font-weight: 600;
  color: var(--navy);
  background: rgba(30,64,175,0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---------- Akun Google (opsional) di modal komentar sosmed ---------- */
.komentar-akun {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px dashed var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.komentar-akun[hidden], .komentar-akun-info[hidden], .komentar-akun-login[hidden] { display: none; }
.komentar-akun-login { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.komentar-akun-info { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-dark); }
.komentar-akun-info img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.komentar-akun-info span { flex: 1; font-weight: 600; }
.komentar-akun-info button {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--card-border); background: transparent; color: var(--text-muted); cursor: pointer;
}

/* ---------- Modal akun pengunjung (masuk / daftar / profil) ---------- */
.akun-modal {
  position: fixed;
  inset: 0;
  z-index: 1001; /* di atas modal sosmed (999) agar bisa dibuka dari dalamnya */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.akun-modal.open { opacity: 1; pointer-events: auto; }
.akun-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7,15,30,0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.akun-modal-box {
  position: relative;
  width: min(420px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px 24px 22px;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s var(--ease);
}
.akun-modal.open .akun-modal-box { transform: translateY(0) scale(1); }
.akun-modal-x {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--paper); color: var(--text-dark);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.akun-modal-box h3 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
  margin: 14px 0 14px;
}

.akun-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--paper);
  border-radius: 999px;
  margin-right: 40px;
}
.akun-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
}
.akun-tab.active { background: var(--navy); color: #fff; }

.akun-form { display: flex; flex-direction: column; gap: 12px; }
.akun-field { display: flex; flex-direction: column; gap: 5px; }
.akun-field > span { font-size: 13px; font-weight: 600; color: var(--text-dark); }
.akun-field input {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--surface);
  color: var(--text-dark);
  font: inherit;
  font-size: 14px;
}
.akun-field input:focus { outline: none; border-color: var(--navy-steel); box-shadow: 0 0 0 3px rgba(30,95,204,0.15); }
.akun-field input:disabled { opacity: 0.6; }
.akun-hint { font-size: 12px; color: var(--text-muted); }
.akun-error {
  font-size: 13px;
  color: #b91c1c;
  background: rgba(220,38,38,0.08);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}
.akun-submit {
  margin-top: 4px;
  padding: 11px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.akun-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.akun-profil-foto { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 14px; }
.akun-profil-foto img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--card-border); background: var(--paper);
}
.akun-link {
  margin-top: 14px;
  background: none;
  border: none;
  color: #b91c1c;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* Tombol kecil di blok akun komentar */
.akun-btn {
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--paper);
  color: var(--text-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.akun-btn-utama { background: var(--navy); color: #fff; border-color: var(--navy); }
.akun-btn-kecil { font-size: 12.5px; padding: 6px 12px; }
.komentar-akun-tombol { display: flex; gap: 8px; }
.komentar-akun-info .akun-btn { padding: 4px 10px; }

/* =====================================================================
   PENGATURAN AKUN (menu hamburger) + antarmuka login & personalisasi
   ===================================================================== */
.menu-panel-akun { padding: 14px 0 6px; margin-top: 8px; border-top: 1px solid rgba(255,255,255,.12); }
.menu-panel-akun-label {
  display: block; padding: 0 22px 10px; font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft);
}
.menu-akun-kartu {
  margin: 0 16px; padding: 14px; border-radius: 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; gap: 12px;
}
.menu-akun-foto {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--gold); background: #fff;
}
.menu-akun-info { flex: 1; min-width: 0; }
.menu-akun-info strong { display: block; color: #fff; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-akun-info small { color: rgba(255,255,255,.7); font-size: 12px; }
.menu-akun-tombol {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  padding: 9px 14px; border-radius: 10px; background: var(--gold); color: var(--navy-deep);
  white-space: nowrap;
}
.menu-akun-tombol:hover { filter: brightness(1.06); }

/* --- Antarmuka login (kartu terpusat) --- */
.akun-gerbang {
  min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px;
}
.akun-gerbang-kartu {
  width: 100%; max-width: 440px; background: var(--paper, #fff); color: var(--ink, #0b2545);
  border-radius: 20px; padding: 36px 30px; box-shadow: 0 24px 60px rgba(7,28,58,.18);
  border-top: 4px solid var(--gold);
}
.akun-gerbang-logo { display: flex; justify-content: center; margin-bottom: 14px; }
.akun-gerbang-logo img { width: 64px; height: 64px; object-fit: contain; }
.akun-gerbang-kartu h2 { text-align: center; font-size: 22px; margin: 0 0 6px; color: var(--navy); }
.akun-gerbang-kartu > p.sub { text-align: center; font-size: 14px; color: var(--muted, #5b6b82); margin: 0 0 22px; }
.akun-gerbang-kartu .akun-field input {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #cfd8e6; font: inherit; font-size: 15px;
}
.akun-gerbang-kartu .akun-field input:focus { outline: 2px solid var(--navy-steel); outline-offset: 1px; border-color: transparent; }
.akun-gerbang-kartu .akun-submit { width: 100%; padding: 13px; font-size: 15px; }

/* --- Banner "Login sukses" --- */
.akun-sukses {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
  background: #e8f7ee; color: #14623a; font-weight: 600; font-size: 15px; margin-bottom: 16px;
}
.akun-sukses i { font-size: 18px; }

/* --- Setel foto profil (langkah awal jika belum ada foto) --- */
.akun-setel-foto {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  padding: 20px; border: 2px dashed #cfd8e6; border-radius: 16px; margin-bottom: 18px;
}
.akun-setel-foto img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #fff; border: 2px solid var(--gold); }
.akun-setel-foto strong { color: var(--navy); font-size: 16px; }

/* --- Langkah personalisasi & kuis --- */
.akun-langkah { display: flex; flex-direction: column; gap: 14px; }
.akun-pilihan { display: flex; gap: 10px; }
.akun-pilihan label {
  position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 12px; border-radius: 10px;
  border: 1px solid #cfd8e6; cursor: pointer; font-weight: 600; font-size: 14px;
}
.akun-pilihan input, .akun-kuis-opsi input, .akun-ekskul-daftar input {
  position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; overflow: hidden;
}
.akun-pilihan label:focus-within, .akun-kuis-opsi label:focus-within {
  outline: 2px solid var(--navy-steel); outline-offset: 2px;
}
.akun-pilihan label:has(input:checked) { background: var(--navy); color: #fff; border-color: var(--navy); }
.akun-ekskul-daftar {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 200px; overflow-y: auto;
  padding: 10px; border: 1px solid #cfd8e6; border-radius: 10px;
}
.akun-ekskul-daftar label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.akun-kuis-opsi { display: flex; flex-direction: column; gap: 8px; }
.akun-kuis-opsi label {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid #cfd8e6; cursor: pointer; font-size: 15px;
}
.akun-kuis-opsi label:has(input:checked) { border-color: var(--navy-steel); background: var(--sky); }

/* --- Lencana pengunjung (foto pterodactyl) --- */
.akun-badge-pengunjung { font-size: 11px; font-weight: 700; color: var(--gold-deep); letter-spacing: .04em; }
.akun-badge-warga { font-size: 11px; font-weight: 700; color: #14623a; letter-spacing: .04em; }

/* --- Komentar terkunci untuk pengunjung yang belum login --- */
.komentar-terkunci {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 22px; border-radius: 14px; background: var(--sky); border: 1px dashed var(--navy-steel);
}
.komentar-terkunci i { font-size: 26px; color: var(--navy-steel); }
.komentar-terkunci p { margin: 0; color: var(--ink, #0b2545); font-size: 14px; }

@media (max-width: 480px) {
  .akun-gerbang-kartu { padding: 28px 20px; }
  .akun-ekskul-daftar { grid-template-columns: 1fr; }
}

/* =====================================================================
   PROGRAM KEAHLIAN (beranda) — kartu foto bergaya "Prima", warna Amga
   Foto: taruh di assets/jurusan/<slug>.jpg (rasio ±3:4). Jika belum ada,
   kartu otomatis tampil dengan latar gradasi navy-biru.
   ===================================================================== */
.program-section {
  padding: 72px 0;
  background: transparent;
  position: relative;
}
.prog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.prog-head .section-heading { margin-bottom: 0; max-width: 640px; }
.prog-head .section-heading h2 { color: var(--navy); }
.prog-accent { color: var(--orange, #ff6b00); }
.prog-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.prog-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 12px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.prog-btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--card-border); }
.prog-btn-ghost:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--navy-steel); }
.prog-btn-solid { background: var(--orange, #ff6b00); color: #fff; box-shadow: 0 10px 22px -10px rgba(255,107,0,.6); }
.prog-btn-solid:hover { background: var(--orange-hover, #e85d00); transform: translateY(-3px); }

.prog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.prog-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 10px;
  min-height: 420px;
  padding: 26px 20px 24px;
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: #fff;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(7,28,58,.05) 0%, rgba(7,28,58,.55) 55%, rgba(7,28,58,.92) 100%),
    var(--prog-img) center / cover no-repeat,
    linear-gradient(160deg, var(--navy-steel-fixed) 0%, var(--navy) 100%);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
/* lapisan foto terpisah supaya bisa zoom halus saat hover */
.prog-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: inherit;
  transition: transform .6s var(--ease);
}
.prog-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.prog-card:hover::before { transform: scale(1.07); }
.prog-logo {
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--navy-steel-fixed);
  font-size: 1.5rem;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.45);
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease);
}
.prog-card:hover .prog-logo { transform: translateY(-4px) rotate(-8deg); background: var(--orange, #ff6b00); color: #fff; }
.prog-card h3 {
  font-family: var(--font-display);
  font-size: 1.28rem; line-height: 1.3; font-weight: 700;
  color: #fff; margin: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
}
.prog-more {
  font-weight: 600; font-size: .95rem; color: var(--gold-soft);
  display: inline-flex; align-items: center; gap: 8px;
}
.prog-more i { font-size: .8rem; transition: transform .3s var(--ease); }
.prog-card:hover .prog-more i { transform: translateX(6px); }

/* ---- Responsif ---- */
@media (max-width: 1100px) {
  .prog-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (max-width: 820px) {
  .program-section { padding: 56px 0; }
  .prog-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .prog-card { min-height: 340px; padding: 20px 14px; }
  .prog-card h3 { font-size: 1.1rem; }
}
@media (max-width: 520px) {
  .program-section { padding: 44px 0; }
  .prog-head { margin-bottom: 24px; }
  .prog-actions { width: 100%; }
  .prog-btn { flex: 1; padding: 12px 14px; }
  .prog-grid { grid-template-columns: 1fr; }
  .prog-card { min-height: 300px; }
}

/* ---- Mode malam & aksesibilitas ---- */
:root[data-theme="dark"] .prog-head .section-heading h2 { color: var(--ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .prog-head .section-heading h2 { color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .prog-card, .prog-card::before, .prog-logo, .prog-btn, .prog-more i { transition: none !important; }
  .prog-card:hover, .prog-card:hover::before { transform: none; }
}

/* =====================================================================
   STATS GLASS — "Sekolah dalam angka" (Siswa / Kompetensi Keahlian /
   Tenaga Pendidik / Rombongan Belajar) di beranda.
   ===================================================================== */
.stats-glass {
  position: relative;
  padding: 64px 0;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(160deg, var(--navy-steel-fixed) 0%, var(--navy) 100%);
}
.sg-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .35;
  pointer-events: none;
}
.sg-orb-1 { width: 320px; height: 320px; top: -120px; left: -80px; background: var(--orange, #ff6b00); }
.sg-orb-2 { width: 280px; height: 280px; bottom: -110px; right: -60px; background: var(--gold-soft); }

.sg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.sg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 30px 18px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-decoration: none;
  color: #fff;
  transition: transform .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
}
.sg-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,.14);
  box-shadow: var(--shadow-lg);
}
.sg-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: var(--gold-soft);
  font-size: 1.4rem;
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease);
}
.sg-card:hover .sg-icon { transform: translateY(-3px) scale(1.06); background: var(--orange, #ff6b00); color: #fff; }
.sg-num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}
.sg-label {
  font-size: .98rem;
  font-weight: 600;
  color: rgba(255,255,255,.88);
  position: relative;
  overflow: hidden;
  display: inline-block;
}
.sg-hint {
  font-size: .82rem;
  font-weight: 600;
  color: var(--gold-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.sg-card:hover .sg-hint { opacity: 1; transform: translateY(0); }
.sg-hint i { font-size: .72rem; }

/* ---- Animasi teks label: muncul dari bawah + fade, per-huruf disiapkan JS
   lewat span.sg-char; fallback (tanpa JS) tetap fade biasa lewat .reveal-visible ---- */
.sg-label .sg-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(70%);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: calc(var(--char-i, 0) * 35ms);
  will-change: transform, opacity;
}
.sg-card.reveal-visible .sg-label .sg-char {
  opacity: 1;
  transform: translateY(0);
}
/* fallback kalau JS belum sempat memecah teks jadi per-huruf */
.sg-label:not(:has(.sg-char)) {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s var(--ease) .2s, transform .5s var(--ease) .2s;
}
.sg-card.reveal-visible .sg-label:not(:has(.sg-char)) {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .sg-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (max-width: 520px) {
  .stats-glass { padding: 48px 0; }
  .sg-card { padding: 24px 14px; }
  .sg-num { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sg-card, .sg-icon, .sg-hint { transition: none !important; }
  .sg-card:hover { transform: none; }
  .sg-label .sg-char { transition: none !important; opacity: 1; transform: none; }
}


/* =====================================================================
   DETAIL KOMPETENSI  (#/kompetensi/<slug>)  — js/kompetensi-detail.js
   Foto: assets/jurusan/<slug>-hero.jpg  (kanan atas, rasio ±4:3)
         assets/jurusan/kaprog-<slug>.jpg (kiri, foto kepala program, ±3:4)
   Jika foto belum ada, otomatis tampil placeholder gradasi + ikon.
   ===================================================================== */
body.kd-open .page:not(#kompetensiDetail) { display: none !important; }
body.kd-open #kompetensiDetail { display: block; animation: pageIn .5s cubic-bezier(.22,1,.36,1); }

/* ---- animasi muncul saat di-scroll ---- */
.kd-r { opacity: 0; transform: translateY(30px);
  transition: opacity .8s var(--ease) var(--d, 0ms), transform .8s var(--ease) var(--d, 0ms); }
.kd-r.kd-left  { transform: translateX(-44px); }
.kd-r.kd-right { transform: translateX(44px); }
.kd-r.kd-in { opacity: 1; transform: none; }

/* ---- HERO ---- */
.kd-hero { position: relative; overflow: hidden; padding: 72px 0 84px; }
.kd-wm {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 800; line-height: 1;
  font-size: clamp(5rem, 17vw, 15rem); letter-spacing: -.02em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 2px rgba(30,95,204,.13);
  pointer-events: none; user-select: none; animation: kdFloat 9s ease-in-out infinite;
}
@keyframes kdFloat { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(14px); } }
.kd-hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.kd-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--orange-soft); color: var(--orange);
  font-weight: 700; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  box-shadow: var(--shadow);
}
.kd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); animation: kdPulse 1.8s ease-out infinite; }
@keyframes kdPulse { 0% { box-shadow: 0 0 0 0 var(--orange-glow); } 100% { box-shadow: 0 0 0 12px rgba(255,107,0,0); } }
.kd-title {
  margin: 22px 0 20px; font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2rem, 5.2vw, 4.2rem); line-height: 1.05; letter-spacing: -.02em; overflow-wrap: anywhere;
}
.kd-title span { color: var(--navy); }
.kd-title em { font-style: normal; color: var(--orange); }
.kd-lead { max-width: 56ch; font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.8; color: var(--ink-muted); margin: 0 0 28px; }
.kd-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- foto (dipakai hero & kepala program) ---- */
.kd-photo { position: relative; margin: 0; }
.kd-photo::before {                       /* bingkai oranye di belakang foto */
  content: ""; position: absolute; inset: 14px -14px -14px 14px; border-radius: var(--radius-lg);
  border: 2px solid var(--orange); opacity: .55; transition: transform .5s var(--ease);
}
.kd-kaprog::before { inset: 14px 14px -14px -14px; }
.kd-photo:hover::before { transform: translate(6px, 6px); }
.kd-kaprog:hover::before { transform: translate(-6px, 6px); }
.kd-img {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  background: linear-gradient(160deg, var(--navy-steel-fixed), var(--navy));
}
.kd-img-main { aspect-ratio: 4 / 3.4; }
.kd-img-portrait { aspect-ratio: 3 / 3.8; }
.kd-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.kd-photo:hover .kd-img img { transform: scale(1.06); }
.kd-img-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.28); font-size: clamp(3rem, 8vw, 5.5rem); }
.kd-chip {
  position: absolute; z-index: 3; left: -22px; bottom: 28px; display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-lg);
  animation: kdBob 4.5s ease-in-out infinite;
}
.kd-chip span { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange); font-size: 1.15rem; }
.kd-chip strong { display: block; font-family: var(--font-display); color: var(--ink); line-height: 1.2; }
.kd-chip small { color: var(--ink-muted); font-weight: 600; }
@keyframes kdBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---- VISI & MISI ---- */
.kd-visimisi { padding: 76px 0; }
.kd-vm-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; }
.kd-name {
  position: absolute; z-index: 3; left: 18px; right: 18px; bottom: 18px; padding: 14px 18px; border-radius: 14px;
  background: rgba(7,28,58,.82); backdrop-filter: blur(8px); color: #fff;
}
.kd-name strong { display: block; font-family: var(--font-display); }
.kd-name small { color: var(--gold-soft); font-weight: 600; }
.kd-vm-text .tag { color: var(--orange); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; }
.kd-vm-text h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: var(--navy); margin: 8px 0 22px; }
.kd-vm-text h2::after { content: ""; display: block; width: 50px; height: 3px; margin-top: 10px; border-radius: 999px; background: var(--orange); }
.kd-visi, .kd-misi { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 18px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.kd-visi:hover, .kd-misi:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.kd-vm-text h4 { margin: 0 0 10px; font-family: var(--font-display); color: var(--navy-steel-fixed); display: flex; align-items: center; gap: 10px; }
.kd-vm-text h4 i { color: var(--orange); }
.kd-vm-text p, .kd-vm-text li { color: var(--ink-muted); line-height: 1.75; }
.kd-misi ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.kd-misi li::marker { color: var(--orange); font-weight: 700; }

/* ---- JOURNEY BELAJAR ---- */
.kd-journey { padding: 76px 0 96px; }
.kd-j-title { text-align: center; font-family: var(--font-display); font-size: clamp(1.6rem, 3.6vw, 2.5rem); color: var(--orange); margin: 0 0 44px; }
.kd-j-title span { overflow-wrap: anywhere; }
.kd-j-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.kd-card {
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 32px 28px 30px; text-align: center; box-shadow: var(--shadow);
  transition: opacity .8s var(--ease) var(--d,0ms), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.kd-card.kd-in:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.kd-card-ic { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; font-size: 1.8rem; color: #fff; background: linear-gradient(145deg, #ff8a3d, var(--orange)); box-shadow: 0 12px 24px -10px var(--orange-glow); transition: transform .4s var(--ease); }
.kd-card:hover .kd-card-ic { transform: rotate(-10deg) scale(1.08); }
.kd-badge { display: inline-block; padding: 6px 18px; border-radius: 999px; background: var(--orange); color: #fff; font-weight: 700; font-size: .85rem; }
.kd-card h3 { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); margin: 14px 0 16px; }
.kd-card ul { list-style: none; margin: 0; padding: 0; text-align: left; display: grid; gap: 11px; }
.kd-card li { position: relative; padding-left: 22px; color: var(--ink-muted); line-height: 1.5; }
.kd-card li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); }

/* ---- RESPONSIF ---- */
@media (max-width: 1024px) {
  .kd-hero { padding: 56px 0 64px; }
  .kd-hero-grid { gap: 36px; }
  .kd-vm-grid { gap: 40px; }
  .kd-j-grid { grid-template-columns: repeat(2, 1fr); }
  .kd-j-grid .kd-card:last-child { grid-column: 1 / -1; max-width: 520px; margin: 0 auto; width: 100%; }
}
@media (max-width: 820px) {
  .kd-hero-grid, .kd-vm-grid { grid-template-columns: 1fr; }
  .kd-hero-text { order: 1; } .kd-photo.kd-right { order: 2; }
  .kd-kaprog { max-width: 420px; margin: 0 auto 8px; width: 100%; }
  .kd-photo { margin-right: 14px; }
  .kd-chip { left: 10px; bottom: 16px; }
  .kd-visimisi, .kd-journey { padding: 56px 0; }
  .kd-r.kd-left, .kd-r.kd-right { transform: translateY(30px); }
}
@media (max-width: 600px) {
  .kd-j-grid { grid-template-columns: 1fr; }
  .kd-j-grid .kd-card:last-child { max-width: none; }
  .kd-cta .prog-btn { flex: 1; }
  .kd-wm { -webkit-text-stroke-width: 1.5px; }
}

/* ---- mode malam & aksesibilitas ---- */
:root[data-theme="dark"] .kd-title span,
:root[data-theme="dark"] .kd-vm-text h2 { color: var(--ink); }
:root[data-theme="dark"] .kd-wm { -webkit-text-stroke-color: rgba(120,170,255,.14); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kd-title span,
  :root:not([data-theme="light"]) .kd-vm-text h2 { color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .kd-r, .kd-r.kd-left, .kd-r.kd-right { opacity: 1; transform: none; transition: none; }
  .kd-wm, .kd-chip, .kd-dot { animation: none; }
}
/* ==========================================================================
   Animasi kartu Program Keahlian (beranda)
   ========================================================================== */
@property --pc-ang {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* keadaan awal: di bawah, kabur, sedikit miring; masuk saat is-in */
.pc-motion {
  opacity: 0;
  transform: translateY(80px) scale(.9) rotateX(14deg);
  transform-origin: 50% 100%;
  filter: blur(6px);
  transition:
    opacity .7s var(--ease),
    transform .9s cubic-bezier(.2,.8,.2,1),
    filter .7s var(--ease);
  will-change: transform, opacity;
}
.pc-motion.is-in {
  opacity: 1;
  transform: none;
  filter: none;
  transition-delay: calc(var(--i, 0) * 90ms);
}
.pc-motion.is-in:hover { transform: translateY(-8px); }

/* keluar lewat atas: terbang ke atas dan memudar */
.pc-motion.is-out {
  opacity: 0;
  transform: translateY(-60px) scale(.94);
  filter: blur(4px);
  transition-duration: .55s, .6s, .5s;
  transition-delay: 0ms;
}

/* border cahaya yang berputar terus-menerus mengelilingi kartu */
.prog-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  padding: 2px;
  pointer-events: none;
  background: conic-gradient(
    from var(--pc-ang),
    transparent 0deg,
    transparent 240deg,
    rgba(255,209,102,.95) 300deg,
    var(--orange, #ff6b00) 330deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: pcOrbit 4.5s linear infinite;
}
@keyframes pcOrbit { to { --pc-ang: 360deg; } }

@media (prefers-reduced-motion: reduce) {
  .pc-motion { opacity: 1; transform: none; filter: none; transition: none; }
  .prog-card::after { animation: none; }
}

/* ==========================================================================
   Bagian PPDB/SPMB di beranda
   ========================================================================== */
[hidden] { display: none !important; }

.spmb-home { padding: 88px 0; position: relative; }

.sh-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 72px;
}
.sh-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(255,107,0,.1);
  color: var(--orange, #ff6b00);
  font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.sh-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--orange, #ff6b00);
  animation: shPulse 1.8s infinite;
}
@keyframes shPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,107,0,.55); }
  70%  { box-shadow: 0 0 0 10px rgba(255,107,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,0,0); }
}
.sh-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  margin: 20px 0 16px;
  color: var(--ink);
}
.sh-accent { display: block; color: var(--orange, #ff6b00); }
.sh-lead {
  color: var(--muted, #5a6b85);
  font-size: 1.05rem; line-height: 1.7; max-width: 52ch;
}
.sh-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  margin-top: 26px;
}
.sh-link {
  color: var(--muted, #5a6b85); font-size: .82rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
  transition: color .25s var(--ease);
}
.sh-link:hover { color: var(--orange, #ff6b00); }

.sh-photo {
  position: relative;
  justify-self: center;
  width: min(360px, 100%);
  aspect-ratio: 4 / 5;
  display: grid; place-items: center;
}
.sh-photo-ring {
  position: absolute; inset: 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,107,0,.2), transparent 70%);
  animation: shFloat 6s ease-in-out infinite;
}
#shPhotoImg {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}
.sh-photo-fallback {
  position: relative; z-index: 1;
  font-size: 5rem; color: var(--orange, #ff6b00); opacity: .55;
}
@keyframes shFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.sh-syarat-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.sh-kicker {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--orange, #ff6b00);
}
.sh-syarat-head h3 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--ink); margin: 10px 0 8px;
}
.sh-syarat-head p { color: var(--muted, #5a6b85); margin: 0; }

.sh-syarat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.sh-card {
  position: relative;
  padding: 28px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.sh-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.sh-card-ico {
  width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(255,107,0,.12);
  color: var(--orange, #ff6b00);
  font-size: 1.3rem;
  margin-bottom: 18px;
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease);
}
.sh-card:hover .sh-card-ico { transform: rotate(-8deg); background: var(--orange, #ff6b00); color: #fff; }
.sh-card h4 {
  font-family: var(--font-display);
  font-size: 1.12rem; color: var(--ink); margin: 0 0 8px;
}
.sh-card p {
  color: var(--muted, #5a6b85); font-size: .92rem; line-height: 1.6; margin: 0 0 14px;
}
.sh-card-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--orange, #ff6b00);
}

.sh-help {
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 32px;
  align-items: center;
  padding: 44px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-lg);
}
.sh-help h3 {
  font-family: var(--font-display);
  font-size: 1.85rem; color: var(--ink); margin: 10px 0 10px;
}
.sh-help p { color: var(--muted, #5a6b85); line-height: 1.7; margin: 0 0 22px; }
.sh-help-media { display: grid; place-items: center; }
.sh-help-avatar {
  width: 190px; height: 190px; border-radius: 50%; object-fit: cover;
  box-shadow: var(--shadow-lg);
}
.sh-qris {
  padding: 16px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.sh-qris img { display: block; width: 220px; max-width: 100%; height: auto; }

/* kartu syarat & bantuan: tampil bertahap saat di-scroll (memakai sistem reveal) */
.spmb-home .reveal-scale-fade {
  transition-delay: calc(var(--i, 0) * 90ms);
}

@media (max-width: 900px) {
  .sh-hero, .sh-help { grid-template-columns: 1fr; }
  .sh-photo { order: -1; width: 240px; }
  .sh-syarat-grid { grid-template-columns: repeat(2, 1fr); }
  .sh-help { padding: 28px; }
}
@media (max-width: 560px) {
  .spmb-home { padding: 60px 0; }
  .sh-hero { margin-bottom: 52px; }
  .sh-syarat-grid { grid-template-columns: 1fr; }
  .sh-help-avatar { width: 140px; height: 140px; }
  .sh-actions { width: 100%; }
  .sh-actions .prog-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sh-dot, .sh-photo-ring { animation: none; }
}

/* ============ INFO GEMPA (strip kecil di bawah beranda) ============ */
.gempa-strip-wrap {
  padding: 0 0 28px;
  background: transparent;
}

.gempa-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 16px;
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.4;
}

.gempa-strip[hidden] { display: none; }

.gempa-strip-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.gempa-strip-label i {
  color: var(--gold-deep, #b8862e);
  font-size: 12px;
}

.gempa-strip-mag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--gold-soft, #f1d890);
  font-weight: 700;
  font-size: 12px;
}

.gempa-strip-wilayah {
  flex: 1 1 260px;
  min-width: 0;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gempa-strip-meta {
  white-space: nowrap;
  color: var(--ink-muted);
}

.gempa-strip-link {
  margin-left: auto;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.gempa-strip-link:hover {
  color: var(--gold-deep, #b8862e);
  text-decoration: underline;
}

.gempa-strip-link i {
  font-size: 10px;
  margin-left: 2px;
}

@media (max-width: 640px) {
  .gempa-strip { padding: 9px 12px; gap: 6px 10px; font-size: 12px; }
  .gempa-strip-wilayah { flex-basis: 100%; order: 3; white-space: normal; }
  .gempa-strip-meta { order: 4; }
  .gempa-strip-link { margin-left: 0; }
}

/* ===== SPMB closed: versi sederhana (tanpa ilustrasi) ===== */
.spmb-state-closed .spmb-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

/* ---- detail kompetensi: penyempurnaan (v66) ---- */
#kdVisiMisi, #kdJourney { scroll-margin-top: 84px; }
.kd-vm-text h2 em { font-style: normal; color: var(--orange); }
.kd-misi ul { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.kd-visi p, .kd-misi p { margin: 0 0 8px; }
.kd-hero-text .back-link { margin-bottom: 18px; }
.kd-cta .prog-btn { cursor: pointer; font-family: inherit; }
.kd-hero, .kd-visimisi, .kd-journey { overflow-x: clip; }
@media (max-width: 820px) {
  .kd-photo.kd-right { max-width: 520px; width: calc(100% - 14px); margin-inline: auto; }
  .kd-chip { left: 12px; }
}
@media (max-width: 420px) {
  .kd-hero { padding: 40px 0 52px; }
  .kd-card { padding: 26px 20px 24px; }
  .kd-pill { font-size: .7rem; padding: 8px 14px; }
}
