/* =============================================
   Gentar News - Global styles
   Dimuat di semua halaman. Berisi:
     1. Design tokens, reset, layout dasar
     3. Footer
   Catatan: file ini sengaja digabung agar browser tidak memuat
   banyak file CSS. CSS spesifik halaman dimuat terpisah:
   single.css, page.css, archive.css, home.css, 404.css.
   ============================================= */

/* ============================================================
   1. BASE
   ============================================================ */

:root {
	--color-accent: #c8102e;
	--color-link: #c8102e;
	--color-text: #1a1a1a;
	--color-muted: #6b7280;
	--color-border: #e5e7eb;
	--color-separator: #e5e7eb;
	--color-bg: #ffffff;
	--color-bg-alt: #f7f7f8;
	--color-dark: #111418;

	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-heading: "Lora", Georgia, "Times New Roman", serif;

	/* Ukuran tipografi. Nilai ini adalah cadangan; pengaturan Tipografi di
	   Customizer menimpanya lewat inline style pada :root. Ukuran varian
	   mobile diterapkan di media query di bawah. */
	--heading-size-desktop: 20px;
	--heading-size-mobile: 16px;
	--body-size-desktop: 16px;
	--body-size-mobile: 16px;
	/* Ukuran nama/judul section & nama judul hero (terpisah dari judul
	   post): desktop 20px, mobile 20px. Ditimpa Customizer lewat inline
	   style pada :root. */
	--section-title-size-desktop: 20px;
	--section-title-size-mobile: 20px;

	/* Nilai aktif: desktop secara bawaan, diganti di layar sempit. */
	--heading-size: var(--heading-size-desktop);
	--body-size: var(--body-size-desktop);
	--section-title-size: var(--section-title-size-desktop);

	/* Berat huruf. Ditimpa dari Customizer lewat inline style pada :root. */
	--heading-weight: 700;
	--body-weight: 400;

	--container: 1200px;
	--gap: 24px;
	--radius: 6px;

	--header-logo-height: 48px;
	/* Mobile otomatis turun 3px dari --header-logo-height (lihat gentar_news_customizer_css). */
	--header-logo-height-mobile: 45px;
	--header-logo-width: auto;
	/* Footer logo (gentar_news_customizer_css): 0.6x tinggi logo header;
	   default header 48px => round(28.8)=29px. Clamped min 28px. */
	--footer-logo-height: 29px;
	--header-sub-height: 42px;
	--header-sub-separator: rgba(0, 0, 0, 0.14);

	/* Chevron icon for dropdown parent items (matches the theme's line icons). */
	--chevron-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");

	color-scheme: light;
}

/* Header logo sizing driven from the Customizer. */
.site-branding .custom-logo {
	height: var(--header-logo-height);
	width: var(--header-logo-width);
	display: block;
}

/* Dark mode token overrides. Toggled by adding .gentar-dark to <html>. */
html.gentar-dark {
	--color-text: #e7e9ee;
	--color-muted: #9aa1ad;
	--color-border: #2a3038;
	--color-separator: #2a3038;
	--color-bg: #12161b;
	--color-bg-alt: #1a1f26;
	--color-dark: #0d1014;
	--color-link: #ff5d74;
	--header-sub-separator: rgba(255, 255, 255, 0.16);

	color-scheme: dark;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--body-size);
	font-weight: var(--body-weight);
	line-height: 1.65;
	overflow-x: hidden;
	overflow-x: clip;
}

img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--color-link);
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.5em;
	line-height: 1.25;
	font-family: var(--font-heading);
	font-weight: var(--heading-weight);
}

p {
	margin: 0 0 1em;
}

/* Container */
.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

/*
 * Mobile gutters.
 *
 * Every full-width band (header, sub header, search, ad slot, content,
 * footer) wraps its own `.container`, so overriding the container padding
 * here keeps the left/right edge identical from header through footer
 * instead of editing each band separately.
 */
@media (max-width: 860px) {
	.container {
		padding-inline: 16px;
	}
}

/* Layout
   Jarak header -> konten HANYA diatur di sini (satu sumber). Elemen
   pertama di kedua kolom di-nol-kan margin/padding atasnya, jadi tepi
   atas kolom konten dan kolom sidebar selalu identik di semua halaman
   (single, arsip, pencarian, beranda). */
.main-content-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 40px;
	padding: 24px 0 15px;
	/* Kedua kolom mulai dari garis atas yang sama. `start` (bukan `stretch`)
	   mencegah sidebar melebar mengikuti tinggi kolom konten. */
	align-items: start;
}

/* Tanpa sidebar (mis. beranda): satu kolom penuh. */
body.no-sidebar .main-content-layout {
	grid-template-columns: minmax(0, 1fr);
}

/* Kedua kolom dijamin mulai dari garis atas grid yang sama.

   Penyebab sidebar tampak turun/menempel header: margin atas bawaan
   peramban pada judul widget (`.widget-title` = h2, ~0.83em) dan pada
   header halaman di kolom konten. Kontainer kolom di-nol-kan lebih dulu,
   lalu elemen pertama di dalamnya, sehingga sisa jarak header -> konten
   hanya `padding-top` milik `.main-content-layout`. */
.content-area,
.content-area > .entry-single,
.content-area > .entry-page,
.sidebar {
	padding-top: 0;
	margin-top: 0;
}

.content-area > :first-child,
.content-area .entry-single > :first-child,
.content-area .entry-page > :first-child,
.sidebar > :first-child,
.sidebar .widget:first-child,
.sidebar .widget:first-child > :first-child,
.sidebar .widget:first-child > :first-child > :first-child {
	margin-top: 0;
}

/* Breadcrumb adalah elemen pertama di dalam `.entry-single`. Judul post
   (`h1`) dan judul header halaman juga di-nol-kan supaya teks keduanya
   jatuh di baseline yang sama, bukan hanya kotak luarnya yang sejajar. */
.entry-single .entry-header > :first-child,
.page-header > :first-child,
.archive-header .page-title,
.search-header .page-title {
	margin-top: 0;
}

.sidebar .widget:first-child > :first-child {
	/* `.widget-title` (h2) membawa `margin-bottom: 14px` + border 2px;
	   di-nol-kan bareng margin atasnya supaya kotak judul dan kotak
	   breadcrumb di kolom konten sama-sama mulai dari tepi atas kolom. */
	padding-top: 0;
	margin-top: 0;
}

.site-content {
	min-height: 50vh;
}

/* Section titles */
/* Mengikuti pola judul section di beranda (`.home-hero-popular-title`): flex,
   titik "live" (`::before`) di kiri teks dan garis aksen (`::after`) yang
   memanjang ke kanan mengisi sisa lebar. Tanpa border-left lama. */
.section-title {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-heading);
	font-size: var(--section-title-size);
	font-weight: var(--heading-weight, 700);
	line-height: 1.25;
	margin-bottom: 20px;
}

.section-title[hidden] {
	display: none;
}

/* Titik "live" berdenyut di kiri judul, sama seperti di beranda. */
.section-title.has-pulse::before {
	content: "";
	flex: 0 0 auto;
	align-self: center;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--color-accent);
	box-shadow: 0 0 0 rgba(200, 16, 46, 0.65);
	animation: gentar-hero-pulsing 2s infinite !important;
}

/* Garis aksen setelah judul. `margin-left: auto` mendorongnya ke kanan;
   `flex: 1` membuatnya memanjang memenuhi sisa lebar. */
.section-title::after {
	content: "";
	flex: 1 1 auto;
	align-self: center;
	height: 2px;
	margin-left: auto;
	background: var(--color-accent);
}

/* Keyframes dipakai juga oleh home.css; didefinisikan di sini (global)
   supaya tersedia di semua halaman (single, archive, dst.), bukan cuma
   beranda. `!important` menang atas aturan animasi lain yang lebih spesifik. */
@keyframes gentar-hero-pulsing {
	from {
		box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.65);
	}
	70% {
		box-shadow: 0 0 0 10px rgba(200, 16, 46, 0);
	}
	to {
		box-shadow: 0 0 0 0 rgba(200, 16, 46, 0);
	}
}

/* Grid posts: dipakai di home, archive, search, dan related posts. */
.grid-posts-container {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: var(--gap);
}

.grid-post {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease;
}

.grid-post:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.grid-post-thumbnail {
	display: block;
	aspect-ratio: 16 / 9;
	background: var(--color-bg-alt);
	overflow: hidden;
}

.grid-post-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.grid-post-content {
	padding: 14px 16px 18px;
}

.post-category {
	display: inline-block;
	color: var(--color-accent);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 6px;
}

.grid-post-title {
	/* 0.84x ukuran judul di desktop; di mobile ukuran dasar dipakai
	   persis supaya tidak jatuh ke ~13px saat user memilih 16px. */
	font-size: calc(var(--heading-size-desktop) * 0.84);
	margin: 0 0 8px;
}

@media (max-width: 700px) {
	.grid-post-title {
		font-size: var(--heading-size-mobile);
	}
}

.grid-post-title a {
	color: var(--color-text);
	text-decoration: none;
	display: inline;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 1px;
	transition: background-size .25s ease, color .2s ease;
}

.grid-post:hover .grid-post-title a,
.grid-post-title a:hover,
.grid-post-title a:focus,
.grid-post-title a:focus-visible {
	color: var(--color-link);
	background-size: 100% 1px;
	text-decoration: none;
}

.post-date {
	color: var(--color-muted);
	font-size: 0.8rem;
}

/* Entry content: dipakai single dan static page. */
.entry-meta {
	color: var(--color-muted);
	font-size: 0.8rem;
}

.entry-content {
	font-size: 1.0625rem;
}

.entry-content > * + * {
	margin-top: 1em;
}

.entry-title {
	font-family: var(--font-heading);
	font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.entry-title a {
	color: var(--color-text);
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 1px;
	background-repeat: no-repeat;
	background-position: 0 100%;
	transition: background-size .25s ease, color .2s ease;
}

.entry-title a:hover,
.entry-title a:focus,
.entry-title a:focus-visible {
	color: var(--color-link);
	background-size: 100% 1px;
	text-decoration: none;
}

/* Ukuran tipografi mobile: tukar variabel aktif ke varian mobile, bukan
   menulis ulang tiap selector. Semua elemen yang membaca `--heading-size`
   atau `--body-size` ikut berubah sekaligus — termasuk seluruh judul post
   di beranda, yang ukurannya selalu ditulis relatif terhadap variabel ini
   (mis. `calc(var(--heading-size) * 0.8)`), bukan angka px/rem mati. */
@media (max-width: 700px) {
	:root {
		--heading-size: var(--heading-size-mobile);
		--body-size: var(--body-size-mobile);
		--section-title-size: var(--section-title-size-mobile);
	}
}

.entry-thumbnail {
	width: 100%;
	margin: 0 0 24px;
}

.entry-thumbnail img {
	width: 100%;
	height: auto;
	display: block;
}

.entry-thumbnail figcaption,
.wp-caption-text,
figure figcaption,
.wp-block-image figcaption {
	font-size: 0.8rem;
	color: var(--color-muted);
	padding-top: 6px;
	text-align: left;
	font-style: italic;
}

/* Pagination */
.pagination,
.navigation.pagination {
	margin: 32px 0;
}

.pagination .nav-links,
.navigation .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-family: var(--font-body);
}

.pagination .page-numbers,
.navigation .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	color: var(--color-text);
	font-family: var(--font-body);
}

.pagination .page-numbers.current,
.navigation .page-numbers.current {
	background: var(--color-accent);
	border-color: var(--color-accent);
	color: #fff;
}

/* Buttons */
.button,
input[type="submit"] {
	display: inline-block;
	background: var(--color-accent);
	color: #fff;
	border: 0;
	border-radius: var(--radius);
	padding: 10px 20px;
	font-family: var(--font-body);
	font-size: 0.9rem;
	cursor: pointer;
}

.button:hover,
input[type="submit"]:hover {
	background: #a30d25;
	color: #fff;
	text-decoration: none;
}

/* Search form */
.search-form {
	display: flex;
	gap: 8px;
}

.search-field {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	font-size: 0.95rem;
}

/* iOS Safari memperbesar viewport saat field difokus bila font-size < 16px.
   Semua field pencarian dikunci ke 16px di layar kecil agar layout tema
   tidak melebar/zoom saat pengguna mulai mengetik. */
@media (max-width: 1024px) {
	.search-field {
		font-size: 16px;
	}
}

.search-submit {
	background: var(--color-accent);
	color: #fff;
	border: 0;
	padding: 10px 18px;
	border-radius: var(--radius);
	cursor: pointer;
	font-size: 0.9rem;
}

/* Widgets */
.widget {
	margin-bottom: 32px;
}

/* Judul widget mengikuti gaya `.section-title.has-pulse` seperti kolom
   Terpopuler: titik "live" berdenyut (`::before`) di kiri teks dan garis
   aksen (`::after`) memanjang mengisi sisa lebar. Berlaku untuk judul
   widget klasik (`.widget-title`) maupun judul widget bawaan/blok
   (`h2.wp-block-heading`) yang dipakai di editor widget blok. Ukuran
   mengikuti Judul Section di Customizer (varian desktop & mobile). */
.widget-title,
.widget h2.wp-block-heading {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-heading);
	font-size: var(--section-title-size);
	font-weight: var(--heading-weight, 700);
	line-height: 1.25;
	letter-spacing: 0;
	text-transform: none;
	padding-bottom: 0;
	border-bottom: 0;
	margin-bottom: 14px;
	min-width: 0;
}

/* Judul widget kosong (mis. blok Heading tanpa teks) tidak boleh
   menampilkan titik pulse dan garis aksen tanpa teks. */
.widget-title:empty,
.widget h2.wp-block-heading:empty {
	display: none;
}

/* Dot pulse dan garis aksen (sama dengan `.section-title.has-pulse`). */
.widget-title::before,
.widget h2.wp-block-heading::before {
	content: "";
	flex: 0 0 auto;
	align-self: center;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--color-accent);
	box-shadow: 0 0 0 rgba(200, 16, 46, 0.65);
	animation: gentar-hero-pulsing 2s infinite !important;
}

.widget-title::after,
.widget h2.wp-block-heading::after {
	content: "";
	flex: 1 1 auto;
	align-self: center;
	height: 2px;
	margin-left: auto;
	background: var(--color-accent);
}

.widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.widget ul li {
	padding: 8px 0;
	border-bottom: 1px solid var(--color-border);
}

.widget ul li:last-child {
	border-bottom: 0;
}

/* All widget links animated underline */
.widget a:not(.widget-popular-link):not(.widget-recent-link):not(.home-sorotan-link):not(.post-category) {
	color: var(--color-text);
	text-decoration: none;
	display: inline;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 1px;
	transition: background-size .25s ease, color .2s ease;
}

.widget a:not(.widget-popular-link):not(.widget-recent-link):not(.home-sorotan-link):not(.post-category):hover,
.widget a:not(.widget-popular-link):not(.widget-recent-link):not(.home-sorotan-link):not(.post-category):focus-visible {
	color: var(--color-link);
	background-size: 100% 1px;
	text-decoration: none;
}

/* Hindari garis ganda pada link kartu/thumbnail widget */
.widget .widget-popular-link,
.widget .widget-recent-link,
.widget .home-sorotan-link,
.widget .widget-popular-thumb,
.widget .widget-recent-thumb,
.widget .home-sorotan-thumb,
.widget .custom-logo-link {
	background-image: none !important;
	text-decoration: none !important;
}

/* Accessibility */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	display: block;
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100000;
	background: #fff;
	color: var(--color-text);
	padding: 12px 16px;
	border-radius: var(--radius);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
}

/* Responsive layout */
@media (max-width: 1140px) {
	.main-content-layout {
		grid-template-columns: minmax(0, 1fr) 300px;
		gap: 28px;
	}
}

@media (max-width: 860px) {
	.main-content-layout {
		grid-template-columns: minmax(0, 1fr);
		/* Satu kolom: sidebar turun ke bawah konten, jadi jarak atasnya
		   di sini yang memisahkan, bukan `margin-top` (sudah 0 di atas). */
		row-gap: 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	/* Only dampen decorative motion (transforms, long transitions, keyframe
	   animations) instead of blanking every transition globally, so state
	   changes such as colour/opacity feedback still read as intentional. */
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-property: color, background-color, border-color, opacity, background-size !important;
		transition-duration: 0.25s !important;
	}

	/* Pastikan animasi smooth underline tetap aktif di semua browser/preferensi */
	.entry-title a,
	.grid-post-title a,
	.editorial-post-title a,
	.widget a,
	.widget-popular-heading-text,
	.widget-recent-heading-text,
	.hero-card-title a,
	.hero-popular-heading,
	.home-sorotan-heading-text,
	.home-pilihan-feature-heading a,
	.home-pilihan-item-heading a,
	.home-section--feature .home-pilihan-item-heading a,
	.home-terbaru-heading a,
	.home-section .home-secgrid-heading a,
	.home-video-heading-text {
		transition: background-size .25s ease, color .2s ease !important;
	}

	/* Header affordances stay animated: they communicate state, not flourish. */
	.main-navigation .menu > li > a::before,
	.darkmode-thumb,
	.nav-submenu-toggle::after {
		transition-property: transform, opacity, background-color !important;
		transition-duration: 0.3s !important;
	}

	.main-navigation .menu > li.menu-item-has-children > a::after {
		transition-property: transform !important;
	}
}


/* ============================================================
   2. HEADER
   Desktop (kiri ke kanan): logo, menu, search icon, dark mode.
   Mobile  (kiri ke kanan): logo, search icon, dark mode + rail menu bawah
   ============================================================ */

/* Header main */
.site-header {
	position: relative;
	z-index: 50;
}

/* Auto-hide (header-inline): JS menambah `.is-fixed` + meng-insert
   `div.header-spacer` (sibling di atas header) setinggi header, menjaga
   konten tidak tertutup dan tidak melompat saat header hilang/tampil.
   `.is-hidden` menaikkan header ke luar layar, `.is-scrolled`
   menyalakan shadow tipis di batas bawah. */
.site-header.is-fixed {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 60;
	background: var(--color-bg);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
	will-change: transform;
}

/* Placeholder tempat header di dalam document flow. Tinggi di-set inline
   oleh theme.js (ukurHeader); konten di bawah tidak tertutup dan tidak
   melompat saat header bergeser. */
.header-spacer {
	height: 0;
}

/* Admin bar (hanya saat user login). WP menambahkan
   `html { margin-top: 32px }` (mobile <=782px: 46px) sehingga seluruh
   dokumen statis — termasuk `.header-spacer` dan `.site-content` —
   terdorong turun. Header `position: fixed` tidak ikut terdorong, jadi
   tanpa aturan ini muncul celah setinggi admin bar antara header dan
   konten. Body class `admin-bar` disediakan WP, jadi kita geser header
   sejauh tinggi admin bar agar tetap menempel di bawahnya. */
.admin-bar .site-header.is-fixed {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .site-header.is-fixed {
		top: 46px;
	}
}

.site-header.is-fixed.is-hidden {
	transform: translateY(-104%);
}

.site-header.is-fixed.is-scrolled {
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06),
		0 4px 14px rgba(0, 0, 0, 0.07);
}

@media (prefers-reduced-motion: reduce) {
	.site-header.is-fixed {
		transition: none;
	}
}

.header-main-inner {
	display: flex;
	align-items: center;
	/* Left to right: branding, horizontal menu, tools (search, dark mode). */
	gap: 30px;
	/* padding-block only: the horizontal padding comes from `.container` and
	   must stay in sync with `.header-sub__inner`. */
	padding-block: 14px;
	min-height: 76px;
}

/* Header layout variants from the Customizer (`gentar_header_layout`).
   Desktop only; mobile always stacks as hamburger, logo, search, dark mode. */
@media (min-width: 861px) {
	/* Logo Tengah (centered): two rows, branding on top, menu below. */
	.site-header.header-centered .header-main-inner {
		flex-wrap: wrap;
		justify-content: center;
		row-gap: 6px;
		padding-block: 18px;
	}

	.site-header.header-centered .site-branding {
		flex: 1 0 100%;
		display: flex;
		justify-content: center;
		text-align: center;
	}

	.site-header.header-centered .main-navigation {
		flex: 1 1 auto;
		display: flex;
		justify-content: center;
	}

	.site-header.header-centered .main-navigation .menu {
		justify-content: center;
	}

	/* Tools (search, dark mode) pinned to the top-right of the first row. */
	.site-header.header-centered .header-tools {
		order: -1;
		align-self: flex-start;
		margin-left: auto;
	}

	/* Logo Kiri (inline): single row, branding, menu, tools. */
	.site-header.header-inline .site-branding {
		flex: 0 1 auto;
	}

	.site-header.header-inline .main-navigation {
		flex: 1 1 auto;
	}

	.site-header.header-inline .main-navigation .menu {
		justify-content: flex-start;
	}
}

/* Logo sits flush with the left edge of the container when the menu follows
   inline, so the branding and the first menu item share the same baseline. */
.site-branding {
	flex: 0 1 auto;
	min-width: 0;
	/* Trim the display-font leadings so the logo box lines up optically with the
	   first menu item instead of floating a few pixels lower. */
	display: flex;
	align-items: center;
}

/* Flush-left menu: cancel the 10px inline padding of the first link so the
   menu text starts on the same vertical line as the logo. Scoped to desktop,
   where the menu sits inline with the branding. */
@media (min-width: 861px) {
	.site-header.header-inline .main-navigation .menu > li:first-child > a,
	.site-header:not(.header-centered):not(.header-inline) .main-navigation .menu > li:first-child > a {
		margin-left: -10px;
	}

	.site-header.header-centered .header-main-inner {
		column-gap: 24px;
	}
}

.site-branding .custom-logo-link {
	display: inline-block;
	line-height: 0;
}

.custom-logo {
	display: block;
	height: var(--header-logo-height);
	width: var(--header-logo-width);
	max-width: 100%;
	max-height: var(--header-logo-height);
	object-fit: contain;
	flex-shrink: 0;
	transition: filter 0.25s ease, opacity 0.2s ease;
}

/* Logo header & drawer saat dark mode: otomatis kontras berlawanan (putih/terang)
   agar terbaca jelas di atas latar gelap.
   filter: brightness(0) invert(1) mengubah warna logo apa pun (hitam, abu-abu,
   warna-warni, atau jika sudah berunsur putih) menjadi putih bersih kontras
   dengan tetap menjaga transparansi saluran alpha file PNG/SVG. */
html.gentar-dark .site-branding .custom-logo-link img,
html.gentar-dark .site-branding .custom-logo-link svg,
html.gentar-dark .site-branding .custom-logo,
html.gentar-dark .mobile-drawer-brand .custom-logo-link img,
html.gentar-dark .mobile-drawer-brand .custom-logo-link svg,
html.gentar-dark .mobile-drawer-brand .custom-logo {
	filter: brightness(0) invert(1);
	opacity: 0.95;
}

html.gentar-dark .site-branding .custom-logo-link:hover img,
html.gentar-dark .site-branding .custom-logo-link:hover svg,
html.gentar-dark .site-branding .custom-logo-link:hover .custom-logo,
html.gentar-dark .mobile-drawer-brand .custom-logo-link:hover img,
html.gentar-dark .mobile-drawer-brand .custom-logo-link:hover svg,
html.gentar-dark .mobile-drawer-brand .custom-logo-link:hover .custom-logo {
	opacity: 1;
}

/* Text fallback when no logo is set. */
.site-title {
	font-size: clamp(1.3rem, 2.4vw, 1.9rem);
	line-height: 1.15;
	margin: 0;
	letter-spacing: -0.01em;
	white-space: nowrap;
}

.site-title a {
	color: var(--color-text);
}

.site-description {
	margin: 2px 0 0;
	color: var(--color-muted);
	font-size: 0.8rem;
	line-height: 1.3;
}

/* Tools column: search icon then dark mode toggle, aligned to the right edge. */
.header-tools {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
	margin-left: auto;
}

.header-tools .search-toggle {
	order: 1;
}

.header-tools .darkmode-toggle {
	order: 2;
}

/* Icon buttons: no border, no background, no rounding ---------------------- */
.header-tools .icon-button,
.header-tools .search-toggle {
	background: none;
	border: 0;
	border-radius: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--color-text);
	cursor: pointer;
	transition: color 0.2s ease, transform 0.2s ease;
}

/* Dark mode switch ------------------------------------------------------- */
.darkmode-toggle {
	display: inline-flex;
	align-items: center;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: var(--color-text);
}

.darkmode-track {
	position: relative;
	display: inline-block;
	width: 60px;
	height: 30px;
	border-radius: 999px;
	background: var(--color-bg-alt);
	border: 1px solid var(--color-border);
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.darkmode-toggle:hover .darkmode-track {
	border-color: var(--color-accent);
}

/* Thumb: the only animated element, so the motion stays fluid. */
.darkmode-thumb {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--color-accent);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
	will-change: transform;
}

html.gentar-dark .darkmode-thumb {
	transform: translateX(30px);
}

/* Icons sit fixed on both ends of the track; only the thumb moves. */
.darkmode-track .icon-sun,
.darkmode-track .icon-moon {
	position: absolute;
	top: 50%;
	width: 15px;
	height: 15px;
	margin-top: -7.5px;
	z-index: 1;
	stroke: var(--color-muted);
	transition: stroke 0.3s ease;
	pointer-events: none;
}

.darkmode-track .icon-sun {
	left: 6px;
}

.darkmode-track .icon-moon {
	right: 6px;
}

html.gentar-dark .darkmode-track .icon-moon {
	stroke: #fff;
}

html:not(.gentar-dark) .darkmode-track .icon-sun {
	stroke: #fff;
}

/* Mobile drawer: slide-in panel from the right (separate render of the same
   menu plus social links). The horizontal rail stays visible below the
   header row on small screens, so both exist side by side on mobile. */
body.drawer-open {
	overflow: hidden;
}

.mobile-drawer {
	position: fixed;
	inset: 0;
	z-index: 9000;
	visibility: hidden;
	pointer-events: none;
}

body.drawer-open .mobile-drawer,
.mobile-drawer.is-open {
	visibility: visible;
	pointer-events: auto;
}

.mobile-drawer-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.3s ease !important;
}

.mobile-drawer.is-open .mobile-drawer-overlay {
	opacity: 1;
}

.mobile-drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 300px;
	max-width: 88vw;
	background: var(--color-bg);
	color: var(--color-text);
	box-shadow: -8px 0 30px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
	overflow: hidden;
}

.mobile-drawer.is-open .mobile-drawer-panel {
	transform: translateX(0);
}

.mobile-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	/* Kanan 10px: tombol tutup 40px sudah di-tarik -10px, total kembali
	   ke 20px seperti padding kiri, jadi ikon tutup rata dengan item
	   menu di bawahnya. */
	padding: 14px 10px 14px 20px;
	border-bottom: 1px solid var(--color-border);
	flex: 0 0 auto;
}

/* Tombol tutup: kotak 40px dengan ikon 20px di tengah; ikonnya duduk
   10px di dalam kotak. Margin kanan -10px menarik kotak keluar supaya
   garis ikon jatuh tepat di 20px, rata dengan teks menu di bawahnya. */
.mobile-drawer-header .mobile-drawer-close {
	margin-right: 0;
}

/* Logo situs di baris atas drawer, ukurannya mengikuti tinggi logo
   header (`--header-logo-height`, diatur dari Customizer) supaya baris
   atas drawer dan header terlihat satu keluarga. */
.mobile-drawer-brand {
	display: flex;
	align-items: center;
	min-width: 0;
}

.mobile-drawer-brand .custom-logo-link {
	display: inline-block;
	line-height: 0;
}

.mobile-drawer-brand .custom-logo {
	display: block;
	height: var(--header-logo-height);
	width: auto;
	max-width: 100%;
	max-height: var(--header-logo-height);
	object-fit: contain;
	transition: filter 0.25s ease, opacity 0.2s ease;
}

.mobile-drawer-site-name {
	font-family: var(--font-heading);
	font-weight: var(--heading-weight);
	font-size: 1.1rem;
	line-height: 1.2;
	color: var(--color-text);
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mobile-drawer-site-name:hover,
.mobile-drawer-site-name:focus-visible {
	color: var(--color-accent);
	text-decoration: none;
}

.mobile-drawer-title {
	font-family: var(--font-heading);
	font-weight: var(--heading-weight);
	font-size: 1rem;
}

/* Pencarian drawer -------------------------------------------------------
   Field pencarian penuh (100%) dengan tombol submit ikon SVG transparan
   (tanpa background) duduk di sisi kanan dalam field.

   Anti-zoom iOS: font-size 16px mencegah Safari melakukan auto-zoom saat
   field difokus, dengan padding kanan 42px agar teks tidak menabrak ikon.
   Mendukung mode terang dan mode gelap secara otomatis lewat CSS tokens. */
.mobile-drawer-search {
	position: relative;
	display: block;
	flex: 0 0 auto;
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 12px 20px;
	border-bottom: 1px solid var(--color-border);
	background: var(--color-bg-alt);
}

.mobile-drawer-search .search-field {
	display: block;
	width: 100%;
	box-sizing: border-box;
	height: 42px;
	padding: 8px 42px 8px 14px;
	/* 16px wajib: mencegah iOS Safari auto-zoom saat fokus. */
	font-size: 16px;
	line-height: normal;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	background: var(--color-bg);
	color: var(--color-text);
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.mobile-drawer-search .search-field::placeholder {
	color: var(--color-muted);
	opacity: 0.8;
}

.mobile-drawer-search .search-field::-webkit-search-decoration,
.mobile-drawer-search .search-field::-webkit-search-cancel-button,
.mobile-drawer-search .search-field::-webkit-search-results-button,
.mobile-drawer-search .search-field::-webkit-search-results-decoration {
	display: none;
}

.mobile-drawer-search .search-field:focus {
	outline: none;
	border-color: var(--color-accent);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent) 25%, transparent);
}

.mobile-drawer-search .search-submit {
	position: absolute;
	top: 50%;
	right: 21px;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: var(--radius);
	background: transparent;
	color: var(--color-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: color 0.18s ease;
}

.mobile-drawer-search .search-submit:hover,
.mobile-drawer-search .search-submit:focus-visible {
	background: transparent;
	color: var(--color-accent);
	outline: none;
}

.mobile-drawer-search .search-submit svg {
	width: 18px;
	height: 18px;
	display: block;
	stroke: currentColor;
}

.mobile-drawer-nav {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 4px 0;
}

.mobile-drawer-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-drawer-nav li {
	border: 0;
}

/* Garis pemisah antar item menu tingkat pertama: satu garis abu-abu di
   bawah tiap baris, jadi daftar terbaca sebagai tabel isi, bukan blok
   teks berhimpit. Sub-menu tidak ikut (indentasi sudah menandai
   hierarki).

   Kelas menu drawer adalah `mobile-menu` (bukan `menu` seperti di rail
   header), jadi kedua-duanya disebut, plus fallback ke semua `li`
   tingkat pertama supaya menu tanpa kelas pun tetap bergaris. */
.mobile-drawer-nav ul.mobile-menu > li,
.mobile-drawer-nav ul.menu > li,
.mobile-drawer-nav nav > ul > li {
	border-bottom: 1px solid var(--color-border);
}

.mobile-drawer-nav ul.mobile-menu > li:last-child,
.mobile-drawer-nav ul.menu > li:last-child,
.mobile-drawer-nav nav > ul > li:last-child {
	border-bottom: 0;
}

/* Item menu drawer selaras dengan rail header `#site-navigation`:
   ukuran 1rem dan tebal 600, warna mengikuti teks tema. */
.mobile-drawer-nav a {
	display: block;
	padding: 12px 20px;
	color: var(--color-text);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
}

.mobile-drawer-nav a:hover,
.mobile-drawer-nav a:focus-visible {
	color: var(--color-accent);
	text-decoration: none;
}

/* Item aktif (current menu) mengikuti aksen, sama seperti rail header. */
.mobile-drawer-nav li.current-menu-item > a,
.mobile-drawer-nav li.current-menu-ancestor > a,
.mobile-drawer-nav li.current-menu-parent > a {
	color: var(--color-accent);
}

/* Sosial media: menempel di dasar panel, terpisah garis, ikon rapi
   sejajar kiri dengan item menu lain. */
.mobile-drawer-social {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 12px 14px;
	list-style: none;
	border-top: 1px solid var(--color-border);
}

.mobile-drawer-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: var(--color-muted);
	transition: color 0.2s ease, background-color 0.2s ease;
}

.mobile-drawer-social-link svg {
	display: block;
	width: 18px;
	height: 18px;
}

.mobile-drawer-social-link:hover,
.mobile-drawer-social-link:focus-visible {
	color: var(--color-accent);
	background: var(--color-bg-alt);
	text-decoration: none;
}

/* Drawer sub-menus: tap accordion (the chevron is its own button injected
   by theme.js; CSS only styles the closed/open state of a list it carries
   `.is-collapsible` on, so a JS failure keeps them open). */
.mobile-drawer-nav .sub-menu {
	overflow: hidden;
}

.mobile-drawer-nav .sub-menu a {
	padding: 10px 20px 10px 34px;
	font-size: 0.875rem;
	font-weight: 400;
	color: var(--color-muted);
}

/* Garis tipis antar sub-item (mis. daftar kategori di dalam "Politik").
   Warna lebih lembut dari garis level-1 supaya hierarki tetap terbaca:
   garis tegas untuk item utama, garis samar untuk turunannya. */
.mobile-drawer-nav .sub-menu > li {
	border-bottom: 1px solid color-mix(in srgb, var(--color-border) 60%, transparent);
}

.mobile-drawer-nav .sub-menu > li:last-child {
	border-bottom: 0;
}

.mobile-drawer-nav .sub-menu a:hover,
.mobile-drawer-nav .sub-menu a:focus-visible {
	color: var(--color-accent);
}

.mobile-drawer-nav .menu-item-has-children > a::after {
	content: "";
	position: static;
	width: 1.1em;
	height: 1.1em;
	background-color: currentColor;
	-webkit-mask: var(--chevron-mask) center / contain no-repeat;
	mask: var(--chevron-mask) center / contain no-repeat;
	opacity: 0;
}

/* Buka/tutup sub-menu: transisi `max-height` (bukan display) supaya
   gulirnya halus. Nilai max-height besar dipakai saat terbuka agar
   sub-menu panjang tak terpotong. */
.mobile-drawer-nav .sub-menu.is-collapsible {
	max-height: 0;
	opacity: 0;
	transition: max-height 0.32s cubic-bezier(0.22, 0.61, 0.36, 1),
		opacity 0.24s ease;
}

.mobile-drawer-nav .sub-menu.is-collapsible.is-open {
	max-height: 60vh;
	opacity: 1;
}

.mobile-drawer-nav .menu-item-has-children > .drawer-submenu-row {
	display: flex;
	align-items: stretch;
}

.mobile-drawer-nav .drawer-submenu-row > a {
	flex: 1 1 auto;
	margin-right: 4px;
}

.mobile-drawer-nav .drawer-submenu-row > a::after {
	opacity: 1;
}

.mobile-drawer-nav .drawer-submenu-toggle {
	flex: 0 0 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--color-text);
	cursor: pointer;
	margin-right: 10px;
}

.mobile-drawer-nav .drawer-submenu-toggle::after {
	content: "";
	width: 1em;
	height: 1em;
	background-color: currentColor;
	-webkit-mask: var(--chevron-mask) center / contain no-repeat;
	mask: var(--chevron-mask) center / contain no-repeat;
	transform: rotate(0deg);
	transform-origin: center;
	transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mobile-drawer-nav .drawer-submenu-toggle[aria-expanded="true"]::after {
	transform: rotate(180deg);
}

.mobile-drawer-nav .menu-item-has-children.is-open > .drawer-submenu-row > .drawer-submenu-toggle,
.mobile-drawer-nav .drawer-submenu-toggle:hover,
.mobile-drawer-nav .drawer-submenu-toggle:focus-visible {
	color: var(--color-accent);
}

/* Hamburger button ------------------------------------------------- */
.menu-toggle {
	background: none;
	border: 0;
	border-radius: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--color-text);
	cursor: pointer;
	transition: color 0.2s ease, transform 0.2s ease;
}

.header-tools .menu-toggle {
	order: 3;
	display: none;
}

/*
 * Hamburger icon (SVG bar tiga baris, garis tengah lebih pendek).
 *
 * Sebelumnya ikon digambar dari tiga elemen CSS (span + ::before/::after)
 * yang morph jadi X saat dibuka. Ikon kini SVG, jadi aturan pseudo-element
 * lama dihapus. Umpan balik buka/tutup diberikan lewat rotasi halus pada
 * wadahnya: ditutup 0deg, dibuka 90deg.
 */
.menu-toggle-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	color: inherit;
	transition: transform 0.25s ease;
}

.menu-toggle-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon {
	transform: rotate(90deg);
}

/* Hormati preferensi tanpa animasi. */
@media (prefers-reduced-motion: reduce) {
	.menu-toggle-icon {
		transition: none;
	}

	.menu-toggle[aria-expanded="true"] .menu-toggle-icon {
		transform: none;
	}
}

.header-tools .menu-toggle:hover,
.mobile-drawer-close:hover {
	color: var(--color-accent);
}

.header-tools .menu-toggle:active,
.mobile-drawer-close:active {
	transform: scale(0.92);
}

.mobile-drawer-close {
	width: 40px;
	height: 40px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	border-radius: 0;
	color: var(--color-text);
	cursor: pointer;
}

/* Horizontal menu (desktop) ---------------------------------------------- */
.main-navigation {
	flex: 0 1 auto;
	min-width: 0;
}

.main-navigation .menu {
	list-style: none;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-start;
	margin: 0;
	padding: 0;
}

.main-navigation .menu > li {
	position: relative;
}

.main-navigation .menu > li > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 10px;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 600;
    transition: color 0.25s ease;
}

/*
 * Dropdown chevron.
 *
 * Rendered as an inline-flex child of the link (not a background image) so it
 * can rotate. It turns upside down while the pointer is anywhere inside the
 * parent item - including the open sub-menu - and returns to its default
 * downward state as soon as the pointer leaves.
 */
.main-navigation .menu > li.menu-item-has-children > a::after {
	content: "";
	position: static;
	flex: 0 0 auto;
	width: 1em;
	height: 1em;
	margin-left: 1px;
	background-color: currentColor;
	-webkit-mask: var(--chevron-mask) center / contain no-repeat;
	mask: var(--chevron-mask) center / contain no-repeat;
	transform: rotate(0deg);
	transform-origin: center;
	transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.2s ease;
	will-change: transform;
}

.main-navigation .menu > li.menu-item-has-children:hover > a::after,
.main-navigation .menu > li.menu-item-has-children:focus-within > a::after {
	transform: rotate(180deg);
}

.main-navigation .menu > li > a:hover,
.main-navigation .menu > li > a:focus {
	text-decoration: none;
}

.header-tools .icon-button:hover,
.header-tools .search-toggle:hover {
	color: var(--color-accent);
}

.header-tools .icon-button:active,
.header-tools .search-toggle:active {
	transform: scale(0.92);
}

.header-tools .icon-button svg,
.header-tools .search-toggle svg {
	display: block;
}
/*
 * Hover underline.
 *
 * Uses `::before` so it never competes with the chevron, which owns `::after`
 * on parent items. Sharing one pseudo-element meant the underline's
 * `position: absolute` / `left` / `right` / `transform-origin` leaked into the
 * chevron while a sub-menu was open, which made the arrow jump sideways as it
 * rotated.
 */
.main-navigation .menu > li > a::before {
	content: "";
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 6px;
	height: 2px;
	background: var(--color-accent);
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1) !important;
	will-change: transform;
}

.main-navigation .menu > li > a:hover::before,
.main-navigation .menu > li > a:focus-visible::before,
.main-navigation .menu > li.current-menu-item > a::before,
.main-navigation .menu > li.current-menu-ancestor > a::before,
.main-navigation .menu > li.current-menu-parent > a::before,
.main-navigation .menu > li:focus-within > a::before {
	transform: scaleX(1);
}

/* Menu items that are not hovered wipe back out to the right edge. */
.main-navigation .menu:hover > li:not(:hover) > a::before {
	transform-origin: right center;
}

.main-navigation .menu > li > a:hover,
.main-navigation .menu > li.current-menu-item > a,
.main-navigation .menu > li.current-menu-ancestor > a {
	color: var(--color-accent);
	background: var(--color-bg-alt);
	text-decoration: none;
}

/* Dropdown submenus. */
.main-navigation .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	list-style: none;
	margin: 0;
	padding: 6px 0;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
	z-index: 60;
}

.main-navigation .menu > li:hover > .sub-menu,
.main-navigation .menu > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.main-navigation .sub-menu li a {
	display: block;
	padding: 8px 16px;
	color: var(--color-text);
	font-size: 0.85rem;
}

.main-navigation .sub-menu li a:hover {
	color: var(--color-accent);
	background: var(--color-bg-alt);
	text-decoration: none;
}

/* ---- Portal panel (mobile rail) ---------------------------------------
   theme.js memindahkan `.sub-menu` ke `document.body` dengan class
   `.mobile-dropdown-portal` supaya lepas dari `overflow` rail dan
   `transform` header. Karena panel sudah TIDAK lagi di dalam
   `.main-navigation`, selector di sini sengaja tanpa prefix itu —
   kalau diprefix, tidak ada satu pun aturan yang cocok.

   Posisi/visibilitas ditulis inline oleh JS. Warna, padding, dan bentuk
   daftar diurus di sini supaya konsisten dengan tema (teks normal,
   aksen hanya saat hover). */

.sub-menu.mobile-dropdown-portal {
	display: block !important;
	position: fixed;
	list-style: none;
	margin: 0;
	padding: 6px 12px;
	width: max-content;
	max-width: calc(100vw - 16px);
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
	z-index: 99999;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	opacity: 1;
	visibility: visible;
}

.sub-menu.mobile-dropdown-portal > li {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 0;
}

.sub-menu.mobile-dropdown-portal > li > a {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 2px;
	/* Teks normal, bukan aksen: warna aksen hanya untuk hover/fokus. */
	color: var(--color-text);
	font-size: 0.88rem;
	font-weight: 400;
	line-height: 1.35;
	white-space: normal;
	text-decoration: none;
	background: none;
}

.sub-menu.mobile-dropdown-portal > li > a::before {
	content: "";
	flex: 0 0 auto;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.5;
}

.sub-menu.mobile-dropdown-portal > li > a:hover,
.sub-menu.mobile-dropdown-portal > li > a:focus-visible {
	color: var(--color-accent);
	background: none;
	text-decoration: none;
}

/* Search panel ----------------------------------------------------------- */
.header-search {
	border-top: 1px solid var(--color-border);
	padding: 14px 0;
	background: var(--color-bg-alt);
}

.header-search[hidden] {
	display: none;
}

/* Header ad area */
.header-ad {
	padding: 16px 0;
	text-align: center;
	border-top: 1px solid var(--color-border);
}

/* Desktop breakpoint: rail rules do not apply, menu flows inline. */
@media (min-width: 861px) {
	/* Chevron buttons only exist for touch; the desktop dropdown is
	   driven by :hover / :focus-within. */
	.nav-submenu-toggle {
		display: none;
	}
}

/* Mobile breakpoint: left to right, logo, search, dark mode. The primary
   menu becomes a swipeable horizontal rail under the header row, with
   tap-driven dropdowns. */
@media (max-width: 860px) {
	/* The header row is a flex line: logo, search, dark mode. `.header-tools`
	   becomes display:contents so its icons join the row and can be ordered
	   independently of one another. */
	.header-main-inner {
		flex-wrap: wrap;
		padding-block: 12px 0;
		min-height: 64px;
		column-gap: 10px;
		row-gap: 10px;
	}

	.header-tools {
		display: contents;
	}

	/* Visual order, left to right: hamburger, logo, search, dark mode.
	   The rail menu follows on its own line (order 5) below. */
	.header-main-inner .menu-toggle {
		display: inline-flex;
		order: 1;
		/* Left edge: the 40px box sits 11px inside the container line; pull it
		   out by that gutter so the bar strokes land on the 16px container
		   padding like the logo and the bars of the content below. */
		margin-left: -11px;
	}

	.header-main-inner .site-branding {
		order: 2;
		flex: 1 1 auto;
		min-width: 0;
	}

	.site-branding .custom-logo,
	.mobile-drawer-brand .custom-logo,
	.custom-logo {
		height: var(--header-logo-height-mobile);
		max-height: var(--header-logo-height-mobile);
	}

	.header-main-inner .search-toggle {
		order: 3;
	}

	.header-main-inner .darkmode-toggle {
		order: 4;
	}

	/* Icon buttons keep a fixed 40px tap target and never shrink. */
	.header-main-inner .menu-toggle,
	.header-main-inner .search-toggle,
	.header-main-inner .darkmode-toggle {
		flex: 0 0 auto;
	}

	/* Right edge: tombol 40px dengan ikon 20px di tengah, jadi glyph
	   ikut masuk 10px dari tepi kotak. `margin-right: -10px` menarik
	   kotak keluar supaya garis ikon jatuh tepat di tepi konten. */
	.header-main-inner .darkmode-toggle {
		margin-right: -10px;
		/* Jarak ke ikon search di kiri. `display: contents` pada
		   `.header-tools` membuat kedua tombol jadi anak langsung baris
		   header dan memakai `column-gap` induk (10px); tambahan 8px
		   memberi total ~28px antar kotak, cukup lega supaya dua ikon
		   tidak terasa menempel. */
		margin-left: -15px;
	}

	/* Search: gutter kanan dipakai jarak ke darkmode, jadi negatif
	   kompensasinya dibuang (dulu -10px; digabung dengan -10px milik
	   darkmode membuat gap induk tergerus habis). */
	.header-main-inner .search-toggle {
		margin-right: 0;
	}

	.darkmode-track {
		position: static;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		background: none;
		border: 0;
	}

	.darkmode-thumb {
		display: none;
	}

	/* Sun / moon keep their stroke weight but become static icons. */
	.darkmode-track .icon-sun,
	.darkmode-track .icon-moon {
		position: static;
		width: 20px;
		height: 20px;
		margin: 0;
		stroke: var(--color-text);
	}

	html:not(.gentar-dark) .darkmode-track .icon-sun,
	html.gentar-dark .darkmode-track .icon-moon {
		display: none;
	}

	html.gentar-dark .darkmode-track .icon-sun,
	html:not(.gentar-dark) .darkmode-track .icon-moon {
		display: block;
	}

	/* ---- Horizontal menu rail ----
	   One row, wider than the viewport when needed. The swipe happens on
	   `.main-navigation` (the scroller), so the track itself never wraps and
	   a dropdown can never stretch it. */
	.main-navigation .menu {
		flex-wrap: nowrap;
		width: max-content;
		min-width: 100%;
		border-top: 1px solid var(--color-border);
	}

	.main-navigation .menu > li {
		flex: 0 0 auto;
	}

	.main-navigation .menu > li > a {
		padding: 8px 10px;
		font-size: 0.9rem;
		white-space: nowrap;
	}

	/* Flush-left rail: cancel the first link inline padding so its text starts
	   on the container line, matching the logo above. */
	.main-navigation .menu > li:first-child > a {
		margin-left: 0;
		padding-left: 0;
	}

	/* Hover underline is unreliable on touch; the rail uses colour only. */
	.main-navigation .menu > li > a::before {
		display: none;
	}

	.main-navigation .menu > li > a:hover,
	.main-navigation .menu > li > a:focus-visible {
		background: none;
	}

	/* One chevron only: the desktop hover-chevron (a::after) is hidden;
	   the tap button carries the same mask icon, and it is the single
	   animated glyph. */
	.main-navigation .menu > li.menu-item-has-children > a::after {
		display: none;
	}

	/* Label + chevron on one row, spaced like the desktop dropdown (small gap,
	   1em icon). The parent link loses its right padding and the chevron box
	   grows to full row height: the icon then sits ~10px after the label,
	   close to the desktop 4px + 10px-padded look, with a comfortable tap
	   target. */
	.main-navigation .menu > li.menu-item-has-children > a {
		padding-right: 2px;
	}

	.main-navigation .menu > li.menu-item-has-children {
		display: flex;
		align-items: stretch;
	}

	/* Transparent tap target, only the icon renders — no button box. */
	.nav-submenu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: flex-start;
		flex: 0 0 28px;
		width: 28px;
		min-height: 40px;
		align-self: stretch;
		padding: 0;
		margin: 0 0 0 2px;
		background: none;
		border: 0;
		color: var(--color-text);
		cursor: pointer;
	}

	.nav-submenu-toggle::after {
		content: "";
		width: 1.2em;
		height: 1.2em;
		background-color: currentColor;
		-webkit-mask: var(--chevron-mask) center / contain no-repeat;
		mask: var(--chevron-mask) center / contain no-repeat;
		transform: rotate(0deg);
		transform-origin: center;
		transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
	}

	.nav-submenu-toggle:hover,
	.nav-submenu-toggle:focus-visible {
		color: var(--color-accent);
	}

	.nav-submenu-toggle[aria-expanded="true"]::after {
		transform: rotate(180deg);
	}

	/* Rail sits directly above the sub header: no bottom padding of its own,
	   so the gap between the last menu row and `.header-sub-wrap` is the
	   sub header's own border only. The rail is the horizontal scroller:
	   the track never wraps and a dropdown can never stretch it. */
	.main-navigation {
		position: relative;
		order: 5;
		flex: 1 0 100%;
		min-width: 0;
		padding-bottom: 0;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.main-navigation::-webkit-scrollbar {
		display: none;
	}

	/* Panel versi di-dalam-rail. Hanya dipakai saat JS gagal (tanpa JS
	   panel mengalir terbuka) atau saat panel diukur sesaat sebelum
	   dipindah ke body. Saat aktif, theme.js memindahkan `.sub-menu` ke
	   `document.body` sebagai `.mobile-dropdown-portal` dan menulis
	   posisinya inline; lihat blok portal di atas. */
	.main-navigation .sub-menu {
		position: fixed;
		top: var(--nav-panel-top, -9999px);
		bottom: var(--nav-panel-bottom, auto);
		left: var(--nav-panel-left, 16px);
		width: max-content;
		min-width: 150px;
		max-width: var(--nav-panel-max, calc(100vw - 32px));
		z-index: 900;
		max-height: var(--nav-panel-maxh, 280px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		margin: 2px 0 0;
		padding: 4px 12px 6px;
		border: 1px solid var(--color-border);
		border-radius: var(--radius);
		box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
		background: var(--color-bg);
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none !important;
	}

	/* Collapsed by default when JS is available (the chevron button opens
	   the portal copy, see below). Without JS the `no-js` class stays on
	   <html> and the dropdown simply flows open in the rail, so the links
	   stay reachable. */
	html:not(.no-js) .main-navigation .sub-menu {
		display: none;
	}

	html:not(.no-js) .main-navigation .sub-menu.is-open {
		display: block;
	}

	/* Sub items: compact, flush, with a small accent dot so the hierarchy
	   reads as a sub-list without a background panel. */
	.main-navigation .sub-menu li a {
		display: flex;
		align-items: center;
		gap: 8px;
		padding: 7px 2px;
		font-size: 0.85rem;
		white-space: normal;
		font-weight: 400;
		color: var(--color-text);
	}

	.main-navigation .sub-menu li a::before {
		content: "";
		flex: 0 0 auto;
		width: 4px;
		height: 4px;
		border-radius: 50%;
		background: currentColor;
		opacity: 0.5;
	}

	.main-navigation .sub-menu li a:first-of-type {
		margin-top: 2px;
	}

	.main-navigation .sub-menu li a:hover,
	.main-navigation .sub-menu li a:focus-visible {
		color: var(--color-accent);
	}

	/* The opened parent only needs its state colour; the sub-menu is a
	   floating panel and no longer participates in the rail row, so the item
	   never grows and the swipe track keeps its height. */
	.main-navigation .menu > li.menu-item-has-children.is-open > a {
		color: var(--color-accent);
	}
}



/* Sub header: popular tag / category strip under the main header.
   A translucent separator line splits it from the header above; the list
   scrolls horizontally on narrow screens without showing a scrollbar. */
.header-sub {
	border-top: 1px solid var(--header-sub-separator);
	border-bottom: 1px solid var(--color-border);
	font-size: 0.8125rem;
}

.header-sub__inner {
	display: flex;
	align-items: center;
	gap: 18px;
	height: var(--header-sub-height);
}

.header-sub__label {
	flex: none;
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--color-text);
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
}

.header-sub__label svg {
	width: 15px;
	height: 15px;
	color: var(--color-accent);
	flex: none;
}

.header-sub__list {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 22px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	overflow-y: hidden;
	white-space: nowrap;
	scrollbar-width: none;
	-ms-overflow-style: none;
	overscroll-behavior-y: contain;
	-webkit-overflow-scrolling: touch;
}

.header-sub__list::-webkit-scrollbar {
	display: none;
}

.header-sub__item {
	flex: none;
	margin: 0;
	padding: 0;
}

.header-sub__link {
	display: inline-block;
	color: color-mix(in srgb, var(--color-text) 72%, transparent);
	font-weight: 500;
	font-size: 14px;
	letter-spacing: 0.01em;
	text-decoration: none;
	transition: color 0.2s ease;
}

.header-sub__link:hover,
.header-sub__link:focus-visible {
	color: var(--color-accent);
	text-decoration: none;
}

@media (max-width: 860px) {
	.header-sub__inner {
		gap: 12px;
		height: 38px;
	}

	.header-sub__list {
		gap: 16px;
	}
}

/* ============================================================
   3. FOOTER
   Grid tiga kolom: identitas (logo + kontak + sosial) | halaman
   standar | menu footer. Latar memakai `--color-dark` (hitam).
   Baris bawah: teks hak cipta di bawah garis separator.
   ============================================================ */

.site-footer {
	background: var(--color-dark);
	color: #c3c7cd;
	margin-top: 30px;
	--color-text: #e7e9ee;
	--color-link: #ff5d74;
}

/* ==========================================================================
   SLOT IKLAN GLOBAL & FOOTER (<footer id="colophon">)
   ========================================================================== */
.gentar-ad-slot {
	clear: both;
	margin: 20px 0 32px;
	text-align: center;
	width: 100%;
}

.gentar-ad-slot .gentar-ad-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	text-align: center;
	margin: 0 auto;
}

.gentar-ad-slot .gentar-ad-label {
	display: block;
	font-family: var(--font-body);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--color-text) 72%, var(--color-bg-alt));
	margin-bottom: 6px;
	line-height: 1;
}

.gentar-ad-slot .gentar-ad-content {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	text-align: center;
}

/* Dukungan banner script Google AdSense / iframe / gambar */
.gentar-ad-slot .gentar-ad-content ins.adsbygoogle,
.gentar-ad-slot .gentar-ad-content iframe,
.gentar-ad-slot .gentar-ad-content img {
	max-width: 100%;
	margin: 0 auto;
	display: block;
}

.gentar-ad-slot .gentar-ad-content ins.adsbygoogle {
	width: 100%;
}

/* ============================================================
   Optimasi Kecepatan & Lazy Loading Iklan (PageSpeed Boost)
   ============================================================ */
.gentar-ad-slot--lazy {
	position: relative;
	contain: layout style;
}

.gentar-ad-slot--lazy:not(.is-loaded) .gentar-ad-content {
	min-height: var(--gentar-ad-min-height, 280px);
	position: relative;
	width: 100%;
}

.gentar-ad-slot--lazy.is-loaded .gentar-ad-content {
	min-height: 0;
}

/* Skeleton Shimmer Loading Placeholder (Mencegah CLS / Layout Shift) */
.gentar-ad-placeholder-shimmer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	min-height: var(--gentar-ad-min-height, 280px);
	background: color-mix(in srgb, var(--color-text) 3%, var(--color-bg-alt));
	border-radius: var(--radius);
	border: 1px dashed color-mix(in srgb, var(--color-text) 16%, var(--color-border));
	overflow: hidden;
	pointer-events: none;
	opacity: 1;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

.gentar-ad-placeholder-shimmer::after {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		transparent,
		color-mix(in srgb, var(--color-text) 5%, transparent),
		transparent
	);
	animation: gentar-ad-shimmer 2s infinite ease-in-out;
}

@keyframes gentar-ad-shimmer {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(200%);
	}
}

.gentar-ad-slot--lazy.is-loaded .gentar-ad-placeholder-shimmer {
	opacity: 0;
	visibility: hidden;
	display: none;
}

/* Sembunyikan slot otomatis jika Google AdSense melaporkan unfilled */
.gentar-ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
	display: none !important;
}

/* Kotak Placeholder Ads */
.gentar-ad-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 120px;
	background: color-mix(in srgb, var(--color-text) 3%, var(--color-bg-alt));
	border: 1px dashed color-mix(in srgb, var(--color-text) 22%, var(--color-border));
	border-radius: var(--radius);
	color: color-mix(in srgb, var(--color-text) 55%, var(--color-bg-alt));
	font-family: var(--font-body);
	font-size: 0.88rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.gentar-ad-placeholder:hover {
	background: color-mix(in srgb, var(--color-text) 6%, var(--color-bg-alt));
	border-color: color-mix(in srgb, var(--color-link) 40%, var(--color-border));
}

/* Khusus Slot Iklan Di Atas Footer (Above Footer) */
.gentar-ad-slot--footer {
	clear: both;
	margin: 36px 0 32px;
	width: 100%;
}

.gentar-ad-slot--footer + .site-footer {
	margin-top: 0;
}

.gentar-ad-slot--footer ins.adsbygoogle {
	width: 100% !important;
	max-width: 100%;
}

@media (min-width: 769px) {
	.gentar-ad-slot--footer .gentar-ad-placeholder {
		width: 100%;
		min-height: 130px;
	}
}

@media (max-width: 768px) {
	.gentar-ad-slot--footer {
		margin: 20px 0 24px;
		width: 100%;
	}

	.gentar-ad-slot--footer + .site-footer {
		margin-top: 0;
	}

	.gentar-ad-slot--footer .gentar-ad-wrapper {
		width: 100%;
		max-width: 100%;
		margin: 0;
	}

	.gentar-ad-slot--footer .gentar-ad-content {
		width: 100%;
		max-width: 100%;
	}

	.gentar-ad-slot--footer .gentar-ad-placeholder {
		width: 100%;
		max-width: 100%;
		min-height: 250px;
		height: auto;
		padding: 24px 16px;
	}

	.gentar-ad-slot--footer ins.adsbygoogle {
		width: 100% !important;
		max-width: 100%;
	}
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr;
	gap: 40px;
	padding-top: 48px;
	padding-bottom: 36px;
}

/* —— Kolom 1: identitas —— */

.footer-logo {
	display: inline-block;
	margin-bottom: 20px;
}

/* Logo footer mengikuti tinggi logo header (0.6x), nilainya tercetak
   oleh gentar_news_customizer_css() sebagai --footer-logo-height setelah
   publish. Saat preview, JS customizer-preview.js menyetel langsung.
   0px (ukuran asli) di header => auto di footer. */
.footer-logo .footer-logo-img,
.footer-logo img {
	display: block;
	width: auto;
	height: var(--footer-logo-height);
	max-width: 240px;
	/* Logo header kadang berwarna gelap (diseuaikan bg terang). Buat netral
	   supaya terbaca di footer gelap. */
	filter: brightness(0) invert(1);
	opacity: 0.95;
	transition: opacity 0.2s ease;
}

.footer-logo:hover .footer-logo-img {
	opacity: 1;
}

.footer-site-name {
	display: inline-block;
	margin-bottom: 20px;
	font-family: var(--font-heading);
	font-size: 1.35rem;
	font-weight: var(--heading-weight);
	color: #fff;
	text-decoration: none;
}

.footer-site-name:hover {
	color: var(--color-accent);
}

.footer-contact {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.footer-contact-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 12px;
	font-size: 0.875rem;
	line-height: 1.55;
}

.footer-contact-icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
	color: var(--color-accent);
}

.footer-contact-text {
	color: #c3c7cd;
	word-break: break-word;
}

.footer-contact-link {
	color: #c3c7cd;
	text-decoration: none;
	transition: color 0.2s ease;
}

.footer-contact-link:hover {
	color: var(--color-accent);
}

.footer-social {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: #e6e8eb;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.footer-social-link:hover,
.footer-social-link:focus-visible {
	color: var(--color-accent);
	border-color: var(--color-accent);
	background: rgba(255, 255, 255, 0.04);
	transform: translateY(-2px);
}

/* —— Kolom 2 & 3: judul + daftar tautan —— */

.footer-col-title {
	margin-bottom: 18px;
	padding-bottom: 10px;
	border-bottom: 0.9px solid var(--color-border);
	color: #fff;
	font-family: var(--font-heading);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
}

.footer-page-list,
.footer-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-page-list li,
.footer-menu-list li {
	margin: 0;
	padding: 0;
}

.footer-page-list li + li,
.footer-menu-list li + li {
	margin-top: 0;
}

.footer-page-list a,
.footer-menu-list a {
	display: block;
	padding: 6px 0;
	color: #c3c7cd;
	font-size: 0.875rem;
	line-height: 1.4;
	text-decoration: none;
	border-bottom: 0;
	transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-page-list a:hover,
.footer-menu-list a:hover {
	color: var(--color-accent);
	padding-left: 6px;
}

/* —— Baris bawah: hak cipta —— */

/*
 * Garis separator "ditabrak" tombol back-to-top.
 *
 * `border-top` tidak bisa dibelah per-elemen, jadi garisnya dipecah jadi
 * dua: pseudo-element yang duduk di belakang tombol, dan border kanan
 * tombol sendiri melanjutkan garisnya. Hasil visual: garis yang sama
 * berhenti tepat di tepi kiri & kanan lingkaran tombol.
 *
 * Geometri: di mobile tombol (36px) ada di tengah kolom (column-reverse),
 * jadi jarak tepi container ke tepi tombol = lebar kolom / 2 - 18px,
 * dengan lebar kolom = 100vw - 2 x padding container (16px). Diukur
 * terhadap `.footer-bottom` yang selebar layar penuh.
 *
 * Desktop tidak diubah: tombol duduk di ujung kanan, tumpang-tindih
 * garis hanya terjadi di tepi layar, bukan sesuatu yang terlihat.
 */
.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding-top: 18px;
	padding-bottom: 22px;
}

@media (max-width: 640px) {
	.footer-bottom {
		position: relative;
		/* Garis penuh lalu ditabrak: segmen kiri digambar oleh ::before
		   di bawah, segmen kanan oleh border-top tombol. `border-top`
		   dihapus supaya tidak ada garis yang menembus lingkaran. */
		border-top: 0;
		/* Ruang untuk "lubang" setinggi lingkaran: tombol duduk tepat
		   di posisi garis, jadi garis atas diganti border tombol.
		   Padding bawah dirapatkan karena tombol sudah turun setengah
		   tinggi ke dalam blok ini. */
		padding-top: 0;
		padding-bottom: 22px;
	}

	/* Segmen garis kiri: dari tepi kiri konten sampai tepi kiri tombol.
	   `left: 16px` = padding container (`.container` di <=860px) supaya
	   garis sejajar dengan tepi teks, bukan menempel ke tepi layar.
	   `top: 18px` = setengah tinggi tombol: garis mengiris pusat
	   lingkaran, sejajar dengan garis tengah huruf pada copyright. */
	.footer-bottom::before {
		content: '';
		position: absolute;
		top: 18px;
		left: 16px;
		right: calc(50% + 18px);
		height: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
		pointer-events: none;
	}

	.footer-bottom-inner {
		position: relative;
		/* Tombol menempel ke garis atas, teks di bawahnya. */
		padding-top: 18px;
	}

	/* Tombol digeser naik setengah tinggi lingkaran supaya pusatnya
	   pas di garis: garis jadi "menabrak" lingkaran, lalu lanjut
	   sebagai border-top tombol di sisi kanan. */
	.back-to-top {
		margin-top: -18px;
		/* Border atas + bawah tombol ikut membentuk segmen garis kanan. */
	}

	/* Segmen garis kanan: melanjutkan dari tepi kanan tombol ke tepi
	   kanan konten. Ditempel ke `.footer-bottom` (bukan inner) supaya
	   sumbu 50% sama dengan `::before`; 16px = padding container.
	   `top` wajib sama dengan `::before`. */
	.footer-bottom::after {
		content: '';
		position: absolute;
		top: 18px;
		left: calc(50% + 18px);
		right: 16px;
		height: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
		pointer-events: none;
	}
}

.footer-bottom-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.footer-copyright {
	margin: 0;
	font-size: 0.8125rem;
	color: #9aa0a8;
}

/* Back to top: lingkaran garis tipis di sisi kanan teks hak cipta. */
.back-to-top {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 50%;
	background: none;
	color: #e6e8eb;
	cursor: pointer;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.back-to-top:hover,
.back-to-top:focus-visible {
	color: var(--color-accent);
	border-color: var(--color-accent);
	background: rgba(255, 255, 255, 0.04);
	transform: translateY(-3px);
}

/* —— Responsif —— */

@media (max-width: 1000px) {
	.footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 32px;
	}

	/* Baris kedua: menu Footer melebar penuh (About + Halaman di baris 1). */
	.footer-menu-col {
		grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {
	.footer-grid {
		/* 2 baris: About sendiri di atas penuh,
		   Halaman + Menu Footer berdampingan di bawah. */
		grid-template-columns: 1fr 1fr;
		gap: 28px;
		padding-top: 30px;
		text-align: left;
	}

	.footer-about {
		grid-column: 1 / -1;
	}

	/* Batalkan span penuh milik query <=1000px: di mobile Halaman +
	   Menu Footer kembali berdampingan. */
	.footer-menu-col {
		grid-column: auto;
	}

	.footer-logo {
		margin-bottom: 16px;
	}

	/* Baris bawah: tombol di atas teks, rata tengah. `column-reverse`
	   yang membuat tombol duduk di tengah kolom, sehingga segmen garis
	   kiri/kanan di blok atas (`.footer-bottom::before/::after`) bisa
	   dihitung dari sumbu 50% + setengah lebar tombol (18px).
	   `gap: 8px` = jarak dari tepi bawah lingkaran (bukan pusatnya)
	   ke baris pertama teks copyright, jadi tetap terasa rapat tanpa
	   menempel. */
	.footer-bottom-inner {
		flex-direction: column-reverse;
		gap: 8px;
	}
}

/* ============================================================
   WIDGETS: POPULAR & RECENT POSTS (Sidebar)
   Daftar postingan terpopuler dan postingan terbaru:
   judul dengan section-title has-pulse, judul dua baris,
   meta tanggal, thumbnail 1:1 di kanan.
   ============================================================ */

.widget-popular,
.widget-recent {
	min-width: 0;
}

/* Judul widget mengikuti gaya `.section-title.has-pulse` */
.widget-popular .widget-popular-title,
.widget-recent .widget-recent-title {
	font-family: var(--font-heading);
	font-size: var(--section-title-size);
	font-weight: var(--heading-weight, 700);
	line-height: 1.25;
	margin: 0 0 16px;
	padding-bottom: 0;
	border-bottom: 0;
}

.widget-popular-title[hidden],
.widget-recent-title[hidden] {
	display: none;
}

/* Dot pulse dan garis aksen */
.widget-popular-title.has-pulse::before,
.widget-recent-title.has-pulse::before {
	content: "";
	flex: 0 0 auto;
	align-self: center;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--color-accent);
	box-shadow: 0 0 0 rgba(200, 16, 46, 0.65);
	animation: gentar-hero-pulsing 2s infinite !important;
}

.widget-popular-title::after,
.widget-recent-title::after {
	content: "";
	flex: 1 1 auto;
	align-self: center;
	height: 2px;
	margin-left: auto;
	background: var(--color-accent);
}

/* ---------- Daftar ---------- */

.widget-popular-list,
.widget-recent-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Reset aturan `.widget ul li` global */
.widget-popular .widget-popular-item,
.widget-recent .widget-recent-item {
	padding: 0;
	border-bottom: 0;
}

.widget-popular-item + .widget-popular-item,
.widget-recent-item + .widget-recent-item {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid var(--color-border);
}

.widget-popular-link,
.widget-recent-link {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	color: var(--color-text);
	text-decoration: none;
}

.widget-popular-link:hover,
.widget-popular-link:focus-visible,
.widget-recent-link:hover,
.widget-recent-link:focus-visible {
	color: var(--color-link);
	text-decoration: none;
}

/* Nomor urut peringkat (hanya Popular) */
.widget-popular-rank {
    flex: 0 0 auto;
    align-self: flex-start;
    margin-top: 2px;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    border: solid 1px var(--color-link);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: var(--color-link);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.widget-popular-rank-num {
	display: block;
	font-size: inherit;
	line-height: 1;
	transform: translateX(0.02em);
}

.widget-popular-link:hover .widget-popular-rank,
.widget-popular-link:focus-visible .widget-popular-rank {
	background: color-mix(in srgb, var(--color-link) 82%, #000);
	border-color: color-mix(in srgb, var(--color-link) 82%, #000);
	color: #fff;
	transform: translateY(-1px) scale(1.06);
}

.widget-popular-body,
.widget-recent-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	flex: 1 1 auto;
}

.widget-popular-heading,
.widget-recent-heading {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	min-width: 0;
	overflow-wrap: break-word;
	font-family: var(--font-heading);
	font-size: calc(var(--heading-size) * 0.84);
	font-weight: var(--heading-weight);
	line-height: 1.4;
	transition: color .2s ease;
}

.widget-popular-heading-text,
.widget-recent-heading-text {
	display: inline;
	background-image: linear-gradient(currentColor, currentColor);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 0 1px;
	transition: background-size .25s ease, color .2s ease;
}

.widget-popular-link:hover .widget-popular-heading,
.widget-popular-link:focus-visible .widget-popular-heading,
.widget-recent-link:hover .widget-recent-heading,
.widget-recent-link:focus-visible .widget-recent-heading {
	color: var(--color-link);
	text-decoration: none;
}

.widget-popular-link:hover .widget-popular-heading-text,
.widget-popular-link:focus-visible .widget-popular-heading-text,
.widget-recent-link:hover .widget-recent-heading-text,
.widget-recent-link:focus-visible .widget-recent-heading-text {
	color: var(--color-link);
	background-size: 100% 1px;
	text-decoration: none;
}

.widget-popular-meta,
.widget-recent-meta {
	display: flex;
	align-items: center;
	color: var(--color-muted);
	font-size: 0.72rem;
	line-height: 1.3;
}

.widget-popular-date,
.widget-recent-date {
	color: var(--color-muted);
}

.widget-popular-thumb {
	flex: 0 0 auto;
	width: 64px;
	aspect-ratio: 1 / 1;
	margin-left: auto;
	align-self: center;
	overflow: hidden;
	border-radius: 4px;
	background: var(--color-border);
}

.widget-recent-thumb {
	flex: 0 0 64px;
	width: 64px;
	aspect-ratio: 1 / 1;
	align-self: flex-start;
	overflow: hidden;
	border-radius: 4px;
	background: var(--color-border);
}

.widget-popular-thumb img,
.widget-recent-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.widget-popular-link:hover .widget-popular-thumb img,
.widget-popular-link:focus-visible .widget-popular-thumb img,
.widget-recent-link:hover .widget-recent-thumb img,
.widget-recent-link:focus-visible .widget-recent-thumb img {
	transform: scale(1.05);
}

.widget-popular-empty,
.widget-recent-empty {
	color: var(--color-muted);
	font-size: 0.85rem;
	margin: 0;
}

/* ---------- Mobile ---------- */

@media (max-width: 860px) {
	.widget-popular-rank {
		width: 34px;
		height: 34px;
		font-size: 1rem;
	}

	.widget-popular-heading,
	.widget-recent-heading,
	.nav-title {
		font-family: var(--font-heading);
		font-size: var(--heading-size-mobile);
		line-height: 1.25;
		-webkit-line-clamp: 3;
		line-clamp: 2;
	}

	.widget-popular-thumb {
		width: 70px;
	}

	.widget-recent-thumb {
		flex: 0 0 70px;
		width: 70px;
	}
}

/* --- Sticky Sidebar Widget (Desktop) ---
   Memastikan widget Berita Terbaru (.widget_gentar_recent) melayang
   dan melekat di layar saat pengguna scroll ke bawah di desktop.
   Sidebar di-stretch setinggi kolom konten agar batas sticky mencakup
   seluruh panjang artikel tanpa menabrak footer. */
@media (min-width: 861px) {
	.sidebar {
		align-self: stretch;
		height: 100%;
	}

	.sidebar .widget.widget_gentar_recent,
	.sidebar .widget_gentar_recent {
		position: -webkit-sticky;
		position: sticky;
		top: 24px;
		z-index: 10;
	}

	.admin-bar .sidebar .widget.widget_gentar_recent,
	.admin-bar .sidebar .widget_gentar_recent {
		top: 56px;
	}
}
