/* Vanilla JS slider styles for RLC Ship (replaces Slick).

   Notes:
   - Designed to work with existing markup:
     .testimonial-slider/.awards-slider (container)
     .slider__slide (direct children)
     .slider__content (inner)
*/

.rlcship-slider-shell {
	position: relative;
	overflow: hidden;
}

.rlcship-slider-shell > .awards-slider {
	width: 100%;
}

.testimonial-slider,
.awards-slider {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	gap: 0;
	padding: 0;
	padding-inline: var( --rlcship-slider-padding, 0px );
	scroll-padding: 0;
	scroll-padding-inline: var( --rlcship-slider-padding, 0px );
	max-width: 100vw;
	touch-action: pan-y;
	cursor: grab;
}

.testimonial-slider.is-dragging,
.awards-slider.is-dragging {
	scroll-snap-type: none;
	cursor: grabbing;
	user-select: none;
}

.testimonial-slider::-webkit-scrollbar,
.awards-slider::-webkit-scrollbar {
	height: 0;
}

/* Slide layout */
.testimonial-slider {
	--rlcship-slider-visible: 3;
}

.awards-slider {
	--rlcship-slider-visible: 5;
}

.testimonial-slider > .slider__slide,
.awards-slider > .slider__slide {
	flex: 0 0 calc( 100% / var( --rlcship-slider-visible, 1 ) );
	width: calc( 100% / var( --rlcship-slider-visible, 1 ) );
	scroll-snap-align: start;
	box-sizing: border-box;
}

.testimonial-slider.is-single-slide {
	overflow-x: hidden;
	justify-content: center;
}

.testimonial-slider.is-single-slide > .slider__slide {
	flex: 0 0 100%;
	width: 100%;
	max-width: 820px;
}

.rlcship-slider-shell--testimonial.is-single-slide .rlcship-slider__nav,
.rlcship-slider-shell--testimonial.is-single-slide .slick-arrow,
.rlcship-slider-shell--testimonial.is-single-slide .slick-dots,
.rlcship-slider-shell--testimonial.is-single-slide .rlcship-slider__dots {
	display: none !important;
}

.testimonial-slider[data-rlcship-align="center"] > .slider__slide,
.awards-slider[data-rlcship-align="center"] > .slider__slide {
	scroll-snap-align: center;
}

/* Testimonials parity styling (ported from prior Slick inline styles) */
@media screen and ( max-width: 768px ) {
	.testimonial-slider {
		background: #006548;
		background: radial-gradient(
			circle,
			rgba( 0, 101, 72, 0.7119222689 ) 0%,
			rgb( 0, 101, 72 ) 50%
		);
		background-position: center;
		background-repeat: no-repeat;
		background-size: cover;
	}
}

.testimonial-slider .slider__content {
	min-height: 275px;
	height: fit-content;
	padding: 25px 5px;
	background-color: #ededed;
	color: #aeaeae;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 0 10px;
	opacity: 0.8;
	transform: scale( 0.8 );
	transition: 0.5s ease all;
}

@media screen and ( max-width: 992px ) {
	.testimonial-slider {
		--rlcship-slider-visible: 1;
	}
}

@media screen and ( max-width: 768px ) {
	.testimonial-slider .slider__content {
		background: unset;
		color: #fff;
		border-top: 1px solid rgba( 255, 255, 255, 0.5 );
		border-bottom: 1px solid rgba( 255, 255, 255, 0.5 );
		padding: 0 25px;
		margin: 15px 0;
		height: 300px;
		transform: scale( 1 );
		opacity: 1;
	}
}

@media screen and ( max-width: 500px ) {
	.testimonial-slider .slider__content {
		height: 350px;
	}
}

.testimonial-slider p,
.testimonial-slider span {
	padding: 0 30px;
}

.testimonial-slider span {
	color: var( --wp--preset--color--primary );
	font-weight: 700;
}

@media screen and ( max-width: 768px ) {
	.testimonial-slider span {
		color: #fff;
	}
}

.testimonial-slider .slider__slide.is-active .slider__content {
	background: #006548;
	background: radial-gradient(
		circle,
		rgba( 0, 101, 72, 0.7119222689 ) 0%,
		rgb( 0, 101, 72 ) 50%
	);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	color: #fff;
	outline: 1px solid rgba( 255, 255, 255, 0.5 );
	outline-offset: -10px;
	transform: scale( 1 );
	opacity: 1;
	margin-inline: -20px;
	transition: 0.5s ease all;
}

@media screen and ( max-width: 768px ) {
	.testimonial-slider .slider__slide.is-active .slider__content {
		margin-right: 0;
		margin-left: 0;
		color: #fff;
		border-top: 1px solid rgba( 255, 255, 255, 0.5 );
		border-bottom: 1px solid rgba( 255, 255, 255, 0.5 );
		padding: 0 25px;
		margin: 15px 0;
		background: unset;
		outline: none;
	}
}

@media screen and ( max-width: 768px ) {
	.testimonial-slider .slider__slide.is-active .slider__content {
		background: unset;
		outline: none;
		margin-inline: -20px;
	}
}

.testimonial-slider .slider__slide.is-active .slider__content span {
	color: #fff;
}

/* Vanilla nav buttons (inserted by JS) */
.rlcship-slider__nav {
	font-size: 0;
	line-height: 0;
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	display: block;
	width: 14px;
	height: 24px;
	padding: 0;
	cursor: pointer;
	color: rgba( 0, 0, 0, 0 );
	border: none;
	outline: none;
	background-color: transparent;
	background-repeat: no-repeat;
	transition: 0.4s;
	z-index: 5;
}

.rlcship-slider__prev {
	left: 10px;
	background-image: var( --rlcship-arrow-left );
}

.rlcship-slider__next {
	right: 10px;
	background-image: var( --rlcship-arrow-right );
}

/* Awards: responsive visible counts (approximate Slick breakpoints) */
@media screen and ( max-width: 1350px ) {
	.awards-slider {
		--rlcship-slider-visible: 4;
	}
}

@media screen and ( max-width: 1200px ) {
	.awards-slider {
		--rlcship-slider-visible: 3;
	}
}

@media screen and ( max-width: 992px ) {
	.awards-slider {
		--rlcship-slider-visible: 2;
	}
}

@media screen and ( max-width: 992px ) {
	.awards-slider {
		--rlcship-slider-visible: 1;
	}
}

/* Hide awards arrows except narrow breakpoint (matches prior behavior roughly) */
.rlcship-slider-shell--awards .rlcship-slider__nav {
	display: none;
}

@media screen and ( max-width: 992px ) {
	.rlcship-slider-shell--awards .rlcship-slider__nav {
		display: block;
	}
}
