.vts-wrap {
	--vts-persp: 2000px;
	--vts-rx: 18deg;
	--vts-ry: 0deg;
	--vts-rz: 15deg;
	--vts-skx: 0deg;
	--vts-sky: 0deg;
	--vts-sc: 1;
	--vts-tx: 0px;
	--vts-ty: 0px;
	--vts-fade: 15%;
	--vts-tilt-delay: 1.2s;
	--vts-tilt-dur: 1.8s;
	position: relative;
	width: 100%;
}

/* Tilt intro: start straight, then ease into the configured tilt.
   Both states list the same transform functions so they interpolate smoothly. */
.vts-tilt-intro:not(.vts-tilted) .vts-inner {
	transform:
		translate(var(--vts-tx), var(--vts-ty))
		rotateX(0deg)
		rotateY(0deg)
		rotateZ(0deg)
		skew(0deg, 0deg)
		scale(var(--vts-sc));
}

.vts-tilt-intro:not(.vts-tilt-done) .vts-inner {
	transition: transform var(--vts-tilt-dur) cubic-bezier(0.22, 0.8, 0.24, 1) var(--vts-tilt-delay);
}

@media (prefers-reduced-motion: reduce) {
	.vts-tilt-intro .vts-inner { transition: none !important; }
}

.vts-viewport {
	position: relative;
	width: 100%;
	height: 700px;
	overflow: hidden;
}

.vts-stage {
	position: absolute;
	inset: 0;
	perspective: var(--vts-persp);
}

/* Bigger than the viewport in BOTH directions so rotation / scale / shift never
   reveals empty space. Width is centred and grows when Scale < 1. JS clones
   columns until this whole area is filled, so slides always span full width. */
.vts-inner {
	position: absolute;
	left: calc(50% - 100% / var(--vts-sc));
	top: -75%;
	width: calc(200% / var(--vts-sc));
	height: 250%;
	transform-origin: 50% 50%;
	transform:
		translate(var(--vts-tx), var(--vts-ty))
		rotateX(var(--vts-rx))
		rotateY(var(--vts-ry))
		rotateZ(var(--vts-rz))
		skew(var(--vts-skx), var(--vts-sky))
		scale(var(--vts-sc));
}

.vts-cols {
	display: flex;
	gap: 10px;
	height: 100%;
	overflow: hidden;
	justify-content: center;
}

.vts-col {
	flex: 0 0 240px;
	width: 240px;
	min-width: 0;
	height: 100%;
	overflow: hidden;
}

.vts-track {
	display: flex;
	flex-direction: column;
	animation: vts-scroll 40s linear infinite;
}

.vts-track.vts-down {
	animation-direction: reverse;
}

.vts-group {
	display: flex;
	flex-direction: column;
	flex: none;
	gap: 10px;
	padding-bottom: 10px; /* equals gap, keeps the loop seamless */
}

.vts-item {
	position: relative;
	display: block;
	flex: none;
	width: 100%;
	aspect-ratio: auto;
	overflow: hidden;
	text-decoration: none;
}

.vts-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	max-width: none;
	backface-visibility: hidden;
}

.vts-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 12px 14px;
	font-size: 14px;
	color: #fff;
	background: rgba(0, 0, 0, 0.5);
}

@keyframes vts-scroll {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(0, -50%, 0); }
}

/* pause only while the widget is off screen.
   Hover slow-down of a single slide is handled in JS (smooth playbackRate). */
.vts-wrap.vts-offscreen .vts-track {
	animation-play-state: paused;
}

/* colour only on hover: black & white until the image is hovered */
.vts-gray-yes .vts-item img {
	filter: grayscale(1);
	transition: filter 0.4s ease, transform 0.4s ease;
}

.vts-gray-yes .vts-item:hover img {
	filter: grayscale(0);
}

/* edge fade (mask) */
.vts-fade-y .vts-viewport {
	-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--vts-fade), #000 calc(100% - var(--vts-fade)), transparent 100%);
	mask-image: linear-gradient(to bottom, transparent 0, #000 var(--vts-fade), #000 calc(100% - var(--vts-fade)), transparent 100%);
}

.vts-fade-x .vts-viewport {
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--vts-fade), #000 calc(100% - var(--vts-fade)), transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 var(--vts-fade), #000 calc(100% - var(--vts-fade)), transparent 100%);
}

.vts-fade-x.vts-fade-y .vts-viewport {
	-webkit-mask-image:
		linear-gradient(to bottom, transparent 0, #000 var(--vts-fade), #000 calc(100% - var(--vts-fade)), transparent 100%),
		linear-gradient(to right, transparent 0, #000 var(--vts-fade), #000 calc(100% - var(--vts-fade)), transparent 100%);
	mask-image:
		linear-gradient(to bottom, transparent 0, #000 var(--vts-fade), #000 calc(100% - var(--vts-fade)), transparent 100%),
		linear-gradient(to right, transparent 0, #000 var(--vts-fade), #000 calc(100% - var(--vts-fade)), transparent 100%);
	-webkit-mask-composite: source-in;
	mask-composite: intersect;
}

/* Height follows the parent container (default mode) */
.elementor-widget.vts-height-fill {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	align-self: stretch;
	min-height: 0;
}

.vts-height-fill > .elementor-widget-container {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.vts-height-fill .vts-wrap {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.vts-height-fill .vts-viewport {
	flex: 1 1 auto;
	height: auto;
}

/* ================= HERO WIDGET ================= */
.vts-hero {
	--vts-ov-c: #ffffff;
	--vts-ov-white: 46;
	--vts-ov-soft: 14;
	--vts-ov-s: 100%;
	--vts-ov-blur: 6px;
	position: relative;
	width: 100%;
	overflow: hidden;
}

.vts-hero-slider {
	position: relative;
	width: 100%;
}

/* fade that protects the text and lets the slider show faintly behind it */
.vts-hero-fade {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: calc((var(--vts-ov-white) + var(--vts-ov-soft)) * 1%);
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(
		to right,
		color-mix(in srgb, var(--vts-ov-c) var(--vts-ov-s), transparent) 0%,
		color-mix(in srgb, var(--vts-ov-c) var(--vts-ov-s), transparent) calc(var(--vts-ov-white) / (var(--vts-ov-white) + var(--vts-ov-soft)) * 100%),
		transparent 100%
	);
	-webkit-backdrop-filter: blur(var(--vts-ov-blur));
	backdrop-filter: blur(var(--vts-ov-blur));
	/* fully solid up to white area, soft fade only in the last part */
	-webkit-mask-image: linear-gradient(to right, #000 calc(var(--vts-ov-white) / (var(--vts-ov-white) + var(--vts-ov-soft)) * 100%), transparent 100%);
	mask-image: linear-gradient(to right, #000 calc(var(--vts-ov-white) / (var(--vts-ov-white) + var(--vts-ov-soft)) * 100%), transparent 100%);
}

.vts-hero-content {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	padding: 40px 40px 40px 116px;
	pointer-events: none;
	box-sizing: border-box;
}

.vts-hero-inner {
	width: 100%;
	max-width: 640px;
	pointer-events: auto;
}

.vts-hero-title {
	margin: 0 0 28px;
	font-size: 64px;
	font-weight: 500;
	line-height: 1.08;
	letter-spacing: -0.04em;
	color: #0a0a0a;
}

.vts-hero-text,
.vts-hero-note {
	margin: 0 0 24px;
	font-size: 20px;
	line-height: 1.55;
	letter-spacing: -0.02em;
	color: #5b5b5f;
}

.vts-hero-note {
	font-style: italic;
}

.vts-btns {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 32px;
}

.vts-btns .vts-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Elementor button markup: content wrapper + optional icon */
.vts-btn .elementor-button-content-wrapper {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.vts-btn .elementor-button-icon {
	display: inline-flex;
	align-items: center;
	font-size: 0.9em;
}

.vts-btn .elementor-button-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* text blocks use Elementor's text-editor wrapper: keep inner paragraphs tidy */
.vts-hero-text p,
.vts-hero-note p {
	margin: 0 0 0.6em;
}

.vts-hero-text p:last-child,
.vts-hero-note p:last-child {
	margin-bottom: 0;
}

@media (max-width: 1024px) {
	.vts-hero-title { font-size: 46px; }
	.vts-hero-text, .vts-hero-note { font-size: 18px; }
}

@media (max-width: 767px) {
	.vts-hero-title { font-size: 34px; }
	.vts-hero-text, .vts-hero-note { font-size: 16px; }
	.vts-btns { margin-top: 22px; }
}

/* hero + "follow parent container height" mode */
.vts-height-fill .vts-hero,
.vts-height-fill .vts-hero-slider {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}
