/* =========================================================
   DianApps – Video Testimonial Slider  (v1.3.0)
========================================================= */

.video-testimonial-section {
	--vts-blue: #1e3a8a;
	--vts-icon-blue: #2443a2;
	position: relative;
	width: 100%;
	padding: var(--vts-top) clamp(12px, 2vw, 22px) var(--vts-bottom);
	box-sizing: border-box;
	overflow: hidden;
}

.video-testimonial-section *,
.video-testimonial-section *::before,
.video-testimonial-section *::after {
	box-sizing: border-box;
}

.video-testimonial-slider {
	width: 100%;
}

/* Gap between cards: half the gap on each side, list pulled back so edges align. */
.video-testimonial-track .slick-list {
	margin: 0 calc(var(--vts-gap) / -2);
}

/* Before Slick starts: show a single tidy row instead of stacked cards. */
.video-testimonial-track:not(.slick-initialized) {
	display: flex;
	overflow: hidden;
	margin: 0 calc(var(--vts-gap) / -2);
}

.video-testimonial-track:not(.slick-initialized) > .video-testimonial-card {
	flex: 0 0 calc(25% - var(--vts-gap));
}

@media (max-width: 1024px) {
	.video-testimonial-track:not(.slick-initialized) > .video-testimonial-card { flex-basis: calc(33.333% - var(--vts-gap)); }
}

@media (max-width: 767px) {
	.video-testimonial-track:not(.slick-initialized) > .video-testimonial-card { flex-basis: calc(100% - var(--vts-gap)); }
}

/* ---------- Card ---------- */
.video-testimonial-card {
	position: relative;
	height: var(--vts-height) !important;
	margin: 0 calc(var(--vts-gap) / 2) !important;
	padding: 0 !important;
	overflow: hidden;
	isolation: isolate;
	border: 0 !important;
	border-radius: var(--vts-radius);
	background: var(--vts-blue) !important;
	outline: none;
	transform: translateZ(0); /* keeps rounded corners clipped in Safari while the image scales */
	cursor: default;
}

.video-testimonial-card .video-testimonial-image {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	border-radius: 0 !important;
	object-fit: cover !important;
	object-position: center top;
	transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Resting gradient: blue fades in over the lower half */
.video-testimonial-card::after,
.video-testimonial-card::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.video-testimonial-card::after {
	z-index: 1;
	background: linear-gradient(
		to bottom,
		rgba(30, 58, 138, 0) 0%,
		rgba(30, 58, 138, 0) 46%,
		rgba(30, 58, 138, 0.35) 58%,
		rgba(30, 58, 138, 0.8) 72%,
		rgba(30, 58, 138, 0.97) 86%,
		#1e3a8a 100%
	);
}

/* Hover gradient: rises higher so the full review stays readable */
.video-testimonial-card::before {
	z-index: 2;
	opacity: 0;
	background: linear-gradient(
		to bottom,
		rgba(30, 58, 138, 0) 0%,
		rgba(30, 58, 138, 0.12) 22%,
		rgba(30, 58, 138, 0.5) 45%,
		rgba(30, 58, 138, 0.86) 62%,
		#1e3a8a 80%,
		#1e3a8a 100%
	);
	transition: opacity 0.5s ease;
}

/* ---------- Top-left action icon (play video / open link) ---------- */
.video-testimonial-section .video-testimonial-action {
	position: absolute;
	top: clamp(10px, 0.9vw, 14px);
	left: clamp(10px, 0.9vw, 14px);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: clamp(36px, 3.3vw, 44px);
	height: clamp(36px, 3.3vw, 44px);
	min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #fff !important;
	/* thin inner ring, as in the design */
	box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px rgba(80, 70, 60, 0.28), 0 4px 14px -6px rgba(0, 0, 0, 0.35) !important;
	color: var(--vts-icon-blue) !important;
	cursor: pointer;
	text-decoration: none !important;
	transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.video-testimonial-action svg {
	display: block;
	width: 48%;
	height: 48%;
}

.video-testimonial-play svg {
	width: 44%;
	height: 44%;
	margin-left: 2px; /* optical centring of the triangle */
}

.video-testimonial-section{
	padding-top: 20px;
}

.video-testimonial-section .video-testimonial-action:hover,
.video-testimonial-section .video-testimonial-action:focus-visible {
	transform: scale(1.08);
	background: var(--vts-icon-blue) !important;
	color: #fff !important;
	box-shadow: inset 0 0 0 2px var(--vts-icon-blue), inset 0 0 0 3px rgba(255, 255, 255, 0.45), 0 6px 18px -6px rgba(0, 0, 0, 0.45) !important;
}

.video-testimonial-section .video-testimonial-action:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ---------- Text content ---------- */
.video-testimonial-content {
	position: absolute;
	left: clamp(14px, 1.3vw, 20px);
	right: clamp(14px, 1.3vw, 20px);
	bottom: clamp(16px, 1.5vw, 22px);
	z-index: 3;
	color: #fff;
}

.video-testimonial-stars {
	display: flex;
	gap: 3px;
	margin: 0 0 10px !important;
	line-height: 0;
	color: #fbbf24;
}

.video-testimonial-stars svg {
	display: block;
	flex: 0 0 auto;
	width: clamp(12px, 1.1vw, 15px);
	height: clamp(12px, 1.1vw, 15px);
}

.video-testimonial-stars .is-off {
	color: rgba(255, 255, 255, 0.35);
}

.video-testimonial-role {
	margin: 0 0 6px !important;
	font-size: clamp(13px, 1.15vw, 16px);
	line-height: 1.3;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.9);
}

.video-testimonial-name {
	margin: 0 0 12px !important;
	font-size: clamp(20px, 1.9vw, 26px);
	line-height: 1.15;
	font-weight: 500;
	color: #fff;
}

/* 3 lines with "…" at rest; the full review opens on hover / focus / tap */
.video-testimonial-section .video-testimonial-description {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	max-height: calc(1.55em * 3);
	margin: 0 !important;
	padding: 0 !important;
	font-size: clamp(13px, 1.12vw, 15px);
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.94);
	transition: max-height 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Open state ---------- */
@media (hover: hover) {
	.video-testimonial-card:hover::before { opacity: 1; }
	.video-testimonial-card:hover .video-testimonial-image { transform: scale(1.05); }
	.video-testimonial-section .video-testimonial-card:hover .video-testimonial-description {
		-webkit-line-clamp: unset;
		line-clamp: none;
		max-height: calc(1.55em * 11);
	}
}

.video-testimonial-card:focus-within::before,
.video-testimonial-card.is-open::before {
	opacity: 1;
}

.video-testimonial-card:focus-within .video-testimonial-image,
.video-testimonial-card.is-open .video-testimonial-image {
	transform: scale(1.05);
}

.video-testimonial-section .video-testimonial-card:focus-within .video-testimonial-description,
.video-testimonial-section .video-testimonial-card.is-open .video-testimonial-description {
	-webkit-line-clamp: unset;
	line-clamp: none;
	max-height: calc(1.55em * 11);
}

.video-testimonial-card:focus-visible {
	box-shadow: inset 0 0 0 2px #fff;
}

/* ---------- Navigation ---------- */
.video-testimonial-navigation {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	margin-top: clamp(24px, 3vw, 42px);
}

.video-testimonial-section .video-testimonial-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: clamp(34px, 2.7vw, 40px);
	height: clamp(34px, 2.7vw, 40px);
	min-height: 0 !important;
	padding: 0 !important;
	border-radius: 50% !important;
	border: 1px solid #c3c9d6 !important;
	background: transparent !important;
	color: #6b7280 !important;
	cursor: pointer;
	box-shadow: none !important;
	transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.video-testimonial-nav svg {
	display: block;
	width: 45%;
	height: 45%;
}

.video-testimonial-section .video-testimonial-nav.next {
	background: var(--vts-blue) !important;
	border-color: var(--vts-blue) !important;
	color: #fff !important;
}

.video-testimonial-section .video-testimonial-nav.prev:hover,
.video-testimonial-section .video-testimonial-nav.prev:focus-visible {
	border-color: var(--vts-blue) !important;
	color: var(--vts-blue) !important;
}

.video-testimonial-section .video-testimonial-nav.next:hover,
.video-testimonial-section .video-testimonial-nav.next:focus-visible {
	background: #2c52be !important;
	border-color: #2c52be !important;
}

.video-testimonial-section .video-testimonial-nav:active {
	transform: scale(0.94);
}

.video-testimonial-section .video-testimonial-nav.slick-disabled {
	opacity: 0.4;
	cursor: default;
	transform: none;
}

/* Optional dots (Settings > Dots Navigation) */
.video-testimonial-section .slick-dots {
	display: flex !important;
	justify-content: center;
	gap: 8px;
	margin: 20px 0 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.video-testimonial-section .slick-dots li {
	margin: 0 !important;
}

.video-testimonial-section .slick-dots button {
	width: 8px;
	height: 8px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50%;
	background: #c3c9d6 !important;
	font-size: 0;
	cursor: pointer;
}

.video-testimonial-section .slick-dots .slick-active button {
	background: var(--vts-blue) !important;
}

/* ---------- Video modal ---------- */
.video-testimonial-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 25px;
	background: rgba(5, 13, 53, 0.9);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-testimonial-modal.active {
	opacity: 1;
	visibility: visible;
}

.video-testimonial-modal-content {
	position: relative;
	width: 90%;
	max-width: 1000px;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 12px;
	transform: scale(0.94);
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.video-testimonial-modal.active .video-testimonial-modal-content {
	transform: none;
}

.video-testimonial-modal iframe {
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: 12px;
}

.video-testimonial-modal .video-testimonial-close {
	position: absolute;
	top: -48px;
	right: 0;
	z-index: 10;
	width: 38px;
	height: 38px;
	min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: #050d35 !important;
	font-size: 25px;
	line-height: 1;
	cursor: pointer;
}

@media (max-width: 480px) {
	.video-testimonial-modal-content { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.video-testimonial-section *,
	.video-testimonial-section *::before,
	.video-testimonial-section *::after,
	.video-testimonial-modal,
	.video-testimonial-modal * {
		transition: none !important;
		animation: none !important;
	}
}

.video-testimonials-section{
	padding-bottom: 60px;
	.video-testimonial-section{
		padding-bottom: 0px;
	}
}