/* ==========================================================================
   Majalahkita.com — stylesheet utama (mobile-first, mengikuti desain referensi)
   Palet: navy #0B1F3B · merah #E12A2A · putih · abu-abu muda
   ========================================================================== */

:root {
  --navy: #0B1F3B;
  --navy-800: #0d2444;
  --navy-700: #12294c;
  --navy-600: #1b3a66;
  --navy-50: #eef2f8;
  --red: #E12A2A;
  --red-dark: #bf1f1f;
  --ink: #14181f;
  --ink-soft: #3d4757;
  --muted: #7b8494;
  --line: #e6e8ec;
  --line-strong: #d5d9e0;
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --bg-card: #fafbfc;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(14, 25, 45, .06);
  --shadow: 0 4px 16px rgba(14, 25, 45, .08);
  --shadow-lg: 0 14px 34px rgba(14, 25, 45, .16);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", "Liberation Serif", serif;
  --container: 1240px;
  --bottom-nav-h: 60px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
}

/* height: auto wajib — atribut width/height pada <img> berlaku sebagai CSS dan
   tanpa ini gambar direntangkan setinggi nilai atributnya (mis. hero 920px). */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.28; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
input, select, textarea { font: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.svg-fill svg { fill: currentColor; stroke: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.sr-only, .skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus {
  position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto;
  background: var(--navy); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm); z-index: 200;
}
.muted { color: var(--muted); font-size: 14px; }
.hide { display: none !important; }
/* aturan author bisa mengalahkan [hidden] bawaan browser — cegah elemen "hidden" tetap tampil */
[hidden] { display: none !important; }
.mt { margin-top: 20px; }
.ico { display: inline-flex; align-items: center; justify-content: center; }
.ico svg { width: 1.08em; height: 1.08em; }

/* ---------- topbar (desktop) ---------- */
.topbar { background: var(--navy); color: #cfd8e6; font-size: 14px; display: none; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.topbar-date { color: #9fb0c8; }
.topbar-links { display: flex; gap: 18px; }
.topbar-links a { color: #cfd8e6; }
.topbar-links a:hover { color: #fff; }
.topbar-social { display: flex; align-items: center; gap: 10px; }
.topbar-search { color: #cfd8e6; }
.topbar-search:hover { color: #fff; }

.social { display: flex; gap: 8px; }
.social a { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #dfe6f1; transition: .15s; }
.social a:hover { background: var(--red); color: #fff; }
.social svg { width: 18px; height: 18px; }

/* ---------- header ---------- */
.site-header { background: #fff; position: sticky; top: 0; z-index: 60; }
.site-header::after { content: ''; display: block; height: 1px; background: var(--line); }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 62px; }
.header-inner > .header-actions { margin-left: auto; }

.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 800; font-size: 27px; letter-spacing: -.8px; line-height: 1.02; }
.b-majalah, .b-com { color: var(--navy); }
.b-kita { color: var(--red); }
.brand-tagline { font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
/* logo gambar (unggahan dari Pengaturan) menggantikan teks */
.brand-logo { height: 40px; width: auto; max-width: min(62vw, 260px); object-fit: contain; }

/* header tengah untuk halaman dalam (tombol kembali + logo di tengah) */
.header-sub .header-inner { min-height: 58px; }
.header-sub .header-center { flex: 1; display: flex; justify-content: center; }
.header-sub .brand-text { align-items: center; text-align: center; }
.header-sub .brand-name { font-size: 21px; }
.header-sub .brand-tagline { font-size: 8.5px; }
.header-sub .brand-logo { height: 34px; }
.back-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; background: transparent; color: var(--ink); border-radius: 50%; margin-left: -8px; }
.back-btn:hover { background: var(--bg-soft); }
.back-btn svg { width: 22px; height: 22px; }

.main-nav { display: none; gap: 2px; flex: 1; justify-content: center; }
.nav-link { padding: 10px 12px; font-weight: 600; font-size: 15px; color: var(--ink-soft); border-radius: var(--radius-sm); white-space: nowrap; }
.nav-link:hover { color: var(--navy); background: var(--bg-soft); }
.nav-link.is-active { color: var(--red); }
.header-actions { display: flex; align-items: center; gap: 2px; }

.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 0; background: transparent; color: var(--ink); border-radius: 50%; }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn svg { width: 21px; height: 21px; }

/* tab kategori (teks + garis merah bawah) */
.mobile-cats { border-bottom: 1px solid var(--line); overflow: hidden; }
.mobile-cats-inner { display: flex; gap: 22px; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
.mobile-cats-inner::-webkit-scrollbar { display: none; }
.mobile-cat {
  flex: 0 0 auto; padding: 11px 0 10px; font-size: 15px; font-weight: 500; color: var(--ink-soft);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.mobile-cat.is-active { color: var(--red); font-weight: 700; border-bottom-color: var(--red); }

/* pill tab (halaman kategori / "Semua") */
.pills { display: flex; gap: 9px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
}
.pill.is-active { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- hero ---------- */
.hero { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy); margin-top: 12px; }
.hero-track { position: relative; }
.hero-slide { position: relative; }
.hero-slide[hidden] { display: none; }
.hero-media { display: block; }
.hero-media img { width: 100%; aspect-ratio: 1 / 1.02; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  background: linear-gradient(180deg, rgba(6, 14, 28, 0) 30%, rgba(6, 14, 28, .55) 62%, rgba(6, 14, 28, .93) 100%);
}
.hero-content { padding: 16px 16px 20px; color: #fff; width: 100%; }
.hero-cat {
  display: inline-block; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800;
  letter-spacing: .9px; text-transform: uppercase; padding: 5px 10px; border-radius: 5px; margin-bottom: 10px;
}
.hero-cat:hover { color: #fff; background: var(--red-dark); }
.hero-title { font-size: 25px; font-weight: 800; line-height: 1.2; margin-bottom: 9px; letter-spacing: -.4px; }
.hero-title a { color: #fff; }
.hero-title a:hover { color: #fff; }
.hero-excerpt { font-size: 14px; color: #dbe3ef; margin-bottom: 12px; line-height: 1.5; }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: #c3cfdf; }
.hero-meta .meta-item { color: #c3cfdf; }
.hero-cta { display: none; }
.hero-nav {
  position: absolute; top: 40%; transform: translateY(-50%); width: 36px; height: 36px; border: 0;
  border-radius: 50%; background: rgba(9, 15, 27, .55); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(4px);
}
.hero-nav svg { width: 18px; height: 18px; }
.hero-nav:hover { background: rgba(9, 15, 27, .74); color: #fff; }
.hero-nav.prev { left: 12px; }
.hero-nav.next { right: 12px; }
.hero-dots { position: absolute; bottom: 14px; right: 16px; display: flex; align-items: center; gap: 6px; }
.hero-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.hero-dot.is-active { background: var(--red); }

/* ---------- section & grid ---------- */
.section { padding: 24px 0 2px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 800; color: var(--navy); }
.section-head h2::before { content: ''; width: 4px; height: 19px; border-radius: 2px; background: var(--red); flex: 0 0 auto; }
.more-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--navy); }
.more-link:hover { color: var(--red); }
.more-link svg { width: 14px; height: 14px; }

.grid { display: grid; gap: 18px; }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid > * { min-width: 0; }

/* ---------- kartu artikel (grid 2 kolom seperti referensi) ---------- */
.card { background: #fff; display: flex; flex-direction: column; min-width: 0; }
.card-thumb { display: block; position: relative; overflow: hidden; background: var(--bg-soft); border-radius: var(--radius-sm); }
.card-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card:hover .card-thumb img { opacity: .94; }
.card-body { padding: 9px 0 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: 10.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--cat, var(--red)); }
.card-cat:hover { color: var(--cat, var(--red)); }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; color: var(--navy); }
.card-title a:hover { color: var(--red); }
.card-excerpt { display: none; }
.card .meta { margin-top: auto; padding-top: 7px; border-top: 1px solid var(--line); }

/* ---------- beranda: kartu "Berita Pilihan" & baris "Berita Terbaru" (desain referensi) ---------- */
.card-boxed { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.card-boxed .card-thumb { border-radius: 0; }
.card-boxed .card-body { padding: 10px 12px 12px; }
.grid.home-pilihan { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }

.list-rows { display: grid; gap: 12px; }
.card-row {
  display: grid; grid-template-columns: 104px minmax(0, 1fr) 18px; column-gap: 12px;
  align-items: start; min-width: 0; padding: 10px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
.card-row-thumb { display: block; }
.card-row-thumb img { width: 104px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.card-row-title { font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--navy); align-self: center; overflow-wrap: anywhere; }
.card-row-title a:hover { color: var(--red); }
.card-row-chev { align-self: center; color: var(--muted); }
.card-row-chev svg { width: 18px; height: 18px; }
.card-row-meta { grid-column: 2 / 4; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.card-row-meta .meta { font-size: 12px; }

.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; font-size: 11.5px; color: var(--muted); }
.meta-item { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.meta-item svg { width: 13px; height: 13px; }
.cat-chip { font-size: 10.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--cat, var(--red)); }
.cat-chip:hover { color: var(--cat, var(--red)); }

/* kartu artikel mendatar (daftar kategori) */
.card-wide { display: grid; grid-template-columns: 104px 1fr; gap: 13px; padding: 0 0 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.card-wide:last-child { border-bottom: 0; }
.card-wide-thumb img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); }
.card-wide-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.card-wide .card-title { font-size: 15px; font-weight: 700; }
.card-wide .card-excerpt { display: none; }
.card-wide .meta { gap: 11px; }
.list-articles { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }

/* ---------- berita terpopuler ---------- */
.panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px; min-width: 0; }
.panel-head { margin-bottom: 4px; }
.panel-head h2 { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 800; }
.panel-head h2::before { content: ''; width: 4px; height: 19px; border-radius: 2px; background: var(--red); flex: 0 0 auto; }
.popular-list { display: flex; flex-direction: column; }
.popular-item { display: grid; grid-template-columns: 20px 58px minmax(0, 1fr); gap: 11px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.popular-item:last-child { border-bottom: 0; }
.popular-rank { font-size: 19px; font-weight: 800; color: var(--navy); line-height: 1; text-align: center; }
.popular-rank.top { color: var(--red); }
.popular-thumb img { width: 58px; height: 58px; object-fit: cover; border-radius: var(--radius-sm); }
.popular-body { min-width: 0; }
.popular-body h4 { font-size: 14.5px; font-weight: 700; line-height: 1.32; margin-bottom: 4px; overflow-wrap: anywhere; }
.popular-body h4 a:hover { color: var(--red); }
.popular-body .meta { gap: 9px; font-size: 11.5px; }

/* ---------- profil tokoh ---------- */
.profile-feature { display: grid; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.profile-feature-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.profile-feature-body { padding: 18px 16px; display: flex; flex-direction: column; gap: 9px; }
.profile-eyebrow { font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 800; color: var(--red); }
.profile-name { font-size: 21px; font-weight: 800; }
.profile-role { font-weight: 700; color: var(--navy); font-size: 15px; }
.profile-quote { font-size: 14.5px; color: var(--ink-soft); border-left: 3px solid var(--red); padding-left: 12px; font-style: italic; }

/* ---------- newsletter (kartu navy, ikon amplop) ---------- */
.newsletter { margin: 26px 0 6px; border-radius: var(--radius); padding: 18px 16px; color: #fff; background: var(--navy); }
.newsletter-inner { display: grid; gap: 14px; min-width: 0; }
.newsletter-icon {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .12); color: #fff; order: -1;
}
.newsletter-icon svg { width: 20px; height: 20px; }
.newsletter-copy { min-width: 0; }
.newsletter-copy h2 { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 7px; }
.newsletter-copy p { color: #b9c6d9; font-size: 13.5px; line-height: 1.55; }
.newsletter-form { min-width: 0; }
.newsletter-form { display: flex; flex-wrap: wrap; gap: 8px; }
.newsletter-form input {
  flex: 1 1 140px; min-width: 0; min-height: 46px; border: 1px solid #2c4770; background: var(--navy-700);
  color: #fff; border-radius: var(--radius-sm); padding: 0 13px; font-size: 14.5px;
}
.newsletter-form input::placeholder { color: #8fa3c0; }
.newsletter-form input:focus { outline: 2px solid rgba(255, 255, 255, .45); outline-offset: 0; }
.newsletter-form .btn { flex: 0 0 auto; }
.form-note { flex: 1 1 100%; font-size: 13px; color: #c3cfe0; min-height: 0; margin: 0; }
.form-note.ok { color: #93e6b6; }
.form-note.err { color: #ffc2c2; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px;
  padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 700; font-size: 15px; transition: .15s; white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-600); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-outline-red { background: #fff; color: var(--red); border-color: #f0b9b9; }
.btn-outline-red:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn.is-saved { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- daftar kategori (dengan chevron) ---------- */
.cat-rows { display: flex; flex-direction: column; }
.cat-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 20px; gap: 13px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.cat-row:last-child { border-bottom: 0; }
.cat-row-thumb img { width: 62px; height: 62px; object-fit: cover; border-radius: var(--radius-sm); }
.cat-row-body { min-width: 0; }
.cat-row-name { font-size: 15.5px; font-weight: 700; margin-bottom: 2px; }
.cat-row-desc { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.cat-row > .ico { color: var(--line-strong); }
.cat-row:hover .cat-row-name { color: var(--red); }

/* ---------- menu akun ---------- */
.account-head { display: flex; align-items: center; gap: 14px; padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.account-avatar { width: 62px; height: 62px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 22px; flex: 0 0 auto; overflow: hidden; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-name { font-size: 17px; font-weight: 800; }
.account-mail { font-size: 13px; color: var(--muted); margin-top: 1px; }
.account-head > .ico { margin-left: auto; color: var(--line-strong); }
.menu-rows { display: flex; flex-direction: column; }
.menu-row { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; font-weight: 600; }
.menu-row:last-child { border-bottom: 0; }
.menu-row > .ico { color: var(--navy); }
.menu-row > .ico svg { width: 21px; height: 21px; }
.menu-row-label { flex: 1; }
.menu-row .chev { color: var(--line-strong); margin-left: auto; }
.menu-row.is-active { color: var(--red); }
.menu-row.is-active > .ico { color: var(--red); }
.badge-dot { background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 6px; margin-left: auto; }
.menu-section-title { font-size: 13.5px; font-weight: 700; color: var(--ink); margin: 22px 0 2px; }

/* ---------- bottom nav ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex;
  background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.bottom-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--bottom-nav-h); font-size: 11.5px; font-weight: 600; color: var(--ink-soft);
  border: 0; background: none; padding: 6px 2px;
}
.bottom-item svg { width: 22px; height: 22px; }
.bottom-item.is-active { color: var(--red); }
.bottom-item.is-active svg { stroke-width: 2.1; }

/* ---------- drawer & overlay pencarian ---------- */
.drawer, .search-overlay { position: fixed; inset: 0; z-index: 120; }
.drawer-backdrop, .search-backdrop { position: absolute; inset: 0; background: rgba(8, 15, 28, .5); animation: fade .16s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); background: #fff;
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto; padding: 16px 18px 30px;
  animation: slideIn .2s ease;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer-nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.drawer-link { padding: 13px 2px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15.5px; }
.drawer-link.is-active { color: var(--red); }
.drawer-section { margin-top: 20px; }
.drawer-section h4 { font-size: 11.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.chip span { color: var(--muted); font-size: 12px; }
.drawer-account { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.drawer-account small { display: block; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.drawer-actions { display: flex; flex-direction: column; gap: 8px; }

.search-box { position: absolute; top: 10vh; left: 50%; transform: translateX(-50%); width: min(620px, 92vw); background: #fff; border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-lg); }
.search-form { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 2px 8px; min-width: 0; background: var(--bg-soft); }
.search-form > .ico { color: var(--muted); flex: 0 0 auto; }
.search-form input { flex: 1 1 90px; min-width: 0; border: 0; min-height: 44px; font-size: 16px; background: transparent; }
.search-form input:focus { outline: none; }
.search-suggest { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 4px 2px; font-size: 13.5px; }
.search-suggest span { color: var(--muted); }
.search-suggest button { border: 1px solid var(--line); background: var(--bg-soft); border-radius: 999px; padding: 6px 13px; font-size: 13.5px; }
.search-suggest button:hover { border-color: var(--red); color: var(--red); }

/* ---------- slot iklan / sponsor ----------
   Banner dibuat rata dengan hero: lebar penuh container, sudut membulat 12px (sama dengan hero),
   dan gambar dipotong otomatis (object-fit: cover) mengikuti rasio hero di tiap ukuran layar.
   Rasio dipusatkan pada variabel --ad-ratio supaya mudah diseragamkan lagi bila perlu. */
:root { --ad-ratio: 1 / 1.02; }
.ad-wrap { padding-top: 14px; }
.ad-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.ad-slot + .ad-slot { margin-top: 14px; }
.ad-label { font-size: 9.5px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); }
.ad-link { display: block; width: 100%; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.ad-link img { width: 100%; height: 100%; aspect-ratio: var(--ad-ratio); object-fit: cover; }
.ad-home-middle { margin: 26px 0 4px; }
.ad-footer { margin: 28px 0 6px; }
/* sidebar artikel: selebar kolomnya, tidak perlu rasio hero karena bukan lebar penuh */
.ad-article-sidebar .ad-link img { aspect-ratio: auto; max-height: 260px; object-fit: contain; }
.sidebar .ad-slot { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 10px; }

/* ---------- donasi / dukungan pembaca ---------- */
.donate {
  margin-top: 26px; padding: 18px 16px; border-radius: var(--radius);
  background: var(--navy-50); border: 1px solid #d7e0ef;
  display: flex; flex-direction: column; gap: 14px;
}
.donate-copy { min-width: 0; }
.donate-copy h2 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.donate-copy p { font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.donate-btn { align-self: flex-start; }
.donate-modal { position: fixed; inset: 0; z-index: 130; }
.donate-backdrop { position: absolute; inset: 0; background: rgba(8, 15, 28, .5); animation: fade .16s ease; }
.donate-card {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(420px, 92vw); max-height: 86vh; overflow-y: auto;
  background: #fff; border-radius: var(--radius-lg); padding: 18px 16px 20px;
  box-shadow: var(--shadow-lg); animation: fade .18s ease;
}
.donate-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.donate-card-head h3 { font-size: 17px; font-weight: 800; color: var(--navy); }
.donate-qris { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; }
.donate-qris img { width: min(260px, 74vw); aspect-ratio: 1 / 1; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; padding: 8px; }
.donate-qris-hint { font-size: 12.5px; color: var(--muted); text-align: center; }
.donate-accounts { display: flex; flex-direction: column; gap: 10px; }
.donate-accounts li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--bg-card);
}
.donate-bank { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--navy); }
.donate-number { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: .4px; overflow-wrap: anywhere; }
.donate-holder { grid-column: 1; font-size: 12.5px; color: var(--muted); }
.donate-copy { grid-row: 1 / span 3; grid-column: 2; align-self: center; }
.donate-copy.copied { background: #1fab54; color: #fff; border-color: transparent; }
.donate-thanks { margin-top: 14px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #c6d1e2; margin-top: 34px; }
.footer-grid { display: grid; gap: 26px; padding: 32px 16px 24px; }
.footer-brand .brand-name { font-size: 26px; }
.footer-brand .brand-logo { height: 46px; max-width: 300px; background: rgba(255, 255, 255, .94); border-radius: 8px; padding: 4px 8px; }
.footer-brand .b-majalah, .footer-brand .b-com { color: #fff; }
.footer-brand .b-kita { color: #ff5c66; }
.footer-desc { font-size: 13.5px; color: #9fb0c8; margin: 12px 0 16px; max-width: 40ch; }
.site-footer h3 { font-size: 13.5px; color: #fff; letter-spacing: .3px; margin-bottom: 11px; }
.site-footer ul { display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
.site-footer a:hover { color: #fff; }
.footer-news { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-news input { flex: 1 1 130px; min-width: 0; min-height: 42px; border-radius: var(--radius-sm); border: 1px solid #2c4770; background: rgba(255, 255, 255, .08); color: #fff; padding: 0 12px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-direction: column; gap: 6px; padding: 16px; font-size: 13px; color: #93a4bd; }
.footer-bottom a:hover { color: #fff; }

/* ---------- judul halaman & breadcrumb ---------- */
.page-head { padding: 20px 0 4px; }
.page-head h1 { font-size: 24px; font-weight: 800; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 5px; max-width: 70ch; }
.page-head .kicker { font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 800; color: var(--red); display: block; margin-bottom: 7px; }
.breadcrumb { padding-top: 4px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.breadcrumb .sep { color: var(--line-strong); }

/* ---------- halaman artikel ---------- */
.article-wrap { display: grid; gap: 24px; padding-top: 14px; }
.article-head { display: flex; flex-direction: column; gap: 10px; }
.article-cat { align-self: flex-start; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; padding: 5px 10px; border-radius: 5px; }
.article-cat:hover { color: #fff; background: var(--red-dark); }
.article-title { font-size: 25px; font-weight: 800; line-height: 1.22; letter-spacing: -.4px; overflow-wrap: anywhere; }

/* hero artikel dengan judul menimpa gambar (seperti referensi) */
.article-hero { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; }
.article-hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.article-hero--overlay .article-hero-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: 16px 16px 18px;
  background: linear-gradient(180deg, rgba(6, 14, 28, 0) 32%, rgba(6, 14, 28, .55) 62%, rgba(6, 14, 28, .93) 100%);
}
.article-hero--overlay .article-cat { align-self: flex-start; }
.article-hero--overlay .article-title { color: #fff; font-size: 24px; }
.article-hero--overlay .meta { color: #c3cfdf; }
.article-hero--overlay .meta-item { color: #c3cfdf; }
.article-hero .article-figcaption { position: relative; padding: 8px 2px 0; }

.article-lead { font-size: 15.5px; color: var(--ink-soft); line-height: 1.62; }
.article-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.article-byline strong { color: var(--ink); }
.byline-author { display: flex; align-items: center; gap: 9px; }
.article-figcaption { font-size: 12.5px; color: var(--muted); padding: 8px 2px 0; }
.article-body { font-size: 16.5px; line-height: 1.75; color: #232830; max-width: 72ch; }
.article-body p { margin-bottom: 17px; }
.article-body h2 { font-size: 19px; font-weight: 800; margin: 26px 0 11px; }
.article-body h3 { font-size: 17px; font-weight: 700; margin: 22px 0 9px; }
.article-body ul, .article-body ol { margin: 0 0 18px 20px; list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 7px; }
.article-body blockquote {
  position: relative; margin: 22px 0; padding: 26px 18px 18px;
  background: var(--bg-soft); border-radius: var(--radius-sm); border: 0;
  font-family: var(--font-serif); font-size: 17.5px; line-height: 1.6; font-style: italic; color: var(--ink);
}
.article-body blockquote::before {
  content: '”'; position: absolute; top: 2px; left: 14px; font-family: var(--font-serif);
  font-size: 46px; line-height: 1; color: var(--line-strong);
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body img { border-radius: var(--radius-sm); margin: 8px 0; }
.article-body a { color: var(--navy); border-bottom: 1px solid var(--red); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.article-tags a { font-size: 13px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft); color: var(--ink-soft); }
.article-tags a:hover { border-color: var(--red); color: var(--red); }
.article-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-label { font-size: 13px; color: var(--muted); width: 100%; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--navy);
}
.share-btn:hover { color: #fff; border-color: transparent; }
.share-btn.wa:hover { background: #1fab54; }
.share-btn.fb:hover { background: #1877f2; }
.share-btn.copy:hover { background: var(--navy); }
.share-btn.copied { background: #1fab54; color: #fff; border-color: transparent; }

.sidebar { display: grid; gap: 18px; align-content: start; min-width: 0; }
.sidebar > * { min-width: 0; }
.sidebar .panel { background: var(--bg-card); }
.popular-body h4, .card-title, .article-title, .hero-title { overflow-wrap: anywhere; }
.sidebar .newsletter-form input { flex: 1 1 100%; }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 26px 0 8px; }
.page-btn {
  min-width: 42px; min-height: 42px; display: inline-grid; place-items: center; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-weight: 600; background: #fff; font-size: 14.5px;
}
.page-btn:hover { border-color: var(--navy); color: var(--navy); }
.page-btn.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.load-more-wrap { display: flex; justify-content: center; margin: 24px 0 6px; }

/* ---------- state / skeleton ---------- */
.state { text-align: center; padding: 44px 18px; color: var(--muted); }
.state-art { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; background: var(--bg-soft); color: var(--navy); display: grid; place-items: center; }
.state-art svg { width: 26px; height: 26px; }
.state h3, .state h1 { color: var(--ink); font-size: 19px; font-weight: 800; margin-bottom: 7px; }
.state p { max-width: 44ch; margin: 0 auto 16px; font-size: 14.5px; }
.state-lg { padding: 66px 18px; }
.state-code { font-size: 68px; font-weight: 800; line-height: 1; color: var(--navy); opacity: .16; margin-bottom: 4px; }

.skeleton { padding: 0; }
.sk-thumb { aspect-ratio: 16 / 10; border-radius: var(--radius-sm); background: linear-gradient(90deg, #eef0f4 25%, #e2e6ec 50%, #eef0f4 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
.sk-line { height: 11px; margin: 10px 0 0; border-radius: 6px; background: linear-gradient(90deg, #eef0f4 25%, #e2e6ec 50%, #eef0f4 75%); background-size: 200% 100%; animation: sk 1.2s infinite; }
.sk-line.w70 { width: 70%; } .sk-line.w90 { width: 90%; } .sk-line.w40 { width: 40%; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- form / auth ---------- */
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 26px 16px 60px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; box-shadow: var(--shadow-sm); }
.form-card h1 { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.form-card > p.muted { margin-bottom: 16px; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  min-height: 46px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 10px 12px; background: #fff; color: var(--ink); width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.field-hint { font-size: 12.5px; color: var(--muted); }
.alert { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin-bottom: 14px; display: flex; gap: 9px; align-items: flex-start; }
.alert svg { flex: 0 0 auto; margin-top: 1px; }
.alert-err { background: #fdecec; color: #8f1a1f; border: 1px solid #f6c6c8; }
.alert-ok { background: #e9f7ef; color: #14663c; border: 1px solid #bfe4ce; }
.form-foot { margin-top: 16px; font-size: 14px; color: var(--muted); }

/* ---------- video ---------- */
.video-card { position: relative; }
.video-thumb { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; }
.video-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.play-badge {
  position: absolute; inset: 0; margin: auto; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(225, 42, 42, .94); color: #fff; display: grid; place-items: center;
}
.play-badge svg { width: 22px; height: 22px; fill: currentColor; stroke: none; margin-left: 3px; }
.duration { position: absolute; right: 8px; bottom: 8px; background: rgba(8, 15, 28, .8); color: #fff; font-size: 11.5px; padding: 3px 7px; border-radius: 4px; }
.video-frame { border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.video-frame video, .video-frame iframe { width: 100%; aspect-ratio: 16 / 9; display: block; border: 0; }
.player-note { font-size: 13px; color: var(--muted); margin-top: 10px; word-break: break-all; }

/* ---------- misc ---------- */
.search-result-head { padding: 20px 0 2px; }
.notice {
  display: flex; gap: 10px; align-items: center; background: var(--navy-50); border: 1px solid #d7e0ef;
  color: var(--navy); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin: 16px 0;
}
.notice a { font-weight: 700; text-decoration: underline; }
.flash { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; margin: 14px 0; display: flex; gap: 9px; align-items: center; }
.flash.ok { background: #e9f7ef; color: #14663c; border: 1px solid #bfe4ce; }
.flash.err { background: #fdecec; color: #8f1a1f; border: 1px solid #f6c6c8; }

/* ==========================================================================
   Layar lebih besar
   ========================================================================== */
@media (min-width: 600px) {
  :root { --ad-ratio: 16 / 10; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-feature { grid-template-columns: 260px 1fr; }
  .profile-feature-media img { height: 100%; aspect-ratio: auto; }
  .newsletter-inner { grid-template-columns: 48px minmax(0, 1fr); align-items: start; column-gap: 14px; }
  .newsletter-icon { order: 0; grid-row: 1 / span 2; }
  .newsletter-copy, .newsletter-form { grid-column: 2; min-width: 0; }
  /* versi ringkas di sidebar: satu kolom agar tidak melebarkan sidebar */
  .newsletter-compact .newsletter-inner { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
  .newsletter-compact .newsletter-icon { grid-row: auto; width: 38px; height: 38px; }
  .newsletter-compact .newsletter-copy, .newsletter-compact .newsletter-form { grid-column: 1; }
  .hero-title { font-size: 30px; }
  .hero-media img { aspect-ratio: 16 / 10; }
  .hero { margin-top: 16px; }
  .card-row { grid-template-columns: 132px minmax(0, 1fr) 20px; column-gap: 14px; padding: 12px 14px; }
  .card-row-thumb img { width: 132px; }
  .card-row-title { font-size: 16px; }
  .grid.home-pilihan { gap: 22px; }
  .article-hero { margin: 4px 0 18px; }
  .article-hero img { aspect-ratio: 16 / 9; }
  .article-hero--overlay .article-hero-overlay { padding: 24px 24px 26px; }
  .article-hero--overlay .article-title { font-size: 32px; }
  .article-figcaption { font-size: 12.5px; color: var(--muted); }
  .article-title { font-size: 30px; }
  .article-lead { font-size: 17px; }
  .article-body { font-size: 17.5px; }
  .card-wide { grid-template-columns: 128px 1fr; gap: 15px; }
  .cat-row { grid-template-columns: 72px minmax(0, 1fr) 20px; }
  .cat-row-thumb img { width: 72px; height: 72px; }
  .cat-row-name { font-size: 16.5px; }
}

@media (min-width: 900px) {
  .topbar { display: block; }
  .main-nav { display: flex; }
  .burger { display: none; }
  .header-inner { min-height: 74px; }
  /* 9 menu kategori + logo besar tidak muat dalam satu baris pada 900–1150px:
     menu turun ke barisnya sendiri (bisa digeser bila masih kurang), lalu kembali satu baris di layar lebar. */
  .header-inner { flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; flex: 0 0 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; min-width: 0; }
  .main-nav::-webkit-scrollbar { display: none; }
  .mobile-cats { display: none; }
  .grid-2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.3fr; }
  .card { border: 1px solid var(--line); } /* kartu berbingkai hanya di layar lebar */
  .card-body { padding: 12px 13px 14px; }
  .card-thumb { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
  .card-title { font-size: 16.5px; }
  .hero-media img { aspect-ratio: 16 / 9; }
  :root { --ad-ratio: 16 / 9; }
  .hero-title { font-size: 34px; }
  .site-footer { margin-top: 46px; }
  .section { padding: 30px 0 4px; }
  .section-head h2 { font-size: 21px; }
  .section-head h2::before { height: 21px; }
  .back-btn { display: none; }
  .header-sub .header-center { justify-content: flex-start; }
  .header-sub .brand-text { align-items: flex-start; text-align: left; }
  .header-sub .brand-name { font-size: 24px; }
  .header-sub .brand-tagline { font-size: 9.5px; }
  .brand-logo { height: 46px; max-width: 320px; }
  .header-sub .brand-logo { height: 40px; }
}

@media (min-width: 1150px) {
  .header-inner { flex-wrap: nowrap; }
  /* 10 kategori: menu tetap boleh digeser kalau tidak muat, supaya ikon kanan tidak terdorong keluar layar */
  .main-nav { order: 0; width: auto; flex: 1 1 auto; justify-content: center; overflow-x: auto; min-width: 0; }
  .nav-link { padding: 10px 9px; }
}

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .article-title { font-size: 36px; }
  .hero-media img { aspect-ratio: 16 / 9; max-height: 560px; }
  .hero { margin-top: 22px; }
  .grid.home-pilihan { gap: 26px; }
  .list-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .grid-2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .article-wrap { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-top: 20px; }
  .card-wide { grid-template-columns: 220px 1fr; gap: 18px; }
  .card-wide-thumb img { aspect-ratio: 4 / 3; }
  .card-wide .card-excerpt { display: block; }
  .cat-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 34px; }
}

@media (max-width: 1023px) {
  .article-wrap { padding-top: 12px; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 25px; }
  .brand-logo { height: 36px; max-width: 56vw; }
  .header-inner { gap: 8px; }
  .hero-title { font-size: 23px; }
  .grid { gap: 15px; }
  .card-title { font-size: 14.5px; }
}

@media (max-width: 360px) {
  .brand-name { font-size: 22px; }
  .brand-tagline { font-size: 9px; letter-spacing: 1.2px; }
  .popular-item { grid-template-columns: 18px 52px minmax(0, 1fr); gap: 10px; }
  .popular-thumb img { width: 52px; height: 52px; }
  .card-wide { grid-template-columns: 92px 1fr; }
  .cat-row-thumb img { width: 56px; height: 56px; }
}
