/* ==========================================================================
   VIDEO SLIDER WIDGET

   Rendered by arm_video_slider_widget() (inc/widget-video-slider.php) and the
   [video_slider] shortcode. Slides + carousel settings (loop, autoplay,
   transition speed, items shown per device) come from the "Video Slider"
   options page (inc/acf-video-slider-fields.php).

   Self-contained and namespaced (.vs-*) with no ancestor dependencies. Owl
   Carousel init + click-to-play / pause-on-slide-change behaviour lives in
   assets/js/video-slider.js. Enqueued from functions.php (md_theme_scripts()).
   ========================================================================== */

.vs-section {
	padding: 50px 0 0 0;
	/* Matches the background of the section immediately below it on each
	   template (the "What Customers Value" / Testimonials section) so the
	   two sit flush with no visible seam. Default below is the light gray
	   used by .jr-reviews-section (Blog, About Us, Junk Removal); the Service
	   Page template overrides it to match .sp-testimonials-section's navy. */
	background: #f1f2f4;
}

.vs-title {
	font-family: 'Sora', sans-serif;
	font-size: 24px;
	line-height: 28px;
	font-weight: 600;
	letter-spacing: -0.5px;
	color: #222222;
	text-align: center;
	margin: 0 0 40px;
}

/* Service Page's "next section" (.sp-testimonials-section) is navy, not the
   default light gray above - match it here, including title contrast. */
.page-template-page-additional-php .vs-section {
	margin-bottom: 50px;
}

.page-template-template-service-page-php .vs-section {
	background: #1c3f95;
}

.page-template-template-service-page-php .vs-title {
	color: #ffffff;
}

/* Free Estimate page - "What Customers Value" below it (.jr-reviews-section,
   see junk-removal.css) is also blue here, so match it instead of the
   default light gray. */
.page-template-page-free-estimate-php .vs-section {
	background: #1c3f95;
}

.page-template-page-free-estimate-php .vs-title {
	color: #222222;
}

section.md-banner-section.home-sections.free-setmated-get.md-banner-bottom-section.banner-contact {
	padding-top: 0 !important;
}

/* ---------- PRE-CAROUSEL FALLBACK ---------- */
.vs-carousel.owl-carousel {
	display: block;
}

.vs-carousel:not(.owl-loaded) {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -12px;
}

.vs-carousel:not(.owl-loaded)>.vs-slide {
	width: 33.3333%;
	padding: 0 12px;
	margin-bottom: 24px;
}

/* ---------- SLIDE / VIDEO ---------- */
.vs-slide {
	font-family: 'Sora', sans-serif;
}

.vs-video-wrap {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	aspect-ratio: 1 / 2;
	max-height: 440px;
	overflow: hidden;
	border-radius: 8px;
	background: #14284a;
}

.vs-poster {
	position: absolute;
	inset: 0;
	/* Opaque fallback so slides with no uploaded poster image (or before it
	   loads) show a clean branded placeholder instead of the raw <video>
	   element's black frame + native browser controls showing through a
	   transparent overlay. Any actual poster image (set inline via `style=`
	   in the widget markup) simply paints over this. */
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform .5s ease, opacity .3s ease;
	z-index: 2;
}

.vs-video-wrap:hover .vs-poster {
	transform: scale(1.04);
}

.vs-video-wrap.is-playing .vs-poster {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.vs-play-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .95);
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1C3F95;
	font-size: 17px;
	padding-left: 6px;
	cursor: pointer;
	transition: transform .3s ease, background-color .3s ease;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

.vs-video-wrap:hover .vs-play-btn {
	transform: scale(1.1);
	background: #ffffff;
}

.vs-embed,
.vs-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.vs-video-el {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #000;
}

.vs-slide-title {
	margin: 14px 0 0;
	font-size: 13px;
	font-weight: 400;
	color: #222222;
	text-align: center;
	line-height: 16px;
}

/* ---------- OWL CAROUSEL OVERRIDES ---------- */
.vs-carousel.owl-carousel {
	margin-bottom: 10px;
}

.vs-carousel .owl-stage-outer {
	padding: 4px 2px;
}

.vs-carousel .owl-nav button.owl-prev,
.vs-carousel .owl-nav button.owl-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #ffffff;
	color: #1C3F95;
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
	transition: background-color .2s ease, color .2s ease;
}

.vs-carousel .owl-nav button.owl-prev:hover,
.vs-carousel .owl-nav button.owl-next:hover {
	background: #1C3F95;
	color: #ffffff;
}

.vs-carousel .owl-nav button.owl-prev {
	left: -22px;
}

.vs-carousel .owl-nav button.owl-next {
	right: -22px;
}

.vs-carousel .owl-dots {
	text-align: center;
	margin-top: 24px;
	line-height: 0;
	display: none;
}

.vs-carousel .owl-dots .owl-dot span {
	width: 9px;
	height: 9px;
	margin: 0 4px;
	background: #d6dbe6;
	border-radius: 50%;
	display: block;
	transition: background-color .2s ease, transform .2s ease;
}

.vs-carousel .owl-dots .owl-dot.active span,
.vs-carousel .owl-dots .owl-dot:hover span {
	background: #1C3F95;
	transform: scale(1.15);
}

/* ==========================================================================
   RESPONSIVE (fallback grid only - Owl handles its own breakpoints once loaded)
   ========================================================================== */
@media screen and (max-width: 991px) {

	.vs-carousel .owl-nav button.owl-prev,
	.vs-carousel .owl-nav button.owl-next {
		display: none;
	}

	.home section.vs-section {
		margin: 0;
	}
}

@media screen and (max-width: 767px) {
	.vs-carousel:not(.owl-loaded)>.vs-slide {
		width: 100%;
	}

	.vs-title {
		font-size: 20px;
		line-height: 26px;
	}

	.vs-play-btn {
		width: 56px;
		height: 56px;
		font-size: 18px;
	}
}