/* Youthlife Homepage Slider – replaces Slider Revolution "bredins-homepage-2" */

.yl-slider {
	--yl-speed: 800ms;
	--yl-overlay: 0.3;
	--yl-btn: #f35a3d;
	--yl-btn-hover: #fa8d32;
	position: relative;
	width: 100%;
	height: 100vh;
	height: 100svh;
	min-height: 560px;
	overflow: hidden;
	background: #e8e8e8;
	color: #fff;
	touch-action: pan-y;
}

.yl-slider__track {
	display: flex;
	height: 100%;
	transition: transform var(--yl-speed) cubic-bezier(0.65, 0, 0.35, 1);
	will-change: transform;
}

.yl-slide {
	position: relative;
	flex: 0 0 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.yl-slide__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	z-index: 0;
}

/* Navy overlay (matches the old .slotholder:after rule) */
.yl-slide::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(15, 49, 97, var(--yl-overlay));
	pointer-events: none;
	z-index: 1;
}

.yl-slide__content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 900px;
	padding: 40px 24px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.yl-slider .yl-slide__heading {
	margin: 0 0 40px;
	max-width: 844px;
	font-family: "Roboto Slab", Georgia, serif;
	font-weight: 700;
	font-size: 48px;
	line-height: 1.1;
	color: #fff;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}

.yl-slider .yl-slide__heading--large {
	font-size: 70px;
	line-height: 1.05;
}

.yl-slider .yl-slide__sub {
	margin: 0 0 24px;
	font-family: Roboto, Arial, sans-serif;
	font-weight: 300;
	font-size: 30px;
	line-height: 1.25;
	color: #fff;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
}

.yl-slider .yl-slide__btn {
	display: inline-block;
	min-width: 210px;
	padding: 18px;
	border: 0;
	border-radius: 18px;
	background-color: var(--yl-btn);
	box-shadow: none;
	font-family: Roboto, Arial, sans-serif;
	font-weight: 300;
	font-size: 24px;
	line-height: 1;
	color: #fff;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.yl-slider .yl-slide__btn:hover,
.yl-slider .yl-slide__btn:focus-visible {
	background-color: var(--yl-btn-hover);
	color: #fff;
	text-decoration: none;
}

.yl-slider .yl-slide__btn:focus-visible,
.yl-slider__arrow:focus-visible,
.yl-slider__dot:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

/* Layer entrance animations (heading drops in, subheading rises, button fades) */
.yl-slider.is-ready .yl-slide .yl-slide__heading,
.yl-slider.is-ready .yl-slide .yl-slide__sub,
.yl-slider.is-ready .yl-slide .yl-slide__btn {
	opacity: 0;
}
.yl-slider.is-ready .yl-slide .yl-slide__heading { transform: translateY(-50px); }
.yl-slider.is-ready .yl-slide .yl-slide__sub { transform: translateY(50px); }

.yl-slider.is-ready .yl-slide.is-animated .yl-slide__heading,
.yl-slider.is-ready .yl-slide.is-animated .yl-slide__sub,
.yl-slider.is-ready .yl-slide.is-animated .yl-slide__btn {
	opacity: 1;
	transform: none;
	transition: opacity 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.5s, transform 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.5s, background-color 0.2s ease;
}

/* Arrows */
.yl-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 40px;
	height: 40px;
	margin-top: -20px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease;
}
.yl-slider__arrow:hover { background: #000; }
.yl-slider__arrow svg { width: 24px; height: 24px; fill: currentColor; }
.yl-slider__arrow--prev { left: 20px; }
.yl-slider__arrow--next { right: 20px; }

/* Dots */
.yl-slider__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 24px;
	z-index: 3;
	display: flex;
	justify-content: center;
	gap: 10px;
}
.yl-slider__dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}
.yl-slider__dot.is-active { background: #fff; }

/* From 1024px the site header overlays the slider, so clear it */
@media only screen and (min-width: 1024px) {
	.yl-slide__content { padding-top: 190px; }
}

/* Below 1024px the header sits above the slider */
@media only screen and (max-width: 1023px) {
	.yl-slider { height: 70vh; height: 70svh; min-height: 460px; }
}

@media only screen and (max-width: 860px) {
	.yl-slider .yl-slide__heading { font-size: 40px; }
	.yl-slider .yl-slide__heading--large { font-size: 54px; }
	.yl-slider .yl-slide__sub { font-size: 24px; }
}

@media only screen and (max-width: 700px) {
	.yl-slider__arrow { display: none; }
}

@media only screen and (max-width: 480px) {
	.yl-slider { min-height: 420px; }
	.yl-slide__content { padding: 32px 16px; }
	.yl-slider .yl-slide__heading { font-size: 30px; margin-bottom: 24px; }
	.yl-slider .yl-slide__heading--large { font-size: 40px; }
	.yl-slider .yl-slide__sub { font-size: 20px; }
	.yl-slider .yl-slide__btn { min-width: 174px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
	.yl-slider__track { transition: none; }
	.yl-slider.is-ready .yl-slide .yl-slide__heading,
	.yl-slider.is-ready .yl-slide .yl-slide__sub,
	.yl-slider.is-ready .yl-slide .yl-slide__btn {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
