/**
 * Pelatihan & Sertifikasi — tampilan Archive, Skema, Pencarian, dan Single.
 *
 * Dimuat otomatis oleh inc/templates.php. Warna & ukuran utama bisa diubah
 * lewat variabel (--kp-*) di blok paling atas.
 *
 * Kalau sebelumnya CSS ini ada di Appearance > Customize > Additional CSS,
 * kosongkan di sana setelah file ini aktif supaya tidak bentrok.
 */

/* ============================================================
   VARIABEL & WADAH
   ============================================================ */
.pelatihan-archive-wrap,
.program-detail {
	--kp-blue: #0b5ed7;
	--kp-blue-dark: #094db0;
	--kp-text: #111827;
	--kp-muted: #4b5563;
	--kp-border: #e5e7eb;
	--kp-gray: #f5f5f5;
	--kp-gray-dark: #e0e0e0;
	--kp-chip: #dcdcdc;
	--kp-radius: 16px;

	box-sizing: border-box;
	width: 100%;
	max-width: 1320px;
	margin-inline: auto;
	padding: 24px 16px 56px;
	color: var(--kp-text);
}

.pelatihan-archive-wrap *,
.program-detail * {
	box-sizing: border-box;
}

/* ============================================================
   FILTER & PENCARIAN
   ============================================================ */
.pelatihan-filter {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 24px;
}

.pelatihan-filter form {
	margin: 0;
	display: flex;
	gap: 8px;
}

.pelatihan-filter select {
	width: 240px;
	max-width: 100%;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--kp-border);
	border-radius: 10px;
	background-color: #fff;
	color: var(--kp-text);
	font-size: 14px;
}

.search-pelatihan {
	width: 360px;
	max-width: 100%;
	gap: 0 !important;
}

.search-pelatihan input[type="text"] {
	flex: 1;
	min-width: 0;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--kp-border);
	border-right: 0;
	border-radius: 10px 0 0 10px;
	background: #fff;
	color: var(--kp-text);
	font-size: 14px;
}

.search-pelatihan button,
.pelatihan-filter noscript button {
	height: 44px;
	padding: 0 24px;
	border: 0;
	background: var(--kp-blue);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.search-pelatihan button {
	border-radius: 0 10px 10px 0;
}

.pelatihan-filter noscript button {
	border-radius: 10px;
}

.search-pelatihan button:hover,
.pelatihan-filter noscript button:hover {
	background: var(--kp-blue-dark);
}

/* ============================================================
   GRID & CARD (dipakai archive, skema, pencarian, shortcode, rekomendasi)
   ============================================================ */
.pelatihan-grid,
.rekomendasi-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 16px;
}

.pelatihan-grid > p {
	grid-column: 1 / -1;
}

.pelatihan-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--kp-border);
	border-radius: var(--kp-radius);
	background: #fff;
}

.pelatihan-card > a:first-child {
	display: block;
	flex: 1;
	color: inherit;
	text-decoration: none;
}

.pelatihan-card .card-thumb {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f3f3f3;
}

.pelatihan-card .card-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pelatihan-card .card-title {
	margin: 0;
	padding: 16px 16px 12px;
	color: var(--kp-text);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
}

.pelatihan-card .card-btn {
	display: block;
	margin: 0 16px 16px;
	padding: 12px 16px;
	border-radius: 999px;
	background: var(--kp-blue);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.pelatihan-card .card-btn:hover,
.pelatihan-card .card-btn:focus-visible {
	background: var(--kp-blue-dark);
	color: #fff;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pelatihan-pagination {
	margin-top: 32px;
}

.pelatihan-pagination .nav-links,
.pelatihan-pagination .pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

.pelatihan-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--kp-border);
	border-radius: 10px;
	background: #fff;
	color: var(--kp-text);
	font-weight: 600;
	text-decoration: none;
}

.pelatihan-pagination a.page-numbers:hover {
	border-color: var(--kp-blue);
	color: var(--kp-blue);
}

.pelatihan-pagination .page-numbers.current {
	border-color: var(--kp-blue);
	background: var(--kp-blue);
	color: #fff;
}

/* ============================================================
   SINGLE — HERO (gambar kiri, info kanan)
   ============================================================ */
.program-hero {
	display: grid;
	grid-template-columns: 43% minmax(0, 1fr);
	gap: 56px;
	align-items: start;
	margin-bottom: 40px;
}

.program-image {
	overflow: hidden;
	border-radius: 8px;
	background: #f3f3f3;
}

.program-image img {
	display: block;
	width: 100%;
	height: auto;
}

.program-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-bottom: 20px;
	color: var(--kp-muted);
	font-size: 15px;
}

.program-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.program-breadcrumb a:hover {
	color: var(--kp-blue);
	text-decoration: underline;
}

.program-breadcrumb .current {
	color: var(--kp-text);
}

.program-skema {
	display: inline-block;
	margin-bottom: 12px;
	padding: 6px 16px;
	border-radius: 999px;
	background: var(--kp-blue);
	color: #fff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
}

.program-info h1 {
	margin: 0 0 12px;
	color: var(--kp-text);
	font-size: clamp(28px, 4vw, 44px);
	font-weight: 800;
	line-height: 1.15;
}

.program-short-desc {
	margin-bottom: 20px;
	color: var(--kp-muted);
	font-size: 15px;
	line-height: 1.6;
}

.program-short-desc p {
	margin: 0 0 8px;
}

.program-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
	margin-bottom: 24px;
}

.program-meta-item {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px;
	padding: 7px 16px;
	border-radius: 999px;
	background: var(--kp-chip);
	color: var(--kp-text);
	font-size: 16px;
	line-height: 1.3;
}

.program-meta-item .meta-label::after {
	content: ":";
}

.program-meta-item .meta-value {
	font-weight: 700;
}

.program-wa {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 999px;
	background: #25d366;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.program-wa:hover,
.program-wa:focus-visible {
	background: #1ebe5a;
	color: #fff;
}

/* ============================================================
   SINGLE — TAB & ISI
   ============================================================ */
.program-tabs {
	display: flex;
	gap: 8px;
}

.program-tab {
	flex: 1 1 0;
	max-width: 230px;
	padding: 16px 12px;
	border: 0;
	border-radius: 24px 24px 0 0;
	background: var(--kp-gray-dark);
	color: var(--kp-text);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.program-tab:hover {
	background: #d2d2d2;
}

.program-tab.is-active {
	background: var(--kp-gray);
}

.program-tab:focus-visible {
	outline: 2px solid var(--kp-blue);
	outline-offset: -2px;
}

.program-content {
	min-height: 320px;
	padding: 28px;
	border-radius: 0 24px 24px 24px;
	background: var(--kp-gray);
}

.program-panel {
	display: none;
}

.program-panel.is-active {
	display: block;
}

.program-field {
	color: var(--kp-text);
	font-size: 16px;
	line-height: 1.7;
}

.program-field > :first-child {
	margin-top: 0;
}

.program-field ul {
	padding-left: 1.4em;
	list-style: disc;
}

.program-field ol {
	padding-left: 1.4em;
	list-style: decimal;
}

.program-field li {
	margin-bottom: 6px;
}

/* ============================================================
   SINGLE — REKOMENDASI
   ============================================================ */
.program-rekomendasi {
	margin-top: 56px;
}

.rekomendasi-title {
	margin: 0 0 24px;
	color: var(--kp-text);
	font-size: clamp(24px, 3vw, 32px);
	font-weight: 800;
	text-align: center;
}

.program-rekomendasi .pelatihan-card {
	padding: 8px 8px 12px;
	border: 0;
	border-radius: 12px;
	background: var(--kp-gray);
}

.program-rekomendasi .pelatihan-card .card-thumb {
	aspect-ratio: 5 / 4;
	border-radius: 4px;
}

.program-rekomendasi .pelatihan-card .card-title {
	padding: 12px 8px 10px;
	font-size: 15px;
}

.program-rekomendasi .pelatihan-card .card-btn {
	align-self: center;
	margin: 0;
	padding: 8px 22px;
	font-size: 14px;
}

/* ============================================================
   RESPONSIF
   ============================================================ */
@media (max-width: 1100px) {
	.pelatihan-grid,
	.rekomendasi-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.pelatihan-grid,
	.rekomendasi-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.program-hero {
		grid-template-columns: 1fr;
		gap: 24px;
	}
}

@media (max-width: 600px) {
	.pelatihan-grid,
	.rekomendasi-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.pelatihan-filter select,
	.search-pelatihan {
		width: 100%;
	}

	.pelatihan-filter form {
		width: 100%;
	}

	.program-skema {
		font-size: 18px;
	}

	.program-tab {
		padding: 12px 6px;
		font-size: 14px;
	}

	.program-content {
		padding: 20px 16px;
	}
}

@media (max-width: 380px) {
	.pelatihan-grid,
	.rekomendasi-grid {
		grid-template-columns: 1fr;
	}
}
