/*
Theme Name: TOMOO Theme
Theme URI: https://kajianpemikiran.org
Author: Begawan Negoro
Author URI: https://kajianpemikiran.org
Description: One Movement, One Opinion. Theme mandiri untuk kajianpemikiran.org — kajian pemikiran Islam berregister akademik sober: mobile-first, tipografi 17.5px/1.75, kolom teks 720px, dark mode toggle, teks Arab nash yang besar dan jelas, tanpa emoji (ikon inline SVG).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tomo
Tags: accessibility-ready, blog, grid-layout, custom-logo, custom-menu, featured-images, translation-ready, one-column, wide-blocks
*/

/* ==========================================================================
   1. CSS VARIABLES — Light (default) & Dark
   ========================================================================== */

:root {
	--kp-orange: #e85d04;
	--kp-orange-hover: #c24e03;
	--kp-cream: #d4a574;
	--kp-bg: #faf7f2;
	--kp-surface: #ffffff;
	--kp-heading: #1c1917;
	--kp-text: #292524;
	--kp-muted: #78716c;
	--kp-border: #e7e5e4;
	--kp-orange-soft: rgba(232, 93, 4, 0.08);
	--kp-cream-soft: rgba(212, 165, 116, 0.14);

	--font-heading: 'Merriweather', Georgia, 'Times New Roman', serif;
	--font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-arabic: 'Amiri', 'Scheherazade New', 'Traditional Arabic', 'Noto Naskh Arabic', 'Times New Roman', serif;

	--container: 1200px;
	--text-col: 720px;
	--radius: 8px;
	--radius-lg: 12px;
	--shadow: 0 1px 3px rgba(28, 25, 23, 0.06), 0 4px 14px rgba(28, 25, 23, 0.05);
	--shadow-lg: 0 8px 30px rgba(28, 25, 23, 0.12);
	--header-h: 58px;
	--header-h-desktop: 70px;
	--gap: 20px;
	--gap-lg: 25px;
	--transition: 0.2s ease;

	color-scheme: light;
}

[data-theme="dark"] {
	--kp-orange: #f97316;
	--kp-orange-hover: #fb923c;
	--kp-cream: #d4a574;
	--kp-bg: #121417;
	--kp-surface: #1c1f26;
	--kp-heading: #f5f5f4;
	--kp-text: #d6d3d1;
	--kp-muted: #a8a29e;
	--kp-border: #3f3f46;
	--kp-orange-soft: rgba(249, 115, 22, 0.12);
	--kp-cream-soft: rgba(212, 165, 116, 0.12);
	--shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.3);
	--shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);

	color-scheme: dark;
}

/* ==========================================================================
   2. RESET & BASE (mobile-first)
   ========================================================================== */

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

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

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.75;
	color: var(--kp-text);
	background-color: var(--kp-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

@media (min-width: 690px) {
	body { font-size: 17.5px; }
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	color: var(--kp-heading);
	line-height: 1.3;
	margin: 0 0 0.6em;
	overflow-wrap: break-word;
}

h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 19px; font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; }

@media (min-width: 690px) {
	h1 { font-size: 32px; }
	h2 { font-size: 26px; }
	h3 { font-size: 21px; }
}

p { margin: 0 0 1.5em; }

a {
	color: var(--kp-orange);
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color var(--transition);
}

a:hover { color: var(--kp-orange-hover); }

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

figure { margin: 0 0 1.5em; }

::selection {
	background: var(--kp-orange);
	color: #ffffff;
}

/* Skip link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--kp-orange);
	color: #fff;
	padding: 12px 20px;
	border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
	left: 0;
	top: 0;
}

/* Layout helpers */
.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: 20px;
}

@media (min-width: 690px) {
	.container { padding-inline: 40px; }
}

.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;
	word-wrap: normal !important;
}

/* ==========================================================================
   3. BUTTONS & CHIPS
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 22px;
	border-radius: var(--radius);
	border: 1.5px solid transparent;
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary {
	background: var(--kp-orange);
	color: #ffffff;
}

.btn-primary:hover {
	background: var(--kp-orange-hover);
	color: #ffffff;
}

.btn-outline {
	background: transparent;
	border-color: var(--kp-orange);
	color: var(--kp-orange);
}

.btn-outline:hover {
	background: var(--kp-orange-soft);
	color: var(--kp-orange);
}

.cat-chip {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--kp-orange-soft);
	color: var(--kp-orange);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	transition: background var(--transition);
}

.cat-chip:hover {
	background: rgba(232, 93, 4, 0.15);
	color: var(--kp-orange);
}

@media (min-width: 690px) {
	.btn { padding: 12px 26px; }
}

/* ==========================================================================
   4. HEADER — sticky, mobile-first
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 900;
	background: var(--kp-surface);
	border-bottom: 1px solid var(--kp-border);
	box-shadow: var(--shadow);
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	height: var(--header-h);
	transition: height var(--transition);
}

/* Shrink halus saat scroll */
.site-header.is-scrolled .site-header-inner {
	height: 52px;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.kp-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex: none;
	border-radius: var(--radius);
	background: var(--kp-orange);
	color: #ffffff;
	font-family: var(--font-arabic);
	font-size: 21px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: transform var(--transition), background var(--transition);
}

.kp-logo:hover {
	color: #ffffff;
	transform: translateY(-1px);
	background: var(--kp-orange-hover);
}

.site-title {
	font-family: var(--font-heading);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.site-title a {
	color: var(--kp-heading);
	text-decoration: none;
}

.site-title .site-tagline {
	display: block;
	font-family: var(--font-body);
	font-size: 11px;
	font-weight: 400;
	color: var(--kp-muted);
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* Desktop nav */
.main-nav { display: none; }

@media (min-width: 1000px) {
	.main-nav { display: block; }

	.main-nav .menu {
		display: flex;
		align-items: center;
		gap: 4px;
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.main-nav .menu > li { position: relative; }

	.main-nav .menu > li > a {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 8px 14px;
		color: var(--kp-text);
		font-size: 15.5px;
		font-weight: 600;
		text-decoration: none;
		border-radius: var(--radius);
		transition: color var(--transition), background var(--transition);
	}

	.main-nav .menu > li > a:hover,
	.main-nav .menu > li.current-menu-item > a,
	.main-nav .menu > li.current_page_item > a {
		color: var(--kp-orange);
		background: var(--kp-orange-soft);
	}

	/* Submenu dropdown (desktop) */
	.main-nav .sub-menu {
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 220px;
		list-style: none;
		margin: 0;
		padding: 8px;
		background: var(--kp-surface);
		border: 1px solid var(--kp-border);
		border-radius: var(--radius);
		box-shadow: var(--shadow-lg);
		opacity: 0;
		visibility: hidden;
		transform: translateY(6px);
		transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
		z-index: 50;
	}

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

	.main-nav .sub-menu a {
		display: block;
		padding: 10px 14px;
		border-radius: 6px;
		color: var(--kp-text);
		font-size: 14.5px;
		text-decoration: none;
	}

	.main-nav .sub-menu a:hover { color: var(--kp-orange); background: var(--kp-orange-soft); }
}

/* Header actions (search, theme, hamburger) */
.header-actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex: none;
	border: none;
	border-radius: var(--radius);
	background: transparent;
	color: var(--kp-text);
	cursor: pointer;
	transition: color var(--transition), background var(--transition);
}

.icon-btn:hover {
	color: var(--kp-orange);
	background: var(--kp-orange-soft);
}

.icon-btn svg {
	width: 22px;
	height: 22px;
	stroke-width: 1.8;
}

/* Toggle tema: sun (light) / moon (dark) */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Hamburger hanya tampil di mobile/tablet */
.menu-toggle { display: inline-flex; }

@media (min-width: 1000px) {
	.menu-toggle { display: none; }
}

/* ==========================================================================
   5. SEARCH BOX (dropdown di bawah header)
   ========================================================================== */

.search-box {
	display: none;
	background: var(--kp-surface);
	border-bottom: 1px solid var(--kp-border);
	padding: 12px 0 16px;
}

.search-box.is-open { display: block; }

.search-form {
	display: flex;
	gap: 10px;
	max-width: 640px;
	margin-inline: auto;
}

.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	min-height: 48px;
	padding: 10px 16px;
	font-family: var(--font-body);
	font-size: 16px;
	color: var(--kp-text);
	background: var(--kp-bg);
	border: 1.5px solid var(--kp-border);
	border-radius: var(--radius);
	transition: border-color var(--transition);
}

.search-form input[type="search"]:focus {
	outline: none;
	border-color: var(--kp-orange);
}

.search-form button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 20px;
	flex: none;
	background: var(--kp-orange);
	color: #ffffff;
	border: none;
	border-radius: var(--radius);
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background var(--transition);
}

.search-form button:hover { background: var(--kp-orange-hover); }

.search-form button svg { width: 18px; height: 18px; }

/* ==========================================================================
   6. OFF-CANVAS MOBILE MENU
   ========================================================================== */

.off-canvas {
	position: fixed;
	inset: 0;
	z-index: 1000;
	visibility: hidden;
	pointer-events: none;
}

.off-canvas.is-open { visibility: visible; pointer-events: auto; }

.off-canvas-overlay {
	position: absolute;
	inset: 0;
	background: rgba(18, 16, 15, 0.5);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.off-canvas.is-open .off-canvas-overlay { opacity: 1; }

.off-canvas-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(340px, 88vw);
	background: var(--kp-surface);
	box-shadow: var(--shadow-lg);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.28s ease;
	padding-bottom: env(safe-area-inset-bottom);
}

.off-canvas.is-open .off-canvas-panel { transform: translateX(0); }

.off-canvas-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	border-bottom: 1px solid var(--kp-border);
}

.off-canvas-title {
	font-family: var(--font-heading);
	font-size: 16px;
	font-weight: 700;
	color: var(--kp-heading);
}

.off-canvas-close { margin-left: auto; }

.off-canvas .menu {
	list-style: none;
	margin: 0;
	padding: 8px 0;
	overflow-y: auto;
	flex: 1;
}

.off-canvas .menu > li > a {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 10px 20px;
	color: var(--kp-text);
	font-size: 17px;
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px solid var(--kp-border);
	transition: color var(--transition), background var(--transition);
}

.off-canvas .menu > li > a:hover,
.off-canvas .menu > li.current-menu-item > a,
.off-canvas .menu > li.current_page_item > a {
	color: var(--kp-orange);
	background: var(--kp-orange-soft);
}

.off-canvas .sub-menu { list-style: none; margin: 0; padding: 0 0 0 20px; }

.off-canvas .sub-menu a {
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 20px;
	color: var(--kp-muted);
	font-size: 15.5px;
	text-decoration: none;
	border-bottom: 1px solid var(--kp-border);
}

.off-canvas .sub-menu a:hover { color: var(--kp-orange); }

.off-canvas-footer {
	padding: 16px 20px;
	padding-bottom: calc(16px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--kp-border);
}

body.menu-open { overflow: hidden; }

/* ==========================================================================
   7. LAYOUT UTAMA & HERO
   ========================================================================== */

.site-main {
	min-height: 60vh;
	padding: 32px 0 56px;
}

@media (min-width: 690px) {
	.site-main { padding: 48px 0 72px; }
}

/* Breadcrumb (archive/single) */
.kp-breadcrumb {
	font-size: 13.5px;
	color: var(--kp-muted);
	margin-bottom: 20px;
}

.kp-breadcrumb a { color: var(--kp-muted); text-decoration: none; }
.kp-breadcrumb a:hover { color: var(--kp-orange); }
.kp-breadcrumb .sep { margin: 0 8px; color: var(--kp-border); }

/* Hero — beranda (fallback bila tanpa Gutenberg hero) */
.hero {
	background: var(--kp-bg);
	padding: 64px 0 40px;
	border-bottom: 1px solid var(--kp-border);
}

@media (min-width: 690px) {
	.hero { padding: 96px 0 56px; }
}

.hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--kp-muted);
	margin-bottom: 16px;
}

.hero-eyebrow svg { width: 14px; height: 14px; color: var(--kp-orange); }

.hero-title {
	font-size: 30px;
	line-height: 1.25;
	max-width: 720px;
	margin-bottom: 16px;
}

@media (min-width: 690px) {
	.hero-title { font-size: 44px; }
}

.hero-sub {
	font-size: 17px;
	line-height: 1.75;
	color: var(--kp-muted);
	max-width: 640px;
	margin-bottom: 28px;
}

@media (min-width: 690px) {
	.hero-sub { font-size: 18px; }
}

.hero-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

@media (min-width: 600px) {
	.hero-actions { flex-direction: row; }
}

.hero-meta {
	margin-top: 28px;
	font-size: 13.5px;
	color: var(--kp-muted);
}

/* Section judul di beranda */
.section-head {
	margin-bottom: 24px;
}

.section-title {
	font-size: 22px;
	margin-bottom: 6px;
}

@media (min-width: 690px) {
	.section-title { font-size: 26px; }
}

.section-sub {
	font-size: 15px;
	color: var(--kp-muted);
}

/* ==========================================================================
   8. POST GRID — kartu 3 kolom (archive & beranda)
   ========================================================================== */

.post-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--gap);
	list-style: none;
	margin: 0 0 32px;
	padding: 0;
}

@media (min-width: 600px) {
	.post-grid { grid-template-columns: repeat(2, 1fr); gap: var(--gap-lg); }
}

@media (min-width: 1000px) {
	.post-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
	display: flex;
	flex-direction: column;
	background: var(--kp-surface);
	border: 1px solid var(--kp-border);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow);
	overflow: hidden;
	transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.post-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-lg);
	border-color: var(--kp-cream);
}

.post-card-thumb {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--kp-cream-soft);
	overflow: hidden;
}

.post-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.post-card:hover .post-card-thumb img { transform: scale(1.03); }

.post-card-thumb .thumb-fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--kp-cream);
}

.post-card-thumb .thumb-fallback svg { width: 42px; height: 42px; stroke-width: 1.4; }

.post-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 10px;
	padding: 20px;
}

.post-card-cats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.post-card-title {
	font-size: 19px;
	line-height: 1.4;
	margin: 0;
}

.post-card-title a {
	color: var(--kp-heading);
	text-decoration: none;
	transition: color var(--transition);
}

.post-card-title a:hover { color: var(--kp-orange); }

.post-card-excerpt {
	font-size: 15.5px;
	line-height: 1.65;
	color: var(--kp-muted);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.post-card-meta {
	margin-top: auto;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--kp-muted);
}

.post-card-meta svg { width: 15px; height: 15px; flex: none; color: var(--kp-cream); }

/* Kartu featured (Artikel Pilihan) */
.post-card.featured {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: 1fr;
}

@media (min-width: 690px) {
	.post-card.featured {
		grid-template-columns: 1.1fr 1fr;
	}

	.post-card.featured .post-card-thumb { aspect-ratio: auto; height: 100%; }

	.post-card.featured .post-card-body { padding: 32px; }

	.post-card.featured .post-card-title { font-size: 26px; }

	.post-card.featured .post-card-excerpt {
		-webkit-line-clamp: 3;
		font-size: 16.5px;
	}
}

/* ==========================================================================
   9. ARCHIVE HEADER & PAGINATION
   ========================================================================== */

.archive-header {
	padding-bottom: 24px;
	margin-bottom: 32px;
	border-bottom: 1px solid var(--kp-border);
}

.archive-title {
	font-size: 26px;
	margin-bottom: 8px;
}

@media (min-width: 690px) {
	.archive-title { font-size: 32px; }
}

.archive-desc {
	font-size: 16px;
	color: var(--kp-muted);
	max-width: 640px;
	margin: 0;
}

.archive-count {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--kp-orange);
	background: var(--kp-orange-soft);
	padding: 4px 12px;
	border-radius: 999px;
	margin-bottom: 12px;
}

.pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
	flex-wrap: wrap;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border-radius: var(--radius);
	border: 1px solid var(--kp-border);
	background: var(--kp-surface);
	color: var(--kp-text);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.pagination .page-numbers.current {
	background: var(--kp-orange);
	border-color: var(--kp-orange);
	color: #ffffff;
}

.pagination .page-numbers:hover:not(.current) {
	border-color: var(--kp-orange);
	color: var(--kp-orange);
}

/* Empty state */
.no-results {
	background: var(--kp-surface);
	border: 1px dashed var(--kp-border);
	border-radius: var(--radius-lg);
	padding: 40px 24px;
	text-align: center;
}

.no-results svg {
	width: 40px;
	height: 40px;
	color: var(--kp-cream);
	margin-bottom: 12px;
}

.no-results p { color: var(--kp-muted); margin-bottom: 20px; }

/* ==========================================================================
   10. ARTICLE (single) — tipografi inti 17.5px/1.75, kolom 720px
   ========================================================================== */

.single-wrapper { max-width: var(--text-col); margin-inline: auto; }

.entry-header {
	margin-bottom: 32px;
}

.entry-title {
	font-size: 28px;
	line-height: 1.3;
	margin-bottom: 16px;
}

@media (min-width: 690px) {
	.entry-title { font-size: 36px; }
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	font-size: 14px;
	color: var(--kp-muted);
	margin-bottom: 20px;
}

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

.entry-meta svg { width: 15px; height: 15px; color: var(--kp-cream); }

.entry-meta a { color: var(--kp-muted); text-decoration: none; }
.entry-meta a:hover { color: var(--kp-orange); }

.entry-thumbnail {
	margin-bottom: 28px;
	border-radius: var(--radius-lg);
	overflow: hidden;
}

/* Konten artikel */
.entry-content {
	max-width: var(--text-col);
	margin-inline: auto;
	font-size: 17px;
	line-height: 1.75;
}

@media (min-width: 690px) {
	.entry-content { font-size: 17.5px; }
}

.entry-content > * {
	margin-bottom: 1.5em;
}

.entry-content h2 {
	margin-top: 1.6em;
}

.entry-content h3 {
	margin-top: 1.4em;
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.4em;
}

.entry-content li { margin-bottom: 0.5em; }

.entry-content img {
	border-radius: var(--radius);
}

.entry-content .wp-caption,
.entry-content figure {
	max-width: 100%;
}

.entry-content .wp-caption-text,
.entry-content figcaption {
	font-size: 14px;
	font-style: italic;
	color: var(--kp-muted);
	text-align: center;
	padding-top: 8px;
}

/* Blockquote akademik — sober */
.entry-content blockquote {
	margin: 1.8em 0;
	padding: 1em 1.25em;
	border-left: 4px solid var(--kp-cream);
	background: var(--kp-cream-soft);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-style: italic;
	color: var(--kp-text);
}

.entry-content blockquote p:last-child { margin-bottom: 0; }

/* Tabel */
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--kp-border);
	padding: 10px 14px;
	text-align: left;
}

.entry-content th {
	background: var(--kp-surface);
	font-family: var(--font-heading);
	color: var(--kp-heading);
}

/* ==========================================================================
   11. TEKS ARAB — nash harus besar & jelas
   ========================================================================== */

.entry-content [lang="ar"],
.entry-content span[lang="ar"],
.entry-content p[lang="ar"] {
	display: block;
	direction: rtl;
	text-align: right;
	font-family: var(--font-arabic);
	font-size: 1.5em;
	line-height: 2;
	font-weight: 400;
	color: var(--kp-heading);
	margin: 1.4em 0;
	unicode-bidi: isolate;
	overflow-wrap: break-word;
}

/* Transliterasi/terjemahan yang mengikuti nash */
.entry-content [lang="ar"] + p,
.entry-content p:has(+ [lang="ar"]) {
	font-style: italic;
	color: var(--kp-muted);
}

/* ==========================================================================
   12. NAVIGASI PREV/NEXT + ARTIKEL TERKAIT
   ========================================================================== */

.post-navigation {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--kp-border);
}

@media (min-width: 690px) {
	.post-navigation { flex-direction: row; }
}

.post-navigation a {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 18px;
	border: 1px solid var(--kp-border);
	border-radius: var(--radius-lg);
	background: var(--kp-surface);
	color: var(--kp-text);
	text-decoration: none;
	transition: border-color var(--transition), box-shadow var(--transition);
}

.post-navigation a:hover {
	border-color: var(--kp-orange);
	box-shadow: var(--shadow);
}

.post-navigation .nav-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--kp-muted);
}

.post-navigation .nav-label svg { width: 15px; height: 15px; color: var(--kp-orange); }

.post-navigation a.next-post .nav-label { justify-content: flex-end; }

.post-navigation .nav-title {
	font-family: var(--font-heading);
	font-size: 15.5px;
	line-height: 1.45;
	color: var(--kp-heading);
}

/* Artikel Terkait */
.related-posts {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--kp-border);
}

.related-title {
	font-size: 20px;
	margin-bottom: 20px;
}

.related-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.related-list li {
	border-left: 3px solid var(--kp-cream);
	padding-left: 14px;
}

.related-list a {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-family: var(--font-heading);
	font-size: 16px;
	line-height: 1.5;
	color: var(--kp-heading);
	text-decoration: none;
	transition: color var(--transition);
}

.related-list a:hover { color: var(--kp-orange); }

.related-list a svg {
	width: 16px;
	height: 16px;
	flex: none;
	margin-top: 5px;
	color: var(--kp-cream);
}

/* ==========================================================================
   13. FOOTER — 3 kolom
   ========================================================================== */

.site-footer {
	background: var(--kp-surface);
	border-top: 1px solid var(--kp-border);
	padding: 48px 0 0;
	margin-top: 32px;
}

.footer-widgets {
	display: grid;
	grid-template-columns: 1fr;
	gap: 36px;
	padding-bottom: 40px;
}

@media (min-width: 690px) {
	.footer-widgets {
		grid-template-columns: repeat(3, 1fr);
		gap: 40px;
	}
}

.footer-widget h3,
.footer-widget .widget-title {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--kp-heading);
	margin-bottom: 16px;
}

.footer-brand { display: flex; flex-direction: column; gap: 14px; }

.footer-logo-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.footer-brand .kp-logo {
	width: 42px;
	height: 42px;
	font-size: 22px;
}

.footer-brand-name {
	font-family: var(--font-heading);
	font-size: 17px;
	font-weight: 700;
	color: var(--kp-heading);
}

.footer-tagline {
	font-size: 14.5px;
	line-height: 1.7;
	color: var(--kp-muted);
	margin: 0;
}

.footer-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.footer-widget ul li + li { margin-top: 2px; }

.footer-widget ul a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 6px 0;
	color: var(--kp-muted);
	font-size: 15px;
	text-decoration: none;
	transition: color var(--transition);
}

.footer-widget ul a:hover { color: var(--kp-orange); }

.footer-bottom {
	border-top: 1px solid var(--kp-border);
	padding: 20px 0;
	padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.footer-bottom-inner {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-start;
}

@media (min-width: 690px) {
	.footer-bottom-inner {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}

.footer-copyright {
	font-size: 13.5px;
	color: var(--kp-muted);
	margin: 0;
}

.footer-copyright a { color: var(--kp-muted); }
.footer-copyright a:hover { color: var(--kp-orange); }

.footer-copyright .academic-cap { color: var(--kp-orange); }

.footer-legal {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-legal a {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	font-size: 13.5px;
	color: var(--kp-muted);
	text-decoration: none;
}

.footer-legal a:hover { color: var(--kp-orange); }

/* ==========================================================================
   14. HALAMAN STATIS (page.php) & GUTENBERG
   ========================================================================== */

.page-wrapper { max-width: var(--text-col); margin-inline: auto; }

.page-header { margin-bottom: 28px; }

.page-title {
	font-size: 28px;
	margin-bottom: 12px;
}

@media (min-width: 690px) {
	.page-title { font-size: 34px; }
}

/* Gutenberg align */
.alignwide { margin-inline: calc(-4vw); max-width: none; }
.alignfull { margin-inline: 0; max-width: none; width: 100%; }

@media (min-width: 690px) {
	.alignwide { margin-inline: calc(-120px); }
}

.wp-block-image img { border-radius: var(--radius); }

.wp-block-quote,
.wp-block-pullquote {
	border-left: 4px solid var(--kp-cream);
	background: var(--kp-cream-soft);
	padding: 1em 1.25em;
	border-radius: 0 var(--radius) var(--radius) 0;
	margin: 1.8em 0;
}

.wp-block-pullquote blockquote { border: none; background: none; padding: 0; margin: 0; }

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 22px;
	border-radius: var(--radius);
	background: var(--kp-orange);
	color: #ffffff;
	font-weight: 600;
	text-decoration: none;
}

.wp-block-button__link:hover { background: var(--kp-orange-hover); color: #ffffff; }

/* ==========================================================================
   15. DARK MODE — sentuhan khusus
   ========================================================================== */

[data-theme="dark"] .kp-logo {
	background: var(--kp-orange);
}

[data-theme="dark"] .post-card-thumb { background: rgba(212, 165, 116, 0.08); }

[data-theme="dark"] .entry-content [lang="ar"] {
	color: var(--kp-heading);
}

[data-theme="dark"] img {
	filter: brightness(0.92) contrast(1.02);
}

[data-theme="dark"] .thumb-fallback svg,
[data-theme="dark"] .post-card-meta svg { color: var(--kp-cream); }

/* ==========================================================================
   15. KOMENTAR & 404
   ========================================================================== */

.comments-area {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--kp-border);
}

.comments-title {
	font-size: 20px;
	margin-bottom: 20px;
}

.comment-list,
.comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list > .comment + .comment,
.comment-list > li:not(.comment) + .comment { margin-top: 24px; }

.comment-body {
	background: var(--kp-surface);
	border: 1px solid var(--kp-border);
	border-radius: var(--radius-lg);
	padding: 20px;
}

.comment-list .children { margin: 16px 0 0 24px; }

.comment-author { font-weight: 700; color: var(--kp-heading); }
.comment-author .avatar { border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.comment-metadata { font-size: 13px; color: var(--kp-muted); margin-bottom: 10px; }
.comment-metadata a { color: var(--kp-muted); text-decoration: none; }
.comment-content { font-size: 15.5px; line-height: 1.7; }

.comment-content p:last-child { margin-bottom: 0; }

.reply { margin-top: 10px; }
.comment-reply-link {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 6px 14px;
	font-size: 14px;
	font-weight: 600;
	border: 1px solid var(--kp-border);
	border-radius: var(--radius);
	color: var(--kp-text);
	text-decoration: none;
}
.comment-reply-link:hover { border-color: var(--kp-orange); color: var(--kp-orange); }

.comments-area .comment-form { margin-top: 28px; }
.comments-area .comment-form label { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 6px; }
.comments-area .comment-form input[type="text"],
.comments-area .comment-form input[type="email"],
.comments-area .comment-form input[type="url"],
.comments-area .comment-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--kp-border);
	border-radius: var(--radius);
	background: var(--kp-surface);
	color: var(--kp-text);
	font-family: var(--font-body);
	font-size: 16px;
}
.comments-area .comment-form input:focus,
.comments-area .comment-form textarea:focus {
	outline: 2px solid var(--kp-orange);
	outline-offset: 1px;
	border-color: var(--kp-orange);
}
.comments-area .comment-form .submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 22px;
	border: none;
	border-radius: var(--radius);
	background: var(--kp-orange);
	color: #ffffff;
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}
.comments-area .comment-form .submit:hover { background: var(--kp-orange-hover); }

.comments-area .comment-notes,
.comments-area .logged-in-as { font-size: 14px; color: var(--kp-muted); }

/* 404 */
.error-404 { padding: 40px 0; }
.error-404 .page-title { margin-bottom: 16px; }
.error-404 p { max-width: 640px; }
.error-404-subtitle {
	font-size: 18px;
	margin: 32px 0 16px;
}
.error-404-links {
	list-style: none;
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	max-width: 640px;
	margin: 0 0 32px;
	padding: 0;
}

@media (min-width: 600px) {
	.error-404-links { grid-template-columns: repeat(2, 1fr); }
}

.error-404-links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 16px;
	background: var(--kp-surface);
	border: 1px solid var(--kp-border);
	border-radius: var(--radius);
	color: var(--kp-text);
	font-weight: 600;
	text-decoration: none;
}
.error-404-links a:hover { border-color: var(--kp-orange); color: var(--kp-orange); }

/* ==========================================================================
   16. ACCESSIBILITY & MISC
   ========================================================================== */

:focus-visible {
	outline: 2px solid var(--kp-orange);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Tap target ≥ 44px di mobile (elemen interaktif utama) */
@media (max-width: 689px) {
	.site-header a,
	.site-footer a,
	.entry-content a[href],
	.pagination a,
	.pagination span {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}

	.btn,
	.wp-block-button__link { width: 100%; justify-content: center; }

	.post-card-title a {
		min-height: 0;
		display: inline;
	}

	.footer-widget ul a,
	.footer-legal a { min-height: 44px; }
}

/* Pilihan gerak berkurang */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Print — artikel layak dicetak */
@media print {
	.site-header,
	.site-footer,
	.post-navigation,
	.related-posts,
	.search-box,
	.off-canvas { display: none !important; }

	body { background: #fff; color: #000; font-size: 12pt; }

	.entry-content { max-width: 100%; }
}

/* ==========================================================================
   HOMEPAGE — Kajian Pilihan / Artikel Terbaru / Pilar Kajian
   Ditambahkan sesuai redesign yang disetujui (lihat mockup Design Canvas).
   ========================================================================== */

/* --- Kicker label (dipakai di atas tiap heading section) --- */
.kp-kicker {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--kp-orange-hover) !important;
	margin-bottom: 14px;
}
.kp-kicker .kp-kicker-rule {
	width: 28px;
	height: 2px;
	background: var(--kp-orange);
	display: block !important;
	flex-shrink: 0;
}
.kp-kicker.on-dark { color: var(--kp-orange) !important; }
.kp-kicker.on-dark .kp-kicker-rule { background: var(--kp-orange); }

/* --- Artikel Pilihan: kartu editorial dengan drop cap + panel gelap --- */
.kp-featured-card {
	border-top: 3px solid var(--kp-orange) !important;
	border-left: 1px solid var(--kp-border);
	border-right: 1px solid var(--kp-border);
	border-bottom: 1px solid var(--kp-border);
}
.kp-featured-card .wp-block-column:first-child { padding: 44px !important; }
.kp-featured-tag {
	display: inline-block;
	background: var(--kp-orange);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 3px;
}
.kp-featured-card p.has-drop-cap:first-of-type::first-letter {
	font-family: var(--font-heading);
	color: var(--kp-orange);
	font-weight: 900;
}
.kp-featured-visual {
	background: var(--kp-heading);
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="84" height="84"><g fill="none" stroke="%23e8b98a" stroke-width="1" opacity="0.18"><path d="M42 4 L58 22 L58 46 L42 64 L26 46 L26 22 Z"/><path d="M42 4 L42 64 M4 42 L80 42"/><path d="M12 12 L42 4 L72 12 L80 42 L72 72 L42 80 L12 72 L4 42 Z"/></g></svg>');
	background-size: 84px 84px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 240px;
}
.kp-featured-visual span {
	font-family: var(--font-arabic);
	color: #f2e6d3;
	font-size: 56px;
}

/* --- Artikel Terbaru: grid bernomor --- */
.kp-post-card {
	background: var(--kp-surface);
	border: 1px solid var(--kp-border);
	position: relative;
	transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
	counter-increment: kp-post;
}
.kp-latest .wp-block-post-template { counter-reset: kp-post; }
.kp-post-card::before {
	content: counter(kp-post, decimal-leading-zero);
	position: absolute;
	top: 24px;
	right: 26px;
	font-family: var(--font-heading);
	font-size: 40px;
	font-weight: 900;
	color: var(--kp-bg);
	z-index: 0;
}
.kp-post-card > * { position: relative; z-index: 1; }
.kp-post-card:hover {
	border-color: var(--kp-orange);
	transform: translateY(-3px);
	box-shadow: var(--shadow-lg);
}
.kp-post-card .wp-block-post-terms a {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--kp-orange-hover);
	text-decoration: none;
}

/* --- Pilar Kajian: band gelap + ikon --- */
.kp-pillars .kp-pillar-icon {
	width: 30px;
	height: 30px;
	color: var(--kp-orange);
	margin-bottom: 14px;
	display: block;
}
.kp-pillars .kp-pillar-icon svg { width: 100%; height: 100%; }
.kp-pillars h3 { color: inherit; }
.kp-pillars a { color: var(--kp-orange); }

/* --- Mega-dropdown "Kajian" (2 kolom, lebih lebar dari sub-menu biasa) --- */
.main-nav .menu-item-has-children.kp-mega .sub-menu {
	min-width: 420px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px 24px;
	padding: 16px;
	border-top: 3px solid var(--kp-orange);
}
.main-nav .menu-item-has-children.kp-mega .sub-menu li { width: 100%; }

/* --- Footer: form langganan email --- */
.footer-subscribe { margin-top: 20px; }
.footer-subscribe-label {
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--kp-heading);
	margin-bottom: 10px;
}
.footer-subscribe-form {
	display: flex;
	max-width: 300px;
	border: 1px solid var(--kp-border);
	border-radius: 6px;
	overflow: hidden;
	background: var(--kp-bg);
}
.footer-subscribe-form input[type="email"] {
	flex: 1;
	min-width: 0;
	border: none;
	background: transparent;
	padding: 10px 12px;
	font-size: 13.5px;
	font-family: inherit;
	color: var(--kp-text);
	outline: none;
}
.footer-subscribe-form button {
	background: var(--kp-orange);
	color: #fff;
	border: none;
	padding: 0 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color var(--transition);
}
.footer-subscribe-form button:hover { background: var(--kp-orange-hover); }
.footer-subscribe-note {
	font-size: 12px;
	color: var(--kp-muted);
	margin-top: 8px;
}

/* --- Hero: pola geometris Islam di background + watermark huruf Arab --- */
.kp-hero.wp-block-cover {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="84" height="84"><g fill="none" stroke="%23e8b98a" stroke-width="1" opacity="0.14"><path d="M42 4 L58 22 L58 46 L42 64 L26 46 L26 22 Z"/><path d="M42 4 L42 64 M4 42 L80 42"/><path d="M12 12 L42 4 L72 12 L80 42 L72 72 L42 80 L12 72 L4 42 Z"/></g></svg>');
	background-size: 84px 84px;
}
.kp-hero .kp-hero-mark,
span.kp-hero-mark[lang="ar"] {
	display: block !important;
	direction: ltr !important;
	text-align: center !important;
	font-family: var(--font-arabic) !important;
	font-size: clamp(90px, 14vw, 220px) !important;
	line-height: 1 !important;
	font-weight: 400 !important;
	color: rgba(232, 185, 138, 0.16) !important;
	margin: 0 !important;
	width: 100%;
}
@media (max-width: 689px) {
	.kp-hero .wp-block-columns { flex-wrap: wrap; }
	.kp-hero-mark { display: none; }
}
