/**
 * RKS Testimoni — carousel styles
 * CSS variables are set by Elementor controls; sensible defaults live here.
 */

.rks-testimoni {
	--rks-slides: 4;
	--rks-gap: 24px;

	/* 3-stop overlay gradient (each colour includes its own alpha/opacity) */
	--rks-grad-angle: 180deg;
	--rks-grad-start: rgba(0, 0, 0, 0);
	--rks-grad-start-pos: 0%;
	--rks-grad-mid: rgba(0, 0, 0, 0.35);
	--rks-grad-mid-pos: 55%;
	--rks-grad-end: rgba(9, 9, 12, 0.92);
	--rks-grad-end-pos: 100%;

	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.rks-testimoni *,
.rks-testimoni *::before,
.rks-testimoni *::after {
	box-sizing: border-box;
}

/* Viewport clips the moving track */
.rks-testimoni__viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
}

/* The moving track */
.rks-testimoni__track {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--rks-gap);
	will-change: transform;
	transform: translate3d(0, 0, 0);
	/* No CSS transition here — motion is driven by JS (requestAnimationFrame),
	   so autoplay is perfectly linear and arrows/bullets stay smooth. */
}

/* Each slide takes an equal share based on cards-per-view */
.rks-testimoni__slide {
	flex: 0 0 calc((100% - (var(--rks-slides) - 1) * var(--rks-gap)) / var(--rks-slides));
	max-width: calc((100% - (var(--rks-slides) - 1) * var(--rks-gap)) / var(--rks-slides));
	min-width: 0;
}

/* Card — the image is the whole background */
.rks-testimoni__card {
	position: relative;
	width: 100%;
	height: 460px;
	border-radius: 24px;
	overflow: hidden;
	/* Neutral fallback only visible before the image loads / if none is set. */
	background-color: #14140f;
	isolation: isolate;
}

/* Full-bleed image. The width/height are forced with !important so a theme's
   global `img { height:auto }` reset cannot shrink it back to natural size. */
.rks-testimoni__image {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	object-position: center center;
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	transition: transform 0.5s ease;
	z-index: 1;
}

/* Overlay = blended 3-stop gradient laid over the whole image.
   Each stop's colour carries its own opacity (alpha). */
.rks-testimoni__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	background-image: linear-gradient(
		var(--rks-grad-angle),
		var(--rks-grad-start) var(--rks-grad-start-pos),
		var(--rks-grad-mid) var(--rks-grad-mid-pos),
		var(--rks-grad-end) var(--rks-grad-end-pos)
	);
	pointer-events: none;
}

/* Content anchored to the bottom */
.rks-testimoni__content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	padding: 24px;
	color: #fff;
}

/* Stars */
.rks-testimoni__stars {
	display: flex;
	align-items: center;
	gap: 3px;
	margin-bottom: 16px;
	line-height: 0;
}

.rks-testimoni__star {
	width: 22px;
	height: 22px;
	display: block;
	flex: 0 0 auto;
}

.rks-testimoni__star.is-filled {
	color: #e8a317;
}

.rks-testimoni__star.is-empty {
	color: rgba(255, 255, 255, 0.25);
}

/* Testimonial text */
.rks-testimoni__text {
	font-size: 15px;
	line-height: 1.5;
	color: #fff;
	margin: 0;
}

/* Name */
.rks-testimoni__name {
	margin-top: 14px;
	font-weight: 700;
	font-size: 15px;
	color: #e8a317;
}

/* ---------------------------------------------------------------------
 * Navigation
 * ------------------------------------------------------------------- */
.rks-testimoni__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-top: 32px;
}

.rks-testimoni__arrow {
	appearance: none;
	background: none;
	border: 0;
	padding: 4px;
	margin: 0;
	cursor: pointer;
	color: #3a3a3a;
	line-height: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease, transform 0.2s ease;
}

.rks-testimoni__arrow:hover {
	color: #e8a317;
}

.rks-testimoni__arrow:active {
	transform: scale(0.92);
}

.rks-testimoni__arrow svg {
	width: 24px;
	height: 24px;
}

.rks-testimoni__arrow:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
	border-radius: 4px;
}

/* Bullets */
.rks-testimoni__dots {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
}

.rks-testimoni__dot {
	appearance: none;
	padding: 0;
	margin: 0;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 1.5px solid rgba(58, 58, 58, 0.35);
	background: transparent;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rks-testimoni__dot:hover {
	transform: scale(1.15);
}

.rks-testimoni__dot.is-active {
	background: #e8a317;
	border-color: #e8a317;
}

.rks-testimoni__dot:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Accessibility: honour reduced motion — JS also disables autoplay */
@media (prefers-reduced-motion: reduce) {
	.rks-testimoni__image {
		transition: none;
	}
}

/* Clones are purely decorative */
.rks-testimoni__slide.rks-clone {
	pointer-events: none;
}
