/*
Name: 			image-slider.css
Description:	สไลด์รูปแบนเนอร์หน้าแรก (ใช้คู่กับ js/image-slider.js) แทน Slider Revolution
*/

.image-slider {
	position: relative;
	overflow: hidden;
	background: #0b3d66;
}

.image-slider-track {
	display: flex;
	transition: transform .6s ease;
	touch-action: pan-y;
	will-change: transform;
}

.image-slider.is-dragging .image-slider-track {
	transition: none;
}

.image-slider-slide {
	flex: 0 0 100%;
	min-width: 0;
}

.image-slider-slide img {
	display: block;
	width: 100%;
	height: auto;
	user-select: none;
	-webkit-user-drag: none;
}

/* ปุ่มก่อนหน้า / ถัดไป */
.image-slider-prev,
.image-slider-next {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .35);
	color: #FFF;
	cursor: pointer;
	opacity: .85;
	transition: background-color .2s, opacity .2s;
}

.image-slider-prev { left: 15px; }
.image-slider-next { right: 15px; }

.image-slider-prev:hover,
.image-slider-next:hover,
.image-slider-prev:focus-visible,
.image-slider-next:focus-visible {
	background: rgba(0, 0, 0, .6);
	opacity: 1;
}

.image-slider-prev svg,
.image-slider-next svg {
	width: 20px;
	height: 20px;
}

/* จุดบอกตำแหน่งสไลด์ */
.image-slider-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.image-slider-dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 2px solid #FFF;
	border-radius: 50%;
	background: transparent;
	box-shadow: 0 0 3px rgba(0, 0, 0, .4);
	cursor: pointer;
}

.image-slider-dot[aria-current="true"] {
	background: #FFF;
}

.image-slider-prev:focus-visible,
.image-slider-next:focus-visible,
.image-slider-dot:focus-visible {
	outline: 2px solid #FFF;
	outline-offset: 2px;
}

@media (max-width: 575.98px) {
	.image-slider-prev,
	.image-slider-next {
		width: 36px;
		height: 36px;
		margin-top: -18px;
	}

	.image-slider-prev { left: 8px; }
	.image-slider-next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.image-slider-track {
		transition: none;
	}
}
