/* --- Stats Card --- */
.stat-card{background:#fff;border-radius:var(--radius-xl);border:1px solid var(--neutral-200);box-shadow:var(--shadow-1)}
.stat-card .stat-value{font-size:1.5rem;font-weight:800;color:var(--neutral-900);letter-spacing:-.02em}
.stat-card .stat-label{font-size:.9rem;color:var(--neutral-500)}
/* --- Video Frame --- */
.video-frame{border-radius:var(--radius-xl)}
.ratio-16x9{position:relative;width:100%;padding-top:56.25%}
.ratio-16x9 iframe{position:absolute;inset:0;border:0;width:100%;height:100%}

/* ===== News Detail (post detail) ===== */
.newsd-wrap{max-width:980px;margin:0 auto;padding:16px 12px}
.newsd-title{margin:10px 0 8px;font-weight:800;line-height:1.2;color:#0f172a;font-size:clamp(22px,4.2vw,36px)}

/* Hero responsif */
.newsd-hero{position:relative;border-radius:20px;overflow:hidden;background:#0b0b0b;box-shadow:0 10px 24px rgba(2,6,23,.06)}
.newsd-hero .media{position:relative;aspect-ratio:var(--hero-mobile,16/9)}
@media (min-width:992px){ .newsd-hero .media{aspect-ratio:var(--hero-desktop,16/9)} }
.newsd-hero img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.95;transition:transform .4s ease}
.newsd-hero:hover img{transform:scale(1.02)}
.newsd-hero .grad{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.55),rgba(0,0,0,.2) 38%,rgba(0,0,0,0))}

/* Meta & share */
.newsd-meta{display:flex;flex-wrap:wrap;gap:8px 10px;color:#475569;font-size:12px;margin-bottom:10px}
@media (min-width:768px){ .newsd-meta{font-size:13px} }
.newsd-chip{display:inline-flex;align-items:center;gap:8px;background:#f8fafc;border:1px solid #e5e7eb;padding:6px 10px;border-radius:999px}
.newsd-chip svg{width:16px;height:16px}
.newsd-share{display:flex;gap:8px;margin:8px 0 18px;flex-wrap:wrap}
.newsd-share .btn-share{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;border:1px solid #e5e7eb;background:#fff}
.newsd-share .btn-share:hover{box-shadow:0 8px 18px rgba(2,6,23,.08);transform:translateY(-1px)}

/* Grid: 1 kolom di mobile, 2 kolom di desktop */
.newsd-content{display:grid;gap:20px;grid-template-columns:1fr}
@media (min-width:992px){ .newsd-content{grid-template-columns:minmax(0,1fr) 320px} }
@media (min-width:1200px){ .newsd-content{grid-template-columns:minmax(0,1fr) 340px} }
/* !!! KUNCI: biar item grid tidak memaksa lebar */
.newsd-content > *{min-width:0}

/* Artikel & guardrails konten editor */
.newsd-article{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:20px}
@media (min-width:768px){ .newsd-article{padding:22px} }
.newsd-article .wysiwyg,
.newsd-article .wysiwyg *{box-sizing:border-box}
.newsd-article .wysiwyg{overflow-wrap:anywhere;word-break:break-word}
.newsd-article .wysiwyg p{line-height:1.75;font-size:1rem}
@media (min-width:768px){ .newsd-article .wysiwyg p{font-size:1.05rem;line-height:1.8} }

/* Media dari editor */
.newsd-article .wysiwyg img,
.newsd-article .wysiwyg video,
.newsd-article .wysiwyg iframe{max-width:100%;width:100%;height:auto}
.newsd-article .wysiwyg iframe{aspect-ratio:16/9;border:0}

/* Table aman di mobile: bisa scroll tanpa melebarkan halaman */
.newsd-article .wysiwyg table{display:block;max-width:100%;width:100%;overflow-x:auto;border-collapse:collapse}
.newsd-article .wysiwyg th,
.newsd-article .wysiwyg td{white-space:normal}/* JANGAN nowrap, bikin melar */
.newsd-article .wysiwyg pre{white-space:pre-wrap;overflow:auto;word-break:break-word}

/* Kalau tetap ingin sembunyikan gambar body (biar tidak dobel dgn hero), aktifkan: */
/*
.newsd-article .wysiwyg img,
.newsd-article .wysiwyg picture,
.newsd-article .wysiwyg figure{display:none !important}
*/

/* Sidebar */
.newsd-side{width:100%}
.newsd-side .card{border-radius:14px;border:1px solid #e5e7eb}
@media (min-width:992px){ .newsd-side{position:sticky;top:18px} }

/* Mobile tweak (≤480px): hero lebih pendek & padding rapih */
@media (max-width:480px){
  .newsd-hero .media{aspect-ratio:21/9;max-height:180px}
  .newsd-hero img{object-position:center 25%}
  .newsd-share .btn-share{width:34px;height:34px}
  .newsd-wrap{padding:14px 10px}
  .newsd-article{padding:16px 12px}
}

/* Sembunyikan semua gambar di body artikel kalau ada hero */
.newsd-article.has-hero .wysiwyg img,
.newsd-article.has-hero .wysiwyg picture,
.newsd-article.has-hero .wysiwyg figure {
  display: none !important;
}

/* Kalau mau memaksa tampil gambar tertentu, bungkus dengan .keep-img */
.newsd-article .wysiwyg .keep-img img,
.newsd-article .wysiwyg .keep-img picture,
.newsd-article .wysiwyg .keep-img figure {
  display: initial !important;
  max-width: 100%;
  height: auto;
}
