/**
 * CIYWR Slider Gallery — front-end fade slider.
 */

.ciywr-sg-slider {
	--ciywr-sg-h: clamp(280px, 42vw, 520px);
	--ciywr-sg-accent: #c43c30;
	position: relative;
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	margin: 0;
	background: #101318;
	border-radius: 2px;
	box-sizing: border-box;
}

.ciywr-sg-slider--short {
	--ciywr-sg-h: clamp(200px, 32vw, 360px);
}

.ciywr-sg-slider--medium {
	--ciywr-sg-h: clamp(280px, 42vw, 520px);
}

.ciywr-sg-slider--tall {
	--ciywr-sg-h: clamp(340px, 52vw, 640px);
}

.ciywr-sg-slider--hero {
	--ciywr-sg-h: clamp(380px, 52vh, 560px);
	border-radius: 0;
}

.ciywr-sg-slider__track {
	position: relative;
	width: 100%;
	height: var(--ciywr-sg-h);
}

.ciywr-sg-slider__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1.1s ease, visibility 1.1s ease;
	z-index: 0;
}

.ciywr-sg-slider__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.ciywr-sg-slider__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

/* Dark wash under captions (esp. hero / homepage banner). */
.ciywr-sg-slider--captions .ciywr-sg-slider__slide::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(0, 0, 0, 0.4) 0%,
		rgba(0, 0, 0, 0.55) 45%,
		rgba(0, 0, 0, 0.62) 100%
	);
}

.ciywr-sg-slider__caption {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 48px 20px 56px;
	box-sizing: border-box;
	pointer-events: none;
}

.ciywr-sg-slider__heading {
	margin: 0 0 12px;
	max-width: 900px;
	font-family: "Source Sans 3", "Segoe UI", sans-serif;
	font-size: clamp(26px, 4.2vw, 46px);
	font-weight: 700;
	line-height: 1.25;
	color: #ffffff !important;
	text-shadow: 0 2px 16px rgba(0, 0, 0, 0.65);
}

.ciywr-sg-slider__text {
	margin: 0;
	max-width: 700px;
	font-family: "Source Serif 4", Georgia, serif;
	font-size: clamp(15px, 1.7vw, 19px);
	font-style: italic;
	line-height: 1.55;
	color: #ffffff !important;
	opacity: 0.95;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}

.ciywr-sg-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 4;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #ffffff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 1;
	transition: background 0.2s ease;
}

.ciywr-sg-slider__arrow:hover,
.ciywr-sg-slider__arrow:focus {
	background: var(--ciywr-sg-accent);
}

.ciywr-sg-slider__arrow:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.ciywr-sg-slider__arrow--prev {
	left: 16px;
}

.ciywr-sg-slider__arrow--next {
	right: 16px;
}

.ciywr-sg-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14px;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: auto;
	pointer-events: none;
}

.ciywr-sg-slider__dot {
	appearance: none;
	-webkit-appearance: none;
	pointer-events: auto;
	box-sizing: border-box;
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	min-width: 8px;
	min-height: 8px;
	max-width: 8px;
	max-height: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	line-height: 0;
	font-size: 0;
	overflow: hidden;
	cursor: pointer;
	transition: background 0.25s ease, transform 0.25s ease;
}

.ciywr-sg-slider__dot.is-active {
	background: var(--ciywr-sg-accent);
	transform: scale(1.15);
}

.ciywr-sg-slider__dot:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

@media (max-width: 767px) {
	.ciywr-sg-slider--short {
		--ciywr-sg-h: clamp(180px, 48vw, 280px);
	}

	.ciywr-sg-slider--medium {
		--ciywr-sg-h: clamp(220px, 58vw, 340px);
	}

	.ciywr-sg-slider--tall {
		--ciywr-sg-h: clamp(260px, 68vw, 420px);
	}

	.ciywr-sg-slider--hero {
		--ciywr-sg-h: clamp(280px, 55vh, 420px);
	}

	.ciywr-sg-slider__arrow {
		width: 38px;
		height: 38px;
		font-size: 16px;
	}

	.ciywr-sg-slider__arrow--prev {
		left: 10px;
	}

	.ciywr-sg-slider__arrow--next {
		right: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ciywr-sg-slider__slide {
		transition: none;
	}
}
