/* ═══════════════════════════════════════════════════════════
   JD LECTURES SLIDER
═══════════════════════════════════════════════════════════ */


/* ── Header: title left, arrows right ── */

.jdl-slider-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
}

.jdl-slider-title {
	font-family: var(--jd-font-heading);
	font-size: 28px;
	font-weight: 700;
	color: #222;
	margin: 0;
	line-height: 1.2;
}

.jdl-slider-arrows {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.jdl-arrow {
	width: 40px;
	height: 40px;
	border: 1.5px solid var(--jd-color-accent);
	background: none;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--jd-color-accent);
	padding: 0;
	transition: background 0.15s ease, color 0.15s ease;
	flex-shrink: 0;
}

.jdl-arrow:hover:not(:disabled) {
	background: var(--jd-color-accent);
	color: #fff;
}

.jdl-arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

/* ── Viewport & track ── */

.jdl-slider-viewport {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.jdl-slider-viewport::-webkit-scrollbar {
	display: none;
}

.jdl-slider-track {
	display: flex;
	gap: 32px;
	/* width must be explicit so cards don't collapse */
	width: 100%;
}

/* ── Card ── */

.jdl-card {
	flex: 0 0 calc((100% - 96px) / 4); /* 4 cards, 3 × 32px gap */
	min-width: 0;
	display: flex;
	flex-direction: column;
	scroll-snap-align: start;
}

.jdl-card-image {
	width: 100%;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 16px;
	flex-shrink: 0;
}

.jdl-card-image img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.35s ease;
}

.jdl-card:hover .jdl-card-image img {
	transform: scale(1.04);
}

.jdl-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.jdl-card-title {
	font-family: var(--jd-font-heading);
	font-size: 18px;
	font-weight: 700;
	color: #000;
	line-height: 1.3;
	margin: 0 0 8px;
}

.jdl-card-desc {
	font-family: var(--jd-font-body);
	font-size: 14px;
	color: #555;
	line-height: 1.6;
	margin: 0 0 16px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 6;
}

.jdl-card-price {
	font-family: var(--jd-font-body);
	font-size: 18px;
	font-weight: 700;
	color: var(--jd-color-accent);
	margin: 0 0 16px;
}

.jdl-card-btn {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 16px;
	text-align: center;
	border: 1.5px solid var(--jd-color-accent);
	border-radius: 4px;
	color: var(--jd-color-accent);
	background: none;
	font-family: var(--jd-font-body);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
	margin-top: auto;
}

.jdl-card-btn:hover {
	background: var(--jd-color-accent);
	color: #fff;
}

/* ── Mobile ── */

@media (max-width: 768px) {

	.jdl-slider-arrows {
		display: none;
	}

	.jdl-slider-track {
		gap: 16px;
	}

	.jdl-card {
		/* 1.25 cards visible: 80% width means the next card peeks at ~4% */
		flex: 0 0 80%;
	}

	.jdl-card-title {
		font-size: 16px;
	}
}
