/*!
Theme Name: Kabar
Theme URI: https://example.com/kabar
Author: Original Author
Description: Tema WordPress portal berita profesional — hybrid theme, cepat, mobile-first, SEO & Google News ready, mendukung breaking news, trending berbasis view, mode gelap, dan slot iklan terkelola. Semua branding diatur lewat Customizer.
Version: 2.1.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kabar
Tags: news, magazine, blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, block-styles, wide-blocks, editor-style

This theme, like WordPress, is licensed under the GPL.
*/

/* =========================================================
   DESIGN TOKENS
   Color tokens (--rh-*) are NOT defined here — they come from
   inc/design-tokens.php, output once early in <head> so this file
   never has a second, driftable copy of the same colors. Only
   non-color tokens (typography, spacing, radius, layout) live here.
   ========================================================= */
:root {
	/* Semantic aliases (used throughout components) */
	--color-primary:    var(--rh-navy);
	--color-accent:     var(--rh-blue);
	--color-text:       var(--rh-ink);
	--color-muted:      var(--rh-muted);
	--color-border:     var(--rh-line);
	--color-bg:         var(--rh-paper);
	--color-surface:    var(--rh-surface);

	/* Typography */
	--font-heading: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-body:    "Source Serif 4", Georgia, "Times New Roman", serif;
	--font-meta:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

	/* Spacing scale */
	--space-xs: 4px;
	--space-sm: 8px;
	--space-md: 16px;
	--space-lg: 24px;
	--space-xl: 40px;
	--space-2xl: 64px;

	/* Radius */
	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-lg: 14px;

	/* Shadow — used sparingly */
	--shadow-sm: 0 1px 2px rgba(10,37,64,.06);
	--shadow-md: 0 6px 20px rgba(10,37,64,.10);

	/* Layout */
	--container: 1240px;
	--container-narrow: 760px;
}

/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	transition: background-color .2s ease, color .2s ease;
}
img, picture, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.2em; }

h1, h2, h3, h4, h5 {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -.01em;
	margin: 0 0 var(--space-sm);
	color: var(--color-text);
}

:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 100000;
	background: var(--rh-navy); color: #fff; padding: 12px 18px;
	font-family: var(--font-meta);
}
.skip-link:focus { left: 8px; top: 8px; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--space-lg); }
.container-narrow { max-width: var(--container-narrow); margin-inline: auto; padding-inline: var(--space-lg); }

/* Meta label — category + time, editorial style */
.meta-label {
	font-family: var(--font-meta);
	font-size: 12px;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--color-muted);
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
}
.cat-badge {
	font-family: var(--font-meta);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--color-accent);
}
.cat-badge.is-breaking { color: var(--rh-breaking); }

/* =========================================================
   HEADER / MASTHEAD
   ========================================================= */
.site-header { border-bottom: 1px solid var(--color-border); background: var(--color-bg); }
.header-top { background: var(--rh-navy); color: #fff; }
.header-top-inner {
	display: flex; align-items: center; justify-content: space-between;
	padding-block: var(--space-md); gap: var(--space-lg);
}
.site-branding a { color: #fff; font-family: var(--font-heading); font-weight: 800; font-size: 26px; letter-spacing: -.02em; }
.site-branding img { max-height: 42px; width: auto; }
.header-tools { display: flex; align-items: center; gap: var(--space-md); }

.icon-btn {
	background: transparent; border: 1px solid rgba(255,255,255,.28);
	color: #fff; width: 38px; height: 38px; border-radius: 999px;
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { border-color: #fff; }

.primary-nav { background: var(--rh-navy-soft); }
.primary-nav .menu {
	list-style: none; margin: 0; padding: 0;
	max-width: var(--container); margin-inline: auto; padding-inline: var(--space-lg);
	display: flex; flex-wrap: wrap;
}
.primary-nav a {
	display: block; color: #fff; padding: 13px var(--space-md);
	font-family: var(--font-meta); font-size: 13px; font-weight: 600;
	text-transform: uppercase; letter-spacing: .03em;
}
.primary-nav a:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.primary-nav .current-menu-item > a { box-shadow: inset 0 -3px 0 var(--rh-blue); }

.menu-toggle { display: none; }

/* Sticky compact header */
.site-header.is-sticky .header-top { position: sticky; top: 0; z-index: 90; }

/* =========================================================
   BREAKING NEWS TICKER
   ========================================================= */
.breaking-bar {
	display: flex; align-items: stretch; gap: 0;
	border-bottom: 1px solid var(--color-border);
	background: var(--color-bg); overflow: hidden;
}
.breaking-label {
	background: var(--rh-breaking); color: #fff;
	font-family: var(--font-meta); font-weight: 800; font-size: 12px;
	letter-spacing: .06em; text-transform: uppercase;
	display: flex; align-items: center; padding-inline: var(--space-md);
	white-space: nowrap;
}
.breaking-track { overflow: hidden; flex: 1; position: relative; }
.breaking-slide {
	display: flex; gap: var(--space-xl); padding: 10px var(--space-md);
	font-family: var(--font-meta); font-size: 14px; white-space: nowrap;
	animation: kabar-ticker 30s linear infinite;
}
.breaking-slide a { color: var(--color-text); }
.breaking-track:hover .breaking-slide { animation-play-state: paused; }
@keyframes kabar-ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.breaking-slide { animation: none; overflow-x: auto; }
}

/* =========================================================
   LAYOUT GRID
   ========================================================= */
.site-main { padding-block: var(--space-xl); }
.layout {
	display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: var(--space-xl);
}
.layout.no-sidebar { grid-template-columns: minmax(0,1fr); }

.section-head {
	display: flex; align-items: baseline; justify-content: space-between;
	border-bottom: 2px solid var(--rh-navy); margin-bottom: var(--space-lg);
	padding-bottom: var(--space-sm);
}
.section-head h2 { font-size: 22px; margin: 0; }
.section-head h2 .accent { color: var(--rh-blue); }
.section-head .more { font-family: var(--font-meta); font-size: 13px; font-weight: 600; }

/* =========================================================
   HERO
   ========================================================= */
.hero { margin-bottom: var(--space-2xl); }
.hero-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--space-lg); }
.hero-lead .thumb { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16/9; margin-bottom: var(--space-md); }
.hero-lead .thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-lead h2 { font-size: 36px; }
.hero-lead h2 a { color: var(--color-text); }
.hero-lead .excerpt { color: var(--color-muted); font-size: 18px; }
.hero-secondary { display: grid; grid-template-rows: repeat(2, 1fr); gap: var(--space-md); }
.hero-secondary .card h3 { font-size: 17px; }

/* =========================================================
   CARD SYSTEM
   ========================================================= */
.card { display: flex; flex-direction: column; gap: var(--space-sm); }
.card .thumb { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16/10; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .thumb img { transform: scale(1.03); }
.card h3 { font-size: 18px; }
.card h3 a { color: var(--color-text); }
.card .excerpt { color: var(--color-muted); font-size: 15px; font-family: var(--font-meta); }
.card .card-meta { font-family: var(--font-meta); font-size: 12px; color: var(--color-muted); }

.card-horizontal { display: grid; grid-template-columns: 120px 1fr; gap: var(--space-md); align-items: start; }
.card-horizontal .thumb { aspect-ratio: 1/1; border-radius: var(--radius-sm); overflow: hidden; }
.card-horizontal h3 { font-size: 16px; }
.card-horizontal h3 a { color: var(--color-text); }

.card-minimal { padding-block: var(--space-md); border-bottom: 1px solid var(--color-border); }
.card-minimal h3 { font-size: 16px; }
.card-minimal h3 a { color: var(--color-text); }

.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.cards-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* =========================================================
   TRENDING WIDGET
   ========================================================= */
.widget { margin-bottom: var(--space-xl); }
.widget-title {
	font-family: var(--font-meta); font-size: 13px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .06em; color: var(--rh-navy);
	border-bottom: 2px solid var(--rh-blue); padding-bottom: var(--space-sm);
	margin-bottom: var(--space-md);
}
[data-theme="dark"] .widget-title { color: var(--color-text); }
.trending-list { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.trending-item {
	display: grid; grid-template-columns: 34px 1fr; gap: var(--space-md);
	padding-block: var(--space-md); border-bottom: 1px solid var(--color-border); align-items: start;
}
.trending-item:last-child { border-bottom: none; }
.trending-rank { font-family: var(--font-heading); font-size: 22px; font-weight: 800; color: var(--rh-blue); line-height: 1; }
.trending-item h4 { font-size: 15px; font-family: var(--font-heading); margin: 0 0 4px; }
.trending-item h4 a { color: var(--color-text); }
.trending-meta { font-family: var(--font-meta); font-size: 11px; color: var(--color-muted); }

/* =========================================================
   AD SLOTS
   ========================================================= */
.ad-slot {
	display: flex; align-items: center; justify-content: center;
	background: var(--color-surface); border: 1px dashed var(--color-border);
	color: var(--color-muted); font-family: var(--font-meta); font-size: 12px;
	min-height: 90px; margin-block: var(--space-lg); border-radius: var(--radius-sm);
	overflow: hidden;
}
.ad-slot .ad-label { text-transform: uppercase; letter-spacing: .08em; }

/* =========================================================
   ARTICLE / SINGLE
   ========================================================= */
.read-progress {
	position: fixed; top: 0; left: 0; height: 3px; width: 0;
	background: var(--rh-blue); z-index: 95; transition: width .1s linear;
}
.article-header { margin-bottom: var(--space-lg); }
.article-header h1 { font-size: 38px; line-height: 1.15; }
.article-subhead { font-family: var(--font-body); font-size: 20px; color: var(--color-ink-2); margin-bottom: var(--space-md); }
.article-byline { display: flex; align-items: center; gap: var(--space-md); font-family: var(--font-meta); font-size: 14px; color: var(--color-muted); flex-wrap: wrap; }
.article-byline img { width: 40px; height: 40px; border-radius: 999px; }
.article-featured { margin-block: var(--space-lg); border-radius: var(--radius-md); overflow: hidden; }
.article-featured figcaption { font-family: var(--font-meta); font-size: 12px; color: var(--color-muted); padding-top: var(--space-xs); }

.article-body { font-size: 19px; line-height: 1.8; }
.article-body > * { max-width: var(--container-narrow); margin-inline: auto; }
.article-body p { margin: 0 0 1.3em; }
.article-body h2 { font-size: 26px; margin-top: 1.6em; }
.article-body h3 { font-size: 21px; margin-top: 1.4em; }
.article-body blockquote {
	border-left: 4px solid var(--rh-blue); margin: 1.6em auto; padding: .4em 1.2em;
	font-family: var(--font-heading); font-size: 22px; font-weight: 600; color: var(--color-ink-2);
}
.article-body img { border-radius: var(--radius-sm); }
.article-body figcaption { font-family: var(--font-meta); font-size: 13px; color: var(--color-muted); }

.article-tools { display: flex; gap: var(--space-sm); align-items: center; flex-wrap: wrap; }
.font-size-controls button, .share-links a {
	font-family: var(--font-meta); font-size: 13px; border: 1px solid var(--color-border);
	background: var(--color-bg); color: var(--color-text); border-radius: var(--radius-sm);
	padding: 6px 10px; cursor: pointer;
}
body.font-lg .article-body { font-size: 21px; }
body.font-sm .article-body { font-size: 17px; }

.article-tags { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }
.article-tags a { font-family: var(--font-meta); font-size: 12px; border: 1px solid var(--color-border); border-radius: 999px; padding: 4px 12px; color: var(--color-muted); }

.author-box {
	display: grid; grid-template-columns: 64px 1fr; gap: var(--space-md);
	background: var(--color-surface); border: 1px solid var(--color-border);
	border-radius: var(--radius-md); padding: var(--space-lg); margin-block: var(--space-xl);
}
.author-box img { width: 64px; height: 64px; border-radius: 999px; }
.author-box h3 { font-size: 18px; margin: 0 0 4px; }
.author-box .bio { font-family: var(--font-meta); font-size: 14px; color: var(--color-muted); }

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination { display: flex; gap: var(--space-sm); justify-content: center; margin-top: var(--space-xl); font-family: var(--font-meta); font-size: 14px; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); color: var(--color-text); }
.pagination .current { background: var(--rh-navy); color: #fff; border-color: var(--rh-navy); }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--rh-navy); color: #fff; margin-top: var(--space-2xl); }
[data-theme="dark"] .site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-xl); padding-block: var(--space-2xl); }
.site-footer a { color: #cfe0f5; }
[data-theme="dark"] .site-footer a { color: var(--color-accent); }
.site-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: var(--space-md); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--space-sm); font-family: var(--font-meta); font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: var(--space-md); font-family: var(--font-meta); font-size: 13px; opacity: .8; }

/* =========================================================
   EMPTY / ERROR STATES
   ========================================================= */
.state-block { text-align: center; padding-block: var(--space-2xl); }
.state-block .code { font-size: 72px; font-family: var(--font-heading); font-weight: 800; color: var(--rh-blue); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
	.layout { grid-template-columns: 1fr; }
	.cards-grid { grid-template-columns: repeat(2, 1fr); }
	.footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
	body { font-size: 16px; }
	.hero-grid { grid-template-columns: 1fr; }
	.hero-lead h2 { font-size: 26px; }
	.article-header h1 { font-size: 28px; }
	.menu-toggle {
		display: inline-flex; background: transparent; border: 1px solid rgba(255,255,255,.4);
		color: #fff; padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer;
		font-family: var(--font-meta); font-size: 13px;
	}
	.primary-nav .menu { display: none; flex-direction: column; padding-block: var(--space-sm); }
	.primary-nav.is-open .menu { display: flex; }
	.primary-nav .menu a { padding-block: 12px; }
}
@media (max-width: 560px) {
	.cards-grid, .cards-grid.cols-2 { grid-template-columns: 1fr; }
	.footer-main { grid-template-columns: 1fr; }
	.article-body { font-size: 18px; }
}

/* =========================================================
   ARTICLE BADGES (editorial status)
   ========================================================= */
.article-badge {
	display: inline-block;
	font-family: var(--font-meta);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: var(--radius-sm);
	margin-block: var(--space-xs);
}
.badge-exclusive { background: var(--rh-navy); color: #fff; }
.badge-update    { background: var(--rh-blue-soft); color: var(--rh-blue); }
.badge-sponsored { background: #f3e8c8; color: #7a5c12; }
.badge-opinion   { background: var(--rh-blue); color: #fff; }
[data-theme="dark"] .badge-update { background: var(--rh-blue-soft); color: #fff; }
[data-theme="dark"] .badge-sponsored { background: #4a3c14; color: #f3e8c8; }

/* =========================================================
   SOCIAL LINKS
   ========================================================= */
.social-links a {
	font-family: var(--font-meta);
	font-size: 13px;
	font-weight: 600;
}

/* =========================================================
   SEARCH TOOLBAR
   ========================================================= */
.search-toolbar select {
	font-family: var(--font-meta);
}

/* =========================================================
   ACCESSIBILITY & CONTRAST POLISH
   ========================================================= */
/* Ensure muted text meets contrast on surfaces */
.card .excerpt, .card-meta, .trending-meta { color: var(--rh-muted); }
/* Visible focus on all interactive elements, including cards */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
	outline: 3px solid var(--rh-blue);
	outline-offset: 2px;
	border-radius: 2px;
}
/* Larger tap targets on mobile nav */
@media (max-width: 768px) {
	.primary-nav .menu a { min-height: 44px; display: flex; align-items: center; }
}

/* Block-rendered sections inherit the same spacing as native sections */
.kabar-block-grid { margin-block: var(--space-xl); }
.kabar-block-trending { margin-block: var(--space-xl); }

/* WooCommerce minimal safety — keep product grids from overflowing */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-lg); list-style: none; padding: 0; }
.woocommerce ul.products li.product { margin: 0; }

/* =========================================================
   POST FORMATS (video / gallery / infographic)
   ========================================================= */
.card .thumb { position: relative; }
.format-overlay {
	position: absolute;
	left: var(--space-sm);
	bottom: var(--space-sm);
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10,37,64,.85);
	color: #fff;
	border-radius: 999px;
	font-size: 14px;
	line-height: 1;
	backdrop-filter: blur(2px);
}
.format-video .format-overlay,
.format-overlay.format-video { padding-left: 2px; }

.video-embed iframe { width: 100%; height: 100%; border: 0; position: absolute; inset: 0; }

/* Infographic: break out of the narrow column to full content width */
.article-featured.is-infographic {
	max-width: var(--container);
	margin-inline: auto;
}
.article-featured.is-infographic img { width: 100%; height: auto; }

/* =========================================================
   NARASI-INSPIRED SECTIONS (video-first, terkini feed)
   ========================================================= */

/* Video-first hero */
.video-hero { margin-bottom: var(--space-2xl); }
.video-hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--space-lg); }
.video-hero-embed {
	position: relative; aspect-ratio: 16/9; border-radius: var(--radius-md);
	overflow: hidden; margin-bottom: var(--space-md); background: #000;
}
.video-hero-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-hero-embed .thumb { display: block; width: 100%; height: 100%; position: relative; }
.video-hero-embed .thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-hero-lead h2 { font-size: 28px; }
.video-hero-lead h2 a { color: var(--rh-ink); }
.video-hero-lead .excerpt { color: var(--rh-muted); font-family: var(--font-meta); font-size: 15px; }
.video-hero-rail { display: flex; flex-direction: column; gap: var(--space-md); }
.video-rail-item { display: grid; grid-template-columns: 130px 1fr; gap: var(--space-md); align-items: start; }
.video-rail-item .thumb { position: relative; aspect-ratio: 16/10; border-radius: var(--radius-sm); overflow: hidden; }
.video-rail-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-rail-item h3 { font-size: 15px; }
.video-rail-item h3 a { color: var(--rh-ink); }

/* Play badge overlay */
.play-badge {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
	width: 48px; height: 48px; border-radius: 999px;
	background: rgba(10,37,64,.82); color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-size: 18px; padding-left: 4px; backdrop-filter: blur(2px);
	transition: transform .2s ease, background .2s ease;
}
.thumb:hover .play-badge { transform: translate(-50%,-50%) scale(1.08); background: var(--rh-blue); }
.video-rail-item .play-badge { width: 34px; height: 34px; font-size: 13px; }

/* Terkini feed */
.terkini-section { margin-top: var(--space-2xl); }
.terkini-list { display: flex; flex-direction: column; }
.terkini-item {
	display: grid; grid-template-columns: 120px 1fr; gap: var(--space-md);
	padding-block: var(--space-md); border-bottom: 1px solid var(--rh-line); align-items: center;
}
.terkini-item:last-child { border-bottom: none; }
.terkini-thumb { position: relative; aspect-ratio: 1/1; border-radius: var(--radius-sm); overflow: hidden; }
.terkini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.terkini-body h3 { font-size: 17px; margin: 2px 0 0; }
.terkini-body h3 a { color: var(--rh-ink); }

/* Video archive grid */
.video-grid .video-card .thumb { position: relative; aspect-ratio: 16/10; border-radius: var(--radius-sm); overflow: hidden; }
.video-grid .video-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Cleaner / more whitespace pass (Narasi-like breathing room) */
.site-main { padding-block: var(--space-2xl); }
.section-head { margin-bottom: var(--space-xl); }
.card h3, .terkini-body h3, .video-rail-item h3 { letter-spacing: -.005em; }

@media (max-width: 1024px) {
	.video-hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.terkini-item { grid-template-columns: 92px 1fr; }
	.video-rail-item { grid-template-columns: 110px 1fr; }
}

/* =========================================================
   PRIORITY-1 ENHANCEMENTS
   ========================================================= */

/* -- Inline-style extraction: legal/state/misc -- */
.page-meta { font-family: var(--font-meta); font-size: 13px; color: var(--rh-muted); }
.legal-body { font-size: 17px; }
.search-count { color: var(--rh-muted); font-family: var(--font-meta); margin-bottom: var(--space-lg); }
.footer-logo-wrap { margin-bottom: 12px; }
.footer-brand-name { font-family: var(--font-heading); font-size: 22px; color: #fff; }
.footer-tagline { font-family: var(--font-meta); font-size: 14px; opacity: .85; }
.category-header { border-bottom-width: 3px; }
.category-title { font-size: 26px; }
.category-description { color: var(--rh-muted); margin-bottom: var(--space-lg); max-width: var(--container-narrow); }
.category-lead { margin-bottom: var(--space-xl); }
.category-lead-title { font-size: 26px; }
.state-text { color: var(--rh-muted); }
.state-search-wrap { max-width: 420px; margin: var(--space-lg) auto; }
.author-header { margin-bottom: var(--space-xl); }
.author-name { font-size: 24px; margin: 0 0 4px; }
.author-count { font-family: var(--font-meta); font-size: 13px; color: var(--rh-muted); }
.author-more-link { font-family: var(--font-meta); font-size: 14px; }
.article-tools-spaced { margin-top: var(--space-md); }
.related-spaced { margin-top: var(--space-2xl); }
.video-embed { position: relative; aspect-ratio: 16/9; margin-block: var(--space-lg); border-radius: var(--radius-md); overflow: hidden; }
.breadcrumb-list { list-style: none; margin: 0; padding: 12px 0; display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--font-meta); font-size: 13px; color: var(--rh-muted); }
.breadcrumb-link { color: var(--rh-muted); }
.breadcrumb-current { color: var(--rh-ink); }

/* -- Search form / header search / toolbar -- */
.search-form { display: flex; gap: 8px; }
.search-input { flex: 1; border: 1px solid var(--rh-line); border-radius: var(--radius-sm); padding: 10px 14px; font-family: var(--font-meta); background: var(--rh-paper); color: var(--rh-ink); }
.search-submit { background: var(--rh-navy); color: #fff; border: 0; border-radius: var(--radius-sm); padding: 10px 18px; font-family: var(--font-meta); cursor: pointer; }
.header-search-form { display: flex; }
.header-search-input { border: 0; border-radius: 999px; padding: 8px 14px; font-family: var(--font-meta); font-size: 14px; }
.search-toolbar { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; margin-bottom: var(--space-lg); font-family: var(--font-meta); font-size: 14px; }
.search-toolbar-select { padding: 8px 10px; border: 1px solid var(--rh-line); border-radius: var(--radius-sm); background: var(--rh-paper); color: var(--rh-ink); }

/* -- Comments -- */
.comments-area { margin-top: var(--space-2xl); }
.comments-title { font-family: var(--font-heading); }

/* -- Newsletter -- */
.newsletter { background: var(--rh-navy); color: #fff; border-radius: var(--radius-md); padding: var(--space-xl); margin-block: var(--space-2xl); }
.newsletter-heading { color: #fff; font-size: 24px; margin-bottom: var(--space-sm); }
.newsletter-sub { opacity: .85; font-family: var(--font-meta); margin-bottom: var(--space-lg); }
.newsletter-form { display: flex; flex-wrap: wrap; gap: var(--space-sm); max-width: 520px; }
.newsletter-input { flex: 1; min-width: 200px; padding: 12px 14px; border: 0; border-radius: var(--radius-sm); font-family: var(--font-meta); }
.newsletter-submit { background: var(--rh-blue); color: #fff; border: 0; border-radius: var(--radius-sm); padding: 12px 24px; font-family: var(--font-meta); font-weight: 600; cursor: pointer; }

/* -- Load more button -- */
.kabar-loadmore { text-align: center; margin-top: var(--space-xl); }
.btn-primary { font-family: var(--font-meta); font-size: 14px; background: var(--rh-navy); color: #fff; border: 0; border-radius: var(--radius-sm); padding: 12px 28px; cursor: pointer; }
.btn-primary:hover { background: var(--rh-navy-soft); }

/* -- Social links (footer) -- */
.social-links { display: flex; gap: var(--space-md); }

/* =========================================================
   MOST READ (prominent homepage module) — audit item #4
   ========================================================= */
.most-read-section { margin: var(--space-2xl) 0; padding: var(--space-xl); background: var(--rh-surface); border-radius: var(--radius-md); border: 1px solid var(--rh-line); }
.most-read-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-lg); }
.most-read-item { display: flex; flex-direction: column; gap: 4px; }
.most-read-rank { font-family: var(--font-heading); font-size: 40px; font-weight: 800; color: var(--rh-blue); line-height: 1; opacity: .9; }
.most-read-body h3 { font-size: 16px; margin: 4px 0; }
.most-read-body h3 a { color: var(--rh-ink); }
.most-read-meta { font-family: var(--font-meta); font-size: 12px; color: var(--rh-muted); }
@media (max-width: 1024px) { .most-read-list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .most-read-list { grid-template-columns: 1fr 1fr; } }

/* =========================================================
   UPDATE NOTICE (single article) — audit item #8B
   ========================================================= */
.update-notice {
	display: inline-flex; align-items: center; gap: 6px;
	font-family: var(--font-meta); font-size: 13px; color: var(--rh-blue);
	background: var(--rh-blue-soft); padding: 6px 12px; border-radius: var(--radius-sm);
	margin-top: var(--space-sm);
}

/* =========================================================
   MOBILE NAV DRAWER + FOCUS TRAP — audit item #19/#22
   ========================================================= */
.nav-backdrop {
	display: none; position: fixed; inset: 0; background: rgba(10,37,64,.5);
	z-index: 98; opacity: 0; transition: opacity .2s ease;
}
.nav-backdrop.is-open { display: block; opacity: 1; }
@media (max-width: 768px) {
	.primary-nav {
		position: fixed; top: 0; left: -300px; bottom: 0; width: 280px;
		z-index: 99; overflow-y: auto; transition: left .25s ease;
		box-shadow: var(--shadow-md);
	}
	.primary-nav.is-open { left: 0; }
	.primary-nav .menu { flex-direction: column; padding: var(--space-lg); display: flex; }
}

/* =========================================================
   BACK TO TOP — audit item #21
   ========================================================= */
.js-back-to-top {
	position: fixed; right: var(--space-lg); bottom: var(--space-lg);
	width: 44px; height: 44px; border-radius: 999px;
	background: var(--rh-navy); color: #fff; border: 0; cursor: pointer;
	font-size: 18px; box-shadow: var(--shadow-md);
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
	z-index: 80;
}
.js-back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.js-back-to-top:hover { background: var(--rh-blue); }

/* =========================================================
   PRINT STYLES — audit item #8D
   ========================================================= */
@media print {
	.site-header, .breaking-bar, .breadcrumb, .sidebar, .article-tools,
	.ad-slot, .site-footer, .js-back-to-top, .nav-backdrop, .most-read-section,
	.related, .comments-area { display: none !important; }
	.article-body { font-size: 12pt; }
	body { background: #fff; color: #000; }
}

/* =========================================================
   AUTHOR PROFILE ENHANCEMENTS — audit item #12
   ========================================================= */
.author-header-large { grid-template-columns: 96px 1fr; align-items: start; }
.author-role {
	font-family: var(--font-meta); font-size: 11px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .06em; color: var(--rh-blue);
}
.author-social { margin-top: var(--space-sm); font-family: var(--font-meta); font-size: 13px; }
.author-social a { color: var(--rh-blue); }

/* =========================================================
   PROMINENT BREAKING BADGE — audit item #3
   ========================================================= */
.badge-breaking-live {
	background: var(--rh-breaking); color: #fff;
	display: inline-flex; align-items: center; gap: 6px;
}
.badge-breaking-live .dot {
	width: 6px; height: 6px; border-radius: 999px; background: #fff;
	animation: kabar-pulse 1.4s ease-in-out infinite;
}
@keyframes kabar-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
@media (prefers-reduced-motion: reduce) { .badge-breaking-live .dot { animation: none; } }

/* =========================================================
   SAVE ARTICLE + READING LIST — Brief §43–44
   ========================================================= */
.js-save-article { cursor: pointer; }
.js-save-article.is-saved { color: var(--rh-breaking); border-color: var(--rh-breaking); }

.reading-list { list-style: none; margin: var(--space-lg) 0 0; padding: 0; }
.reading-item {
	display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
	padding: var(--space-md) 0; border-bottom: 1px solid var(--rh-line);
}
.reading-item a { font-family: var(--font-heading); font-weight: 600; font-size: 17px; color: var(--rh-ink); }
.reading-remove {
	flex: 0 0 auto; width: 28px; height: 28px; border-radius: 999px;
	border: 1px solid var(--rh-line); background: var(--rh-paper);
	color: var(--rh-muted); cursor: pointer; font-size: 16px; line-height: 1;
}
.reading-remove:hover { border-color: var(--rh-breaking); color: var(--rh-breaking); }
.reading-empty { color: var(--rh-muted); font-family: var(--font-meta); }

/* =========================================================
   INSTANT SEARCH OVERLAY — Brief §52
   ========================================================= */
.kabar-search-overlay {
	position: fixed; inset: 0; z-index: 120;
	background: rgba(10,37,64,.55); backdrop-filter: blur(3px);
	display: flex; align-items: flex-start; justify-content: center;
	padding: 8vh var(--space-lg) var(--space-lg);
}
.kabar-search-overlay[hidden] { display: none; }
.kabar-search-panel {
	width: 100%; max-width: 620px; background: var(--rh-paper);
	border-radius: var(--radius-md); box-shadow: var(--shadow-md);
	padding: var(--space-lg); animation: kabar-search-in .15s ease;
}
@keyframes kabar-search-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.kabar-search-form { display: flex; align-items: center; gap: var(--space-sm); }
.kabar-search-input {
	flex: 1; border: 0; border-bottom: 2px solid var(--rh-line);
	padding: 10px 4px; font-family: var(--font-heading); font-size: 22px;
	background: transparent; color: var(--rh-ink);
}
.kabar-search-input:focus { outline: none; border-bottom-color: var(--rh-blue); }
.kabar-search-close {
	border: 0; background: transparent; font-size: 28px; line-height: 1;
	color: var(--rh-muted); cursor: pointer; padding: 0 6px;
}
.kabar-search-close:hover { color: var(--rh-breaking); }
.kabar-search-hint { font-family: var(--font-meta); font-size: 12px; color: var(--rh-muted); margin: var(--space-md) 0 0; }
.kabar-search-loading, .kabar-search-empty { font-family: var(--font-meta); color: var(--rh-muted); padding: var(--space-md) 0; }
.kabar-search-list { list-style: none; margin: var(--space-md) 0 0; padding: 0; }
.kabar-search-item a {
	display: flex; align-items: center; gap: var(--space-md);
	padding: var(--space-sm); border-radius: var(--radius-sm); text-decoration: none;
}
.kabar-search-item a:hover { background: var(--rh-surface); }
.kabar-search-thumb {
	flex: 0 0 auto; width: 52px; height: 52px; border-radius: var(--radius-sm);
	background-size: cover; background-position: center; background-color: var(--rh-surface);
}
.kabar-search-text { display: flex; flex-direction: column; gap: 2px; }
.kabar-search-cat { font-family: var(--font-meta); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--rh-blue); }
.kabar-search-title { font-family: var(--font-heading); font-weight: 600; font-size: 16px; color: var(--rh-ink); }

/* =========================================================
   LIVE UPDATES / LIVEBLOG — Brief §29
   ========================================================= */
.kabar-liveblog {
	margin: 24px auto 8px;
	max-width: 760px;
	border: 1px solid var(--rh-line);
	border-radius: var(--radius-md, 10px);
	background: var(--rh-surface);
	overflow: hidden;
}
.kabar-liveblog-head {
	display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	padding: 14px 18px;
	border-bottom: 1px solid var(--rh-line);
	background: var(--rh-paper);
}
.kabar-liveblog-live {
	display: inline-flex; align-items: center; gap: 6px;
	font-family: var(--font-meta); font-weight: 800; font-size: 12px;
	letter-spacing: .06em; text-transform: uppercase;
	color: #fff; background: var(--rh-breaking);
	padding: 4px 10px; border-radius: 999px;
}
.kabar-liveblog-live .dot {
	width: 7px; height: 7px; border-radius: 999px; background: #fff;
	animation: kabar-pulse 1.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .kabar-liveblog-live .dot { animation: none; } }
.kabar-liveblog-title {
	margin: 0; font-family: var(--font-heading); font-size: 20px; line-height: 1.2;
	color: var(--rh-ink);
}
.kabar-liveblog-updated {
	margin-left: auto;
	font-family: var(--font-meta); font-size: 12px; color: var(--rh-muted);
}

/* Editor composer (only visible to users who can edit the post) */
.kabar-liveblog-composer {
	padding: 14px 18px; border-bottom: 1px solid var(--rh-line);
	background: var(--rh-blue-soft);
	display: flex; flex-direction: column; gap: 8px;
}
.kabar-liveblog-composer input[type="text"],
.kabar-liveblog-composer textarea {
	width: 100%; padding: 8px 10px; border: 1px solid var(--rh-line);
	border-radius: var(--radius-sm, 6px); font: inherit; background: var(--rh-paper);
	color: var(--rh-ink);
}
.kabar-lb-fe-actions { display: flex; align-items: center; gap: 14px; }
.kabar-lb-fe-actions label { font-size: 13px; color: var(--rh-muted); }
.kabar-lb-fe-send {
	margin-left: auto; cursor: pointer;
	background: var(--rh-blue); color: #fff; border: 0;
	padding: 8px 16px; border-radius: 999px; font-weight: 700; font-family: var(--font-meta);
}
.kabar-lb-fe-send:hover { background: var(--rh-navy); }
.kabar-lb-fe-status { margin: 0; font-size: 12px; color: var(--rh-muted); min-height: 1em; }
.kabar-lb-fe-toggle {
	display: inline-block; margin: 10px 18px; cursor: pointer;
	background: none; border: 1px dashed var(--rh-line); color: var(--rh-blue);
	padding: 6px 12px; border-radius: 999px; font-family: var(--font-meta); font-size: 13px; font-weight: 600;
}
.kabar-lb-fe-toggle:hover { background: var(--rh-blue-soft); }

/* Feed */
.kabar-liveblog-feed { list-style: none; margin: 0; padding: 0; }
.kabar-liveblog-empty {
	padding: 20px 18px; color: var(--rh-muted); font-style: italic;
}
.kabar-lb-entry {
	position: relative;
	padding: 16px 18px 16px 40px;
	border-bottom: 1px solid var(--rh-line);
}
.kabar-lb-entry:last-child { border-bottom: 0; }
/* Timeline rail + node */
.kabar-lb-entry::before {
	content: ""; position: absolute; left: 18px; top: 22px; bottom: -1px;
	width: 2px; background: var(--rh-line);
}
.kabar-lb-entry:last-child::before { bottom: auto; height: 0; }
.kabar-lb-entry::after {
	content: ""; position: absolute; left: 14px; top: 20px;
	width: 10px; height: 10px; border-radius: 999px;
	background: var(--rh-blue); border: 2px solid var(--rh-surface);
}
.kabar-lb-entry.is-pinned { background: var(--rh-blue-soft); }
.kabar-lb-entry.is-pinned::after { background: var(--rh-breaking); }
.kabar-lb-entry.is-new { animation: kabar-lb-flash 3s ease-out; }
@keyframes kabar-lb-flash {
	0% { background: var(--rh-blue-soft); }
	100% { background: transparent; }
}
@media (prefers-reduced-motion: reduce) { .kabar-lb-entry.is-new { animation: none; } }

.kabar-lb-entry-meta {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	font-family: var(--font-meta); font-size: 12px; color: var(--rh-muted);
	margin-bottom: 4px;
}
.kabar-lb-entry-meta time { font-weight: 700; color: var(--rh-blue); }
.kabar-lb-pin-badge {
	font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 10px;
	color: #fff; background: var(--rh-breaking); padding: 2px 8px; border-radius: 999px;
}
.kabar-lb-entry-title {
	margin: 2px 0 4px; font-family: var(--font-heading); font-size: 18px; line-height: 1.25;
	color: var(--rh-ink);
}
.kabar-lb-entry-body { color: var(--rh-ink); line-height: 1.6; }
.kabar-lb-entry-body p:first-child { margin-top: 0; }
.kabar-lb-entry-body p:last-child { margin-bottom: 0; }
.kabar-lb-entry-body img { border-radius: var(--radius-sm, 6px); margin: 8px 0; }

.kabar-lb-entry-controls { margin-top: 8px; display: flex; gap: 8px; }
.kabar-lb-entry-controls button {
	cursor: pointer; font-family: var(--font-meta); font-size: 12px;
	background: var(--rh-paper); border: 1px solid var(--rh-line);
	color: var(--rh-muted); padding: 3px 10px; border-radius: 999px;
}
.kabar-lb-entry-controls button:hover { border-color: var(--rh-blue); color: var(--rh-blue); }
.kabar-lb-ctl-delete:hover { border-color: var(--rh-breaking) !important; color: var(--rh-breaking) !important; }

/* Dark mode */
[data-theme="dark"] .kabar-liveblog { border-color: var(--color-border); }
[data-theme="dark"] .kabar-liveblog-head { background: var(--color-surface); border-color: var(--color-border); }
[data-theme="dark"] .kabar-lb-entry { border-color: var(--color-border); }
[data-theme="dark"] .kabar-lb-entry::before { background: var(--color-border); }
[data-theme="dark"] .kabar-liveblog-composer { background: rgba(31,111,235,.12); }

@media (max-width: 560px) {
	.kabar-liveblog-updated { margin-left: 0; width: 100%; }
	.kabar-lb-entry { padding-left: 34px; }
	.kabar-lb-entry::before { left: 14px; }
	.kabar-lb-entry::after { left: 10px; }
}

/* =========================================================
   RECOMMENDATIONS — "Untuk Anda" — Brief §22–23
   ========================================================= */
.kabar-recommend { margin-top: 32px; }
.kabar-recommend[hidden] { display: none; }
.kabar-recommend .cat-badge { display: inline-block; margin-bottom: 4px; }
.kabar-reco-card { animation: kabar-reco-in .4s ease-out both; }
.kabar-recommend-note {
	margin-top: 10px; font-size: 12px; color: var(--rh-muted);
}
@keyframes kabar-reco-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .kabar-reco-card { animation: none; } }

/* Newsletter — first-party capture additions (Brief §25) */
.newsletter-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.newsletter-status { flex-basis: 100%; margin: 8px 0 0; font-family: var(--font-meta); font-size: 13px; min-height: 1em; }
.newsletter-status.is-success { color: #7CFFB2; }
.newsletter-status.is-error { color: #ffb4b4; }
.newsletter-submit:disabled { opacity: .6; cursor: default; }
