/*
Theme Name: PortalSatu
Theme URI: https://portalsatu.com
Author: Team Portal Satu
Author URI: https://portalsatu.com
Description: Tema portal berita modern untuk WordPress – hero slider, mobile drawer, sistem iklan terjadwal, inline related posts, dukungan dark mode, dan performa tinggi.
Version: 2.5.7
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: portalsatu
Tags: news, blog, responsive, dark-mode, custom-logo, featured-images
*/

/* ============================================================
   1. VARIABLES & RESET
============================================================ */
:root {
  --primary:       #053d6a;
  --primary-light: #0a5a9e;
  --primary-dark:  #032b4c;
  --accent:        #e8232a;
  --accent-dark:   #b91c1c;
  --accent2:       #f59e0b;
  --bg:            #f4f6f8;
  --bg2:           #eef0f3;
  --card:          #ffffff;
  --text:          #1a1a2e;
  --text2:         #4a5568;
  --text3:         #718096;
  --border:        #e2e8f0;
  --shadow:        0 2px 12px rgba(0,0,0,.08);
  --shadow-md:     0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.16);
  --font-head:     'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:     'Inter', system-ui, sans-serif;
  --radius:        6px;
  --nav-h:         48px;
  --top-h:         62px; /* header-top height */
  --max-w:         1200px;
  --hero-h:        460px; /* FIXED hero height */
  --sidebar-w:     300px;
  --transition:    0.25s ease;
}
[data-theme="dark"] {
  --bg: #0d1117; --bg2: #161b22; --card: #1c2330;
  --text: #e6edf3; --text2: #8b949e; --text3: #6e7681;
  --border: #30363d; --shadow: 0 2px 12px rgba(0,0,0,.35);
  --shadow-md: 0 4px 20px rgba(0,0,0,.40);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.7; font-size: 15px; letter-spacing: -0.01em; transition: background var(--transition), color var(--transition); }
a { text-decoration: none; color: inherit; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
ul, ol { list-style: none; }

/* ============================================================
   2. HEADER TOP
============================================================ */
#site-header { position: relative; z-index: 100; }

.header-top {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  transition: background var(--transition);
}
[data-theme="dark"] .header-top { background: var(--bg2); }
.header-top-inner {
  max-width: var(--max-w);
  margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
  overflow: hidden;
  max-width: 220px;      /* batas lebar logo area */
  text-decoration: none;
}
.logo-icon {
  width: 36px; height: 36px; background: var(--primary);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px; font-weight: 800; font-family: var(--font-head); flex-shrink: 0;
}
.logo-text { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; line-height: 1; }
.logo-text span { color: var(--accent); }
.custom-logo { height: 42px; width: auto; object-fit: contain; }
.header-top-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.header-date { font-size: 12px; color: var(--text3); font-weight: 500; white-space: nowrap; }
.dark-toggle {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; width: 50px; height: 28px;
  position: relative; flex-shrink: 0; transition: background .3s;
}
.dark-toggle::after {
  content: '☀️'; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 20px; text-align: center;
  transition: transform .3s;
}
[data-theme="dark"] .dark-toggle { background: var(--primary); border-color: var(--primary); }
[data-theme="dark"] .dark-toggle::after { transform: translateX(22px); content: '🌙'; }

/* ============================================================
   3. HEADER NAV
============================================================ */
.header-nav {
  background: var(--primary);
  position: relative; z-index: 99;
}
.header-nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; height: var(--nav-h); gap: 4px;
}

/* Sticky logo – HANYA muncul saat is-sticky dan desktop */

/* Primary nav */
.main-nav { display: flex; align-items: center; flex: 1; }
.main-nav ul { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; flex-wrap: nowrap; }
.main-nav ul li { position: relative; }
.main-nav ul li a {
  display: flex; align-items: center; height: var(--nav-h);
  padding: 0 13px; color: rgba(255,255,255,.85);
  font-size: 12px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap; position: relative;
}
.main-nav ul li a::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--accent2);
  transform: scaleX(0); transition: transform .25s ease;
}
.main-nav ul li a:hover,
.main-nav ul li.current-menu-item > a,
.main-nav ul li.current_page_item > a { color: #fff; background: rgba(255,255,255,.12); }
.main-nav ul li a:hover::after,
.main-nav ul li.current-menu-item > a::after,
.main-nav ul li.current_page_item > a::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-icon-btn {
  background: none; border: none; color: rgba(255,255,255,.85);
  width: 38px; height: 38px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background var(--transition);
}
.nav-icon-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.nav-icon-btn svg { width: 18px; height: 18px; pointer-events: none; }

/* Hamburger icon */
.hamburger-icon { display: flex; flex-direction: column; gap: 5px; pointer-events: none; }
.hamburger-icon span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s; }

/* Sticky state */
.header-nav.is-sticky {
  position: fixed; top: 0; left: 0; right: 0;
  box-shadow: var(--shadow-lg);
  animation: ps-slide-down .28s ease;
}
.header-nav.is-sticky .nav-sticky-logo { display: flex; }
/* Only hide hamburger btn on mobile when not sticky */

@keyframes ps-slide-down {
  from { transform: translateY(-100%); } to { transform: translateY(0); }
}
.sticky-spacer { display: none; height: var(--nav-h); }
.sticky-spacer.active { display: block; }

.hamburger-btn { display: none; } /* hidden desktop, shown at 900px */

/* ============================================================
   4. MOBILE NAV DRAWER (slide dari kiri)
============================================================ */
.mobile-nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 299;
  background: rgba(0,0,0,.5); backdrop-filter: blur(2px);
  transition: opacity .3s;
}
.mobile-nav-overlay.is-open { display: block; }

.mobile-nav-drawer {
  position: fixed; top: 0; left: -320px; bottom: 0;
  width: 300px; max-width: 85vw;
  background: var(--primary-dark);
  z-index: 300;
  display: flex; flex-direction: column;
  transition: left .32s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.mobile-nav-drawer.is-open { left: 0; }

.mobile-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: var(--primary);
  border-bottom: 1px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}
.mobile-nav-header .logo-text { color: #fff; font-size: 18px; }
.mobile-nav-header .logo-icon { width: 30px; height: 30px; font-size: 13px; }
.mobile-nav-close {
  background: none; border: none; color: #fff;
  font-size: 22px; line-height: 1; padding: 4px 8px;
  border-radius: 4px; transition: background .2s;
}
.mobile-nav-close:hover { background: rgba(255,255,255,.15); }

.mobile-nav-body { flex: 1; overflow-y: auto; padding: 8px 0; }
.mobile-nav-list { list-style: none; margin: 0; padding: 0; }
.mobile-nav-list li a {
  display: block; padding: 13px 20px;
  color: rgba(255,255,255,.85); font-size: 14px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: background .2s, color .2s;
}
.mobile-nav-list li a:hover,
.mobile-nav-list li.current-menu-item > a { background: rgba(255,255,255,.1); color: #fff; }

/* ============================================================
   5. SEARCH OVERLAY
============================================================ */
.search-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(5,61,106,.94);
  align-items: flex-start; justify-content: center;
  padding-top: 100px;
}
.search-overlay.is-open { display: flex; }
.search-overlay-inner { width: 100%; max-width: 640px; padding: 0 24px; }
.search-overlay-inner form { display: flex; align-items: center; }
.search-overlay-inner input[type="search"] {
  flex: 1; padding: 14px 18px; font-size: 20px;
  border: none; border-bottom: 2px solid rgba(255,255,255,.4);
  background: transparent; color: #fff; outline: none;
  font-family: var(--font-body);
}
.search-overlay-inner input[type="search"]::placeholder { color: rgba(255,255,255,.45); }
.search-submit-btn { background: none; border: none; color: #fff; padding: 14px 10px; font-size: 22px; opacity: .7; }
.search-submit-btn:hover { opacity: 1; }
.search-close-btn {
  position: absolute; top: 24px; right: 28px;
  background: none; border: none; color: #fff;
  font-size: 30px; line-height: 1; opacity: .65; transition: opacity .2s;
}
.search-close-btn:hover { opacity: 1; }

/* ============================================================
   6. BREAKING NEWS BAR
============================================================ */
.breaking-bar {
  background: var(--accent);
  color: #fff;
  width: 100%;
  height: 34px;
  overflow: hidden;
}
.breaking-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
  overflow: hidden;
}
.breaking-label {
  background: var(--accent-dark);
  padding: 0 16px; font-size: 11px; font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase;
  white-space: nowrap; height: 100%;
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.breaking-ticker { flex: 1; overflow: hidden; position: relative; min-width: 0; }
.breaking-ticker-track {
  display: flex; white-space: nowrap;
  animation: ps-ticker 35s linear infinite;
}
.breaking-ticker-track:hover { animation-play-state: paused; }
.breaking-ticker-track a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 500; color: #fff;
  padding-right: 56px; opacity: .92; transition: opacity .2s;
}
.breaking-ticker-track a::before { content: '▸'; opacity: .65; }
.breaking-ticker-track a:hover { opacity: 1; }
@keyframes ps-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   7. CONTAINER & LAYOUT
============================================================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

.main-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 28px; padding: 28px 0; align-items: start;
}
.main-content { min-width: 0; }

/* ============================================================
   8. SECTION HEADER
============================================================ */
.section-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  background: var(--card);
}
.section-header::before {
  content: ''; display: block; flex-shrink: 0;
  width: 4px; height: 20px;
  background: var(--accent); border-radius: 2px;
}
.section-header h2 { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--text); line-height: 1; }
.section-header .view-all {
  margin-left: auto; font-size: 11.5px; font-weight: 700;
  color: var(--primary); text-transform: uppercase;
  letter-spacing: .5px; border-bottom: 1px solid currentColor;
  white-space: nowrap; transition: opacity var(--transition);
}
.section-header .view-all:hover { opacity: .7; }

.content-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 24px;
}

/* ============================================================
   9. HERO SECTION – FIXED HEIGHT
============================================================ */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 16px;
  margin-bottom: 0;      /* gap ke basa-section diatur oleh basa-section margin-top */
  height: var(--hero-h); /* FIXED */
  overflow: hidden;      /* clip any overflow dari grid children */
}

/* ─ Kiri: Slider ─ */
.hero-left { display: flex; flex-direction: column; height: 100%; }

.hero-slider {
  position: relative; border-radius: var(--radius);
  overflow: hidden; background: #111;
  flex: 1; height: 100%;
}
.ps-slide { display: none; position: relative; height: 100%; }
.ps-slide.is-active { display: block; }
.ps-slide > a { display: block; height: 100%; line-height: 0; }
.ps-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.84) 0%, rgba(0,0,0,.18) 55%, transparent 100%);
  pointer-events: none;
}
.slide-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 18px; color: #fff;
}
.slide-cat {
  display: inline-block; background: var(--accent);
  font-size: 9.5px; font-weight: 800;
  padding: 3px 10px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 9px;
  /* Sudut kiri atas – overlay di atas gambar */
  position: relative; /* reset – tetap dalam slide-content */
}
.slide-title { font-family: var(--font-head); font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 7px; }
.slide-title a { color: inherit; }
.slide-title a:hover { text-decoration: underline; }
.slide-meta { font-size: 11.5px; opacity: .72; }

.slider-dots { position: absolute; bottom: 12px; right: 14px; display: flex; gap: 6px; z-index: 2; }
.slider-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.38); cursor: pointer; border: none; padding: 0; flex-shrink: 0;
  transition: background .3s, width .3s;
}
.slider-dot.is-active { background: #fff; width: 20px; border-radius: 4px; }
.slider-arrows {
  position: absolute; top: 50%; transform: translateY(-50%);
  left: 0; right: 0; display: flex; justify-content: space-between;
  padding: 0 10px; pointer-events: none; z-index: 2;
}
.slider-arrow {
  pointer-events: all; background: rgba(0,0,0,.42); border: none; color: #fff;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; backdrop-filter: blur(4px); transition: background .2s;
}
.slider-arrow:hover { background: var(--primary); }

/* ─ Kanan: Peunutoh 5 posts ─ */
.hero-right {
  display: flex; flex-direction: column;
  height: 100%;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.hero-right-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--primary);
  flex-shrink: 0;
}
.hero-right-label {
  font-family: var(--font-head); font-size: 13px; font-weight: 700; color: #fff;
  border-left: 3px solid var(--accent2); padding-left: 8px;
}
.hero-right-more { font-size: 11px; color: var(--accent2); font-weight: 600; }

.hero-posts-list {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; /* tidak scroll, pas 5 post */
}
.hero-post-item {
  display: grid; grid-template-columns: 90px 1fr;
  flex: 1; /* setiap item mengisi tinggi sama rata */
  background: var(--card);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  min-height: 0;
}
.hero-post-item:last-child { border-bottom: none; }
.hero-post-item:hover { background: var(--bg2); }
.hero-post-img-wrap { flex-shrink: 0; overflow: hidden; }
.hero-post-img { width: 90px; height: 100%; object-fit: cover; display: block; }
.hero-post-body {
  padding: 8px 10px; display: flex; flex-direction: column; gap: 3px;
  justify-content: center; min-width: 0;
}
.hero-post-cat { font-size: 9px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .8px; }
.hero-post-title {
  font-family: var(--font-head); font-size: 12.5px; font-weight: 600;
  line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-post-meta { font-size: 10px; color: var(--text3); }

/* ============================================================
   10. BASA ACEH CAROUSEL
============================================================ */
.basa-section {
  background: var(--primary); border-radius: var(--radius);
  padding: 16px 18px 18px;
  margin-top: 28px;
  margin-bottom: 20px;
  overflow: hidden;
  border-top: 4px solid var(--accent2);
}
.basa-section .section-header { background: none; border-bottom: none; padding: 0 0 12px; }
.basa-section .section-header h2 { color: #fff; }
.basa-section .section-header::before { background: var(--accent2); }
.basa-section .section-header .view-all { color: var(--accent2); border-color: var(--accent2); }
.carousel-wrap { overflow: hidden; }
.carousel-track { display: flex; gap: 14px; transition: transform .4s ease; will-change: transform; }
.carousel-card {
  flex: 0 0 calc(25% - 11px); background: rgba(255,255,255,.09);
  border-radius: var(--radius); overflow: hidden; transition: background .2s; min-width: 0;
}
.carousel-card:hover { background: rgba(255,255,255,.16); }
.carousel-card-img { width: 100%; height: 128px; object-fit: cover; display: block; }
.carousel-card-body { padding: 9px 11px 11px; }
.carousel-card-cat { font-size: 9px; font-weight: 800; color: var(--accent2); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 4px; }
.carousel-card-title { font-family: var(--font-head); font-size: 12.5px; font-weight: 600; color: #fff; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.carousel-card-meta { font-size: 10px; color: rgba(255,255,255,.5); margin-top: 5px; }
.carousel-nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.carousel-btn {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.carousel-btn:hover { background: var(--accent2); color: #111; }

/* ============================================================
   11. BERITA TERBARU
============================================================ */
.terbaru-lead {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; padding: 16px 18px 18px;
  border-bottom: 1px solid var(--border); align-items: start;
}
.terbaru-lead-img { width: 100%; height: 220px; object-fit: cover; border-radius: var(--radius); display: block; }
.terbaru-lead-body { display: flex; flex-direction: column; gap: 10px; }
.post-badge {
  display: inline-block; background: var(--accent); color: #fff;
  font-size: 9.5px; font-weight: 800; padding: 3px 10px;
  border-radius: 3px; text-transform: uppercase; letter-spacing: .8px; width: fit-content;
}
.post-badge:hover { background: var(--accent-dark); }
.post-title-xl {
  font-family: var(--font-head); font-size: 20px; font-weight: 800;
  line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.post-title-xl:hover { color: var(--primary); }
.post-excerpt { font-size: 13px; color: var(--text2); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text3); flex-wrap: wrap; }
.post-meta-row a { color: var(--primary); font-weight: 600; }

/* Terbaru Grid */
.terbaru-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.news-card {
  background: var(--card); display: flex; flex-direction: column;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.terbaru-grid .news-card:nth-child(3n) { border-right: none; }
.terbaru-grid .news-card:nth-last-child(-n+3) { border-bottom: none; }
.news-card:hover { background: var(--bg2); }
.news-card-thumb {
  width: 100%;
  height: 160px !important;  /* FIXED – semua card sama, tidak boleh dioverride */
  object-fit: cover !important;
  display: block;
  flex-shrink: 0;
}
.news-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.news-card-cat { display: inline-block; font-size: 9px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; border-left: 2px solid var(--accent); padding-left: 6px; }
.news-card-title { font-family: var(--font-head); font-size: 13.5px; font-weight: 700; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-title:hover { color: var(--primary); }
.news-card-meta { font-size: 11px; color: var(--text3); margin-top: auto; }

/* Standalone card */
.news-card-standalone {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.news-card-standalone:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ============================================================
   12. NEWS LIST (category sections)
============================================================ */
.news-list { display: grid; grid-template-columns: 1fr 1fr; }
.news-list-item {
  display: grid; grid-template-columns: 100px 1fr;
  gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  transition: background var(--transition);
}
.news-list-item:nth-child(even) { border-right: none; }
.news-list-item:nth-last-child(-n+2) { border-bottom: none; }
.news-list-item:hover { background: var(--bg2); }
.news-list-img { width: 100px; height: 72px; object-fit: cover; border-radius: 4px; display: block; flex-shrink: 0; }
.news-list-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.news-list-cat { font-size: 9px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; border-left: 2px solid var(--accent); padding-left: 5px; }
.news-list-title { font-family: var(--font-head); font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-list-title:hover { color: var(--primary); }
.news-list-meta { font-size: 11px; color: var(--text3); margin-top: auto; }

/* ============================================================
   13. FOTO SECTION
============================================================ */
.foto-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 16px; }
.foto-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; display: block; }
.foto-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.foto-item:hover img { transform: scale(1.06); }
.foto-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72), transparent 60%); display: flex; align-items: flex-end; padding: 10px; }
.foto-caption { color: #fff; font-size: 11.5px; font-weight: 600; line-height: 1.3; font-family: var(--font-head); }

/* ============================================================
   14. PENDAPAT
============================================================ */
.pendapat-list { display: flex; flex-direction: column; padding: 14px 16px; gap: 14px; }
.pendapat-item { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); align-items: start; }
.pendapat-item:last-child { border-bottom: none; padding-bottom: 0; }
.author-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; display: block; }
.author-name { font-size: 11px; font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.pendapat-title { font-family: var(--font-head); font-size: 13.5px; font-weight: 700; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 2px; }
.pendapat-title:hover { color: var(--primary); }
.pendapat-meta { font-size: 10.5px; color: var(--text3); }

/* ============================================================
   15. SIDEBAR – Tidak terpotong, sticky proper
============================================================ */
.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: var(--sidebar-w);
  /* Sticky: ikut scroll halaman, berhenti di top, TIDAK scroll internal */
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  align-self: start;
  overflow: visible;
}

.sidebar-widget {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  flex-shrink: 0;
}
.widget-header {
  background: var(--primary); padding: 10px 14px;
  display: flex; align-items: center; gap: 7px;
}
.widget-header h3 { font-family: var(--font-head); font-size: 13.5px; font-weight: 700; color: #fff; }
.widget-icon { font-size: 13px; line-height: 1; }
.widget-body { padding: 12px 14px; }

/* Trending */
.trending-list { display: flex; flex-direction: column; gap: 10px; }
.trending-item { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.trending-item:last-child { border-bottom: none; padding-bottom: 0; }
.trending-rank { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: var(--border); line-height: 1; min-width: 26px; flex-shrink: 0; }
.trending-item:nth-child(1) .trending-rank { color: var(--accent); }
.trending-item:nth-child(2) .trending-rank { color: var(--accent2); }
.trending-item:nth-child(3) .trending-rank { color: #94a3b8; }
.trending-title { font-family: var(--font-head); font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--text); }
.trending-title:hover { color: var(--primary); }
.trending-meta { font-size: 10px; color: var(--text3); margin-top: 2px; }

/* Popular */
.popular-list { display: flex; flex-direction: column; }
.popular-item { display: grid; grid-template-columns: 68px 1fr; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.popular-item:last-child { border-bottom: none; }
.popular-img { width: 68px; height: 50px; object-fit: cover; border-radius: 4px; display: block; }
.popular-title { font-family: var(--font-head); font-size: 12px; font-weight: 700; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.popular-title:hover { color: var(--primary); }
.popular-meta { font-size: 10px; color: var(--text3); margin-top: 2px; }

/* Tag Cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill { display: inline-block; background: var(--bg2); color: var(--text2); font-size: 11px; font-weight: 600; padding: 4px 11px; border-radius: 20px; border: 1px solid var(--border); transition: background var(--transition), color var(--transition), border-color var(--transition); }
.tag-pill:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Kategori list */
.sidebar-cat-list { display: flex; flex-direction: column; }
.sidebar-cat-list li { border-bottom: 1px solid var(--border); }
.sidebar-cat-list li:last-child { border-bottom: none; }
.sidebar-cat-list li a { display: flex; align-items: center; justify-content: space-between; padding: 9px 2px; font-size: 13px; color: var(--text2); transition: color var(--transition); }
.sidebar-cat-list li a:hover { color: var(--primary); }
.sidebar-cat-count { background: var(--bg2); color: var(--text3); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; }

/* ============================================================
   16. ADS SYSTEM
============================================================ */
.ps-ad-wrap {
  position: relative; text-align: center;
  margin: 16px 0; overflow: hidden;
}
.ps-ad-leaderboard { padding: 6px 0; background: var(--bg2); border: 1px dashed var(--border); border-radius: var(--radius); }
.ps-ad-rectangle { padding: 6px; background: var(--bg2); border: 1px dashed var(--border); border-radius: var(--radius); }
.ps-ad-inline { margin: 20px 0; padding: 12px 16px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); }
.ps-ad-label {
  display: block; font-size: 9px; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 6px; font-weight: 600;
}
/* Dark mode ads */
[data-theme="dark"] .ps-ad-leaderboard,
[data-theme="dark"] .ps-ad-rectangle,
[data-theme="dark"] .ps-ad-inline { background: var(--bg2); border-color: var(--border); }

/* ============================================================
   17. INLINE RELATED POSTS (dalam artikel)
============================================================ */
.inline-related {
  margin: 20px 0;
  border-left: 3px solid var(--primary);
  background: var(--bg2);
  border-radius: 0 var(--radius) var(--radius) 0;
  overflow: hidden;
}
.inline-related-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--primary); padding: 8px 14px 6px;
}
.inline-related-item {
  display: flex;       /* flex bukan grid – lebih predictable */
  align-items: center;
  gap: 12px;
  padding: 0 14px 10px;
  text-decoration: none;
  transition: background var(--transition);
}
.inline-related-item:hover { background: var(--border); }

/* Container gambar: fixed box, overflow:hidden – gambar dikurung di sini */
.inline-related-img-wrap {
  display: block;
  width: 88px;          /* FIXED – tidak bisa berubah */
  min-width: 88px;
  height: 64px;         /* FIXED */
  border-radius: 4px;
  overflow: hidden;     /* gambar yang lebih besar akan terpotong */
  flex-shrink: 0;
  background: var(--border);
}
/* Gambar mengisi container sepenuhnya */
.inline-related-img-wrap img {
  display: block !important;
  width: 88px !important;
  height: 64px !important;
  max-width: 88px !important;
  max-height: 64px !important;
  min-width: 88px !important;
  min-height: 64px !important;
  object-fit: cover !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.inline-related-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.inline-related-cat { font-size: 9px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .8px; }
.inline-related-title { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inline-related-date { font-size: 11px; color: var(--text3); }

/* ============================================================
   18. FOOTER
============================================================ */
.site-footer { background: var(--primary); color: rgba(255,255,255,.82); margin-top: 12px; }
.footer-top {
  max-width: var(--max-w); margin: 0 auto; padding: 36px 20px 28px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px;
}
.footer-about .logo-text { color: #fff; }
.footer-about .logo-text span { color: var(--accent2); }
.footer-about p { font-size: 13px; line-height: 1.75; margin-top: 10px; color: rgba(255,255,255,.58); }
.footer-social { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.social-link { display: flex; align-items: center; gap: 5px; font-size: 12px; color: rgba(255,255,255,.62); transition: color var(--transition); }
.social-link:hover { color: var(--accent2); }
.footer-col h4 { font-family: var(--font-head); font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 12px; padding-bottom: 7px; border-bottom: 1px solid rgba(255,255,255,.15); }
.footer-col ul { display: flex; flex-direction: column; gap: 7px; }
.footer-col ul li a { font-size: 12.5px; color: rgba(255,255,255,.6); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--accent2); }
.footer-bottom { background: rgba(0,0,0,.28); text-align: center; padding: 12px 20px; font-size: 12px; color: rgba(255,255,255,.42); display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.footer-nav-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.footer-nav-links a { color: rgba(255,255,255,.42); font-size: 12px; transition: color var(--transition); }
.footer-nav-links a:hover { color: var(--accent2); }

/* ============================================================
   19. SINGLE POST
============================================================ */
.post-header-band { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 9px 0; }
.post-breadcrumb { font-size: 12px; color: var(--text3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-breadcrumb a { color: var(--primary); font-weight: 500; }
.post-breadcrumb a:hover { text-decoration: underline; }
.post-breadcrumb .sep { opacity: .5; }

.single-layout {
  display: grid; grid-template-columns: 1fr var(--sidebar-w);
  gap: 28px; padding: 24px 0; align-items: start;
}
.single-article { min-width: 0; }

.article-cat-badge { display: inline-block; background: var(--accent); color: #fff; font-size: 9.5px; font-weight: 800; padding: 3px 12px; border-radius: 3px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.article-cat-badge:hover { background: var(--accent-dark); }
.article-title { font-family: var(--font-head); font-size: 26px; font-weight: 800; line-height: 1.25; color: var(--text); margin-bottom: 14px; }

.article-meta-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 11px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.article-author-wrap { display: flex; align-items: center; gap: 8px; }
.article-author-wrap img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.article-author-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.2; }
.article-author-name a { color: inherit; }
.article-author-role { font-size: 11px; color: var(--text3); }
.article-date-str { font-size: 12px; color: var(--text3); }
.share-bar { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; padding: 6px 12px; border-radius: 6px;
  font-size: 11.5px; font-weight: 700; border: none; color: #fff;
  transition: filter .2s, transform .15s; white-space: nowrap;
  text-decoration: none; line-height: 1;
}
.share-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.share-btn svg { flex-shrink: 0; }
.share-btn-fb  { background: #1877f2; }
.share-btn-wa  { background: #25d366; }
.share-btn-tw  { background: #000; }

.article-featured-img {
  width: 100%;
  height: 460px;          /* desktop: fixed tinggi featured image */
  max-height: 460px;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius);
  display: block;
  margin-bottom: 6px;
}
.img-caption { font-size: 11.5px; color: var(--text3); text-align: center; margin-bottom: 20px; font-style: italic; }

.article-body {
  font-size: 17px; line-height: 1.85; color: var(--text2);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  overflow: hidden;   /* gambar TIDAK bisa keluar dari card */
}
.article-body > * + * { margin-top: 1rem; }
.article-body h2 { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--text); margin-top: 2rem; }
.article-body h3 { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--text); margin-top: 1.6rem; }
.article-body a { color: var(--primary); text-decoration: underline; }
.article-body blockquote { border-left: 4px solid var(--primary); padding: 12px 18px; background: var(--bg2); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; color: var(--text); font-family: var(--font-head); font-size: 16px; margin: 1.5rem 0; }
.article-body ul { list-style: disc; padding-left: 22px; }
.article-body ol { list-style: decimal; padding-left: 22px; }
.article-body li + li { margin-top: 5px; }
.article-body img {
  border-radius: var(--radius);
  margin: 1rem auto;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  display: block;
}
/* Override article-body img untuk container wrap inline-related */
.article-body .inline-related-img-wrap img,
.inline-related-img-wrap img {
  width: 88px !important; height: 64px !important;
  min-width: 88px !important; min-height: 64px !important;
  max-width: 88px !important; max-height: 64px !important;
  object-fit: cover !important; margin: 0 !important;
  border-radius: 0 !important; display: block !important;
}
.article-body figure { margin: 1rem 0; max-width: 100%; overflow: hidden; }
.article-body iframe, .article-body video, .article-body embed {
  max-width: 100% !important; height: auto; display: block;
}
.article-body .wp-block-table, .article-body table {
  display: block; overflow-x: auto; max-width: 100%;
}
.article-body table { width: 100%; border-collapse: collapse; }
.article-body th, .article-body td { padding: 9px 11px; border: 1px solid var(--border); font-size: 14px; }
.article-body th { background: var(--bg2); font-weight: 700; }

.article-tags { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }
.article-tags-label { font-size: 11px; font-weight: 700; color: var(--text3); }

.post-nav { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.post-nav-item { font-size: 13px; color: var(--primary); font-weight: 600; max-width: 46%; }
.post-nav-item:hover { text-decoration: underline; }
.post-nav-next { text-align: right; margin-left: auto; }

.related-section { margin-top: 28px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Comments */
.comments-area { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.comments-area .comments-title { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 18px; }
.comment-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.comment-body { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.comment-meta { font-size: 12px; color: var(--text3); margin-bottom: 7px; }
.comment-content p { font-size: 14px; color: var(--text2); line-height: 1.65; margin: 0; }
.comment-reply-link { font-size: 12px; color: var(--primary); font-weight: 600; margin-top: 7px; display: inline-block; }
.comment-respond { margin-top: 24px; }
.comment-respond .comment-reply-title { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.comment-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 3px; color: var(--text); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea { width: 100%; padding: 9px 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: var(--text); font-family: var(--font-body); font-size: 14px; margin-bottom: 12px; transition: border-color .2s; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--primary); }
.comment-form textarea { min-height: 110px; resize: vertical; }
.comment-form .submit { background: var(--primary); color: #fff; border: none; padding: 9px 24px; border-radius: var(--radius); font-size: 14px; font-weight: 700; transition: background .2s; }
.comment-form .submit:hover { background: var(--primary-light); }

/* ============================================================
   20. ARCHIVE / SEARCH / TAG / 404
============================================================ */
.archive-band { background: var(--primary); padding: 24px 0; margin-top: 0; }
.archive-band-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.archive-breadcrumb { font-size: 12px; color: rgba(255,255,255,.55); margin-bottom: 5px; }
.archive-breadcrumb a { color: var(--accent2); }
.archive-title { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: #fff; }
.archive-desc { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 5px; }
.archive-count { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 10px; margin-top: 7px; }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.tag-band { background: var(--bg2); border-bottom: 2px solid var(--primary); padding: 18px 0; }
.tag-band-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.tag-label-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--primary); color: #fff; padding: 5px 16px; border-radius: 20px; font-size: 14px; font-weight: 700; font-family: var(--font-head); }
.tag-label-pill::before { content: '#'; opacity: .65; }
.search-band { background: var(--primary); padding: 24px 0; }
.search-band-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.search-band h1 { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: #fff; }
.search-band p { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 4px; }
.search-band form { margin-top: 14px; display: flex; gap: 8px; max-width: 500px; }
.search-band input[type="search"] { flex: 1; padding: 9px 14px; border: none; border-radius: var(--radius); font-size: 14px; font-family: var(--font-body); }
.search-band button { background: var(--accent); color: #fff; border: none; padding: 9px 18px; border-radius: var(--radius); font-weight: 700; transition: background .2s; }
.search-band button:hover { background: var(--accent-dark); }
.search-nothing { text-align: center; padding: 60px 20px; color: var(--text3); }
.error-404 { text-align: center; padding: 70px 20px; }
.error-404-num { font-family: var(--font-head); font-size: 90px; font-weight: 800; color: var(--accent); line-height: 1; }
.error-404 h1 { font-family: var(--font-head); font-size: 24px; font-weight: 700; color: var(--text); margin: 10px 0 8px; }
.error-404 p { font-size: 15px; color: var(--text2); margin-bottom: 22px; }

/* ============================================================
   21. PAGINATION
============================================================ */
.pagination { margin: 8px 0 24px; }
/* WordPress wraps numbers in .nav-links */
.pagination .nav-links {
  display: flex !important;
  flex-direction: row !important;   /* horizontal – override any block/vertical */
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.page-numbers {
  min-width: 36px; height: 36px; padding: 0 9px;
  border: 1px solid var(--border); background: var(--card);
  border-radius: var(--radius);
  display: inline-flex !important; /* inline agar tidak block */
  align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--text2);
  transition: background .2s, color .2s, border-color .2s;
  text-decoration: none;
  line-height: 1;
}
.page-numbers.current, .page-numbers:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-numbers.dots { border: none; background: none; cursor: default; }
/* Prev/Next arrows */
.page-numbers.prev, .page-numbers.next { font-size: 16px; min-width: 36px; }

/* ============================================================
   22. UTILITIES
============================================================ */
.btn-primary { display: inline-block; background: var(--primary); color: #fff; padding: 11px 26px; border-radius: var(--radius); font-weight: 700; font-size: 14px; transition: background .2s; border: none; }
.btn-primary:hover { background: var(--primary-light); }
.visually-hidden, .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.no-results { text-align: center; padding: 44px 20px; color: var(--text3); font-size: 15px; }
.desktop-only { display: block; } /* sembunyikan di mobile */




/* Footer contact info */
.footer-contact { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,.65); }
.footer-contact-item span:first-child { flex-shrink: 0; }
.footer-contact-item a { color: rgba(255,255,255,.65); transition: color var(--transition); }
.footer-contact-item a:hover { color: var(--accent2); }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-logo .ps-logo-light,
.footer-logo .ps-logo-dark { filter: brightness(1.05); }

/* Nav sticky logo – only show when sticky and on desktop */
.nav-sticky-logo {
  display: none;
  align-items: center;
  margin-right: 14px; flex-shrink: 0;
}
.nav-sticky-logo a,
.nav-sticky-logo .site-logo,
.nav-sticky-logo .sticky-logo-link {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: #fff;
}
.nav-sticky-logo .logo-text { color: #fff; font-size: 15px; }
.nav-sticky-logo .logo-icon { width: 26px; height: 26px; font-size: 12px; }
.nav-sticky-logo .ps-logo-img { width: auto; }
/* Sticky logo selalu pakai logo light (nav background gelap) */
.nav-sticky-logo .ps-logo-light { display: block !important; }
.nav-sticky-logo .ps-logo-dark  { display: none !important; }

/* ============================================================
   PEUNUTOH – Tampil di Mobile (di bawah hero, bukan di samping)
============================================================ */
.peunutoh-mobile {
  display: none; /* HIDDEN DI DESKTOP – hanya tampil di mobile via @media */
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.peunutoh-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--primary);
}
.peunutoh-mobile-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.peunutoh-mobile-item {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  overflow: hidden;
  transition: background var(--transition);
}
.peunutoh-mobile-item:nth-child(even) { border-right: none; }
.peunutoh-mobile-item:nth-last-child(-n+2) { border-bottom: none; }
.peunutoh-mobile-item:hover { background: var(--bg2); }
.peunutoh-mobile-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.peunutoh-mobile-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; }
.peunutoh-mobile-cat { font-size: 9px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .8px; }
.peunutoh-mobile-title { font-family: var(--font-head); font-size: 13px; font-weight: 700; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.peunutoh-mobile-date { font-size: 10.5px; color: var(--text3); }

/* ============================================================
   LOGO – LIGHT / DARK SWITCHING
============================================================ */
.ps-logo-img {
  display: block;
  object-fit: contain;
  max-width: 100%;       /* tidak overflow wrapper */
  max-height: 60px;      /* tinggi max di header */
  width: auto;
  height: auto;
}

/* Single logo (hanya 1 versi diupload) → selalu tampil */
.ps-logo-single { display: block; }

/* Dua versi logo → CSS kontrol show/hide */
/* Mode terang default */
.ps-logo-light { display: block; }
.ps-logo-dark  { display: none; }
/* Mode gelap */
[data-theme="dark"] .ps-logo-light { display: none; }
[data-theme="dark"] .ps-logo-dark  { display: block; }

/* site-logo tidak boleh jadi flex jika hanya ada 1 img */
.site-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-logo:has(.ps-logo-single) { gap: 0; }

/* DARK mode overrides untuk komponen yang masih putih */
[data-theme="dark"] .header-nav { background: var(--primary-dark); }
[data-theme="dark"] .mobile-nav-drawer { background: #0a1628; }
[data-theme="dark"] .mobile-nav-header { background: var(--primary-dark); }
[data-theme="dark"] .hero-right { background: var(--card); }
[data-theme="dark"] .content-section { background: var(--card); }
[data-theme="dark"] .sidebar-widget { background: var(--card); }
[data-theme="dark"] .news-card { background: var(--card); }
[data-theme="dark"] .news-card:hover { background: var(--bg2); }
[data-theme="dark"] .news-card-standalone { background: var(--card); }
[data-theme="dark"] .trending-item { border-color: var(--border); }
[data-theme="dark"] .popular-item { border-color: var(--border); }
[data-theme="dark"] .pendapat-item { border-color: var(--border); }
[data-theme="dark"] .hero-post-item { background: var(--card); }
[data-theme="dark"] .hero-post-item:hover { background: var(--bg2); }
[data-theme="dark"] .news-list-item:hover { background: var(--bg2); }
[data-theme="dark"] .inline-related { background: var(--bg2); }

/* ============================================================
   23. RESPONSIVE – 900px (tablet)
============================================================ */
@media (max-width: 900px) {
  /* Hero */
  :root { --hero-h: auto; }
  .hero-section { grid-template-columns: 1fr; height: auto; gap: 12px; }
  .hero-left { height: auto; }
  .hero-slider { height: 360px; }
  /* hero-right disembunyikan di tablet, tampil di mobile homepage via kelas khusus */

  /* Layout */
  .main-layout, .single-layout, .page-layout { grid-template-columns: 1fr; }
  .site-sidebar { position: static; max-height: none; overflow: visible; display: none; }
  /* Tampilkan sidebar di tablet ke bawah? – sembunyikan per desain */

  /* Nav */
  .main-nav { display: none; }
  .hamburger-btn { display: flex; }

  /* Terbaru */
  .terbaru-grid { grid-template-columns: 1fr 1fr; }
  .terbaru-grid .news-card:nth-child(3n) { border-right: 1px solid var(--border); }
  .terbaru-grid .news-card:nth-child(2n) { border-right: none; }
  .terbaru-grid .news-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .terbaru-grid .news-card:nth-last-child(-n+2) { border-bottom: none; }
  .news-list { grid-template-columns: 1fr; }
  .news-list-item { border-right: none; }
  .news-list-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .news-list-item:last-child { border-bottom: none; }

  /* Archive */
  .archive-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .carousel-card { flex: 0 0 calc(50% - 8px); }

  /* Footer */
  .footer-top { grid-template-columns: 1fr 1fr; }

  /* Single */
  .single-layout { grid-template-columns: 1fr; }
  /* Single post: featured image lebih pendek di mobile */
  .article-featured-img {
    height: 240px !important;
    max-height: 240px !important;
  }
  .share-bar { margin-left: 0; }
}

/* ============================================================
   24. RESPONSIVE – 600px (mobile)
============================================================ */

/* Pastikan peunutoh-mobile tersembunyi total di tablet dan desktop */
@media (min-width: 601px) {
  .peunutoh-mobile { display: none !important; }
}

@media (max-width: 600px) {
  .container { padding: 0 14px; }
  .peunutoh-mobile { display: block !important; }

  /* Header */
  .header-top { padding: 8px 0; }
  .logo-text { font-size: 18px; }
  .desktop-only { display: none !important; }

  /* Breaking bar */
  .breaking-label { padding: 0 10px; font-size: 10px; }
  .breaking-ticker-track a { font-size: 12px; }

  /* Hero */
  .hero-slider { height: 240px; }
  .article-featured-img {
    height: 200px !important;
    max-height: 200px !important;
  }
  .slide-title { font-size: 15px; }
  .slide-content { padding: 14px 12px; }
  .hero-right { display: none; }

  /* Main layout */
  .main-layout { padding: 16px 0; gap: 16px; }

  /* Terbaru */
  /* Terbaru lead: 1 kolom, gambar besar di atas */
  .terbaru-lead { grid-template-columns: 1fr; }
  .terbaru-lead-img { height: 220px; }
  .terbaru-lead-body { gap: 8px; }

  /* Terbaru grid mobile: gambar kiri FIXED + teks kanan */
  .terbaru-grid { grid-template-columns: 1fr; }
  .terbaru-grid .news-card {
    display: flex !important;   /* flex, bukan grid, agar height lebih mudah dikontrol */
    flex-direction: row;
    align-items: stretch;
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-height: 90px;
    max-height: 90px;  /* FIXED – semua card sama */
    overflow: hidden;
  }
  .terbaru-grid .news-card:last-child { border-bottom: none; }
  .terbaru-grid .news-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .terbaru-grid .news-card:last-child { border-bottom: none; }

  /* Gambar: fixed 110x90, tidak bisa berubah */
  .terbaru-grid .news-card .news-card-thumb {
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
    object-fit: cover !important;
    display: block !important;
    flex-shrink: 0;
  }
  .terbaru-grid .news-card .news-card-body {
    padding: 8px 10px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    justify-content: center;
  }
  .terbaru-grid .news-card .news-card-title {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }
  .terbaru-grid .news-card .news-card-meta {
    margin-top: 4px;
  }

  /* Archive */
  .archive-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .foto-grid { grid-template-columns: 1fr 1fr; padding: 10px; }

  /* Carousel */
  .carousel-card { flex: 0 0 80%; }

  /* Single */
  .article-title { font-size: 20px; }
  .article-meta-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .share-bar { margin-left: 0; flex-wrap: wrap; }
  .article-body { font-size: 16px; line-height: 1.85; padding: 16px 14px; }
  .article-body p { margin-bottom: 1.2rem; }
  .article-title { font-size: 21px; line-height: 1.3; }
  .inline-related-item img { width: 72px !important; height: 52px !important; }
  .inline-related-title { font-size: 13px; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr; padding: 24px 14px; }
}


/* ============================================================
   RINGKASAN AI – Single Post (ikon dari tema lama)
============================================================ */
.ps-ai-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0;
}
.ps-ai-summary__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.ps-ai-summary__tools {
  display: flex;
  align-items: center;
  gap: 16px;
}
/* Icon-only style – sama seperti tema lama */
.ps-ai-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text2);
  text-decoration: none;
  transition: border-color .2s, background .2s, transform .15s;
  flex-shrink: 0;
}
.ps-ai-icon-btn:hover {
  border-color: var(--primary);
  background: var(--bg2);
  transform: translateY(-2px);
}
/* Icon SVG: fixed 22x22, TIDAK boleh berubah ukuran */
.ps-ai-icon {
  fill: currentColor;
  display: block;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px;
  min-height: 22px;
  max-width: 22px;
  max-height: 22px;
  overflow: visible;
}
[data-theme="dark"] .ps-ai-summary { background: var(--bg2); }

/* ─── NEWSROOM META ────────────────────────────────────────── */
.ps-newsroom-meta {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 20px 0;
}
.ps-newsroom-meta__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 10px;
}
.ps-newsroom-meta__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.ps-newsroom-meta__item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}
.ps-newsroom-meta__key {
  color: var(--text3);
  font-weight: 600;
  flex-shrink: 0;
}
.ps-newsroom-meta__key::after { content: ':'; }
.ps-newsroom-meta__val { color: var(--text2); }
.ps-newsroom-meta__val a { color: var(--primary); text-decoration: underline; }

/* ─── YOUTUBE EMBED ────────────────────────────────────────── */
.ps-yt-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.ps-yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}


/* Archive / Category: gambar tidak boleh overflow */
.archive-grid .news-card-standalone img,
.archive-grid img,
.news-card-standalone img,
/* news-card-thumb override removed – handled by main rule */

/* ============================================================
   CATEGORY LAYOUT VARIANTS – Mobile Homepage
   Desktop: semua tampil sama (news-list biasa)
   Mobile ≤ 900px: tiap kategori berbeda variasinya
============================================================ */

/* ── Variant B: Featured besar + horizontal list ─────────── */
.ps-cat-b__featured {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.ps-cat-b__img-link { display: block; position: relative; }
.ps-cat-b__img {
  width: 100%; height: 190px;
  object-fit: cover; display: block;
}
.ps-cat-b__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.78) 0%, transparent 55%);
}
.ps-cat-b__meta {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 14px 16px; color: #fff;
}
.ps-cat-b__badge {
  display: inline-block;
  background: var(--accent);
  font-size: 9px; font-weight: 800;
  padding: 2px 8px; border-radius: 2px;
  text-transform: uppercase; letter-spacing: .8px;
  margin-bottom: 6px;
}
.ps-cat-b__title {
  font-family: var(--font-head);
  font-size: 16px; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ps-cat-b__date { font-size: 11px; opacity: .7; margin-top: 4px; }
.ps-cat-b__list { border-top: none; }

/* ── Variant C: Magazine – besar kiri, kecil kanan ────────── */
.ps-cat-c__mag {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.ps-cat-c__main {
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  border-right: 1px solid var(--border);
}
.ps-cat-c__main-img {
  width: 100%; height: 100%;
  min-height: 200px;
  object-fit: cover; display: block;
}
.ps-cat-c__badge {
  position: absolute; top: 8px; left: 8px;
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 8px; font-weight: 800;
  padding: 2px 7px; border-radius: 2px;
  text-transform: uppercase;
}
.ps-cat-c__main-title {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 8px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, transparent 100%);
  font-family: var(--font-head);
  font-size: 13px; font-weight: 700; color: #fff; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ps-cat-c__main-date {
  position: absolute; bottom: 8px; right: 8px;
  font-size: 10px; color: rgba(255,255,255,.65);
}
.ps-cat-c__side {
  display: flex; flex-direction: column;
}
.ps-cat-c__side-item {
  display: flex; flex-direction: column;
  flex: 1;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  transition: background .2s;
  overflow: hidden;
}
.ps-cat-c__side-item:last-child { border-bottom: none; }
.ps-cat-c__side-item:hover { background: var(--bg2); }
.ps-cat-c__side-img {
  width: 100%; height: 90px;
  object-fit: cover; display: block;
}
.ps-cat-c__side-title {
  font-family: var(--font-head);
  font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.3;
  padding: 6px 8px 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ps-cat-c__side-date { font-size: 10px; color: var(--text3); padding: 0 8px 6px; }

/* ── Variant A (desktop: normal, mobile: 2-kolom grid) ─────── */
/* Mobile-only override – lihat @media di bawah */

/* Dark mode */
[data-theme="dark"] .ps-cat-b__featured { border-color: var(--border); }
[data-theme="dark"] .ps-cat-c__mag { border-color: var(--border); }
[data-theme="dark"] .ps-cat-c__main { border-color: var(--border); }
[data-theme="dark"] .ps-cat-c__side-item { background: var(--card); }

/* ── Desktop: semua variant tampil seperti news-list biasa ─── */
@media (min-width: 901px) {
  /* Override: semua variant pakai news-list style di desktop */
  .ps-cat-b__featured,
  .ps-cat-c__mag { display: none; }
  .ps-cat-b .news-list,
  .ps-cat-c .news-list { display: flex; flex-direction: column; }
  .ps-cat-b__list .news-list-item,
  .ps-cat-c .news-list .news-list-item { display: grid; }
}

/* ── Mobile ≤ 900px: aktifkan semua varian ─────────────────── */
@media (max-width: 900px) {

  /* Variant A: 2-kolom grid card */
  .ps-cat-a .news-list {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .ps-cat-a .news-list-item {
    display: flex !important;
    flex-direction: column;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .ps-cat-a .news-list-item:nth-child(2n) { border-right: none; }
  .ps-cat-a .news-list-item:nth-last-child(-n+2) { border-bottom: none; }
  .ps-cat-a .news-list-img {
    width: 100% !important;
    height: 110px !important;   /* Cat-A 2-col grid */
    object-fit: cover !important;
  }
  .ps-cat-a .news-list-body { padding: 8px 10px; }
  .ps-cat-a .news-list-title { font-size: 12.5px; -webkit-line-clamp: 3; }
  .ps-cat-a .news-list-meta { font-size: 10px; }

  /* Variant B: Sembunyikan news-list default (tampilkan featured + list custom) */
  .ps-cat-b .news-list:not(.ps-cat-b__list) { display: none; }
  .ps-cat-b__img { height: 190px; }

  /* Variant C: Sembunyikan news-list default (tampilkan magazine) */
  .ps-cat-c > .news-list:first-of-type { display: none; }
  .ps-cat-c__mag { display: grid; }
}

@media (max-width: 600px) {
  .ps-cat-b__img { height: 160px; }
  .ps-cat-c__main-img { min-height: 160px; }
  .ps-cat-c__side-img { height: 76px; }
  .ps-cat-a .news-list-img { height: 90px !important; }
}
/* ============================================================
   DARK MODE – Fixes tambahan
============================================================ */
[data-theme="dark"] .breaking-bar { background: var(--accent-dark); }
[data-theme="dark"] .search-overlay { background: rgba(3,43,76,.96); }
[data-theme="dark"] .terbaru-lead { background: var(--card); }
[data-theme="dark"] .basa-section { background: var(--primary-dark); }
[data-theme="dark"] .site-footer { background: var(--primary-dark); }
[data-theme="dark"] .footer-bottom { background: rgba(0,0,0,.4); }
[data-theme="dark"] .news-list-item { background: var(--card); }
[data-theme="dark"] .foto-overlay { background: linear-gradient(to top, rgba(0,0,0,.85), transparent 60%); }
[data-theme="dark"] .post-header-band { background: var(--bg2); }
[data-theme="dark"] .article-meta-bar { border-color: var(--border); }
[data-theme="dark"] .article-body blockquote { background: var(--bg2); }
[data-theme="dark"] .comment-body { background: var(--card); }
[data-theme="dark"] .ps-ad-wrap { background: var(--bg2); border-color: var(--border); }
[data-theme="dark"] .peunutoh-mobile { background: var(--card); border-color: var(--border); }
[data-theme="dark"] .peunutoh-mobile-item { border-color: var(--border); }
[data-theme="dark"] .peunutoh-mobile-item:hover { background: var(--bg2); }
[data-theme="dark"] .inline-related-item:hover { background: var(--border); }
[data-theme="dark"] .tag-pill { background: var(--bg2); border-color: var(--border); }
[data-theme="dark"] .sidebar-cat-count { background: var(--bg2); }

/* Footer contact info */
.footer-contact { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; color: rgba(255,255,255,.62); }
.footer-contact-item a { color: rgba(255,255,255,.75); transition: color var(--transition); }
.footer-contact-item a:hover { color: var(--accent2); }
.footer-contact-item span:first-child { flex-shrink: 0; margin-top: 1px; }

/* Footer logo */
.footer-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.footer-logo .logo-text { color: #fff; }
.footer-logo .logo-text span { color: var(--accent2); }
.footer-logo .ps-logo-img { filter: brightness(1.05); }

/* Sticky logo link */
.sticky-logo-link { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.sticky-logo-link .logo-text { color: #fff; }

/* ============================================================
   SKIP TO CONTENT – Accessibility
============================================================ */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
  font-size: 14px;
  z-index: 9999;
  transition: top .2s;
  text-decoration: none;
}
.skip-to-content:focus { top: 0; }

/* ============================================================
   FOCUS STYLES – Keyboard navigation (WCAG 2.1)
============================================================ */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 3px;
}
a:focus-visible,
button:focus-visible { outline-color: var(--accent); }

/* ============================================================
   PRINT STYLES – Hide non-essential for print/PDF
============================================================ */
@media print {
  .header-nav, .site-sidebar, .ps-ai-summary, .share-bar,
  .related-section, .post-nav, .breaking-bar, .ps-basa,
  .ps-peunutoh-mobile, footer { display: none !important; }
  .single-layout, .single-article { display: block !important; }
  .article-body { font-size: 12pt; line-height: 1.6; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666; }
}

.sidebar-cat-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 4px;
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 800;
  flex-shrink: 0; margin-right: 6px;
}
.sidebar-cat-list li:nth-child(1) .sidebar-cat-rank { background: #e8232a; }
.sidebar-cat-list li:nth-child(2) .sidebar-cat-rank { background: #f59e0b; color: #000; }
.sidebar-cat-list li:nth-child(3) .sidebar-cat-rank { background: #94a3b8; }