/* ===========================================================
   CMS KebonAI — CSS plugin (GABUNGAN, jangan diedit manual)
   Sumber: admin/plugins/<slug>/style.css
   =========================================================== */

/* ---- plugin: blog ---- */
/* ==========================================================
   Plugin Blog Berita — grid thumbnail (tema "Sekolah di Lereng Lawu")
   Ikut variabel tema website klien (--green/--gold/--ink/--muted).
   ========================================================== */

.cms-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.cms-blog-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white, #FEFCF5);
  border: 1px solid var(--line, #E7E1D0);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cms-blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px -12px rgba(15, 51, 34, .18);
  border-color: var(--gold, #E9A83A);
}

.cms-blog-th {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--green-light, #E8F0E7);
  flex: 0 0 auto;
}
.cms-blog-th-none {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  opacity: .5;
}

.cms-blog-body { padding: 18px 19px 21px; }

.cms-blog-date {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--gold-dark, #C47F1C);
  margin-bottom: 6px;
}

.cms-blog-title {
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink, #26342C);
}

.cms-blog-sum {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted, #66746B);
  margin: 0;
}

@media (max-width: 560px) {
  .cms-blog-grid { grid-template-columns: 1fr; gap: 16px; }
  .cms-blog-th { height: 160px; }
}


/* ---- plugin: hero_video ---- */
/* ==========================================================================
   CMS KebonAI — Tampilan Plugin (untuk WEBSITE klien)
   ==========================================================================
   File ini di-load oleh halaman statis klien. Warna pakai variabel tema
   situs kalau ada (--green/--gold), kalau gak ada pakai default KebonAI.
   ========================================================================== */

:root {
  --cms-accent: var(--teal, var(--green, #05829a));
  --cms-accent-soft: rgba(5, 130, 154, .12);
  --cms-muted: var(--muted, #6b7280);
  --cms-ink: var(--ink, #1f2937);
  --cms-gold: var(--gold, #f8d545);
}

/* ---------- Milestone Timeline ---------- */
.cms-milestone {
  display: flex; flex-direction: column; gap: 18px;
  position: relative; padding-left: 30px;
  max-width: 760px; margin: 0 auto;
}
.cms-milestone::before {
  content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--cms-accent), rgba(5,130,154,.15));
}
.cms-milestone-item { position: relative; display: flex; gap: 16px; align-items: flex-start; }
.cms-milestone-item::before {
  content: ''; position: absolute; left: -30px; top: 4px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--cms-accent);
  box-shadow: 0 0 0 4px rgba(5,130,154,.18);
  border: 3px solid #fff;
}
.cms-ms-year {
  font-weight: 800; color: var(--cms-accent);
  min-width: 66px; font-variant-numeric: tabular-nums;
  font-size: 16px; line-height: 1.3;
}
.cms-ms-body h4 { font-size: 16px; font-weight: 700; margin-bottom: 3px; color: var(--cms-ink); }
.cms-ms-body p { font-size: 13.5px; color: var(--cms-muted); line-height: 1.6; }

/* ---------- Bar Capaian ---------- */
.cms-progress-wrap { display: flex; flex-direction: column; gap: 20px; max-width: 640px; margin: 0 auto; }
.cms-progress .cms-pr-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14.5px; font-weight: 600; color: var(--cms-ink); margin-bottom: 8px;
}
.cms-progress .cms-pr-head b { color: var(--cms-accent); font-size: 16px; }
.cms-progress .cms-pr-bar {
  height: 11px; border-radius: 99px; background: var(--cms-accent-soft); overflow: hidden;
}
.cms-progress .cms-pr-bar span {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--cms-accent), var(--cms-gold, #f8d545));
  transition: width .9s cubic-bezier(.4,0,.2,1);
}

/* ---------- Grid Prestasi ---------- */
.cms-prestasi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px;
}
.cms-prestasi-card {
  background: #fff; /* kartu tetap putih di atas latar abu */ border: 1px solid var(--line, #e5e7eb);
  border-radius: 16px; padding: 20px;
  box-shadow: 0 10px 30px -14px rgba(5,130,154,.20);
  transition: transform .25s ease, box-shadow .25s ease;
}
.cms-prestasi-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -16px rgba(5,130,154,.32); }
.cms-prestasi-card .cms-pr-ico { font-size: 26px; margin-bottom: 10px; }
.cms-prestasi-card h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 5px; color: var(--cms-ink); }
.cms-prestasi-card .cms-pr-who { font-size: 13.5px; color: #374151; }
.cms-prestasi-card .cms-pr-year {
  font-size: 12px; color: var(--cms-gold); margin-top: 6px; font-weight: 700;
}

/* ---------- Hero Video Carousel (AUTO-PLAY + AUTO-NEXT + SWIPE) ---------- */
.cms-hero-video {
  position: relative; border-radius: 18px; overflow: hidden;
  background: #033c48; box-shadow: 0 24px 60px -20px rgba(5,130,154,.45);
  max-width: 1000px; margin: 0 auto;
  touch-action: pan-y;          /* geser horizontal = ganti slide, vertikal = scroll */
  outline: none;
  user-select: none;
}
.cms-hero-video:focus-visible { box-shadow: 0 0 0 3px var(--cms-gold, #f8d545); }
.cms-hv-track { position: relative; aspect-ratio: 16/9; width: 100%; }
.cms-hv-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity .55s ease; pointer-events: none;
}
.cms-hv-slide.active { opacity: 1; pointer-events: auto; }
/* JS menyetel display:none untuk slide non-aktif (hemat resource);
   aturan ini menjaga kalau JS belum jalan — slide 1 tetap terlihat. */
.cms-hv-slide:first-child { opacity: 1; pointer-events: auto; }
.cms-hv-slide.active:first-child { opacity: 1; }

/* Progress bar tipis di atas (menunjukkan durasi video aktif) */
.cms-hv-progress {
  position: absolute; left: 0; top: 0; height: 3px; width: 0%;
  background: var(--cms-gold, #f8d545); z-index: 6;
  transition: width .25s linear; pointer-events: none;
}
.cms-hv-progress.on { transition: width 1s linear; }

/* --- Facade: thumbnail + tombol play custom (bersih) --- */
.cms-hv-facade {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; padding: 0; margin: 0; cursor: pointer;
  background: #000; overflow: hidden; display: block;
}
.cms-hv-facade img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease, filter .3s ease;
  filter: brightness(.82);
}
.cms-hv-facade:hover img { transform: scale(1.04); filter: brightness(.92); }
.cms-hv-facade.cms-hv-hidden { display: none; }

/* Tombol play custom (aksen kuning sekolah) */
.cms-hv-playbtn {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 74px; height: 52px;
  transition: transform .25s ease, opacity .25s ease;
  filter: drop-shadow(0 8px 22px rgba(0,0,0,.45));
}
.cms-hv-facade:hover .cms-hv-playbtn { transform: translate(-50%, -50%) scale(1.1); }
.cms-hv-playbtn svg { width: 100%; height: 100%; display: block; }

/* Keterangan di bawah (teks saja, minimalis) */
.cms-hv-facade-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 20px 14px; text-align: left;
  color: #fff; font-weight: 600; font-size: 14.5px;
  background: linear-gradient(180deg, transparent, rgba(3,60,72,.85));
  pointer-events: none;
}

/* --- Player YouTube asli (muncul setelah klik) --- */
.cms-hv-iframe-wrap { position: absolute; inset: 0; width: 100%; height: 100%; }
.cms-hv-iframe-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Dot navigasi */
.cms-hv-dots {
  position: absolute; bottom: 12px; right: 16px; left: auto;
  display: flex; justify-content: flex-end; gap: 8px; z-index: 5;
}
.cms-hv-dot {
  width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0;
  background: rgba(255,255,255,.45); cursor: pointer; transition: all .2s ease;
}
.cms-hv-dot.active { background: var(--cms-gold, #f8d545); transform: scale(1.25); }
.cms-hv-dot:hover { background: rgba(255,255,255,.85); }

/* Petunjuk geser (hilang setelah interaksi pertama) */
.cms-hv-swipehint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 7px; z-index: 5;
  background: rgba(3,60,72,.72); color: #fff;
  padding: 6px 14px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  backdrop-filter: blur(6px);
  transition: opacity .4s ease;
  pointer-events: none;
}
.cms-hv-swipehint.cms-hv-fade { opacity: 0; }
.cms-hv-swipehint svg { width: 15px; height: 15px; }
/* Tombol panah (desktop, muncul saat hover) */
.cms-hv-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(3,60,72,.66); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 6; opacity: 0; transition: opacity .25s ease, background .2s ease;
  backdrop-filter: blur(6px);
}
.cms-hero-video:hover .cms-hv-nav, .cms-hv-nav:focus-visible { opacity: 1; }
.cms-hv-nav:hover { background: var(--cms-gold, #f8d545); color: #033c48; }
.cms-hv-nav.prev { left: 14px; }
.cms-hv-nav.next { right: 14px; }
.cms-hv-nav svg { width: 20px; height: 20px; }

/* ---------- Galeri Foto ---------- */
.cms-galeri {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px;
}
.cms-gal-item { position: relative; border-radius: 14px; overflow: hidden; }
.cms-gal-item img {
  width: 100%; height: 180px; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.cms-gal-item:hover img { transform: scale(1.07); }
.cms-gal-item span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px;
  font-size: 12.5px; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.75));
}

/* ---------- Responsif ---------- */
@media (max-width: 640px) {
  .cms-milestone { padding-left: 26px; }
  .cms-milestone-item { gap: 10px; }
  .cms-ms-year { min-width: 52px; font-size: 14px; }
  .cms-prestasi-grid { grid-template-columns: 1fr; }
  .cms-galeri { grid-template-columns: repeat(2, 1fr); }
  .cms-gal-item img { height: 130px; }
}


