.tks-wrapper {
	--tks-bg: #a9c9f6;
	--tks-text: #10233f;
	--tks-accent: #10233f;
	--tks-nav-bg: #10233f;
	--tks-nav-text: #ffffff;
	--tks-image-placeholder: #7fa8e0;
	background: var(--tks-bg);
	color: var(--tks-text);
	padding: 32px 20px 40px;
	border-radius: 8px;
	box-sizing: border-box;
	max-width: 100%;
	overflow: hidden;
}

/* ---- Mode responsif berdasarkan lebar kontainer (bukan lebar layar) ----
   Kelas ditambahkan otomatis oleh slider.js lewat ResizeObserver, jadi
   tetap akurat walau slider ditaruh di sidebar sempit pada halaman desktop
   yang lebar.
   tks--wide   : lebar   -> 3 thumbnail per layar
   tks--medium : sedang  -> 2 thumbnail per layar
   tks--narrow : sempit  -> 1 thumbnail per layar (mis. widget sidebar) */

.tks-wrapper.tks--narrow,
.tks-wrapper.tks--medium {
	padding: 20px 14px 26px;
}

.tks-wrapper * {
	box-sizing: border-box;
}

.tks-header {
	text-align: center;
	margin-bottom: 24px;
}

.tks-title {
	font-size: 28px;
	font-weight: 900;
	letter-spacing: 4px;
	text-transform: uppercase;
	font-style: italic;
	margin: 0 0 12px;
	color: var(--tks-text);
}

.tks-title::after {
	content: "";
	display: block;
	width: 90px;
	height: 2px;
	background: var(--tks-accent);
	margin: 12px auto 0;
}

.tks--medium .tks-title {
	font-size: 22px;
	letter-spacing: 3px;
}

.tks--narrow .tks-title {
	font-size: 18px;
	letter-spacing: 2px;
}

.tks--narrow .tks-title::after {
	width: 50px;
}

.tks-slider-outer {
	position: relative;
}

.tks-track-viewport {
	position: relative;
	overflow: hidden;
	width: 100%;
	/* Padding kiri-kanan memberi ruang bagi tombol overlay supaya tidak
	   menutupi bagian gambar paling tepi, tanpa mengurangi lebar track. */
	padding: 0 4px;
}

.tks-track {
	display: flex;
	gap: 16px;
	transition: transform 0.45s ease;
	will-change: transform;
}

.tks-card {
	flex: 0 0 calc(33.333% - 11px);
	display: block;
	text-decoration: none;
	color: var(--tks-text);
}

.tks--medium .tks-card {
	flex-basis: calc(50% - 8px);
}

.tks--narrow .tks-card {
	flex-basis: calc(50% - 5px);
}

.tks-card-image {
	position: relative;
	width: 100%;
	padding-top: 62%; /* rasio gambar */
	border-radius: 10px;
	overflow: hidden;
	background: var(--tks-image-placeholder);
}

.tks-card-image img,
.tks-card-image-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.tks-card:hover .tks-card-image img {
	transform: scale(1.05);
}

.tks-card-label {
	margin-top: 14px;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.25;
}

.tks--medium .tks-card-label {
	margin-top: 10px;
	font-size: 16px;
}

.tks--narrow .tks-card-label {
	margin-top: 8px;
	font-size: 12px;
	line-height: 1.2;
}

.tks-nav {
	position: absolute;
	top: 0;
	/* Tinggi tombol menyamai perkiraan tinggi area gambar kartu (bukan
	   seluruh kartu termasuk label), lalu dipusatkan secara vertikal
	   lewat JS (lihat centerNavButtons di slider.js) supaya presisi
	   walau rasio gambar berbeda-beda. */
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--tks-nav-bg);
	color: var(--tks-nav-text);
	border: 2px solid #ffffff;
	box-shadow: 0 2px 8px rgba(16, 35, 63, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 3;
	opacity: 0.92;
	transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.tks-nav.tks-prev {
	left: 4px;
}

.tks-nav.tks-next {
	right: 4px;
}

.tks-nav:hover {
	transform: scale(1.08);
	background: #16305a;
	opacity: 1;
}

.tks-nav:disabled {
	opacity: 0.35;
	cursor: default;
	transform: none;
}

/* Kontainer kecil (narrow): tombol diperbesar (bukan diperkecil) supaya
   tetap mudah di-tap dengan jari, karena tombol melayang di atas gambar
   dan tidak lagi memakan lebar horizontal sendiri. */
.tks--narrow .tks-nav {
	width: 40px;
	height: 40px;
}

.tks--narrow .tks-nav svg {
	width: 20px;
	height: 20px;
}

/* ---- Card image: rasio disesuaikan tiap mode ---- */
.tks--medium .tks-track,
.tks--narrow .tks-track {
	gap: 10px;
}

.tks--narrow .tks-card-image {
	padding-top: 66%;
}

/* ---- Fallback lebar layar, untuk browser lama tanpa ResizeObserver ---- */
@media (max-width: 900px) {
	.tks-wrapper:not(.tks--narrow):not(.tks--medium):not(.tks--wide) .tks-card {
		flex-basis: calc(50% - 8px);
	}
}

@media (max-width: 600px) {
	.tks-wrapper:not(.tks--narrow):not(.tks--medium):not(.tks--wide) .tks-card {
		flex-basis: calc(50% - 5px);
	}
}
