/* ============================================================
   MDNPEDIA THEME — MAIN CSS
   ============================================================
   Struktur:
   1. CSS Variables & Reset
   2. Typography
   3. Utilities
   4. Skip Link & Accessibility
   5. Top Bar
   6. Header
   7. Nav
   8. Ticker
   9. Hero
   10. Section Head
   11. News Grid & Card
   12. Category Block
   13. Video Section
   14. Newsletter
   15. Sidebar & Widgets
   16. Single / Article
   17. Author Box
   18. Comments
   19. Archive / Search Header
   20. 404
   21. Pagination
   22. Footer
   23. Back to Top
   24. Toast
   25. Mobile Menu
   26. Post Navigation
   27. Responsive
   28. Reduced Motion
   29. RTL Support
   ============================================================ */

/* ============================================================
   1. CSS VARIABLES & RESET
   ============================================================ */
:root {
  --primary:        #c4161a;
  --primary-dark:   #9a1115;
  --primary-light:  #e03a3e;
  --primary-soft:   #FDE8E9;
  --bg:             #FFFFFF;
  --bg-alt:         #F7F7F8;
  --bg-card:        #FFFFFF;
  --bg-elevated:    #FFFFFF;
  --text:           #111318;
  --text-secondary: #545A66;
  --text-muted:     #5C6370; /* ditingkatkan dari #878D99 → contrast 5.2:1 di bg putih */
  --border:         #E6E8EB;
  --border-strong:  #D1D5DB;
  --link:           #1A73E8;
  --success:        #34A853;
  --warning:        #FBBC05;
  --warning-bg:     #FFF9E6;
  --warning-text:   #8B6914;
  --shadow-sm:      0 1px 2px rgba(17,19,24,.04);
  --shadow:         0 1px 3px rgba(17,19,24,.06), 0 4px 16px rgba(17,19,24,.04);
  --shadow-lg:      0 8px 32px rgba(17,19,24,.12);
  --shadow-hover:   0 12px 32px rgba(196,22,26,.18);
  --radius:         10px;
  --radius-sm:      6px;
  --radius-lg:      16px;
  --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:     'Playfair Display', Georgia, serif;
  --header-h:       116px;
  --ticker-h:       40px;
  --transition:     .2s cubic-bezier(.4,0,.2,1);
  --header-bg:      #FFFFFF;
  --topbar-bg:      #111318;
  --footer-bg:      #0E1014;
  --ticker-bg:      #c4161a;
  --ticker-label-bg:#9a1115;
  --ticker-text:    #FFFFFF;
  --logo-height:    48px;
  --logo-max-width: 200px;
  --ticker-duration:40s;
}

[data-theme="dark"] {
  --bg:             #0E1014;
  --bg-alt:         #16181E;
  --bg-card:        #1A1D24;
  --bg-elevated:    #21242C;
  --text:           #F0F2F5;
  --text-secondary: #A8AEBB;
  --text-muted:     #8B95A5; /* dark mode: ditingkatkan dari #6B7280 → contrast 4.6:1 di bg gelap */
  --border:         #262A33;
  --border-strong:  #373B45;
  --primary-soft:   #2A1212;
  --warning-bg:     #2A2410;
  --warning-text:   #FBBC05;
  --shadow-sm:      0 1px 2px rgba(0,0,0,.3);
  --shadow:         0 1px 3px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.2);
  --shadow-lg:      0 8px 32px rgba(0,0,0,.5);
  --shadow-hover:   0 12px 32px rgba(196,22,26,.3);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover { text-decoration: underline; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul { list-style: none; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   2. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

p { margin-bottom: 1rem; }

/* ============================================================
   3. UTILITIES
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}

/* ============================================================
   4. SKIP LINK & ACCESSIBILITY
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 999;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: -3px;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================================
   5. TOP BAR
   ============================================================ */
.topbar {
  background: var(--topbar-bg, var(--text));
  color: #fff;
  font-size: .78rem;
  padding: 8px 0;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 28px; /* sejajar tinggi tombol mode gelap */
}

.topbar-clock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: .95;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}

.topbar-clock__tz {
  font-size: .68rem;
  font-weight: 700;
  opacity: .75;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.topbar .date {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: .9;
}

.topbar-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.topbar-links a {
  opacity: .85;
  transition: opacity var(--transition);
  text-decoration: none;
  color: #fff;
}

.topbar-links a:hover { opacity: 1; color: var(--primary-light); text-decoration: none; }

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  opacity: .9;
  transition: opacity var(--transition);
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.theme-toggle:hover { opacity: 1; color: var(--primary-light); }

/* ============================================================
   6. HEADER
   ============================================================ */
.header {
  background: var(--header-bg, var(--bg));
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: box-shadow var(--transition);
}

.header.scrolled,
.header--sticky.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,.08); }

.header-main {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  min-height: 68px;
}

/* ---- Logo Wrap ---- */
.logo-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-right: 8px;
}

/* WP custom logo — hapus semua override aneh */
.logo-wrap .custom-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.logo-wrap .custom-logo-link:focus {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Logo gambar — ukuran dari Customizer (--logo-height / --logo-max-width) */
.logo-wrap .custom-logo {
  height: var(--logo-height, 48px);
  max-height: var(--logo-height, 48px);
  width: auto;
  max-width: var(--logo-max-width, 200px);
  object-fit: contain;
  display: block;
  padding: 0;
  background: none;
  border-radius: 0;
  transform: none;
  transition: opacity var(--transition);
}

.logo-wrap .custom-logo-link:hover .custom-logo { opacity: .85; }

/* Logo text fallback */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo:hover { text-decoration: none; }

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text .brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -.5px;
  color: var(--text);
}

.logo-text .brand span { color: var(--primary); }

.logo-text .tagline {
  font-size: .6rem;
  color: var(--text-muted);
  letter-spacing: .8px;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 2px;
}

/* ---- Search Form ---- */
.search-form {
  /* Tidak lagi flex:1 — ukuran fixed, posisi di kanan */
  flex: 0 0 auto;
  width: 220px;
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto; /* push ke kanan */
}

.search-form input[type="search"] {
  width: 100%;
  padding: 10px 48px 10px 20px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text);
  font-size: .88rem;
  font-family: var(--font-sans);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.4;
}

.search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.search-form input[type="search"]::placeholder {
  color: var(--text-muted);
}

/* Tombol search — ikon di dalam input */
.search-form button[type="submit"],
.search-form .search-submit {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: .85rem;
  transition: background var(--transition), transform var(--transition);
  flex-shrink: 0;
}

.search-form button[type="submit"]:hover,
.search-form .search-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-50%) scale(1.08);
}

.search-form button[type="submit"]:focus-visible,
.search-form .search-submit:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---- Header Actions (sosmed + hamburger) ---- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  /* margin-left: auto dihapus — search yang push ke kanan */
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  font-size: .85rem;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-light);
  text-decoration: none;
}

/* hamburger hanya muncul di mobile — lihat @media 860px */
/* Dark mode (theme toggle) */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-light);
}

[data-theme="dark"] .theme-toggle {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

[data-theme="dark"] .theme-toggle:hover {
  color: var(--primary-light);
}

.hamburger { display: none; }

/* ============================================================
   7. NAV
   ============================================================ */
.nav {
  border-top: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav-list {
  display: flex;
  gap: 2px;
  padding: 0;
  white-space: nowrap;
  list-style: none;
  margin: 0;
}

.nav-list li { position: relative; }

.nav-list a {
  display: block;
  padding: 13px 18px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2.5px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a.active,
.nav-list .current-menu-item > a,
.nav-list .current-menu-ancestor > a {
  color: var(--primary);
  text-decoration: none;
}

.nav-list .current-menu-item > a,
.nav-list .current-menu-ancestor > a {
  border-bottom-color: var(--primary);
}

/* Sub-menu */
.nav-list .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  z-index: 200;
  list-style: none;
  padding: 8px 0;
}

.nav-list li:hover > .sub-menu,
.nav-list li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-list .sub-menu a {
  padding: 10px 18px;
  border-bottom: none;
  font-size: .84rem;
}

.submenu-indicator { margin-left: 4px; font-size: .7rem; }

/* ============================================================
   8. TICKER
   ============================================================ */

.ticker {
  background: var(--ticker-bg, var(--primary));
  color: var(--ticker-text, #fff);
  height: var(--ticker-h);
  overflow: hidden;
  position: relative;
  z-index: 90;
}

.ticker .container {
  display: flex;
  align-items: stretch;
  height: 100%;
  padding: 0;
  /* overflow hidden JANGAN di sini — harus di track-wrap */
}

/* Label "Breaking News" */
.ticker__label {
  background: var(--ticker-label-bg, var(--primary-dark));
  color: var(--ticker-text, #fff);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
  z-index: 2;
}

.ticker__label i {
  animation: mdnpulse 1.5s ease-in-out infinite;
  font-size: .75rem;
}

@keyframes mdnpulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

/* Wrapper overflow — ini yang clip konten ticker */
.ticker__track-wrap {
  flex: 1;
  min-width: 0; /* biar flex child bisa overflow dengan benar */
  overflow: hidden;
  position: relative;
  /* JANGAN display:flex di sini — overflow:hidden + flex
     membuat .ticker__list menyusut ke lebar container sehingga
     translateX(-50%) hampir tidak terlihat. */
  display: block;
  height: 100%;
  /* Fade kiri-kanan */
  mask-image: linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
}

/* List yang bergerak */
.ticker__list {
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  /* KUNCI: flex row, tidak wrap, lebar sesuai konten */
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  min-width: max-content;
  flex-shrink: 0;
  /* Animasi — durasi bisa di-override via --ticker-duration */
  animation: tickerScroll var(--ticker-duration, 40s) linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.ticker__list.is-paused,
.ticker__list:hover { animation-play-state: paused; }

/* Saat JS marquee aktif, matikan CSS animation agar tidak bentrok */
.ticker__list.is-js-marquee {
  animation: none !important;
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker__item {
  display: flex;
  align-items: center;
  padding: 0 40px 0 0;
  flex-shrink: 0;
}

/* Pemisah antar item */
.ticker__item::before {
  content: '\2022';
  margin-right: 40px;
  opacity: .5;
  font-size: .8rem;
  flex-shrink: 0;
}

.ticker__item:first-child::before { display: none; }

.ticker__item a {
  color: var(--ticker-text, #fff);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity .2s;
}

.ticker__item a:hover {
  opacity: .8;
  text-decoration: underline;
}

/* ============================================================
   9. HERO
   ============================================================ */
.hero-section { margin-bottom: 0; }

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.hero-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-main:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hero-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.hero-link:hover,
.hero-link:focus {
  text-decoration: none;
  color: inherit;
}

.hero-img-wrap {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.hero-img-wrap img,
.hero-img-wrap .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.4,0,.2,1);
}

.hero-main:hover .hero-img-wrap img { transform: scale(1.06); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.4) 45%, transparent 78%);
  pointer-events: none;
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 22px;
  color: #fff;
}

.hero-content .badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  padding: 5px 11px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 12px;
  text-decoration: none;
}

.hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
}

.hero-content p {
  font-size: .92rem;
  opacity: .9;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: .78rem;
  opacity: .85;
  flex-wrap: wrap;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Hero sidebar */
.hero-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.hero-side-heading {
  grid-column: 1 / -1;
}

.popular-side-item {
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  min-width: 0;
}

.popular-side-item a,
.popular-side-link {
  display: flex;
  gap: 12px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.popular-side-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.popular-side-item .num {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
}

.popular-side-item img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.psi-text { min-width: 0; flex: 1; }

.psi-text h4,
.psi-title {
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 5px;
  color: var(--text);
}

.psi-meta {
  font-size: .7rem;
  color: var(--text-muted);
}

/* ============================================================
   10. SECTION HEAD
   ============================================================ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -.3px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-head h2::before {
  content: '';
  width: 4px;
  height: 22px;
  background: var(--primary);
  border-radius: 2px;
  display: inline-block;
}

.link-all {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
  text-decoration: none;
}

.link-all:hover { gap: 10px; text-decoration: none; }

/* ============================================================
   11. NEWS GRID & CARD
   ============================================================ */
.news-section,
.news-grid-section { margin-bottom: 32px; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.news-card .img-wrap,
.news-card .card-img-link .img-wrap {
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
  display: block;
}

.news-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.news-card:hover .img-wrap img { transform: scale(1.06); }

.card-img-link { display: block; text-decoration: none; }
.card-img-link:hover { text-decoration: none; }

.cat-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-decoration: none;
  transition: background var(--transition);
}

.cat-tag:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }

.card-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}

.news-card h3 a { color: inherit; text-decoration: none; }
.news-card:hover h3 { color: var(--primary); }
.news-card:hover h3 a { color: var(--primary); }

.excerpt {
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 14px;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--text-muted);
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ============================================================
   12. CATEGORY BLOCK
   ============================================================ */
.category-block { margin-bottom: 44px; }

.cat-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cat-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.cat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.cat-item-img,
.cat-item a.cat-item-img { display: block; flex-shrink: 0; }

.cat-item img {
  width: 108px;
  height: 88px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.ci-text { min-width: 0; }

.ci-cat {
  font-size: .65rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .6px;
  display: block;
  text-decoration: none;
}

.cat-item h4 {
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 5px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-item h4 a { color: inherit; text-decoration: none; }
.cat-item h4 a:hover { color: var(--primary); }

.ci-meta {
  font-size: .75rem;
  color: var(--text-secondary); /* #545A66 — contrast 7:1, naik dari text-muted */
}

/* ============================================================
   13. VIDEO SECTION
   ============================================================ */
.video-section { margin-bottom: 44px; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.video-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #000;
  transition: transform var(--transition), box-shadow var(--transition);
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.video-card-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
}

.video-card img,
.video-card .video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .85;
  transition: opacity var(--transition);
  position: absolute;
  inset: 0;
}

.video-card:hover img,
.video-card:hover .video-thumb { opacity: 1; }

.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.25);
}

.video-play i {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(196,22,26,.95);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  padding-left: 4px;
  transition: transform var(--transition), background var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
}

.video-card:hover .video-play i {
  transform: scale(1.15);
  background: var(--primary);
}

.video-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,.9), transparent);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* ============================================================
   14. NEWSLETTER
   ============================================================ */
.newsletter {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.newsletter::before {
  content: '\f1ea';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: -20px;
  bottom: -40px;
  font-size: 13rem;
  opacity: .08;
  pointer-events: none;
}

.newsletter-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #fff;
}

.newsletter p {
  font-size: .92rem;
  opacity: .92;
  margin-bottom: 22px;
  max-width: 540px;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 540px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.newsletter-form input {
  flex: 1;
  min-width: 220px;
  padding: 13px 20px;
  border-radius: 999px;
  border: none;
  font-size: .9rem;
  font-family: inherit;
  background: rgba(255,255,255,.97);
  color: #111;
}

.newsletter-form input:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.newsletter-form button {
  padding: 13px 30px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  transition: transform var(--transition), background var(--transition);
  white-space: nowrap;
}

.newsletter-form button:hover {
  transform: translateY(-2px);
  background: #000;
}

.newsletter-msg {
  margin-top: 14px;
  font-size: .85rem;
  font-weight: 600;
  min-height: 20px;
  position: relative;
  z-index: 1;
}

.newsletter-msg.error   { color: #FFE0E0; }
.newsletter-msg.success { color: #D4F7B6; }

/* ============================================================
   15. SIDEBAR & WIDGETS
   ============================================================ */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--ticker-h, 40px) + 16px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  margin-bottom: 0;
  box-shadow: none;
}

.widget-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.widget-head::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 42px;
  height: 2px;
  background: var(--primary);
}

.widget-head::after { display: none; }

.widget-title,
.widget-head h3 {
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
}

/* Popular — ranking tanpa gambar */
.popular-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.popular-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 8px;
  margin: 0 -8px;
  border-radius: var(--radius-sm);
  border-bottom: none;
  transition: background var(--transition);
}

.popular-item + .popular-item {
  border-top: 1px solid var(--border);
  border-radius: 0;
}

.popular-item:hover { background: var(--primary-soft); }

.popular-item .pnum {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: .8rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.popular-item:nth-child(1) .pnum { background: #F5C518; border-color: #e0b400; color: #4a3800; }
.popular-item:nth-child(2) .pnum { background: #D8D8D8; border-color: #bdbdbd; color: #333; }
.popular-item:nth-child(3) .pnum { background: #C47A3A; border-color: #a86528; color: #fff; }

.popular-item-text { min-width: 0; flex: 1; }

.popular-item h3,
.popular-item h4,
.popular-item-title {
  font-family: var(--font-sans);
  font-size: .86rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popular-item h3 a,
.popular-item h4 a,
.popular-item-title a { color: var(--text); text-decoration: none; }
.popular-item h3 a:hover,
.popular-item h4 a:hover,
.popular-item-title a:hover { color: var(--primary); }
.popular-item h4 a:hover { color: var(--primary); }

.popular-item .pmeta,
.pmeta {
  font-size: .72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
}
.pmeta-sep { opacity: .5; }

/* Category nav */
.cat-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cat-nav li + li { border-top: 1px solid var(--border); }
.cat-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 4px;
  text-decoration: none;
  color: var(--text);
  font-size: .88rem;
  font-weight: 600;
  transition: color var(--transition);
}
.cat-nav a:hover { color: var(--primary); }
.cat-nav__count {
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-secondary); /* naik dari text-muted → contrast 7:1 */
}
.cat-nav a:hover .cat-nav__count {
  background: var(--primary-soft);
  border-color: var(--primary-light);
  color: var(--primary-dark);
}

/* Recent list */
.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.recent-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  align-items: flex-start;
}
.recent-item + .recent-item { border-top: 1px solid var(--border); }
.recent-thumb {
  flex-shrink: 0;
  width: 76px;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  background: var(--bg-alt);
}
.recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.recent-item:hover .recent-thumb img { transform: scale(1.06); }
.recent-text { min-width: 0; flex: 1; }
.recent-cat {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--primary);
  text-decoration: none;
  margin-bottom: 4px;
  border-radius: 4px;
  background: var(--primary-soft);
  transition: background var(--transition), color var(--transition);
}
.recent-cat:hover {
  background: var(--primary);
  color: #fff;
}
.recent-text h3,
.recent-text h4 {
  font-family: var(--font-sans);
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recent-text h3 a,
.recent-text h4 a { color: var(--text); text-decoration: none; }
.recent-text h3 a:hover,
.recent-text h4 a:hover { color: var(--primary); }
.recent-text time {
  font-size: .75rem;
  color: var(--text-secondary); /* naik dari text-muted → contrast 7:1 */
}

/* Tag cloud */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud a {
  padding: 6px 12px;
  background: var(--bg-alt);
  border-radius: 999px;
  font-size: .75rem !important;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  border: 1px solid var(--border);
  text-decoration: none;
}
.tag-cloud a:hover {
  background: var(--primary);
  color: #fff !important;
  border-color: var(--primary);
}

/* Sidebar newsletter CTA */
.widget-newsletter-cta {
  padding: 0;
  border: none;
  background: transparent;
  overflow: hidden;
}
.sidebar-nl {
  padding: 22px 20px;
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
  color: #fff;
}
.sidebar-nl__eyebrow {
  display: inline-block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 8px;
}
.sidebar-nl__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 8px;
  color: #fff;
}
.sidebar-nl__desc {
  font-size: .82rem;
  line-height: 1.5;
  margin: 0 0 14px;
  opacity: .9;
}
.sidebar-nl__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-nl__form .newsletter-form__input {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  font-size: .88rem;
  background: #fff;
  color: var(--text);
}
.sidebar-nl__btn {
  border: none;
  border-radius: 8px;
  padding: 11px 14px;
  font-weight: 800;
  font-size: .88rem;
  cursor: pointer;
  background: #111;
  color: #fff;
  transition: transform var(--transition), opacity var(--transition);
}
.sidebar-nl__btn:hover { opacity: .92; transform: translateY(-1px); }

/* ============================================================
   16. SINGLE / ARTICLE
   ============================================================ */
.article-page.main { padding: 28px 0 64px; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: start;
}

/* Kunci: cegah konten panjang merusak grid */
.article-main {
  min-width: 0;
  max-width: 100%;
}

.article-content {
  min-width: 0;
}

.article-header { margin-bottom: 24px; }

.article-cat {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 800;
  padding: 5px 13px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 14px;
  text-decoration: none;
}

.article-cat:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }

.article-title {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 3.5vw, 2.35rem);
  font-weight: 900;
  line-height: 1.22;
  margin-bottom: 18px;
  letter-spacing: -.5px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: .82rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-meta i { color: var(--primary); }

.article-meta a { color: inherit; }
.article-meta a:hover { color: var(--primary); }

.article-hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
  margin-top: 20px;
}

.article-hero-img img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.img-caption {
  font-size: .78rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 12px;
  background: var(--bg-alt);
  border-radius: 0 0 var(--radius) var(--radius);
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-body p { margin-bottom: 20px; }

.article-body img,
.article-body video,
.article-body iframe,
.article-body figure,
.article-body .wp-caption,
.article-body table {
  max-width: 100% !important;
  height: auto;
}

.article-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.article-body table {
  display: block;
  overflow-x: auto;
}

.article-body .alignleft,
.article-body .alignright {
  max-width: 100%;
}

.article-body .alignwide,
.article-body .alignfull {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  font-weight: 800;
  margin: 32px 0 14px;
  color: var(--text);
}

.article-body h2 { font-size: 1.5rem; }
.article-body h3 { font-size: 1.28rem; }
.article-body h4 { font-size: 1.1rem; }

.article-body a {
  color: var(--primary);
  text-decoration: underline;
}

.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--primary-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  font-size: 1.05rem;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body li { margin-bottom: 6px; }

.article-body img {
  border-radius: var(--radius);
  max-width: 100%;
}

/* Article tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.article-tags i { color: var(--primary); margin-right: 4px; }

.tag-item {
  padding: 5px 14px;
  background: var(--bg-alt);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all var(--transition);
  text-decoration: none;
}

.tag-item:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}

/* Share bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 32px 0;
  padding: 18px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}

.share-bar span {
  font-size: .82rem;
  font-weight: 700;
  margin-right: 4px;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .9rem;
  transition: transform var(--transition), opacity var(--transition);
  text-decoration: none;
  flex-shrink: 0;
}

.share-btn:hover { transform: translateY(-3px); opacity: .9; text-decoration: none; color: #fff; }

.share-btn.wa   { background: #25d366; }
.share-btn.fb   { background: #1877f2; }
.share-btn.x    { background: #111; }
.share-btn.tg   { background: #229ed9; }
.share-btn.li   { background: #0a66c2; }
.share-btn.copy { background: var(--text-muted); border: none; cursor: pointer; }

.author-box__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.author-box__link:hover { text-decoration: underline; }

.archive-count {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.error-cats { margin-top: 28px; }
.error-cats__label {
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.error-cats__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
}
.error-cats__list a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}
.error-cats__list a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.error-cats__list span { opacity: .7; font-weight: 500; }

.empty-state__hint { margin-top: 16px; }
.empty-state__hint a { color: var(--primary); font-weight: 600; }

/* Related di single (kolom sempit) cukup 2 kolom; 4 kolom hanya full-width */
.related-grid { grid-template-columns: repeat(2, 1fr); }
.related-grid--4 { grid-template-columns: repeat(2, 1fr); }
.article-layout--full-width .related-grid--4,
.article-layout--wide .related-grid--4 { grid-template-columns: repeat(4, 1fr); }
.article-layout--full-width,
.article-layout--wide { grid-template-columns: 1fr; }
.article-layout--wide .article-main { max-width: 860px; margin: 0 auto; }

/* Page links (multi-page post) */
.page-links {
  margin: 24px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: .9rem;
  font-weight: 600;
}

.page-links .page-number a,
.page-links .page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
  text-decoration: none;
}

.page-links .page-number a:hover { border-color: var(--primary); color: var(--primary); }

/* ============================================================
   17. AUTHOR BOX
   ============================================================ */
.author-box {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  margin: 32px 0;
  border: 1px solid var(--border);
  align-items: flex-start;
}

.author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--primary-soft);
}

.author-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--primary);
  display: block;
  margin-bottom: 4px;
}

.author-name {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.author-name a { color: inherit; text-decoration: none; }
.author-name a:hover { color: var(--primary); }

.author-bio {
  font-size: .85rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   18. COMMENTS
   ============================================================ */
.comments-area {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 2px solid var(--border);
}

.comments-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}

.comment-body {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.comment-author {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}

.comment-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.comment-author-info .fn a {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.comment-author-info .fn a:hover { color: var(--primary); }

.comment-meta {
  font-size: .75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.comment-meta a { color: inherit; text-decoration: none; }
.comment-meta a:hover { color: var(--primary); }

.comment-content { font-size: .95rem; line-height: 1.7; margin-left: 62px; }
.comment-content p:last-child { margin-bottom: 0; }

.comment-actions {
  margin-left: 62px;
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

.comment-reply-link,
.edit-link a {
  font-size: .78rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.comment-reply-link:hover,
.edit-link a:hover { text-decoration: underline; }

.awaiting-moderation {
  font-size: .75rem;
  color: var(--warning-text);
  background: var(--warning-bg);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
}

.no-comments {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 24px;
}

/* Comment form */
.comment-form h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.comment-form p { margin-bottom: 16px; }

.comment-form label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.comment-form textarea { min-height: 140px; resize: vertical; }

.comment-form .submit,
.comment-form .btn-primary {
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  font-family: var(--font-sans);
}

.comment-form .submit:hover,
.comment-form .btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.required { color: var(--primary); }

/* ============================================================
   19. ARCHIVE / SEARCH HEADER
   ============================================================ */
.archive-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.archive-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  margin-bottom: 8px;
}

.archive-title span { color: var(--primary); }

.archive-description {
  font-size: .95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================================
   20. 404
   ============================================================ */
.error-404-wrap {
  padding: 60px 0;
}

.error-404-content {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 60px;
}

.error-code {
  font-family: var(--font-serif);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 16px;
  opacity: .2;
}

.error-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.error-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.error-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.error-popular { margin-top: 40px; }

.error-popular h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

/* ============================================================
   21. PAGINATION
   ============================================================ */
.pagination-wrap {
  margin: 40px 0;
  display: flex;
  justify-content: center;
}

.pagination-wrap ul,
.page-numbers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
  justify-content: center;
}

.page-numbers li,
.pagination-wrap ul li {
  list-style: none;
}

.page-numbers a,
.page-numbers span,
.pagination-wrap a,
.pagination-wrap span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  font-size: .88rem;
  font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
  gap: 6px;
}

.page-numbers a:hover,
.pagination-wrap a:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.page-numbers .current,
.pagination-wrap .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.load-more-wrap {
  text-align: center;
  margin-top: 32px;
}

.btn-load-more {
  padding: 13px 40px;
  border: 2px solid var(--primary);
  border-radius: 999px;
  color: var(--primary);
  font-weight: 700;
  font-size: .9rem;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}

.btn-load-more:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
}

/* ============================================================
   22. FOOTER
   ============================================================ */
.footer {
  background: var(--footer-bg, #0E1014);
  color: #C5C9D3;
  padding: 56px 0 0;
  margin-top: 40px;
}

/* Contact form */
.mdnpedia-contact-form-wrap {
  margin-top: 28px;
  padding: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.mdnpedia-contact-form .contact-row {
  margin-bottom: 16px;
}
.mdnpedia-contact-form label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.mdnpedia-contact-form input,
.mdnpedia-contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}
.mdnpedia-contact-form input:focus,
.mdnpedia-contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.contact-submit {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
}
.contact-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: .9rem;
  font-weight: 600;
}
.contact-alert--ok {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.contact-alert--fail {
  background: #fde8e8;
  color: #b42318;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-brand-logo {
  display: block;
  margin-bottom: 16px;
}

.footer-brand-logo .custom-logo-link {
  display: inline-block;
  line-height: 0;
}

.footer-brand-logo .custom-logo-link:focus {
  outline: 2px solid var(--primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}

.footer-brand-logo .custom-logo {
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  /* Filter untuk dark background footer */
  filter: brightness(0) invert(1);
  opacity: .92;
  transition: opacity var(--transition);
}

.footer-brand-logo .custom-logo-link:hover .custom-logo {
  opacity: 1;
}

.footer-brand .logo-text .brand { color: #fff; }
.footer-brand .logo-text .tagline { color: #B0B8C4; } /* ditingkatkan dari #878D99 */

.footer-brand p {
  font-size: .85rem;
  line-height: 1.75;
  margin-top: 18px;
  color: #C5CBD4; /* ditingkatkan dari #9AA0AB → contrast 5.4:1 di bg gelap footer */
  max-width: 340px;
}

.footer-col h4 {
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 11px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col a {
  font-size: .85rem;
  color: #C5CBD4; /* ditingkatkan dari #9AA0AB → contrast 5.4:1 di bg gelap */
  transition: color var(--transition);
  text-decoration: none;
}

.footer-col a:hover { color: #fff; text-decoration: underline; }

/* Kontak Redaksi — teks alamat/kontak tidak lebih besar dari tautan footer */
#footer-contact .footer-contact-list {
  gap: 10px;
}

#footer-contact .footer-contact-item,
#footer-contact .footer-contact-item a,
#footer-contact .footer-contact-addr span {
  font-size: .8rem;
  line-height: 1.55;
  color: #C5CBD4; /* contrast 5.4:1 */
  word-break: break-word;
}

#footer-contact .footer-contact-item a {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
}

#footer-contact .footer-contact-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: .85;
}

#footer-contact .footer-contact-addr {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

#footer-contact .footer-wa-tip {
  margin: 14px 0 0;
  font-size: .78rem;
  line-height: 1.5;
  color: #C5CBD4; /* contrast 5.4:1 */
  max-width: 260px;
}

#footer-contact .footer-wa-tip a {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  font-size: inherit;
  color: #C5CBD4; /* ditingkatkan dari #9AA0AB → contrast 5.4:1 */
  line-height: 1.5;
}

#footer-contact .footer-wa-tip a:hover {
  color: #25D366;
}

#footer-contact .footer-wa-tip svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #25D366;
}

.footer-bottom {
  border-top: 1px solid #262A33;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .8rem;
  color: #C5CBD4; /* ditingkatkan dari #6B7280 → contrast 5.4:1 */
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.footer-social a,
.footer-social__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  display: grid;
  place-items: center;
  color: #C5C9D3;
  transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition);
  text-decoration: none;
  flex-shrink: 0;
}

.footer-social a svg,
.footer-social__icon svg {
  width: 17px;
  height: 17px;
  display: block;
}

/* Warna brand per platform saat hover */
.footer-social__facebook:hover  { background: #1877F2; border-color: #1877F2; color: #fff; transform: translateY(-2px); }
.footer-social__youtube:hover   { background: #FF0000; border-color: #FF0000; color: #fff; transform: translateY(-2px); }
.footer-social__tiktok:hover    { background: #000;    border-color: #69C9D0; color: #fff; transform: translateY(-2px); }
.footer-social__instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); border-color: #d6249f; color: #fff; transform: translateY(-2px); }
.footer-social__twitter:hover   { background: #000;    border-color: #000;    color: #fff; transform: translateY(-2px); }
.footer-social__telegram:hover  { background: #2CA5E0; border-color: #2CA5E0; color: #fff; transform: translateY(-2px); }
.footer-social__whatsapp:hover  { background: #25D366; border-color: #25D366; color: #fff; transform: translateY(-2px); }
.footer-social__linkedin:hover  { background: #0077B5; border-color: #0077B5; color: #fff; transform: translateY(-2px); }
/* ============================================================
   23. BACK TO TOP
   ============================================================ */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 20px rgba(196,22,26,.4);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
  border: none;
  cursor: pointer;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ============================================================
   24. TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 13px 26px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  white-space: nowrap;
  max-width: 90vw;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   25. MOBILE MENU
   ============================================================ */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100vw;
  height: 100%;
  height: 100dvh;
  background: var(--bg);
  z-index: 10050;
  transform: translate3d(-105%, 0, 0);
  transition: transform .28s cubic-bezier(.4,0,.2,1), visibility .28s;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
  pointer-events: none;
}

.mobile-menu.open {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  pointer-events: auto;
}

/* Jangan pakai display:none — bentrok animasi & klik di mobile */
.mobile-menu[hidden]:not(.open) {
  visibility: hidden;
  pointer-events: none;
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mobile-nav-list {
  list-style: none;
  padding: 12px 0;
  margin: 0;
}

.mobile-nav-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 24px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.mobile-nav-list a:hover,
.mobile-nav-list .current-menu-item > a,
.mobile-nav-list a.active {
  background: var(--bg-alt);
  color: var(--primary);
  border-left-color: var(--primary);
  text-decoration: none;
}

.mobile-nav-list .sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-list .sub-menu a {
  padding-left: 42px;
  font-size: .88rem;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 10040;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s, visibility .3s;
}

.mobile-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.mobile-menu-open {
  overflow: hidden;
}

/* ============================================================
   26. POST NAVIGATION
   ============================================================ */
.post-navigation {
  margin: 36px 0;
  padding: 0;
  border: none;
}

.post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Kalau cuma ada prev ATAU next, biar full width */
.post-navigation .nav-links:has(.nav-previous):not(:has(.nav-next)),
.post-navigation .nav-links:has(.nav-next):not(:has(.nav-previous)) {
  grid-template-columns: 1fr;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  min-width: 0;
}

.post-navigation a {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 16px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.post-navigation a:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-1px);
}

.post-navigation .nav-next a {
  flex-direction: row;
  text-align: right;
  justify-content: flex-end;
}

.post-navigation .nav-dir {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: .85rem;
}

.post-navigation a:hover .nav-dir {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.post-navigation .nav-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.post-navigation .nav-label {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--primary);
}

.post-navigation .nav-title {
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Related posts — 2 kolom di single (area sempit); 3/4 hanya full-width */
.related-section { margin-top: 44px; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.related-grid .news-card h3 { font-size: .88rem; }

.article-layout--full-width .related-grid,
.article-layout--wide .related-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ============================================================
   27. MAIN LAYOUT
   ============================================================ */
.main { padding: 20px 0 48px; }
.main.article-page { padding-top: 24px; }

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--primary); }

.breadcrumb i { font-size: .6rem; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3.5rem;
  margin-bottom: 18px;
  opacity: .35;
  color: var(--primary);
  display: block;
}

.empty-state h3 {
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p { font-size: .9rem; margin-bottom: 20px; }

/* ============================================================
   28. RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
}

@media (max-width: 1024px) {
  .layout-grid       { grid-template-columns: 1fr; gap: 24px; }
  .article-layout    { grid-template-columns: 1fr; gap: 28px; }
  .sidebar           { position: static; width: 100%; }
  .hero              { grid-template-columns: 1fr; gap: 14px; }
  /* Tetap list vertikal biar tidak berserak; heading full-width */
  .hero-side {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .hero-side-heading { grid-column: 1 / -1; margin-bottom: 0; }
  .footer-grid       { grid-template-columns: 1fr 1fr; }
  .news-grid         { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .video-grid        { grid-template-columns: repeat(2, 1fr); }
  .related-grid,
  .related-grid--4,
  .article-layout--full-width .related-grid--4,
  .article-layout--wide .related-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .search-form       { max-width: 280px; }
  .header .search-form { width: 180px; }
}

/* 860px block merged ke atas — lihat "CONSOLIDATED" */

@media (max-width: 680px) {
  .container         { padding: 0 14px; }
  .news-grid         { grid-template-columns: 1fr; }
  .video-grid        { grid-template-columns: 1fr; }
  .related-grid,
  .related-grid--4,
  .article-layout--full-width .related-grid--4,
  .article-layout--wide .related-grid--4 { grid-template-columns: 1fr; }
  .hero-side         { grid-template-columns: 1fr; }
  .footer-grid       { grid-template-columns: 1fr; }
  .footer-bottom     { flex-direction: column; text-align: center; gap: 8px; }
  .article-title     { font-size: 1.4rem; letter-spacing: -.3px; }
  .article-hero-img  { margin-top: 14px; margin-bottom: 20px; border-radius: 8px; }
  .newsletter-form   { flex-direction: column; }
  .newsletter-form button { width: 100%; }
  .author-box        { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
  .comment-content   { margin-left: 0; margin-top: 12px; }
  .comment-actions   { margin-left: 0; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next a { text-align: left; justify-content: flex-start; flex-direction: row-reverse; }
  .ticker__label     { font-size: .62rem; padding: 0 8px; }
  .widget            { padding: 16px; }
  .recent-thumb      { width: 68px; height: 52px; }
  .sidebar-nl        { padding: 18px 16px; }
  .mdnpedia-contact-form-wrap { padding: 16px; }
  .error-code { font-size: 4.5rem; }
}

@media (max-width: 414px) {
  .container { padding: 0 12px; }
  .article-meta { font-size: .78rem; }
  .share-btn { width: 36px; height: 36px; }
  .popular-item h3,
  .popular-item h4,
  .recent-text h3,
  .recent-text h4 { font-size: .82rem; }
  .hero-content h1 { font-size: 1.25rem; }
}

@media (max-width: 360px) {
  .topbar .date { display: none; }
  .article-title { font-size: 1.28rem; }
  .pnum { min-width: 26px; height: 26px; }
}

/* ============================================================
   29. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  /* Ticker: perlambat, jangan matikan total (konten berita perlu terbaca) */
  .ticker__list {
    animation-duration: 90s;
  }
  /* Transition tetap boleh tapi lebih cepat */
  *,
  *::before,
  *::after {
    transition-duration: .05ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   30. RTL SUPPORT
   ============================================================ */
[dir="rtl"] .section-head h2::before { margin-right: 0; margin-left: 12px; }
[dir="rtl"] .breadcrumb i            { transform: scaleX(-1); }
[dir="rtl"] .popular-item:hover      { transform: translateX(-4px); }
[dir="rtl"] .popular-side-item:hover { transform: translateX(-4px); }
[dir="rtl"] .mobile-menu             { transform: translateX(100%); }
[dir="rtl"] .mobile-menu.open        { transform: translateX(0); }
[dir="rtl"] .mobile-nav-list a       { border-left: none; border-right: 3px solid transparent; padding-left: 24px; padding-right: 24px; }
[dir="rtl"] .mobile-nav-list a:hover,
[dir="rtl"] .mobile-nav-list .current-menu-item > a {
  border-right-color: var(--primary);
  border-left-color: transparent;
}

/* ============================================================
   31. MISSING & PATCH CSS
   Semua class yang dipakai di HTML tapi belum ada di CSS.
   ============================================================ */

/* ----- Hero Wrapper (pembungkus luar dari front-page.php) ----- */
.hero-wrapper {
  margin-bottom: 28px;
}

.hero-layout--full-width .hero-side { display: none; }
.hero-layout--full-width .hero-main { grid-column: 1 / -1; }

.hero-layout--slider .hero {
  position: relative;
}

/* ----- Header sticky behavior ----- */
.header--sticky {
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow);
}

/* Anti-FOUC: saat header sticky, beri ruang body */
body.has-sticky-header {
  scroll-padding-top: calc(var(--header-h) + var(--ticker-h, 40px));
}

/* ----- Topbar: kanan (sosmed + dark toggle) ----- */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-social {
  color: rgba(255,255,255,.8);
  font-size: .8rem;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.topbar-social:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* ----- Mobile menu: search wrap + dark toggle ----- */
.mobile-search-wrap {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-dark-toggle {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.mobile-dark-toggle .theme-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  color: var(--text);
  transition: background var(--transition);
}

.mobile-dark-toggle .theme-toggle:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ----- .main-content (wrapper dalam layout-grid) ----- */
.main-content {
  min-width: 0; /* prevent grid blowout */
  width: 100%;
}

/* ----- News grid column variants ----- */
.news-grid--columns-1 { grid-template-columns: 1fr; }
.news-grid--columns-2 { grid-template-columns: repeat(2, 1fr); }
.news-grid--columns-3 { grid-template-columns: repeat(3, 1fr); }
.news-grid--columns-4 { grid-template-columns: repeat(4, 1fr); }

/* ----- Newsletter Section (di front-page.php) ----- */
.newsletter-section {
  margin: 48px 0;
}

.newsletter-inner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
}

.newsletter-inner h2 {
  font-size: 1.75rem;
  color: #fff;
  margin-bottom: 10px;
}

.newsletter-inner p {
  opacity: .88;
  margin-bottom: 28px;
  font-size: .95rem;
}

.newsletter-inner .newsletter-form__fields {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin: 0 auto;
}

.newsletter-inner .newsletter-form__input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  font-size: .95rem;
  color: var(--text);
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.newsletter-inner .newsletter-form__input:focus {
  box-shadow: 0 0 0 3px rgba(255,255,255,.4);
}

.newsletter-inner .newsletter-form__btn {
  padding: 12px 24px;
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition);
}

.newsletter-inner .newsletter-form__btn:hover {
  background: rgba(255,255,255,.3);
  border-color: #fff;
}

.newsletter-form__message {
  margin-top: 12px;
  font-size: .88rem;
  min-height: 20px;
}

.newsletter-form__message.success { color: #d4edda; }
.newsletter-form__message.error   { color: #f8d7da; }

/* Widget overrides handled in section 15 */

/* Load more button variant */
.btn--load-more {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 32px auto 0;
  padding: 12px 32px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn--load-more:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn--load-more.is-loading { opacity: .7; cursor: not-allowed; }
.btn--load-more[disabled] { background: var(--border-strong); cursor: not-allowed; transform: none; }

.load-more-wrapper {
  text-align: center;
  margin-top: 32px;
}

/* ============================================================
   32. RESPONSIVE COMPLETE (override + additions)
   ============================================================ */

/* Large tablet: 1024px */
@media (max-width: 1024px) {
  .newsletter-inner { padding: 36px 28px; }
  .news-grid--columns-4 { grid-template-columns: repeat(2, 1fr); }
  .news-grid--columns-3 { grid-template-columns: repeat(2, 1fr); }
  .topbar-social { display: none; }
}

/* Tablet: 860px — CONSOLIDATED (merged dari dua blok) */
@media (max-width: 860px) {
  :root { --header-h: 64px; }

  /* Hamburger muncul, nav disembunyikan */
  .hamburger         { display: grid !important; }
  .nav               { display: none; }

  /* Sosmed di header-actions disembunyikan di mobile */
  .header-actions .icon-btn:not(.hamburger) { display: none; }

  /* Search disembunyikan di mobile (ada di mobile menu) */
  .header .search-form { display: none !important; }

  .header-main {
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: space-between;
    width: 100%;
  }

  .news-grid         { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-list          { grid-template-columns: 1fr; }
  .hero-side         { grid-template-columns: 1fr; gap: 8px; }
  .topbar-links      { display: none; }
  .newsletter        { padding: 32px 24px; }

  .logo-wrap .custom-logo {
    height: min(var(--logo-height, 48px), 40px);
    max-height: 40px;
    max-width: min(var(--logo-max-width, 200px), 150px);
  }

  .newsletter-inner .newsletter-form__fields { flex-direction: column; }
  .newsletter-inner .newsletter-form__btn { width: 100%; }
  .news-grid--columns-3,
  .news-grid--columns-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Dorong hamburger ke kanan (search sudah hilang) */
  .header-actions {
    margin-left: auto !important;
    position: relative;
    z-index: 1002;
    display: flex !important;
    align-items: center;
    flex-shrink: 0;
  }
  .hamburger {
    display: grid !important;
    position: relative;
    z-index: 1003;
    pointer-events: auto !important;
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .article-meta { gap: 10px 14px; }
  .share-bar { padding: 14px; gap: 8px; }
  .article-body { font-size: 1rem; line-height: 1.75; }
  .article-body .alignleft,
  .article-body .alignright {
    float: none;
    display: block;
    margin: 0 0 16px;
    max-width: 100%;
  }
}

/* Mobile: 680px */
@media (max-width: 680px) {
  .hero-wrapper { margin-bottom: 24px; }

  .news-grid--columns-1,
  .news-grid--columns-2,
  .news-grid--columns-3,
  .news-grid--columns-4 { grid-template-columns: 1fr; }

  .newsletter-inner { padding: 28px 20px; border-radius: 10px; }
  .newsletter-inner h2 { font-size: 1.35rem; }

  .hero-side { grid-template-columns: 1fr; }

  .topbar-left .date { display: none; }
  .topbar-clock { font-size: .8rem; }
  .topbar-clock__tz { font-size: .62rem; }

  .ticker__label { padding: 0 10px; font-size: .68rem; }
  .ticker__item a { font-size: .82rem; }

  .mobile-search-wrap .search-form { max-width: 100%; }

  .header--sticky {
    position: -webkit-sticky;
    position: sticky;
  }
}

/* Small mobile: 400px */
@media (max-width: 400px) {
  .hero-content h1 { font-size: 1.3rem; }
  .hero-meta { flex-wrap: wrap; gap: 6px; }
  .newsletter-inner { padding: 20px 14px; }
  .ticker { font-size: .78rem; }
  .container { padding-inline: 12px; }
}

/* ============================================================
   33. DARK MODE — tambahan untuk class baru
   ============================================================ */
[data-theme="dark"] .newsletter-inner {
  background: linear-gradient(135deg, #2d5a0a 0%, #1e3d07 100%);
}

[data-theme="dark"] .mobile-search-wrap,
[data-theme="dark"] .mobile-dark-toggle {
  border-color: var(--border);
}

[data-theme="dark"] .mobile-dark-toggle .theme-toggle {
  background: var(--bg-alt);
  color: var(--text);
}

[data-theme="dark"] .btn--load-more:hover { background: var(--primary-light); }

[data-theme="dark"] .topbar-social { color: rgba(255,255,255,.7); }
[data-theme="dark"] .topbar-social:hover { background: rgba(255,255,255,.12); color: #fff; }

[data-theme="dark"] .cat-nav__count {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}
[data-theme="dark"] .recent-thumb { background: var(--bg-elevated); }
[data-theme="dark"] .sidebar-nl__btn { background: #0a0a0a; }

[data-theme="dark"] .widget-tags .tag-cloud a,
[data-theme="dark"] .widget-tags a {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

[data-theme="dark"] .newsletter-inner .newsletter-form__input {
  background: rgba(255,255,255,.12);
  color: #fff;
}

[data-theme="dark"] .newsletter-inner .newsletter-form__input::placeholder {
  color: rgba(255,255,255,.5);
}

/* hero-layout variants */
.hero-layout--with-sidebar .hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.hero-layout--full-width   .hero { display: block; }
.hero-layout--slider       .hero { display: block; position: relative; }

@media (max-width: 1024px) {
  .hero-layout--with-sidebar .hero { grid-template-columns: 1fr; gap: 14px; }
}

/* popular-item dark mode */
[data-theme="dark"] .popular-item:hover { background: var(--bg-elevated); }
[data-theme="dark"] .popular-item .pnum { background: var(--bg-elevated); border-color: var(--border-strong); color: var(--text-secondary); }
[data-theme="dark"] .popular-item:nth-child(1) .pnum { background: #7a6200; border-color: #9a7a00; color: #FFD700; }
[data-theme="dark"] .popular-item:nth-child(2) .pnum { background: #3a3a3a; border-color: #555; color: #C0C0C0; }
[data-theme="dark"] .popular-item:nth-child(3) .pnum { background: #6b3f10; border-color: #8b5a20; color: #CD7F32; }

/* ============================================================
   34. PRO ENHANCEMENTS (ringan)
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 400;
  pointer-events: none;
  background: transparent;
}
.reading-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width .05s linear;
}

.article-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.article-badges .article-cat { margin-bottom: 0; }
.article-updated-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.meta-updated { color: var(--warning-text); }
.meta-sumber { font-weight: 600; }

.mdnpedia-toc {
  margin: 0 0 28px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.mdnpedia-toc__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-weight: 800;
  font-size: .88rem;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.mdnpedia-toc__list {
  margin: 12px 0 0;
  padding: 0 0 0 18px;
  list-style: decimal;
}
.mdnpedia-toc__list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: .9rem;
  line-height: 1.45;
}
.mdnpedia-toc__list a:hover { color: var(--primary); }
.mdnpedia-toc__list .toc-l3 { margin-left: 12px; list-style: disc; }

.article-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 8px;
  padding-top: 4px;
}
.article-tools__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
}
.article-tools__btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  text-decoration: none;
}

[data-theme="dark"] .mdnpedia-toc,
[data-theme="dark"] .article-tools__btn {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

@media print {
  .reading-progress,
  .article-tools,
  .mdnpedia-toc__toggle { display: none !important; }
  .mdnpedia-toc__list { display: block !important; }
}

/* ============================================================
   ACCESSIBILITY FIXES
   ============================================================ */

/* Footer bottom links — harus bisa dibedakan dari teks biasa */
.footer-bottom a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.footer-bottom a:hover { color: var(--primary-light); }

/* cat-nav count — pastikan contrast cukup */
.cat-nav__count {
  color: #545A66; /* contrast 7:1 di bg putih */
  background: #F0F2F5;
  font-weight: 600;
}

/* pmeta / psi-meta / card-meta — tanggal & penulis harus readable */
.pmeta,
.psi-meta,
.card-meta,
.card-meta span,
.hero-meta span {
  color: var(--text-secondary); /* #545A66 — contrast 7:1 */
}

/* popular-side-item date */
.popular-side-item .psi-meta,
.popular-side-item time {
  color: var(--text-secondary);
}

/* sidebar popular pmeta */
.popular-item .pmeta,
.popular-item time {
  color: var(--text-secondary);
}

/* ============================================================
   TOUCH TARGET & CONTRAST FIXES (round 2)
   ============================================================ */

/* Recent widget: link title minimum touch area */
.recent-text h3 a,
.recent-text h4 a,
.recent-item-title a {
  display: block;
  min-height: 44px;
  padding-top: 4px;
}

/* Cat-item time — naik dari text-muted ke text-secondary */
.cat-item .ci-meta,
.cat-item .ci-meta time,
.cat-item time {
  color: var(--text-secondary);
  font-size: .75rem;
}

/* Footer bottom teks & link — pastikan contrast cukup di bg gelap */
.footer-bottom,
.footer-bottom span {
  color: #D0D5DC; /* contrast 6.1:1 di bg #131720 */
}

.footer-bottom a,
.footer-dev-link {
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-bottom a:hover,
.footer-dev-link:hover {
  color: var(--primary-light) !important;
}

/* Cat nav count — text-secondary lebih aman */
.cat-nav__count {
  color: var(--text-secondary) !important;
  font-weight: 700;
}

/* Heading fix: hero sidebar h3 perlu wrapper section heading agar tidak skip */
/* h1(hero) → h2(Popular) → h3(item) */
.hero-side-heading {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 4px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  grid-column: 1 / -1;
}
