/*
 * JK SUPER: Post Cards (blok Gutenberg). Memakai warna JK Super Theme bila ada.
 */
.jkb-post-cards {
	--jkb-gap: 16px;
	--jkb-r: var(--jks-radius, 10px);
	--jkb-primary: var(--jks-link, #1e66f5);
	--jkb-heading: var(--jks-heading, #0f172a);
	--jkb-muted: var(--jks-text-muted, #6b7280);
	--jkb-g1: var(--jks-hero-1, #143780);
	--jkb-g2: var(--jks-hero-2, #1e66f5);
	--jkb-g3: var(--jks-hero-3, #107f63);
	margin: 0 0 36px;
}

.jkb-post-cards a,
.entry-content .jkb-post-cards a {
	text-decoration: none !important;
}

/* Netralkan gaya isi artikel (margin judul) di dalam blok */
.entry-content .jkb-post-cards h2,
.entry-content .jkb-post-cards h3 {
	margin-top: 0;
}

.entry-content .jkb-post-cards .jkb-pc-title {
	margin: 0 0 6px;
}

.entry-content .jkb-post-cards .jkb-pc-heading {
	margin: 0;
}

.entry-content .jkb-post-cards img {
	border-radius: 0;
}

/* Judul seksi: tab gradasi + garis */
.jkb-pc-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
	border-bottom: 3px solid var(--jkb-g2);
}

.jkb-pc-heading {
	margin: 0;
	padding: 8px 16px 7px;
	border-radius: 8px 8px 0 0;
	background: linear-gradient(135deg, var(--jkb-g1), var(--jkb-g2) 60%, var(--jkb-g3));
	color: #fff;
	font-size: 0.9375rem;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-transform: uppercase;
}

.jkb-pc-more {
	padding-bottom: 6px;
	color: var(--jkb-primary);
	font-size: 0.875rem;
	font-weight: 600;
}

/* Kartu dasar */
.jkb-pc-card {
	position: relative;
	min-width: 0;
}

.jkb-pc-media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	border-radius: var(--jkb-r);
	background: linear-gradient(135deg, var(--jkb-g1), var(--jkb-g3));
}

.jkb-pc-media img,
.jkb-pc-noimg {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms ease;
}

.jkb-pc-card:hover .jkb-pc-media img {
	transform: scale(1.04);
}

.jkb-pc-cat {
	position: absolute;
	z-index: 2;
	left: 10px;
	bottom: 10px;
	padding: 3px 9px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--jkb-g1), var(--jkb-g2));
	color: #fff !important;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	line-height: 1.5;
	text-transform: uppercase;
}

.jkb-pc-body {
	padding-top: 10px;
}

.jkb-pc-title {
	margin: 0 0 6px;
	font-size: 1.0625rem;
	line-height: 1.35;
}

.jkb-pc-title a {
	color: var(--jkb-heading);
}

.jkb-pc-title a:hover {
	color: var(--jkb-primary);
}

.jkb-pc-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	color: var(--jkb-muted);
	font-size: 0.8125rem;
}

.jkb-pc-author {
	color: var(--jkb-heading);
	font-weight: 600;
}

.jkb-pc-excerpt {
	display: -webkit-box;
	margin: 6px 0 0;
	overflow: hidden;
	color: var(--jkb-muted);
	font-size: 0.9375rem;
	line-height: 1.55;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

/* Overlay: judul di atas gambar */
.jkb-pc-card.is-overlay {
	overflow: hidden;
	border-radius: var(--jkb-r);
	isolation: isolate;
}

.jkb-pc-card.is-overlay .jkb-pc-media {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
	border-radius: 0;
}

.jkb-pc-shade {
	position: absolute;
	z-index: 1;
	inset: 0;
	background: linear-gradient(180deg, transparent 30%, rgb(0 0 0 / 0.78));
	pointer-events: none;
}

.jkb-pc-card.is-overlay .jkb-pc-body {
	position: absolute;
	z-index: 2;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 16px;
}

.jkb-pc-card.is-overlay .jkb-pc-cat {
	position: static;
	display: inline-block;
	margin-bottom: 8px;
}

.jkb-pc-card.is-overlay .jkb-pc-title {
	margin: 0;
	font-size: 1.0625rem;
	text-shadow: 0 1px 6px rgb(0 0 0 / 0.35);
}

.jkb-pc-card.is-overlay .jkb-pc-title a {
	color: #fff;
}

.jkb-pc-card.is-overlay .jkb-pc-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
}

.jkb-pc-card.is-overlay .jkb-pc-meta,
.jkb-pc-card.is-overlay .jkb-pc-author {
	margin-top: 6px;
	color: rgb(255 255 255 / 0.9);
}

/* Grid */
.jkb-pc-grid {
	display: grid;
	grid-template-columns: repeat(var(--jkb-cols, 3), minmax(0, 1fr));
	gap: 24px var(--jkb-gap);
}

.jkb-pc-grid.is-overlay .jkb-pc-card {
	aspect-ratio: 4 / 3;
}

/* Mosaik */
.jkb-pc-mosaic {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: 210px;
}

.jkb-pc-mosaic .is-big {
	grid-column: span 2;
	grid-row: span 2;
}

.jkb-pc-mosaic .is-big .jkb-pc-title {
	font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
}

.jkb-pc-mosaic.is-mosaic-4 .jkb-pc-card:nth-child(2) {
	grid-column: span 2;
}

.jkb-pc-mosaic.is-mosaic-4 .jkb-pc-card:nth-child(2) .jkb-pc-title {
	font-size: 1.3125rem;
}

.jkb-pc-mosaic.is-mosaic-3 {
	grid-template-columns: 2fr 1fr;
}

.jkb-pc-mosaic.is-mosaic-3 .is-big {
	grid-column: auto;
}

/* Unggulan + daftar */
.jkb-pc-featured {
	display: grid;
	grid-template-columns: repeat(var(--jkb-cols, 2), minmax(0, 1fr));
	gap: 24px 32px;
}

.jkb-pc-col {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.jkb-pc-col .is-big .jkb-pc-title {
	font-size: 1.3125rem;
}

.jkb-pc-card.is-small {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
}

.jkb-pc-card.is-small .jkb-pc-media {
	aspect-ratio: 4 / 3;
	border-radius: var(--jks-radius-sm, 6px);
}

.jkb-pc-card.is-small .jkb-pc-body {
	padding: 0;
}

.jkb-pc-card.is-small .jkb-pc-title {
	font-size: 0.9375rem;
}

/* List */
.jkb-pc-list {
	display: grid;
	gap: 22px;
}

.jkb-pc-card.is-row {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: 20px;
	align-items: center;
}

.jkb-pc-card.is-row .jkb-pc-body {
	padding: 0;
}

.jkb-pc-card.is-row .jkb-pc-title {
	font-size: 1.25rem;
}

.jkb-pc-empty {
	padding: 12px;
	border: 1px dashed currentColor;
	opacity: 0.7;
}

/* Responsif */
@media (max-width: 991px) {
	.jkb-pc-grid {
		grid-template-columns: repeat(min(var(--jkb-cols, 3), 2), minmax(0, 1fr));
	}

	.jkb-pc-mosaic,
	.jkb-pc-mosaic.is-mosaic-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: 180px;
	}

	.jkb-pc-mosaic.is-mosaic-3 .is-big {
		grid-column: span 2;
		grid-row: span 1;
	}
}

@media (max-width: 599px) {
	.jkb-pc-grid,
	.jkb-pc-featured {
		grid-template-columns: minmax(0, 1fr);
	}

	.jkb-pc-grid.is-grid {
		gap: 20px;
	}

	.jkb-pc-mosaic {
		grid-auto-rows: 150px;
	}

	.jkb-pc-mosaic .is-big {
		grid-row: span 2;
	}

	.jkb-pc-mosaic.is-mosaic-5 .jkb-pc-card:not(.is-big) .jkb-pc-title,
	.jkb-pc-mosaic.is-mosaic-4 .jkb-pc-card:nth-child(n+3) .jkb-pc-title {
		font-size: 0.875rem;
	}

	.jkb-pc-card.is-row {
		grid-template-columns: 120px minmax(0, 1fr);
		gap: 12px;
	}

	.jkb-pc-card.is-row .jkb-pc-title {
		font-size: 1rem;
	}

	.jkb-pc-card.is-row .jkb-pc-excerpt {
		display: none;
	}
}

/* Ukuran tetap walau ada di dalam .entry-content (gaya judul artikel) */
.entry-content .jkb-post-cards .jkb-pc-heading {
	font-size: 0.9375rem;
	line-height: 1.3;
}

.entry-content .jkb-post-cards .jkb-pc-title {
	font-size: 1.0625rem;
	line-height: 1.35;
}

.entry-content .jkb-post-cards .is-small .jkb-pc-title {
	font-size: 0.9375rem;
}

.entry-content .jkb-post-cards .is-row .jkb-pc-title,
.entry-content .jkb-post-cards .jkb-pc-col .is-big .jkb-pc-title,
.entry-content .jkb-pc-mosaic.is-mosaic-4 .jkb-pc-card:nth-child(2) .jkb-pc-title {
	font-size: 1.25rem;
}

.entry-content .jkb-pc-mosaic .is-big .jkb-pc-title {
	font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
}

/* HP: kartu mosaik kecil lebih ringkas supaya teks tidak terpotong */
@media (max-width: 599px) {
	.jkb-pc-mosaic {
		grid-auto-rows: 170px;
	}

	.jkb-pc-mosaic .jkb-pc-card:not(.is-big) .jkb-pc-meta {
		display: none;
	}

	.jkb-pc-mosaic .jkb-pc-card:not(.is-big) .jkb-pc-body {
		padding: 12px;
	}

	.jkb-pc-mosaic .jkb-pc-card:not(.is-big) .jkb-pc-cat {
		margin-bottom: 6px;
	}

	.entry-content .jkb-pc-mosaic .jkb-pc-card:not(.is-big) .jkb-pc-title {
		display: -webkit-box;
		overflow: hidden;
		font-size: 0.9375rem;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
	}

	.entry-content .jkb-post-cards .is-row .jkb-pc-title {
		font-size: 1rem;
	}
}
