/**
 * Homepage Cases slider styles.
 *
 * All CSS classes below (blc-swiper-container, blc-review-card,
 * blc-review-image, blc-poster-tint, blc-review-overlay, blc-review-title)
 * are preserved exactly from the Blocksy Child theme implementation, so no
 * markup or selectors elsewhere on the site need to change.
 *
 * Admin-configurable values (card ratio, width per breakpoint, gap per
 * breakpoint -- see Cases -> Homepage Slider Style) are injected as CSS
 * custom properties on .blc-swiper-container via an inline <style> block
 * printed by Homepage_Slider::print_dynamic_style(), so this file itself
 * stays static and cacheable.
 */

.blc-swiper-container {
	padding: 28px 6px 34px;
	box-sizing: border-box;
	position: relative;
}

.blc-review-card {
	position: relative;
	border-radius: 10px;
	box-shadow: 0 2px 4px rgba(15, 15, 15, 0.16), 0 14px 20px rgba(15, 15, 15, 0.20), 0 28px 44px rgba(15, 15, 15, 0.22);
}

.blc-review-card-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.blc-swiper-container .swiper-slide {
	/* Card width per breakpoint, admin-configurable via Cases -> Homepage
	   Slider Style. slidesPerView:'auto' (see homepage-slider.js) reads
	   these widths directly instead of a fixed slide count. */
	width: var(--clc-width-mobile, 150px);
}
@media (min-width: 768px) {
	.blc-swiper-container .swiper-slide {
		width: var(--clc-width-tablet, 200px);
	}
}
@media (min-width: 1200px) {
	.blc-swiper-container .swiper-slide {
		width: var(--clc-width-desktop, 260px);
	}
}

.blc-review-image {
	position: relative;
	overflow: hidden;
	border-radius: 10px;
	/* Admin-configurable via Cases -> Homepage Slider Style (default 9:16,
	   matching the source Homepage Poster images almost exactly -- they're
	   uploaded at 168-169x300, i.e. ~0.56-0.563, versus 9/16 = 0.5625).
	   Combined with object-fit:cover below, this near-exact match means
	   visible cropping is negligible in practice while still guaranteeing a
	   fixed, consistent card shape regardless of an individual image's
	   exact pixel ratio. No background-color here: a mismatched ratio was
	   previously paired with object-fit:contain and a black letterbox
	   background, which showed as black bars -- cover never needs one. */
	aspect-ratio: var(--clc-ratio-w, 9) / var(--clc-ratio-h, 16);
}

.blc-poster-tint {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.10);
	border-radius: 10px;
	pointer-events: none;
	z-index: 1;
}

.blc-review-image img {
	width: 100%;
	height: 100%;
	/* cover: the card ratio (9:16 default) is deliberately kept a
	   near-exact match to the source images' own ~9:16 ratio, so cover
	   crops only the negligible sub-pixel difference instead of the
	   visible letterboxing "contain" produced with a mismatched ratio. */
	object-fit: cover;
	object-position: center;
	display: block;
	border-radius: 10px;
	transition: transform 0.5s ease, filter 0.5s ease;
	transform: scale(1);
}

.blc-review-card-link:hover .blc-review-image img {
	transform: scale(1.1);
	filter: brightness(1.1);
}

.blc-review-overlay {
	display: none;
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0,0,0,0.6);
	color: #fff;
	padding: 15px;
	text-align: center;
}

.blc-review-title {
	margin: 0 0 10px;
	font-size: 1.2em;
	color: white;
}

/* Swiper Arrows */
.blc-swiper-container .swiper-button-prev,
.blc-swiper-container .swiper-button-next {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	color: #000;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: background 0.3s, color 0.3s;
}

.blc-swiper-container .swiper-button-prev::after,
.blc-swiper-container .swiper-button-next::after {
	font-size: 14px;
	font-weight: bold;
}

.blc-swiper-container .swiper-button-next:hover,
.blc-swiper-container .swiper-button-prev:hover {
	background: #000;
	color: #fff;
}

@media (max-width: 767px) {
	.blc-swiper-container .swiper-button-prev,
	.blc-swiper-container .swiper-button-next {
		display: none !important;
	}
}

/* Continuous marquee-style autoplay: keeps the loop at a constant speed
   (linear) instead of Swiper's default ease-in-out per-slide easing, which
   would otherwise make the loop feel like it's stepping rather than
   gliding. Safe to always print: it only changes the timing FUNCTION, not
   whether the wrapper moves at all -- the JS driver in homepage-slider.js
   already fully gates whether any motion happens (desktop-only, admin
   on/off switch, reduced-motion). */
.blc-swiper-container.swiper-initialized .swiper-wrapper {
	transition-timing-function: linear !important;
}
@media (prefers-reduced-motion: reduce) {
	.blc-swiper-container.swiper-initialized .swiper-wrapper {
		transition-duration: 0ms !important;
	}
}
