/*
Theme Name: mastahseo
Description: Tema media berita: beranda dengan hero featured post, strip berita terbaru, blok per kategori, sidebar Terbaru & Terpopuler, serta halaman artikel dengan tombol Suka dan Bagikan.
Version: 1.2.16
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mastahseo
*/

/* ==========================================================
   1. TOKENS
   ========================================================== */
/* Brand */
:root {
  --accent: #e00000;
  --accent-dark: #b80000;
  --accent-ink: #ffffff;
  color-scheme: light;
}

:root {
  --bg: #ffffff;
  --surface: #f5f5f5;      /* latar kartu/chip agar terpisah dari bg putih */
  --ink: #111111;
  --ink-2: #444444;
  --muted: #666666; /* #737373 gagal kontras 4.5:1 AA di atas --surface (#f5f5f5), lihat footer-desc/site-info */
  --line: #e5e5e5;

  --f-head: "Newsreader", Georgia, "Times New Roman", serif;
  --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Skala tipografi — hanya ukuran ini yang dipakai */
  --fs-xs: 12px;    /* label kapital (kategori, widget), toast */
  --fs-sm: 13px;    /* meta, breadcrumb, caption, copyright */
  --fs-ui: 14px;    /* trending, tag, tombol, tautan kecil */
  --fs-md: 15px;    /* menu, menu footer, ringkasan kartu */
  --fs-base: 16px;  /* teks dasar */
  --fs-t4: 17px;    /* judul daftar (serif) */
  --fs-lead: 18px;  /* isi artikel, ringkasan hero */
  --fs-t3: 20px;    /* judul kartu menengah, h3, kutipan, dek */
  --fs-t2: 24px;    /* judul blok, judul utama kategori, h2 */
  --fs-t1: clamp(28px, 3.4vw, 42px); /* judul hero & judul artikel */

  /* Ketebalan: Public Sans 400/600/700 · Newsreader 500/600/700 */
  --lh-tight: 1.2;  /* judul */
  --lh-ui: 1.5;     /* UI, meta, caption */
  --lh-text: 1.75;  /* paragraf */

  --wrap: 1240px;
  --page-top: 32px;     /* jarak header → konten pertama, sama di semua halaman */
  --section-gap: 48px;  /* jarak antarbagian besar (hero → kategori, konten → footer) */
  --gut: 24px;
  --radius: 4px;
}


/* ==========================================================
   2. BASE
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--f-head); font-weight: 600; line-height: var(--lh-tight); letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto;
  background: var(--ink); color: var(--bg); padding: 8px 14px;
}

/* Hover judul: underline tipis */
.entry-title a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .25s ease;
}
.entry-title a:hover { background-size: 100% 1px; }

/* Batas baris judul kecil (judul besar tetap utuh) */
.clamp-2, .clamp-3,
.latest-strip__item .entry-title,
.hero-side__item--row .entry-title,
.cat-block__list .entry-title,
.popular .entry-title {
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
  -webkit-line-clamp: 3; line-clamp: 3;
}
.clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }

/* Thumbnail */
.thumb { position: relative; overflow: hidden; background: var(--line); border-radius: var(--radius); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
a:hover > .thumb img, .thumb:hover img { transform: scale(1.04); }
.r-16x9 { aspect-ratio: 16 / 9; }
.r-1x1  { aspect-ratio: 1 / 1; }

/* Label kategori & meta */
.cat-label {
  display: inline-block;
  font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.cat-label--solid { background: var(--accent); color: var(--accent-ink); padding: 3px 8px; border-radius: 2px; }
a.cat-label:hover { color: var(--accent-dark); }
a.cat-label--solid:hover { background: var(--accent-dark); color: var(--accent-ink); }
/* margin-top generik -- .entry-meta dipakai di banyak komponen (post-list,
   related-card, hero-side, cat-block, widget Terpopuler/Terbaru) dengan
   margin-bottom judul yang beda-beda (4-10px); dipusatkan di sini supaya
   jarak ke .author (target tap) di atasnya tetap memadai di semua tempat,
   bukan ditambal satu-satu per komponen. */
.entry-meta { font-size: var(--fs-sm); line-height: var(--lh-ui); color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.entry-meta > * + *::before { content: "·"; margin-right: 6px; }
.entry-meta .author {
  color: var(--ink-2); font-weight: 600;
  /* Target sentuh tinggi teks ~13px terlalu kecil (<24px). Padding + margin
     negatif menambah area tap tanpa menggeser posisi visual teks -- SENGAJA
     condong ke BAWAH (tidak ada target lain di bawah entry-meta), bukan
     merata ke atas: entry-title (target tap lain) cuma berjarak 8px di
     atasnya (lihat .post-list .entry-title), padding ke atas yang terlalu
     besar malah mempersempit jarak itu & memperparah "spasi tidak memadai"
     antara dua target alih-alih memperbaikinya. */
  display: inline-block; padding-top: 2px; padding-bottom: 10px; margin-top: -2px; margin-bottom: -10px;
}
.entry-meta .author:hover { color: var(--accent); }
.excerpt { color: var(--ink-2); font-size: var(--fs-md); line-height: 1.65; }

/* ==========================================================
   3. HEADER (sticky header + trending)
   ========================================================== */
:root { --header-h: 64px; }

/* --- Sticky shell (sembunyi saat scroll ke bawah, muncul saat scroll ke atas) --- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); transition: transform .3s ease, box-shadow .3s ease; }
.site-header.is-scrolled { box-shadow: 0 10px 28px -16px rgba(0,0,0,.28); }
.site-header.is-hidden { transform: translateY(-100%); }

.header-main { position: relative; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-main__inner { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
/* display:contents "membubarkan" .header-main__top di desktop -- isinya
   (hamburger/logo/aksi) jadi flex item LANGSUNG dari .header-main__inner,
   persis seperti sebelum wadah ini ada. order di bawah mengembalikan
   urutan visual semula (hamburger, logo, primary-nav, aksi) walau urutan
   DOM-nya sekarang hamburger+logo+aksi dulu baru primary-nav. Baris ini
   TIDAK berlaku di mobile -- lihat override-nya di blok responsive. */
.header-main__top { display: contents; }

.brand { flex: none; display: block; line-height: 0; order: 2; }
.brand img { height: 30px; width: auto; }

.hbtn {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; transition: background .15s;
}
.hbtn:hover { background: var(--line); }
.hbtn svg { width: 20px; height: 20px; }
.menu-toggle { margin-left: -8px; order: 1; }

/* --- Menu utama --- */
.primary-nav { flex: 1; min-width: 0; margin-left: 8px; order: 3; }
.primary-nav .menu { display: flex; align-items: center; gap: 2px; }
.primary-nav .menu > li { position: relative; }
.primary-nav .menu > li > a {
  position: relative; display: flex; align-items: center; height: var(--header-h); padding: 0 12px;
  font-size: var(--fs-md); font-weight: 600; color: var(--ink-2); white-space: nowrap;
}
.primary-nav .menu > li > a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px;
  background: var(--accent); border-radius: 3px 3px 0 0; transform: scaleX(0); transition: transform .2s ease;
}
.primary-nav .menu > li > a:hover,
.primary-nav .menu > .current-menu-item > a { color: var(--ink); }
.primary-nav .menu > li > a:hover::after,
.primary-nav .menu > .current-menu-item > a::after { transform: scaleX(1); }

.primary-nav .menu-item-has-children > a {
  padding-right: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
}
.primary-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 210px; padding: 8px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.3);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s;
}
.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a { display: block; padding: 8px 12px; border-radius: 6px; font-size: var(--fs-md); font-weight: 400; }
.primary-nav .sub-menu a:hover { background: var(--surface); color: var(--accent); }

/* --- Aksi kanan --- */
.header-actions { flex: none; display: flex; align-items: center; gap: 4px; margin-left: auto; order: 4; }

/* --- Pencarian: menutupi baris header, tanpa panel tambahan --- */
.search-panel {
  position: absolute; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 3;
  background: var(--bg); animation: fade .15s ease;
}
.search-panel[hidden] { display: none; }
.search-panel::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.search-panel__inner { display: flex; align-items: center; gap: 12px; height: 100%; }
.header-search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
.header-search svg { flex: none; width: 22px; height: 22px; color: var(--accent); }
.header-search input {
  flex: 1; min-width: 0; padding: 8px 0; border: 0; outline: none; background: transparent;
  font: inherit; font-size: var(--fs-t3); font-weight: 400; color: var(--ink);
}
.header-search input::placeholder { color: var(--muted); }
.header-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* Form pencarian di drawer */
.search-form input {
  width: 100%; font: inherit; font-size: var(--fs-md); color: var(--ink);
  padding: 10px 16px 10px 44px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 16px center / 17px;
}
.search-form input:focus { outline: none; border-color: var(--ink); background-color: var(--bg); }

/* --- Baris trending (teks ringan, tanpa pil) --- */
.header-sub { border-bottom: 1px solid var(--line); font-size: var(--fs-ui); }
.header-sub__inner { display: flex; align-items: center; gap: 18px; height: 42px; }
.trend-label { flex: none; display: flex; align-items: center; gap: 6px; font-size: var(--fs-ui); color: var(--ink); }
.trend-label svg { width: 15px; height: 15px; color: var(--accent); }
.trend-list {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 22px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none; white-space: nowrap;
  /* overflow-y:hidden WAJIB ditulis eksplisit -- kalau cuma overflow-x
     yang diisi dan overflow-y dibiarkan default (visible), spesifikasi
     CSS Overflow justru MENGHITUNG overflow-y jadi "auto" juga (aturan:
     salah satu overflow-x/y "visible" & yang lain bukan -> yang visible
     dipaksa jadi auto). Akibatnya elemen ini diam-diam juga valid discroll
     VERTIKAL di dalam kotaknya sendiri -- kemungkinan ini penyebab
     sebenarnya konten "mengecil/kosong sesaat" di rekaman layar, bukan
     cuma soal WebKit salah hitung tinggi seperti dugaan sebelumnya.
     touch-action:pan-x SENGAJA TIDAK dipasang (lihat .entry-content
     .wp-block-table) -- terbukti lewat pengujian nyata di HP (iOS &
     Android) itu justru SUMBER scroll "macet" utk elemen yang tinggi/
     panjang: gestur yang tidak murni horizontal ditelan elemen ini,
     bukan diteruskan ke scroll halaman. overflow-y:hidden saja sudah
     cukup -- browser otomatis meneruskan gestur vertikal ke scroll
     halaman krn sumbu Y memang tidak scrollable di sini. */
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
.trend-list::-webkit-scrollbar { display: none; }
.trend-list a { display: block; color: var(--muted); font-weight: 400; transition: color .15s; }
.trend-list a:hover { color: var(--accent); }

/* --- Drawer (menu samping) --- */
.drawer { position: fixed; inset: 0; z-index: 100; }
.drawer[hidden] { display: none; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(10,9,7,.55); animation: fade .2s ease; }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(360px, 88vw); overflow-y: auto;
  background: var(--bg); padding: 14px 20px 32px; display: flex; flex-direction: column; gap: 26px;
  animation: slide-in .25s ease;
}
@keyframes fade { from { opacity: 0 } }
@keyframes slide-in { from { transform: translateX(-100%) } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__label { font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.drawer-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.drawer-cats a { display: block; padding: 11px 14px; border-radius: 8px; background: var(--surface); font-size: var(--fs-md); font-weight: 600; }
.drawer-cats a:hover { color: var(--accent); }
.drawer-links a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-md); color: var(--ink-2); }
.drawer-links a:hover { color: var(--accent); }
body.no-scroll { overflow: hidden; padding-right: var(--sbw, 0px); }

@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
}

/* --- Header responsive --- */
@media (max-width: 1080px) {
  /* .header-main__inner jadi block biasa (bukan flex) -- cukup menumpuk
     .header-main__top lalu .primary-nav apa adanya, tanpa wrap/order/
     calc apa pun. .header-main__top-lah yang jadi flex row (gantikan
     peran display:contents di desktop, lihat definisi dasarnya di atas). */
  .header-main__inner { display: block; height: auto; padding-top: 8px; }
  .header-main__top { display: flex; align-items: center; gap: 0 10px; }
  .header-main__top > .hbtn, .header-main__top > .brand, .header-main__top > .header-actions { height: 52px; display: flex; align-items: center; }
  .header-main__top > .hbtn { display: grid; }
  .search-panel { height: 60px; }
  .search-panel__inner { padding-top: 8px; }
  .header-search input { font-size: var(--fs-lead); }
  .brand img { height: 26px; }
  .primary-nav {
    /* SIBLING biasa dari .header-main__top (lihat header.php), bukan lagi
       flex item yang "dipaksa" pindah baris lewat order+flex-basis-lebar-
       dari-100%+margin-negatif -- itu diduga ikut berkontribusi ke bug
       "mengecil/kosong sesaat saat digeser" di rekaman layar, karena
       tinggi & lebarnya dulu hasil hitungan algoritma flex (yang bisa
       re-flow di tengah animasi scroll), bukan dimensi block biasa yang
       stabil. width/margin di bawah tetap bikin efek "full-bleed" sampai
       tepi layar, caranya saja yang sekarang lewat block width, bukan
       flex-basis.
       height eksplisit (bukan auto dari konten) tetap dipertahankan --
       lapisan pertahanan kedua terlepas dari penyebab utamanya flex atau
       bukan, menyamai tinggi <a> di dalamnya (lihat
       .primary-nav .menu > li > a). -webkit-overflow-scrolling:touch
       SENGAJA TIDAK dipasang lagi -- diduga memicu jalur rendering WebKit
       lama yang bermasalah; iOS Safari modern (13+) sudah momentum-scroll
       otomatis utk overflow:auto tanpa properti itu. touch-action:pan-x
       JUGA dibuang (lihat catatan sama di .entry-content .wp-block-table) --
       terbukti elemen panjang/tinggi dgn touch-action:pan-x justru
       "menelan" gestur yang tidak murni horizontal, bukan meneruskannya
       ke scroll halaman. */
    display: block; width: calc(100% + 2 * var(--gut)); margin: 6px calc(-1 * var(--gut)) 0;
    padding: 0 calc(var(--gut) - 10px); border-top: 1px solid var(--line);
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    height: 44px;
    overscroll-behavior-y: contain;
  }
  .primary-nav::-webkit-scrollbar { display: none; }
  .primary-nav .menu > li > a { height: 44px; padding: 0 10px; font-size: var(--fs-ui); }
  .primary-nav .menu > li > a::after { left: 10px; right: 10px; }
  /* .primary-nav overflow-x:auto (di atas) otomatis MEMOTONG .sub-menu
     position:absolute kalau submenu lebih tinggi dari area nav -- overflow-x
     dan overflow-y tidak bisa "campur" auto+visible (lihat catatan
     overflow-x/overflow-y lain di file ini). Submenu di breakpoint ini jadi
     position:fixed (di bawah) supaya lolos dari potongan itu -- posisi
     top/left-nya dihitung & diisi oleh main.js (positionSubmenu()) saat
     dibuka, bukan dari top:100%/left:0 bawaan .sub-menu (yang relatif ke LI,
     percuma utk position:fixed). Dibuka/ditutup lewat tap (.is-open, dari
     main.js) sebagai pengganti :hover/:focus-within yang tidak ada artinya
     di layar sentuh.
  */
  .primary-nav .sub-menu { position: fixed; z-index: 60; }
  .primary-nav .menu-item-has-children.is-open > .sub-menu {
    opacity: 1; visibility: visible; transform: none;
  }
}
@media (max-width: 600px) {
}

/* ==========================================================
   4. HERO / FEATURED
   ========================================================== */
.hero { padding: var(--page-top) 0 0; }
.hero__grid { display: grid; grid-template-columns: 1.75fr 1fr; gap: 28px; }

.hero-main { position: relative; }
.hero-main__body { padding-top: 18px; }
.hero-main .entry-title { font-size: var(--fs-t1); margin: 10px 0 12px; line-height: 1.15; }
.hero-main .excerpt { font-size: 16px; max-width: 62ch; margin-bottom: 12px; }

.hero-side { display: flex; flex-direction: column; border-left: 1px solid var(--line); padding-left: 28px; }
.hero-side__item { padding: 0 0 20px; }
.hero-side__item + .hero-side__item { border-top: 1px solid var(--line); padding-top: 20px; }
.hero-side__item:first-child .thumb { margin-bottom: 14px; }
.hero-side__item .entry-title { font-size: var(--fs-t3); margin: 6px 0 8px; }
.hero-side__item--row { display: grid; grid-template-columns: 1fr 96px; gap: 14px; align-items: start; }
.hero-side__item--row .entry-title { font-size: var(--fs-t4); }

/* Strip "Terkini" di bawah hero */
.latest-strip { margin-top: 32px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.latest-strip__list { display: grid; grid-template-columns: repeat(3, 1fr); }
.latest-strip__item { padding: 18px 20px 18px 0; display: flex; align-items: center; gap: 14px; }
.latest-strip__item + .latest-strip__item { padding-left: 20px; border-left: 1px solid var(--line); }
.latest-strip__thumb { flex: none; width: 72px; }
.latest-strip__item .entry-title { font-size: var(--fs-t4); }

/* ==========================================================
   5. LAYOUT UTAMA + SIDEBAR
   ========================================================== */
.site-main { padding: var(--page-top) 0 0; }
.hero + .site-main { padding-top: var(--section-gap); }
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; }
.home-layout__content > * + * { margin-top: 52px; }

/* Header blok kategori */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 3px solid var(--ink); padding-top: 12px; margin-bottom: 22px; }
.section-title { font-size: var(--fs-t2); display: flex; align-items: center; gap: 10px; }
.section-title::before { content: ""; width: 10px; height: 10px; background: var(--accent); }
.section-more { font-size: var(--fs-ui); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.section-more::after { content: " →"; transition: margin .2s; }
.section-more:hover { color: var(--accent); }
.section-more:hover::after { margin-left: 4px; }

/* --- Blok kategori (satu pola untuk semua kategori) --- */
.cat-block { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; }
.cat-block__lead .thumb { margin-bottom: 14px; }
.cat-block__lead .entry-title { font-size: var(--fs-t2); margin-bottom: 10px; }
.cat-block__lead .excerpt { margin-bottom: 10px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.cat-block__list li { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; padding-bottom: 15px; }
.cat-block__list li + li { border-top: 1px solid var(--line); padding-top: 15px; }
.cat-block__list .entry-title { font-size: var(--fs-t4); margin-bottom: 6px; }

/* ==========================================================
   6. SIDEBAR / WIDGETS
   ========================================================== */
.sidebar > * + * { margin-top: 40px; }
.sidebar .widget:last-child { position: sticky; top: 24px; }
.widget-title { font-family: var(--f-body); font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; padding-bottom: 10px; border-bottom: 1px solid var(--ink); margin-bottom: 6px; }

.popular { counter-reset: pop; }
.popular li { counter-increment: pop; display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.popular li::before {
  content: counter(pop);
  font-family: var(--f-body); font-size: var(--fs-t3); line-height: 1.1; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.popular .entry-title { font-size: var(--fs-t4); margin-bottom: 4px; }




/* --- Ikon sosial media (footer & drawer) --- */
.social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.social-links a {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2);
  transition: color .15s, border-color .15s;
}
.social-links a:hover { color: var(--accent); border-color: var(--accent); }
.social-links svg { width: 18px; height: 18px; }
.drawer .social-links { gap: 6px; }
.drawer .social-links a { width: 36px; height: 36px; }

/* ==========================================================
   7. FOOTER (rata tengah: logo → deskripsi → menu → copyright)
   ========================================================== */
.site-footer { margin-top: calc(var(--section-gap) * 1.5); background: var(--surface); padding: 44px 0 32px; text-align: center; }
.footer-logo { display: inline-block; line-height: 0; }
.footer-logo img { height: 38px; width: auto; }
.footer-desc { max-width: 600px; margin: 18px auto 0; font-size: var(--fs-md); line-height: 1.7; color: var(--muted); }
.footer-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-top: 26px; }
.footer-menu a { font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.footer-menu a:hover { color: var(--accent); }
.site-footer .social-links { justify-content: center; margin-top: 22px; }
.site-info { margin-top: 24px; font-size: var(--fs-sm); line-height: var(--lh-ui); color: var(--muted); }
@media (max-width: 600px) {
  .site-footer { padding: 36px 0 28px; }
  .footer-menu { gap: 8px 20px; }
  .footer-menu a { font-size: var(--fs-ui); }
}

/* ==========================================================
   8. RESPONSIVE
   ========================================================== */
@media (max-width: 1080px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .sidebar .widget:last-child { position: static; }
  .sidebar > * + * { margin-top: 0; }
}

@media (max-width: 860px) {
  /* Strip jadi kartu geser horizontal */
  .latest-strip { border: 0; margin-top: 24px; }
  .latest-strip__list {
    display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gut)); padding: 2px var(--gut); scroll-padding-inline: var(--gut);
    /* touch-action:pan-x dibuang -- lihat catatan di .entry-content
       .wp-block-table (sumber scroll "macet" terbukti lewat pengujian
       nyata di HP, bukan dugaan). */
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }
  .latest-strip__list::-webkit-scrollbar { display: none; }
  .latest-strip__item, .latest-strip__item + .latest-strip__item {
    flex: 0 0 min(82%, 320px); scroll-snap-align: start;
    padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
  }
  .latest-strip__thumb { width: 64px; }
  .latest-strip__item .entry-title { font-size: var(--fs-base); }
  .hero__grid { grid-template-columns: 1fr; }
  .hero-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 20px; }
  .cat-block { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .cat-block__lead { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
  .cat-block__list li:first-child { padding-top: 16px; }
}

@media (max-width: 600px) {
  :root { --gut: 16px; --page-top: 24px; --section-gap: 40px; --fs-t2: 22px; --fs-t1: 28px; --fs-lead: 17px; --fs-t3: 18px; }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .cat-block__list li { grid-template-columns: 84px 1fr; }
}

/* ==========================================================
   9. HALAMAN ARTIKEL (single)
   ========================================================== */

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-sm); line-height: var(--lh-ui); color: var(--muted); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--line); }

.article-title { font-size: var(--fs-t1); line-height: 1.15; margin: 0 0 14px; }
.cat-label + .article-title { margin-top: 14px; }
.article-dek { font-size: var(--fs-t3); line-height: 1.6; color: var(--ink-2); }

.article-meta {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px;
  margin-top: 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.byline { display: flex; align-items: center; gap: 12px; min-width: 0; }
.byline__avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; background: var(--line); }
.byline__avatar img { width: 100%; height: 100%; object-fit: cover; }
.byline__text { display: flex; flex-direction: column; line-height: var(--lh-ui); min-width: 0; }
.byline .author { font-size: var(--fs-md); color: var(--ink); }
.byline .author:hover { color: var(--accent); }
.byline time { font-size: var(--fs-sm); color: var(--muted); }

/* Tombol Suka & Bagikan — pil tersegmen */
.article-actions { display: inline-flex; align-items: center; padding: 4px; background: var(--surface); border-radius: 99px; }
.article-actions button {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
  border: 0; border-radius: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: var(--fs-ui); font-weight: 600; cursor: pointer; transition: color .15s;
}
/* Radius hover/active HANYA di sisi luar tiap tombol (menyambung kurva
   pill wadah), sisi dalam (nempel .actions-divider) tetap siku -- bukan
   lagi border-radius:99px rata di kedua tombol, yang di "Bagikan" (lebih
   lebar krn ikon+label+angka, bukan cuma ikon+angka spt "Suka") membentuk
   pill sendiri yang tidak konsentris dgn pill wadah luarnya. */
.like-btn { border-radius: 99px 0 0 99px; }
.share-btn { border-radius: 0 99px 99px 0; }
/* Hover/active TIDAK lagi ganti background (tetap transparan) -- cuma
   warna SVG & teks yang berubah, atas permintaan eksplisit. */
.article-actions button:hover { color: var(--accent); }
.article-actions svg { width: 18px; height: 18px; flex: none; }
.actions-divider { width: 1px; height: 18px; background: var(--line); }
.like-count,
.share-count { font-variant-numeric: tabular-nums; min-width: 2ch; }
.like-btn[aria-pressed="true"] { color: var(--accent); }
.like-btn[aria-pressed="true"] svg { fill: currentColor; }
.like-btn.is-pop svg { animation: like-pop .35s ease; }
@keyframes like-pop { 0% { transform: scale(1) } 40% { transform: scale(1.35) } 100% { transform: scale(1) } }
.action-toast {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: var(--fs-xs); font-weight: 600; background: var(--ink); color: #fff;
  padding: 4px 9px; border-radius: 4px; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.share-btn.is-copied .action-toast { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .like-btn.is-pop svg { animation: none; } }

/* Gambar utama */
.article-figure { margin: 24px 0 0; }
figcaption { margin-top: 8px; font-size: var(--fs-sm); line-height: var(--lh-ui); color: var(--muted); }

/* Isi artikel */
/* 16px tetap, TIDAK pakai var(--fs-lead) -- var itu masih dipakai elemen
   lain (excerpt hero, dek artikel, dll) yang sengaja beda ukuran & masih
   boleh berubah per breakpoint; isi artikel sendiri diminta seragam 16px
   di semua ukuran layar. */
.entry-content { margin-top: 28px; font-size: 16px; line-height: var(--lh-text); color: var(--ink); }
.entry-content > * + * { margin-top: 1.25em; }
.entry-content h2 { font-size: var(--fs-t2); margin-top: 1.8em; }
.entry-content h3 { font-size: var(--fs-t3); margin-top: 1.6em; }
.entry-content h2 + *, .entry-content h3 + * { margin-top: .6em; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content a:hover { color: var(--accent-dark); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li + li { margin-top: .45em; }
.entry-content li::marker { color: var(--accent); }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content blockquote {
  margin-left: 0; margin-right: 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--accent);
  font-family: var(--f-head); font-size: var(--fs-t3); line-height: 1.5; font-weight: 500;
}
.entry-content blockquote cite { display: block; margin-top: 10px; font-family: var(--f-body); font-size: var(--fs-ui); font-style: normal; font-weight: 600; color: var(--muted); }
.entry-content blockquote cite::before { content: "— "; }

/* --- Kartu "Baca juga" (disisipkan inc/content.php di antara paragraf) --- */
.entry-content .inline-related { margin: 1.75rem 0; }
.entry-content .inline-related__inner {
  display: flex; align-items: center; gap: .9rem; padding: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  text-decoration: none; transition: border-color .15s;
}
.entry-content .inline-related__inner:hover,
.entry-content .inline-related__inner:focus-visible { border-color: var(--accent); }
.entry-content .inline-related__inner .thumb { flex: none; width: 72px; margin: 0; }
.entry-content .inline-related__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .2rem; font-family: var(--f-body); }
.entry-content .inline-related__label { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.entry-content .inline-related__title { font-size: var(--fs-md); color: var(--ink); line-height: 1.35; }

/* --- Wadah iklan di dalam konten (disisipkan inc/ads.php) -- struktur &
   placeholder disalin apa adanya dari detak-media-network supaya kreatif
   persegi (mis. 300x250) tidak melompat ukuran saat baru dimuat. --- */
.responsive-ad { height: auto; min-width: 300px; min-height: 250px; }
.ad-container { margin: 24px auto; display: flex; justify-content: center; align-items: center; flex-direction: column; }
@media (max-width: 767px) {
  .ad-container { width: 100vw; max-width: 100vw; margin: 16px calc(50% - 50vw); padding: 16px 0; background-color: var(--surface); }
}
.ad-wrapper {
  width: 336px; min-height: 280px; display: flex; justify-content: center; align-items: center; margin: auto;
  background-color: var(--surface); background-repeat: no-repeat; background-position: center; background-size: 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23999' d='M6.153 10.625h1.444L6.875 8.546zM13.75 10c-0.517 0 -0.938 0.421 -0.938 0.938s0.421 0.938 0.938 0.938 0.938 -0.421 0.938 -0.938 -0.421 -0.938 -0.938 -0.938M18.125 2.5H1.875C0.84 2.5 0 3.34 0 4.375v11.25c0 1.035 0.84 1.875 1.875 1.875h16.25c1.035 0 1.875 -0.84 1.875 -1.875V4.375c0 -1.035 -0.84 -1.875 -1.875 -1.875M9.788 13.75h-0.662c-0.266 0 -0.503 -0.169 -0.591 -0.42L8.248 12.5h-2.746l-0.288 0.83A0.625 0.625 0 0 1 4.623 13.75h-0.662c-0.43 0 -0.732 -0.424 -0.591 -0.83L5.469 6.88A0.937 0.937 0 0 1 6.354 6.25h1.041A0.937 0.937 0 0 1 8.281 6.88l2.097 6.04c0.141 0.406 -0.161 0.83 -0.59 0.83M16.563 13.125c0 0.345 -0.28 0.625 -0.625 0.625h-0.625c-0.189 0 -0.353 -0.089 -0.468 -0.222 -0.337 0.143 -0.707 0.222 -1.095 0.222 -1.551 0 -2.813 -1.262 -2.813 -2.813s1.262 -2.813 2.813 -2.813c0.33 0 0.643 0.068 0.938 0.173V6.875c0 -0.345 0.28 -0.625 0.625 -0.625h0.625c0.345 0 0.625 0.28 0.625 0.625z'/%3E%3C/svg%3E");
}
/* Efek sticky-scroll CUKUP DI MOBILE (konfirmasi user) -- .ad-wrapper jadi
   "jalur" setinggi 600px, .ad-wrapper__sticky bergerak nempel di
   dalamnya sampai jalur itu lewat, baru scroll lagi bersama konten
   biasa. Desktop tetap statis seperti semula (tidak di-override). */
@media (max-width: 767px) {
  .ad-wrapper { height: 600px; width: 100%; display: block; background: none; }
  .ad-wrapper__sticky {
    position: sticky; top: 16px;
    width: 336px; min-height: 280px; display: flex; justify-content: center; align-items: center; margin: auto;
    background-color: var(--surface); background-repeat: no-repeat; background-position: center; background-size: 16px 16px;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23999' d='M6.153 10.625h1.444L6.875 8.546zM13.75 10c-0.517 0 -0.938 0.421 -0.938 0.938s0.421 0.938 0.938 0.938 0.938 -0.421 0.938 -0.938 -0.421 -0.938 -0.938 -0.938M18.125 2.5H1.875C0.84 2.5 0 3.34 0 4.375v11.25c0 1.035 0.84 1.875 1.875 1.875h16.25c1.035 0 1.875 -0.84 1.875 -1.875V4.375c0 -1.035 -0.84 -1.875 -1.875 -1.875M9.788 13.75h-0.662c-0.266 0 -0.503 -0.169 -0.591 -0.42L8.248 12.5h-2.746l-0.288 0.83A0.625 0.625 0 0 1 4.623 13.75h-0.662c-0.43 0 -0.732 -0.424 -0.591 -0.83L5.469 6.88A0.937 0.937 0 0 1 6.354 6.25h1.041A0.937 0.937 0 0 1 8.281 6.88l2.097 6.04c0.141 0.406 -0.161 0.83 -0.59 0.83M16.563 13.125c0 0.345 -0.28 0.625 -0.625 0.625h-0.625c-0.189 0 -0.353 -0.089 -0.468 -0.222 -0.337 0.143 -0.707 0.222 -1.095 0.222 -1.551 0 -2.813 -1.262 -2.813 -2.813s1.262 -2.813 2.813 -2.813c0.33 0 0.643 0.068 0.938 0.173V6.875c0 -0.345 0.28 -0.625 0.625 -0.625h0.625c0.345 0 0.625 0.28 0.625 0.625z'/%3E%3C/svg%3E");
  }
}

/* --- Slot "atas" (sebelum konten artikel) -- struktur disalin apa
   adanya dari detak-media-network, TANPA div kosong ber-id (lihat
   mastahseo_render_ad_top() di inc/ads.php). --- */
.ad-top { display: flex; justify-content: center; align-items: center; margin: 16px auto 0; padding: 0 16px; }
@media (max-width: 767px) {
  .ad-top { margin: 16px auto; background-color: var(--surface); }
}
.ad-top__wrapper {
  width: 100%; max-width: 320px; min-height: 100px; display: flex; justify-content: center; align-items: center; margin: auto;
  background-color: var(--surface); background-repeat: no-repeat; background-position: center; background-size: 16px 16px;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23999' d='M6.153 10.625h1.444L6.875 8.546zM13.75 10c-0.517 0 -0.938 0.421 -0.938 0.938s0.421 0.938 0.938 0.938 0.938 -0.421 0.938 -0.938 -0.421 -0.938 -0.938 -0.938M18.125 2.5H1.875C0.84 2.5 0 3.34 0 4.375v11.25c0 1.035 0.84 1.875 1.875 1.875h16.25c1.035 0 1.875 -0.84 1.875 -1.875V4.375c0 -1.035 -0.84 -1.875 -1.875 -1.875M9.788 13.75h-0.662c-0.266 0 -0.503 -0.169 -0.591 -0.42L8.248 12.5h-2.746l-0.288 0.83A0.625 0.625 0 0 1 4.623 13.75h-0.662c-0.43 0 -0.732 -0.424 -0.591 -0.83L5.469 6.88A0.937 0.937 0 0 1 6.354 6.25h1.041A0.937 0.937 0 0 1 8.281 6.88l2.097 6.04c0.141 0.406 -0.161 0.83 -0.59 0.83M16.563 13.125c0 0.345 -0.28 0.625 -0.625 0.625h-0.625c-0.189 0 -0.353 -0.089 -0.468 -0.222 -0.337 0.143 -0.707 0.222 -1.095 0.222 -1.551 0 -2.813 -1.262 -2.813 -2.813s1.262 -2.813 2.813 -2.813c0.33 0 0.643 0.068 0.938 0.173V6.875c0 -0.345 0.28 -0.625 0.625 -0.625h0.625c0.345 0 0.625 0.28 0.625 0.625z'/%3E%3C/svg%3E");
}
@media (min-width: 768px) {
  .ad-top__wrapper { max-width: 728px; min-height: 90px; }
}

/* Tag & bagikan bawah */
.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; }
.article-tags__label { font-size: var(--fs-ui); margin-right: 4px; }
.article-tags a { font-size: var(--fs-ui); padding: 5px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-2); }
.article-tags a:hover { border-color: var(--accent); color: var(--accent); }
.article-footer-share { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Berita terkait */
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.related-card .thumb { margin-bottom: 12px; }
.related-card .entry-title { font-size: var(--fs-t4); margin-bottom: 8px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }

@media (max-width: 600px) {
  .article-dek { font-size: var(--fs-lead); }
  /* Berita terkait: daftar dengan gambar kecil 1:1 */
  .related-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .related-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
  .related-card:first-child { border-top: 0; padding-top: 0; }
  .related-card .thumb { margin: 0; aspect-ratio: 1 / 1; }
}

/* ==========================================================
   10. WORDPRESS
   ========================================================== */
/* Admin bar: header lengket tidak tertutup */
@media (min-width: 601px) { .admin-bar .site-header { top: 46px; } }
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }

/* Logo teks bila belum ada logo di Customizer */
.brand-text { font-family: var(--f-head); font-size: var(--fs-t2); line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.footer-logo .brand-text { font-size: 30px; }

/* Menu aktif pada halaman artikel & arsip anak */
.primary-nav .menu > .current-menu-parent > a,
.primary-nav .menu > .current-menu-ancestor > a,
.primary-nav .menu > .current-post-ancestor > a,
.primary-nav .menu > .current-category-ancestor > a { color: var(--ink); }
.primary-nav .menu > .current-menu-parent > a::after,
.primary-nav .menu > .current-menu-ancestor > a::after,
.primary-nav .menu > .current-post-ancestor > a::after,
.primary-nav .menu > .current-category-ancestor > a::after { transform: scaleX(1); }

/* Isi artikel dari editor blok */
.entry-content img { border-radius: var(--radius); }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.entry-content .wp-block-image img { height: auto; }
.entry-content .wp-block-embed iframe, .entry-content iframe { max-width: 100%; }
.entry-content .wp-block-embed__wrapper { position: relative; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); line-height: var(--lh-ui); }
.entry-content th, .entry-content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { background: var(--surface); }
/* min-width WAJIB di tabel-nya sendiri -- tanpa itu overflow-x:auto tidak
   pernah memicu scroll sungguhan, tabel cuma menyusut/membungkuk tidak
   karuan di layar sempit alih-alih melebar & bisa digeser.

   touch-action:pan-x SENGAJA TIDAK dipasang (beda dari .primary-nav/
   .trend-list) -- terbukti lewat pengujian nyata di HP (iOS & Android)
   justru itulah SUMBER scroll "macet", khusus utk tabel PANJANG: begitu
   gestur geser dimulai di dalam elemen yang punya touch-action:pan-x,
   kalau gesturnya tidak murni horizontal (wajar, jari manusia jarang
   geser lurus sempurna), elemen itu tidak tahu harus apa -- bukannya
   melepas gestur ke halaman, malah "menelan" sentuhannya begitu saja.
   Makin tinggi elemennya (tabel makin panjang), makin besar kemungkinan
   gestur vertikal dimulai di DALAM area itu, makin sering kejadian.

   overflow-y:hidden SAJA (tanpa touch-action) sudah cukup: sumbu Y
   memang tidak bisa di-scroll di elemen ini, jadi browser otomatis
   meneruskan gestur vertikal ke scroll halaman lewat perilaku bawaannya
   sendiri (mencari leluhur yang benar-benar scrollable di arah itu) --
   tidak perlu dipaksa lewat touch-action sama sekali. */
.entry-content .wp-block-table { overflow-x: auto; overflow-y: hidden; }
.entry-content .wp-block-table table { min-width: 600px; }
/* Override EKSPLISIT utk tabel di dalam block Table Gutenberg -- WP core
   (wp-includes/blocks/table/style.css, auto-enqueued begitu block Table
   dipakai) punya aturan sendiri utk .wp-block-table/th/td/thead/tfoot
   dgn SPESIFISITAS SAMA PERSIS (1 class + 1 elemen) dgn .entry-content
   th/td di atas -- siapa menang jadi tebak-tebakan urutan enqueue, dan
   nyatanya core yg menang (makanya tabel apa pun yg ditulis via block
   Table tampil kotak-kotak hitam tebal ala default WP, bukan gaya tema).
   Ditambah .wp-block-table di selector supaya spesifisitasnya PASTI lebih
   tinggi drpd punya core, bukan gantung ke urutan muat. */
.entry-content .wp-block-table thead { border-bottom: 1px solid var(--line); }
.entry-content .wp-block-table tfoot { border-top: 1px solid var(--line); }
.entry-content .wp-block-table th,
.entry-content .wp-block-table td {
  border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top;
}
.entry-content .wp-block-table th { background: var(--surface); }
.entry-content hr { border: 0; border-top: 1px solid var(--line); }
.entry-content .wp-block-quote { margin-left: 0; margin-right: 0; }
@media (min-width: 783px) {
  .entry-content .alignleft { float: left; max-width: 50%; margin: .3em 1.5em 1em 0; }
  .entry-content .alignright { float: right; max-width: 50%; margin: .3em 0 1em 1.5em; }
}
.page-links { margin-top: 24px; font-size: var(--fs-ui); font-weight: 600; }

/* Halaman statis */
.page-header { margin-bottom: 8px; }

/* Arsip, kategori, tag, penulis, pencarian */
.archive-header { padding-bottom: 20px; margin-bottom: 8px; border-bottom: 3px solid var(--ink); }
.home-layout__content > .archive-header + * { margin-top: 0; }
.archive-header__label { display: block; font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.archive-title { font-size: var(--fs-t1); line-height: 1.15; }
.archive-description { margin-top: 10px; font-size: var(--fs-md); line-height: 1.65; color: var(--ink-2); }
.archive-description p + p { margin-top: .6em; }
.archive-author { display: flex; align-items: center; gap: 16px; }
.archive-author img { width: 64px; height: 64px; border-radius: 50%; flex: none; }
.archive-author__count {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 5px 12px;
  background: var(--surface); border-radius: 999px;
  font-family: var(--f-body); font-size: var(--fs-xs); color: var(--ink-2);
}
.archive-author__count strong { color: var(--ink); font-weight: 700; }
.archive-author-socials { margin-top: 14px; }

.post-list > li { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 20px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.post-list .entry-title { font-size: var(--fs-t3); margin: 6px 0 8px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }

.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pagination .page-numbers {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 99px; font-size: var(--fs-ui); font-weight: 600; color: var(--ink-2);
}
.pagination a.page-numbers:hover { border-color: var(--ink); color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination .page-numbers.dots { border: 0; min-width: auto; padding: 0 4px; }

.no-results { padding: 24px 0; }
.no-results p { font-size: var(--fs-md); color: var(--ink-2); margin-bottom: 16px; }
.no-results .search-form { max-width: 480px; }

/* 404 */
.error-404 { padding: 0 0 8px; }
.error-404__code { font-family: var(--f-head); font-size: 96px; line-height: 1; color: var(--accent); }
.error-404 h1 { font-size: var(--fs-t2); margin: 12px 0 8px; }
.error-404 p { font-size: var(--fs-md); color: var(--ink-2); margin-bottom: 20px; }
.error-404 .search-form { max-width: 480px; margin-bottom: 20px; }
.text-link { font-size: var(--fs-ui); font-weight: 600; color: var(--accent); }
.text-link:hover { color: var(--accent-dark); }

@media (max-width: 600px) {
  .post-list > li { grid-template-columns: minmax(0, 1fr) 84px; gap: 14px; padding: 16px 0; }
  .post-list .entry-title { font-size: var(--fs-t4); margin-top: 4px; }
  .error-404__code { font-size: 72px; }
}

/* ==========================================================================
   PROBE TERSEMBUNYI PREFERRED SOURCE — tersembunyi visual saja (bukan
   display:none), supaya skrip Google tetap mau mengisinya. Pola sama
   seperti teks screen-reader-only standar. Lihat catatan lengkap di
   inc/preferred-source.php soal fungsinya sebagai detektor status "sudah
   ditambahkan sebagai sumber pilihan".
   ========================================================================== */
.mastahseo-pref-probe {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

/* ==========================================================================
   MODAL AJAKAN PREFERRED SOURCE — mekanisme di assets/js/main.js.
   Porting dari detak-media-network (topik.id), token warna disesuaikan ke
   variabel :root mastahseo.
   ========================================================================== */
.mastahseo-pref-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647; /* nyaris batas atas z-index 32-bit bertanda -- modal ini harus selalu di atas segalanya */
  padding: 16px;
  animation: mastahseo-pref-overlay-in 0.2s ease;
}
.mastahseo-pref-modal-box {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
  padding: 32px 24px 24px;
  text-align: center;
  animation: mastahseo-pref-box-in 0.25s ease;
}
.mastahseo-pref-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  border-radius: 50%;
  transition: background .15s, color .15s;
}
.mastahseo-pref-modal-close svg { display: block; }
.mastahseo-pref-modal-close:hover {
  background: var(--surface);
  color: var(--accent);
}
.mastahseo-pref-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.mastahseo-pref-modal-icon img { display: block; }
.mastahseo-pref-modal-title {
  font-size: var(--fs-t3);
  color: var(--ink);
  margin-bottom: 8px;
}
.mastahseo-pref-modal-body {
  font-size: var(--fs-ui);
  line-height: 1.5;
  color: var(--ink-2);
  margin-bottom: 20px;
}
.mastahseo-pref-modal-enable {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: var(--fs-md);
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background .15s;
}
.mastahseo-pref-modal-enable:hover { background: var(--accent-dark); }
.mastahseo-pref-modal-dismiss {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
  padding: 12px 8px 0;
  transition: color .15s;
}
.mastahseo-pref-modal-dismiss:hover {
  color: var(--ink-2);
  text-decoration: underline;
}
@keyframes mastahseo-pref-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes mastahseo-pref-box-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 400px) {
  .mastahseo-pref-modal-box { padding: 28px 20px 20px; }
}
