/* ==========================================================================
   NANSARUNAI.ID - gaya utama halaman publik
   Karakter: portal berita padat, tipografi kecil-tajam, banyak thumbnail,
   garis pemisah tipis, tanpa sudut membulat berlebihan.
   ========================================================================== */

:root {
  --green: #0B6E4F;
  --green-dark: #075139;
  --green-soft: #E7F2EE;
  --amber: #E08A00;
  --red: #C31D1D;
  --ink: #12181F;
  --body: #333B45;
  --muted: #6B7280;
  --line: #E3E6EA;
  --line-soft: #EFF1F4;
  --bg: #F4F5F7;
  --white: #fff;
  --wrap: 1150px;
  --gap: 16px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(18, 24, 31, .06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.28; font-weight: 700; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 14px; max-width: 100%; min-width: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 12px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--green); color: #fff;
  padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ============================== HEADER =================================== */

.site-head { background: var(--white); border-bottom: 1px solid var(--line); }

.topbar { background: var(--green-dark); color: rgba(255, 255, 255, .88); font-size: 11.5px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 28px; }
.topbar-date { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-links { display: flex; gap: 14px; }
.topbar-links a { color: rgba(255, 255, 255, .88); }
.topbar-links a:hover { color: #fff; text-decoration: underline; }

.head-main { border-bottom: 1px solid var(--line-soft); }
.head-inner { display: flex; align-items: center; gap: 18px; padding: 8px 12px; }
.brand { flex: 0 0 auto; display: block; }
.brand-logo { height: 54px; width: auto; }

.site-search { flex: 1 1 auto; display: flex; max-width: 460px; margin: 0 auto; }
.site-search input {
  flex: 1 1 auto; height: 34px; padding: 0 10px; border: 1px solid var(--line);
  border-right: 0; border-radius: 2px 0 0 2px; background: #FAFBFC; color: var(--ink);
}
.site-search input:focus { outline: 2px solid var(--green-soft); border-color: var(--green); }
.site-search button {
  height: 34px; padding: 0 16px; border: 0; background: var(--green); color: #fff;
  font-weight: 600; font-size: 13px; border-radius: 0 2px 2px 0; cursor: pointer;
}
.site-search button:hover { background: var(--green-dark); }

.head-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.btn-ghost {
  border: 1px solid var(--green); color: var(--green); padding: 5px 12px; border-radius: 2px;
  font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px;
}
.btn-ghost:hover { background: var(--green); color: #fff; }

.nav-toggle {
  display: none; align-items: center; gap: 6px; background: var(--green); color: #fff;
  border: 0; height: 32px; padding: 0 12px; font-size: 12.5px; font-weight: 700; border-radius: 2px;
}
.nav-toggle-bars { width: 14px; height: 2px; background: #fff; box-shadow: 0 5px 0 #fff, 0 -5px 0 #fff; }

.mainnav { background: var(--green); }
.nav-list {
  display: flex; align-items: stretch; gap: 0; overflow-x: auto; scrollbar-width: thin;
}
.nav-list li { flex: 0 0 auto; }
.nav-list a {
  display: block; padding: 9px 11px; color: rgba(255, 255, 255, .92);
  font-size: 12px; font-weight: 700; letter-spacing: .4px; white-space: nowrap;
  border-left: 1px solid rgba(255, 255, 255, .12);
}
.nav-list li:first-child a { border-left: 0; }
.nav-list a:hover { background: var(--green-dark); color: #fff; }
.nav-list a.is-active { background: var(--amber); color: #fff; }

.mobile-drawer { border-top: 1px solid var(--line); background: #fff; padding: 12px; }
.drawer-search { display: flex; margin-bottom: 10px; }
.drawer-search input { flex: 1; height: 36px; padding: 0 10px; border: 1px solid var(--line); }
.drawer-search button { height: 36px; padding: 0 14px; border: 0; background: var(--green); color: #fff; font-weight: 600; }
.drawer-nav a {
  display: block; padding: 9px 4px; border-bottom: 1px solid var(--line-soft);
  font-weight: 600; font-size: 13px; color: var(--ink);
}

/* ============================== TICKER =================================== */

.ticker { background: var(--white); border-bottom: 1px solid var(--line); }
.ticker-inner { display: flex; align-items: center; gap: 10px; height: 38px; overflow: hidden; }
.ticker-label {
  flex: 0 0 auto; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 800;
  letter-spacing: .6px; padding: 5px 10px; border-radius: 2px;
}
/* Satu baris berjalan: `.ticker-items` = baris flex yang TIDAK boleh membungkus,
   berisi dua `.ticker-group` kembar berdampingan.
   `flex: 0 0 auto` WAJIB: tanpa itu elemen ini ikut menyusut selebar track
   (flex-shrink default 1), sehingga `translateX(-50%)` = setengah lebar track,
   bukan selebar satu grup — animasinya jadi melompat setiap putaran, bukan
   berjalan mulus. Isi headline sudah diulang sampai cukup panjang (layout.js)
   agar total lebar selalu melebihi track, jadi tidak pernah ada celah kosong. */
.ticker-track { flex: 1 1 auto; overflow: hidden; position: relative; display: flex; }
.ticker-items {
  display: flex; flex: 0 0 auto; flex-wrap: nowrap; align-items: center; width: max-content;
  animation: ticker-scroll 44s linear infinite; will-change: transform;
}
.ticker-track:hover .ticker-items { animation-play-state: paused; }
.ticker-group {
  display: flex; flex: 0 0 auto; align-items: center; gap: 14px; white-space: nowrap;
  padding-right: 14px;
}
.ticker-items span, .ticker-items a { font-size: 13px; color: var(--ink); font-weight: 500; white-space: nowrap; }
.ticker-sep { color: var(--amber); font-weight: 800; flex: 0 0 auto; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-items { animation: none; } }

/* ============================== IKLAN =================================== */

.ad-slot {
  position: relative; background: var(--white); border: 1px solid var(--line);
  padding: 10px 10px 8px; margin: 0 0 16px; text-align: center;
}
.ad-slot .ad-tag {
  position: absolute; top: 0; left: 0; background: var(--line-soft); color: var(--muted);
  font-size: 9.5px; letter-spacing: .8px; padding: 2px 6px; font-weight: 700;
}
.ad-slot .ad-img { width: 100%; height: auto; margin: 6px auto 0; object-fit: cover; }
.ad-left_sidebar .ad-img, .ad-right_sidebar .ad-img { max-width: 300px; }
.ad-top_banner .ad-img, .ad-bottom_banner .ad-img { max-width: 100%; }
.top-banner-slot { margin: 14px auto; }
.top-banner-slot .ad-slot { margin-bottom: 0; }
.ad-between, .ad-inline, .ad-after-source { margin: 18px 0; }
.ad-between .ad-slot, .ad-inline .ad-slot, .ad-after-source .ad-slot { margin: 0; }
.bottom-banner { margin: 22px auto 6px; }
.ad-mobile_banner { display: none; }

/* ============================ SUSUNAN KOLOM ============================== */

.page-main { padding: 16px 0 30px; }

.layout-3col {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 300px;
  gap: var(--gap);
  align-items: start;
}
.layout-listing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: var(--gap);
  align-items: start;
}
.layout-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  /* kolom artikel ±700px + sidebar ±300px, terpusat seperti portal berita */
  max-width: 1030px;
  margin: 0 auto;
}
.col-center, .col-left, .col-right { min-width: 0; }
.col-left, .col-right { position: static; }

/* =========================== HERO ATAS (BERANDA) ==========================
   Blok lebar penuh di paling atas beranda untuk berita TERBARU.
   Gambar besar di kiri, teks (kategori, judul, lead, waktu) di kanan.
   Di bawahnya LANGSUNG katalog BERITA TERKINI.                                */

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  padding: 14px;
  margin-bottom: 16px;
}
.hero-top .hero-media { display: block; overflow: hidden; background: var(--line-soft); }
.hero-top .hero-media img { width: 100%; height: 370px; object-fit: cover; }
.hero-top .hero-title { font-size: 29px; margin: 10px 0 9px; letter-spacing: -.5px; }
.hero-top .hero-lead { margin: 0 0 10px; font-size: 15px; color: #414B57; }
.hero-top .hero-meta { font-size: 12.5px; }

/* ============================== KARTU/TILE =============================== */

.tile { display: flex; gap: 10px; min-width: 0; }
.tile-img { flex: 0 0 auto; width: 104px; overflow: hidden; background: var(--line-soft); }
.tile-img img { width: 100%; height: 70px; object-fit: cover; }
.tile-body { min-width: 0; }
.tile-cat {
  display: inline-block; color: var(--cat, var(--green)); font-size: 10.5px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase; margin-bottom: 2px;
}
.tile-title { font-size: 13.5px; font-weight: 600; }
.tile-title a { color: var(--ink); }
.tile-title a:hover { color: var(--green); }
.tile-time { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; }

.tile-sm { background: var(--white); border: 1px solid var(--line); padding: 8px; }
.tile-sm .tile-img { width: 92px; }
.tile-sm .tile-img img { height: 62px; }

/* ============================= HEADLINE UTAMA ============================ */

.hero-headline {
  background: var(--white); border: 1px solid var(--line); padding: 12px; margin-bottom: 14px;
}
.hero-media { display: block; overflow: hidden; background: var(--line-soft); }
.hero-media img { width: 100%; height: 350px; object-fit: cover; }
.hero-text { padding-top: 10px; }
.hero-cat {
  display: inline-block; background: var(--cat, var(--green)); color: #fff; font-size: 10.5px;
  font-weight: 800; letter-spacing: .7px; text-transform: uppercase; padding: 3px 8px; border-radius: 2px;
}
.hero-title { font-size: 25px; margin: 8px 0 6px; letter-spacing: -.3px; }
.hero-title a { color: var(--ink); }
.hero-title a:hover { color: var(--green); }
.hero-lead { margin: 0 0 8px; color: var(--body); font-size: 14px; }
.hero-meta { color: var(--muted); font-size: 11.5px; }
.hero-compact .hero-media img { height: 300px; }
.hero-compact .hero-title { font-size: 22px; }

.companion-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px;
}
.companion-grid .tile-sm { flex-direction: column; }
.companion-grid .tile-sm .tile-img { width: 100%; }
.companion-grid .tile-sm .tile-img img { height: 140px; }
.companion-grid .tile-sm .tile-title { font-size: 14.5px; }
.companion-grid .tile-sm .tile-time { font-size: 12px; }

/* =============================== FEED LIST =============================== */

.block-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 2px solid var(--green); padding-bottom: 5px; margin-bottom: 2px;
}
.block-title { font-size: 15px; letter-spacing: .2px; }
.block-title span { position: relative; }
.block-title span::after {
  content: ""; position: absolute; left: 0; right: -100vw; bottom: -7px; height: 0;
}
.block-more { font-size: 11px; font-weight: 700; color: var(--green); letter-spacing: .4px; white-space: nowrap; }
.block-more:hover { color: var(--amber); }

.feed-list, .feed { margin-bottom: 24px; }
.feed-list { border-top: 1px solid var(--line-soft); }

.news-row {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 0;
  border-bottom: 1px solid var(--line); background: transparent;
}
.row-body { flex: 1 1 auto; min-width: 0; }
.row-cat {
  display: inline-block; color: var(--cat, var(--green)); font-size: 10.5px; font-weight: 800;
  letter-spacing: .6px; text-transform: uppercase; margin-bottom: 3px;
}
.row-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.1px; }
.row-title a { color: var(--ink); }
.row-title a:hover { color: var(--green); }
.row-excerpt { margin: 5px 0 0; color: var(--body); font-size: 13px; }
.row-meta { margin-top: 6px; color: var(--muted); font-size: 11.5px; display: flex; gap: 6px; flex-wrap: wrap; }
.row-thumb { flex: 0 0 auto; width: 110px; height: 75px; object-fit: cover; background: var(--line-soft); }
.row-compact { padding: 8px 0; }
.row-compact .row-title { font-size: 13.5px; }
.row-more { margin-top: 12px; }
.btn-outline {
  display: inline-block; border: 1px solid var(--green); color: var(--green); font-weight: 700;
  font-size: 12px; letter-spacing: .4px; padding: 8px 14px; border-radius: 2px;
}
.btn-outline:hover { background: var(--green); color: #fff; }

/* ============================ SECTION KATEGORI =========================== */

.cat-section { margin-bottom: 26px; }
.cat-lead { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 16px; padding-top: 12px; }
.tile-lead { flex-direction: column; }
.tile-lead .tile-img { width: 100%; }
.tile-lead .tile-img img { height: 150px; }
.tile-lead .tile-title { font-size: 15px; }
.cat-rest { min-width: 0; border-top: 1px solid var(--line-soft); }

/* ================================ WIDGET ================================= */

.widget { background: var(--white); border: 1px solid var(--line); margin-bottom: 16px; padding: 10px 12px 12px; }
.widget .block-head { margin-bottom: 10px; }

.pop-list { counter-reset: pop; }
.pop-item { display: flex; gap: 9px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.pop-item:last-child { border-bottom: 0; }
.pop-rank { flex: 0 0 22px; color: var(--green); font-size: 15px; font-weight: 800; line-height: 1.2; }
.pop-item:nth-child(1) .pop-rank { color: var(--red); }
.pop-thumb { flex: 0 0 auto; width: 72px; }
.pop-thumb img { width: 72px; height: 54px; object-fit: cover; background: var(--line-soft); }
.pop-body { min-width: 0; }
.pop-title { display: block; font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.34; }
.pop-title:hover { color: var(--green); }
.pop-meta { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

.trend-row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.trend-list li:last-child .trend-row { border-bottom: 0; }
.trend-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.trend-bar { display: block; height: 7px; background: var(--line-soft); border-radius: 1px; overflow: hidden; }
.trend-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--amber)); }
.trend-hits { font-size: 10.5px; color: var(--muted); }
.trend-row:hover .trend-label { color: var(--green); }

.vid-list { display: grid; gap: 12px; }
.vid-item { display: grid; gap: 6px; }
.vid-thumb { position: relative; display: block; overflow: hidden; background: var(--line-soft); }
.vid-thumb img { width: 100%; height: 146px; object-fit: cover; }
.vid-play {
  position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  background: rgba(0, 0, 0, .55); border: 2px solid #fff; border-radius: 50%;
}
.vid-play::after {
  content: ""; position: absolute; left: 15px; top: 11px; border-left: 12px solid #fff;
  border-top: 8px solid transparent; border-bottom: 8px solid transparent;
}
.vid-dur {
  position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .72); color: #fff;
  font-size: 10.5px; padding: 1px 5px; border-radius: 2px;
}
.vid-title { font-size: 13.5px; font-weight: 600; }
.vid-title a { color: var(--ink); }

.widget-indeks .indeks-list li a,
.indeks-list li a {
  display: flex; justify-content: space-between; gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--ink);
}
.indeks-n { color: var(--muted); font-size: 11.5px; }
.foto-list { display: grid; gap: 10px; }
.foto-list img { width: 100%; height: 92px; object-fit: cover; margin-bottom: 4px; }
.foto-list a { font-size: 12.5px; font-weight: 600; color: var(--ink); }

/* ============================== HALAMAN ================================== */

.page-head { padding: 4px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.page-title { font-size: 22px; letter-spacing: -.2px; }
.page-sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.page-info { margin-top: 6px; color: var(--muted); font-size: 12px; }
.empty-note {
  background: var(--white); border: 1px dashed var(--line); padding: 22px; text-align: center;
  color: var(--muted); font-size: 13.5px;
}

.breadcrumb { padding: 8px 0 12px; font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumb-sep { color: var(--line); }
.crumb-current { color: var(--ink); font-weight: 600; }

.pagination { margin: 18px 0; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 6px; }
.page-link {
  display: block; min-width: 34px; text-align: center; padding: 7px 10px; background: var(--white);
  border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink);
}
.page-link:hover { border-color: var(--green); color: var(--green); }
.page-link.is-active { background: var(--green); border-color: var(--green); color: #fff; }
.page-nav { padding: 7px 12px; font-size: 12px; }
.page-gap { padding: 7px 4px; color: var(--muted); }

/* =========================== DETAIL ARTIKEL ============================== */

.article-detail { background: var(--white); border: 1px solid var(--line); padding: 20px; min-width: 0; }
.article-cat {
  display: inline-block; background: var(--cat, var(--green)); color: #fff; font-size: 10.5px;
  font-weight: 800; letter-spacing: .8px; text-transform: uppercase; padding: 3px 9px; border-radius: 2px;
}
.article-title { font-size: 29px; margin: 10px 0 8px; letter-spacing: -.5px; }
.article-lead { margin: 0 0 12px; font-size: 15.5px; color: #46505C; font-weight: 500; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center; color: var(--muted);
  font-size: 12px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  padding: 9px 0; margin-bottom: 14px;
}
.am-author { color: var(--ink); font-weight: 700; }
.am-sep { color: var(--line); }

.article-figure { margin: 0 0 16px; }
.article-figure img { width: 100%; height: auto; }
.article-figure figcaption { font-size: 11.5px; color: var(--muted); padding-top: 6px; border-bottom: 1px solid var(--line-soft); padding-bottom: 6px; }
.credit { color: #8A929B; }

.share-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 16px; }
.share-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.share-btn {
  border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 11.5px;
  font-weight: 600; padding: 5px 10px; cursor: pointer; border-radius: 2px;
}
.share-btn:hover { border-color: var(--green); color: var(--green); }
.share-btn.copy.is-done { border-color: var(--green); color: var(--green); }

.article-body { font-size: 16px; line-height: 1.75; color: #22282F; }
.article-body p { margin: 0 0 16px; }
.article-body h2, .article-body h3 { font-size: 19px; margin: 22px 0 10px; }
.article-body blockquote {
  margin: 18px 0; padding: 12px 16px; background: var(--green-soft);
  border-left: 4px solid var(--green); font-style: italic; color: #1F3A31;
}
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 20px; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 6px; }
.article-body a { color: var(--green); text-decoration: underline; }
.article-body img { margin: 4px 0 16px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; }
.article-body iframe, .article-body video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }

.article-source { font-size: 12.5px; color: var(--muted); margin: 4px 0 14px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 14px 0 20px; font-size: 12px; }
.article-tags span { color: var(--muted); font-weight: 600; }
.article-tags a { background: var(--line-soft); padding: 3px 8px; color: var(--ink); border-radius: 2px; }
.article-tags a:hover { background: var(--green); color: #fff; }

.related { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }

.comments { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; }
.comment-list { margin: 12px 0 18px; }
.comment-item { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.comment-avatar {
  flex: 0 0 34px; width: 34px; height: 34px; background: var(--green-soft); color: var(--green-dark);
  font-weight: 800; display: grid; place-items: center; border-radius: 50%; font-size: 14px;
}
.comment-head { display: flex; gap: 8px; align-items: baseline; }
.comment-time { color: var(--muted); font-size: 11.5px; }
.comment-text { margin: 4px 0 0; font-size: 13.5px; }
.comment-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
.comment-form { background: #FAFBFC; border: 1px solid var(--line); padding: 14px; display: grid; gap: 10px; }
.comment-form h3 { font-size: 15px; }
.comment-note { margin: 0; font-size: 12px; color: var(--muted); }
.comment-form label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.comment-form input, .comment-form textarea {
  border: 1px solid var(--line); padding: 8px 10px; background: #fff; width: 100%;
}
.form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp-field { position: absolute; left: -9999px; }
.btn-primary {
  background: var(--green); color: #fff; border: 0; padding: 9px 16px; font-weight: 700;
  font-size: 13px; cursor: pointer; border-radius: 2px; display: inline-block;
}
.btn-primary:hover { background: var(--green-dark); color: #fff; }

/* =============================== VIDEO =================================== */

.video-lead { display: grid; gap: 12px; margin-bottom: 18px; }
.video-frame { background: #000; }
.video-frame video, .video-frame iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; display: block; }
.video-lead-text h2 { font-size: 21px; margin: 6px 0; }
.video-desc { font-size: 14.5px; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.video-card h3 { font-size: 14px; margin: 6px 0 3px; }
.video-card .vid-thumb img { height: 158px; }
.video-meta { color: var(--muted); font-size: 11.5px; }
.video-missing { background: var(--line-soft); padding: 30px; text-align: center; color: var(--muted); }

/* =============================== GALERI ================================== */

.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gallery-card img { width: 100%; height: 170px; object-fit: cover; background: var(--line-soft); }
.gallery-card h3 { font-size: 14.5px; margin: 7px 0 3px; }
.gallery-count { color: var(--muted); font-size: 11.5px; }
.gallery-items { display: grid; gap: 16px; margin-top: 8px; }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; height: auto; }
.gallery-item figcaption { font-size: 12.5px; color: var(--muted); padding-top: 6px; }
.gi-num { color: var(--green); font-weight: 800; }

/* =============================== INDEKS ================================== */

.index-block { margin-bottom: 22px; }
.index-list { padding-top: 10px; }
.index-list li { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.index-list a { color: var(--ink); font-size: 14px; font-weight: 600; }
.index-list a:hover { color: var(--green); }
.index-time { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.tag-cloud a { background: var(--white); border: 1px solid var(--line); padding: 5px 10px; font-size: 12.5px; font-weight: 600; }
.tag-cloud a span { color: var(--muted); font-weight: 500; }
.tag-cloud a:hover { border-color: var(--green); color: var(--green); }

.static-page .article-body { max-width: 760px; }
.static-page .article-body h2 { margin-top: 24px; }

.error-page { background: var(--white); border: 1px solid var(--line); padding: 40px 20px; text-align: center; margin-bottom: 24px; }
.error-code { font-size: 62px; color: var(--green); margin: 0; }
.error-msg { color: var(--muted); margin: 6px 0 16px; }

/* =============================== FOOTER ================================== */

.site-foot { background: #0D1B16; color: rgba(255, 255, 255, .72); margin-top: 20px; }
.foot-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 26px; padding-top: 26px; padding-bottom: 20px;
}
.foot-logo { height: 46px; width: auto; margin-bottom: 10px; }
.foot-about { font-size: 12.8px; line-height: 1.65; margin: 0 0 10px; }
.foot-contact { font-size: 12.3px; line-height: 1.6; margin: 0; }
.foot-col h3 { color: #fff; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 10px; }
.foot-col li { margin-bottom: 7px; }
.foot-col a { font-size: 12.8px; color: rgba(255, 255, 255, .74); }
.foot-col a:hover { color: #fff; text-decoration: underline; }
.site-foot a { color: rgba(255, 255, 255, .8); }
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 14px; padding-bottom: 20px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
}
.foot-social { display: flex; flex-wrap: wrap; gap: 12px; }
.foot-social a { font-size: 12.5px; font-weight: 600; }
.copyright { margin: 0; font-size: 11.8px; color: rgba(255, 255, 255, .6); }

/* ============================ TABLET (<=1080px) ========================== */

@media (max-width: 1080px) {
  :root { --wrap: 100%; }
  .layout-3col { grid-template-columns: minmax(0, 1fr) 300px; }
  .layout-3col .col-left {
    grid-column: 1 / -1; grid-row: 3; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--gap);
  }
  .layout-3col .col-left > * { margin-bottom: 0; }
  .layout-3col .col-left .ad-slot { margin-bottom: 0; }
  .tile-img { width: 118px; }
  .tile-img img { height: 80px; }
  .hero-media img { height: 330px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }

  /* hero atas: gambar di atas, teks di bawah */
  .hero-top { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hero-top .hero-media img { height: 320px; }
  .hero-top .hero-title { font-size: 26px; }
  .companion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .companion-grid .tile-sm .tile-img img { height: 132px; }
}

@media (max-width: 980px) {
  .layout-article, .layout-listing { grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
  .article-detail { padding: 16px; }
}

/* ============================= MOBILE (<=860px) ==========================
   Tampilan HP dibesarkan mendekati ukuran "normal" portal berita: teks 15-16px,
   thumbnail lebih besar, jarak antar blok lebih lega — tetap padat, tapi tidak
   lagi terasa kecil. Diuji 320-430px (tidak boleh scroll horizontal).          */

@media (max-width: 860px) {
  body { font-size: 15px; }
  .wrap { padding: 0 14px; }

  .head-inner { gap: 10px; padding: 9px 12px; }
  .brand-logo { height: 46px; }
  .site-search { display: none; }
  .nav-toggle { display: inline-flex; height: 38px; font-size: 13.5px; padding: 0 14px; }
  .mainnav { display: none; }
  .mobile-drawer[hidden] { display: none; }
  .mobile-drawer { padding: 14px; }
  .drawer-search input, .drawer-search button { height: 42px; font-size: 15px; }
  .drawer-nav a { font-size: 15px; padding: 12px 4px; }
  .topbar-links { display: none; }
  .topbar-inner { height: 30px; justify-content: flex-start; font-size: 12.5px; }
  .btn-ghost { padding: 7px 14px; font-size: 13px; }

  .layout-3col, .layout-listing, .layout-article { grid-template-columns: minmax(0, 1fr); }
  /* col-left TETAP di baris ke-3 (warisan aturan 1080px) supaya di HP urutannya:
     hero -> BERITA TERKINI (kolom tengah) -> widget kanan -> iklan & indeks.
     Kalau grid-row dikembalikan ke auto, iklan/indeks kolom kiri akan tampil
     di antara hero dan BERITA TERKINI (katalog Terkini jadi jauh ke bawah). */
  .layout-3col .col-left { grid-row: 3; grid-template-columns: minmax(0, 1fr); }
  .col-right { display: block; }
  .col-left { display: block; }

  .ticker-inner { height: 40px; gap: 8px; }
  .ticker-label { font-size: 12px; padding: 6px 10px; }
  .ticker-items { animation-duration: 34s; }
  .ticker-items span, .ticker-items a { font-size: 14px; }

  /* hero atas */
  .hero-top { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px; margin-bottom: 14px; }
  .hero-top .hero-media img { height: 234px; }
  .hero-top .hero-title { font-size: 22px; margin: 8px 0 7px; }
  .hero-top .hero-lead { font-size: 15.5px; }
  .hero-top .hero-meta { font-size: 13px; }

  /* 4 berita pendamping: satu kolom, thumbnail di kiri */
  .companion-grid { grid-template-columns: minmax(0, 1fr); gap: 0; margin-bottom: 14px; }
  .companion-grid .tile-sm {
    flex-direction: row; gap: 11px; border: 0; border-bottom: 1px solid var(--line);
    padding: 11px 0; background: transparent;
  }
  .companion-grid .tile-sm:first-child { border-top: 1px solid var(--line); }
  .companion-grid .tile-sm .tile-img { width: 116px; }
  .companion-grid .tile-sm .tile-img img { height: 80px; }
  .companion-grid .tile-sm .tile-title { font-size: 16px; line-height: 1.34; }
  .companion-grid .tile-sm .tile-time { font-size: 12.5px; }


  /* feed berita terkini */
  .block-title { font-size: 17px; }
  .block-more { font-size: 12px; }
  .news-row { gap: 12px; padding: 13px 0; }
  .row-cat { font-size: 12px; }
  .row-title { font-size: 16.5px; line-height: 1.34; }
  .row-excerpt { display: none; }
  .row-meta { font-size: 12.5px; }
  .row-thumb { width: 118px; height: 82px; }
  .btn-outline { font-size: 13.5px; padding: 10px 16px; }

  /* section kategori */
  .cat-lead { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cat-section { margin-bottom: 28px; }
  .tile-lead { flex-direction: row; }
  .tile-lead .tile-img { width: 132px; }
  .tile-lead .tile-img img { height: 92px; }
  .tile-lead .tile-title { font-size: 16.5px; }
  .row-compact .row-title { font-size: 15px; }

  /* widget sidebar */
  .widget { padding: 13px; }
  .pop-item { padding: 10px 0; gap: 10px; }
  .pop-rank { flex-basis: 26px; font-size: 17px; }
  .pop-thumb, .pop-thumb img { width: 84px; }
  .pop-thumb img { height: 62px; }
  .pop-title { font-size: 15.5px; }
  .pop-meta { font-size: 12px; }
  .trend-row { padding: 9px 0; }
  .trend-label { font-size: 15px; }
  .trend-hits { font-size: 12px; }
  .vid-thumb img { height: 186px; }
  .vid-title { font-size: 15.5px; }
  .indeks-list li a, .widget-indeks .indeks-list li a { font-size: 15px; padding: 9px 0; }
  .indeks-n { font-size: 12.5px; }
  .foto-list img { height: 150px; }
  .foto-list a { font-size: 14.5px; }

  /* halaman & artikel */
  .page-title { font-size: 24px; }
  .page-sub { font-size: 14.5px; }
  .page-info { font-size: 13px; }
  .breadcrumb { font-size: 12.5px; }
  .pagination ul { gap: 7px; }
  .page-link { min-width: 40px; padding: 9px 12px; font-size: 15px; }
  .page-nav { font-size: 13.5px; }
  .empty-note { font-size: 15px; padding: 26px; }

  .hero-media img { height: 230px; }
  .hero-title { font-size: 22px; }
  .hero-lead { font-size: 15.5px; }
  .hero-compact .hero-media img { height: 220px; }
  .hero-compact .hero-title { font-size: 21px; }

  .article-detail { padding: 16px; }
  .article-title { font-size: 25px; }
  .article-lead { font-size: 16.5px; }
  .article-meta { font-size: 13px; gap: 8px; }
  .article-body { font-size: 17px; line-height: 1.8; }
  .article-body h2, .article-body h3 { font-size: 21px; }
  .article-figure figcaption { font-size: 12.5px; }
  .share-btn { font-size: 13px; padding: 7px 12px; }
  .article-tags { font-size: 13px; }
  .article-tags a { padding: 5px 10px; }
  .comment-item { gap: 11px; padding: 13px 0; }
  .comment-avatar { flex-basis: 38px; width: 38px; height: 38px; font-size: 15px; }
  .comment-head strong { font-size: 15px; }
  .comment-text { font-size: 15px; }
  .comment-time { font-size: 12.5px; }
  .comment-form label { font-size: 13.5px; }
  .comment-form input, .comment-form textarea { font-size: 15px; padding: 10px 12px; }
  .btn-primary { font-size: 14.5px; padding: 11px 20px; }

  .related-grid, .gallery-grid, .video-grid { grid-template-columns: minmax(0, 1fr); }
  .gallery-card img { height: 200px; }
  .gallery-card h3 { font-size: 16.5px; }
  .video-card h3 { font-size: 16.5px; }
  .video-card .vid-thumb img { height: 196px; }
  .video-meta { font-size: 12.5px; }
  .index-list a { font-size: 15.5px; }
  .index-list li { padding: 9px 0; }
  .index-time { font-size: 12.5px; }
  .tag-cloud a { font-size: 13.5px; padding: 6px 12px; }
  .form-row2 { grid-template-columns: minmax(0, 1fr); }
  .error-code { font-size: 68px; }
  .error-msg { font-size: 15px; }

  .ad-mobile_banner { display: block; }
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .foot-grid { padding-top: 28px; }
  .foot-about, .foot-contact, .foot-col a { font-size: 14px; }
  .foot-col h3 { font-size: 14px; }
  .foot-social a { font-size: 14px; }
  .copyright { font-size: 12.5px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* HP kecil (<=420px): tetap terbaca, hanya sedikit lebih rapat.
   Tombol Login dipindahkan ke menu MENU supaya header = LOGO | MENU. */
@media (max-width: 420px) {
  .wrap { padding: 0 12px; }
  .head-inner { gap: 8px; }
  .head-actions .btn-ghost { display: none; }
  .block-head { flex-wrap: wrap; gap: 4px 10px; }
  .block-title { min-width: 0; font-size: 16px; }
  .block-more { font-size: 11.5px; }
  .brand-logo { height: 40px; max-width: 62vw; object-fit: contain; }
  .hero-top .hero-media img { height: 210px; }
  .hero-top .hero-title { font-size: 20.5px; }
  .hero-media img { height: 208px; }
  .hero-title { font-size: 20.5px; }
  .row-title { font-size: 16px; }
  .row-thumb { width: 110px; height: 76px; }
  .companion-grid .tile-sm .tile-img { width: 106px; }
  .companion-grid .tile-sm .tile-img img { height: 74px; }
  .article-title { font-size: 23px; }
  .block-more { font-size: 11.5px; }
  .pop-thumb, .pop-thumb img { width: 76px; }
  .pop-thumb img { height: 56px; }
}

/* ============================== TOAST ==================================== */

.n-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--green-dark); color: #fff; padding: 11px 18px; font-size: 13.5px;
  border-radius: 3px; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); z-index: 60;
  opacity: 0; transition: opacity .25s ease, transform .25s ease; max-width: 92vw; text-align: center;
}
.n-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.n-toast.is-error { background: #8A1C1C; }

/* banner mobile: hanya tampil di layar kecil (slot terpisah dari top banner) */
.mobile-banner-slot { display: none; }
@media (max-width: 860px) {
  .mobile-banner-slot { display: block; margin: 10px auto 0; }
  .mobile-banner-slot .ad-slot { margin-bottom: 0; }
}
