/* slides/slides.css — dek presentasi sekolah. Palet senada situs:
   teal struktur, putih panggung, emas aksen. */
:root {
  --d-teal:   #0f766e;
  --d-teal-d: #115e59;
  --d-ink:    #102a2a;
  --d-muted:  #4b5f60;
  --d-line:   rgba(16,42,42,.12);
  --d-gold:   #b7791f;
  --d-paper:  #ffffff;
  --d-bg:     #eef4f3;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Mona Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--d-bg);
  color: var(--d-ink);
  -webkit-font-smoothing: antialiased;
}

.deck { display: flex; flex-direction: column; min-height: 100%; }

/* ── Bilah kontrol ─────────────────────────────────────────── */
.deck-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
  padding: .6rem 1rem;
  background: var(--d-teal-d); color: #fff;
  position: sticky; top: 0; z-index: 10;
}
.deck-bar__home { display: inline-flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; font-weight: 700; min-width: 0; }
.deck-bar__home svg { width: 1.4rem; height: 1.4rem; flex: none; }
.deck-bar__home span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-bar__actions { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.deck-btn {
  appearance: none; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08);
  color: #fff; font: inherit; font-weight: 700; font-size: .82rem;
  min-width: 2.2rem; height: 2.2rem; padding: 0 .6rem;
  border-radius: 999px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .15s ease, transform .1s ease;
}
.deck-btn:hover { background: rgba(255,255,255,.2); }
.deck-btn:active { transform: translateY(1px); }
.deck-btn--wide { padding: 0 .95rem; }
.deck-count { font-size: .8rem; font-weight: 700; opacity: .9; min-width: 3.4rem; text-align: center; }

/* ── Panggung ──────────────────────────────────────────────── */
.deck-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: clamp(1rem, 3vw, 2.5rem); }

.slide {
  width: min(1120px, 100%);
  aspect-ratio: 16 / 9;
  background: var(--d-paper);
  border-radius: 1.25rem;
  border: 1px solid var(--d-line);
  box-shadow: 0 24px 60px -30px rgba(15,61,58,.45);
  padding: clamp(1.4rem, 4vw, 3.4rem);
  position: relative;
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.slide.is-active { display: flex; }
.slide::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: linear-gradient(var(--d-teal), var(--d-gold));
}

.slide__inner { flex: 1; min-height: 0; overflow: auto; }
.slide__kicker { margin: 0 0 .4rem; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--d-gold); }
.slide__title { margin: 0 0 1rem; font-size: clamp(1.5rem, 1rem + 2.4vw, 2.6rem); line-height: 1.12; color: var(--d-ink); }
.slide__body { font-size: clamp(.95rem, .8rem + .5vw, 1.15rem); }
.slide__foot { margin: .75rem 0 0; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--d-muted); }

.deck-subhead { margin: 1.1rem 0 .4rem; font-size: 1.05em; color: var(--d-teal-d); font-weight: 800; }
.deck-p { margin: .5rem 0; line-height: 1.6; color: var(--d-muted); max-width: 60ch; }
.deck-bullets { margin: .5rem 0; padding-left: 1.2rem; line-height: 1.55; color: var(--d-muted); }
.deck-bullets li { margin: .28rem 0; }
.deck-bullets li::marker { color: var(--d-gold); }

.deck-kv { display: grid; grid-template-columns: minmax(7rem, 14rem) 1fr; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--d-line); }
.deck-kv:last-child { border-bottom: 0; }
.deck-kv dt { margin: 0; color: var(--d-muted); font-size: .92em; }
.deck-kv dd { margin: 0; font-weight: 700; color: var(--d-ink); }

.slide__body { --stat-cols: repeat(auto-fit, minmax(9rem, 1fr)); }
.deck-stat { display: inline-grid; margin: .35rem 1.5rem .35rem 0; }
.deck-stat b { font-size: clamp(1.6rem, 1rem + 3vw, 2.8rem); color: var(--d-teal); line-height: 1; }
.deck-stat span { font-size: .85em; color: var(--d-muted); margin-top: .2rem; }

/* ── Sampul ────────────────────────────────────────────────── */
.slide--cover { background: linear-gradient(150deg, var(--d-teal-d), var(--d-teal)); border-color: transparent; color: #fff; }
.slide--cover::before { background: var(--d-gold); }
.slide--cover .slide__inner { display: flex; flex-direction: column; justify-content: center; text-align: center; align-items: center; }
.slide--cover .slide__kicker { color: #ffe6b8; }
.slide--cover .slide__title { color: #fff; font-size: clamp(2rem, 1rem + 4vw, 3.6rem); }
.slide--cover .deck-p { color: rgba(255,255,255,.9); text-align: center; max-width: 46ch; }
.slide--cover .slide__foot { color: rgba(255,255,255,.7); text-align: center; }
.slide__mark { width: clamp(2.5rem, 6vw, 4rem); height: auto; color: #ffe6b8; margin-bottom: .75rem; }

/* ── Progres ───────────────────────────────────────────────── */
.deck-progress { height: 4px; background: var(--d-line); }
.deck-progress__bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--d-teal), var(--d-gold)); transition: width .25s ease; }

/* ── Zona klik navigasi (kiri/kanan panggung) ─────────────── */
.deck-stage { position: relative; }
.deck-nav-zone { position: absolute; top: 0; bottom: 0; width: 12%; cursor: pointer; z-index: 5; }
.deck-nav-zone--prev { left: 0; }
.deck-nav-zone--next { right: 0; }
@media (max-width: 700px) { .deck-nav-zone { display: none; } }

/* ── Mode gelap sistem (opsional, ringan) ─────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { --d-bg: #0b1917; }
}

/* ── Cetak → PDF lanskap, satu slide per halaman ──────────── */
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff; }
  .deck-bar, .deck-progress, .deck-nav-zone { display: none !important; }
  .deck-stage { display: block; padding: 0; }
  .slide {
    display: flex !important;
    width: 100%; max-width: none;
    aspect-ratio: auto; height: 100vh;
    border: 0; border-radius: 0; box-shadow: none;
    padding: 12mm 16mm;
    break-after: page; page-break-after: always;
  }
  .slide:last-child { break-after: auto; page-break-after: auto; }
  .slide__inner { overflow: visible; }
  .slide--cover { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .deck-p, .deck-bullets { max-width: none; }
}

/* ── Ikon di dalam tombol I/O ─────────────────────────────── */
.deck-btn svg { width: 1.05rem; height: 1.05rem; flex: none; }
.deck-btn--wide { gap: .4rem; }
.deck-bar__io  { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.deck-bar__nav { display: flex; align-items: center; gap: .4rem; }

/* ── PONSEL (≤700px): slide fullscreen, kontrol dibagi
   atas (judul tengah + Simpan PDF/PPTX) & bawah (nomor kiri,
   panah tengah, layar-penuh kanan). ───────────────────────── */
@media (max-width: 700px) {
  .deck { min-height: 100dvh; }

  .deck-bar {
    flex-direction: column;
    gap: .5rem;
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-top));
  }
  .deck-bar__home  { justify-content: center; width: 100%; font-size: .95rem; }
  .deck-bar__io    { width: 100%; justify-content: center; }
  .deck-bar__io .deck-btn--wide { flex: 1; min-width: 0; max-width: 12rem; }

  /* nomor + panah + layar-penuh → bilah TETAP di dasar layar */
  .deck-bar__nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 30;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom));
    background: var(--d-teal-d);
    border-top: 1px solid rgba(255,255,255,.15);
  }
  .deck-bar__nav .deck-count      { order: 0; min-width: 3rem; text-align: left; }
  .deck-bar__nav [data-deck-prev] { order: 1; margin-left: auto; }
  .deck-bar__nav [data-deck-next] { order: 2; }
  .deck-bar__nav [data-deck-full] { order: 3; margin-left: auto; }

  /* panggung: slide mengisi layar */
  .deck-stage { padding: 0; padding-bottom: 3.4rem; }
  .slide {
    width: 100%;
    aspect-ratio: auto;
    min-height: calc(100dvh - 3.4rem);
    border-radius: 0;
    border: 0;
    box-shadow: none;
    padding: 1.5rem 1.25rem 1.5rem;
  }
  .slide::before { width: 4px; }
  .slide__title  { font-size: clamp(1.35rem, 1rem + 4vw, 2rem); }
  .slide__body   { font-size: clamp(.9rem, .82rem + 1vw, 1.05rem); }

  .deck-progress { position: fixed; left: 0; right: 0; bottom: 3.4rem; z-index: 29; }
  .slide__foot { display: none; }
}
