/* Review Media Slider for Elementor */

.rms {
	--rms-slides: 3;
	--rms-gap: 24px;
	position: relative;
	width: 100%;
}

@media (max-width: 1024px) {
	.rms { --rms-slides: 2; --rms-gap: 20px; }
}

@media (max-width: 767px) {
	.rms { --rms-slides: 1; --rms-gap: 16px; }
}

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

.rms-viewport {
	position: relative;
}

/* ---- Track & slides ------------------------------------------------ */

.rms-track {
	position: relative;
	display: flex;
	gap: var(--rms-gap);
	margin: 0;
	/* vertical room so the card shadow is not clipped by the scroll container */
	padding: 8px 0 20px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.rms-track::-webkit-scrollbar {
	display: none;
}

.rms-track:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.rms-slide {
	display: flex;
	flex: 0 0 calc((100% - (var(--rms-slides) - 1) * var(--rms-gap)) / var(--rms-slides));
	min-width: 0;
	scroll-snap-align: start;
}

/* ---- Card ---------------------------------------------------------- */

.rms-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	margin: 0;
	overflow: hidden;
	background: #fff;
	border-radius: 12px;
}

/* ---- Media --------------------------------------------------------- */

.rms-media {
	position: relative;
	flex: none;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f2f2f2;
}

.rms .rms-media img,
.rms .rms-media video,
.rms .rms-media iframe {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	object-fit: contain;
}

.rms .rms-media .rms-image-link {
	position: absolute;
	inset: 0;
	display: block;
}

.rms .rms-media iframe {
	z-index: 3;
}

.rms .rms-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.6);
	color: #fff;
	box-shadow: none;
	cursor: pointer;
	transform: translate(-50%, -50%);
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.rms .rms-play:focus-visible {
	background-color: #e11d48;
	color: #fff;
	transform: translate(-50%, -50%) scale(1.08);
}

@media (hover: hover) {
	.rms .rms-play:hover {
		background-color: #e11d48;
		color: #fff;
		transform: translate(-50%, -50%) scale(1.08);
	}
}

.rms .rms-play svg {
	width: 40%;
	height: 40%;
	margin-inline-start: 6%; /* optically centre the triangle */
	fill: currentColor;
}

.rms-media.is-playing .rms-play {
	display: none;
}

/* videos sit on black */
.rms-media--video {
	background: #000;
}

.rms-media--video[data-type="embed"].is-playing img {
	visibility: hidden;
}

/* ---- Arrows -------------------------------------------------------- */

.rms .rms-arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: #fff;
	color: #111;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.rms .rms-arrow:focus-visible {
	background-color: #111;
	color: #fff;
}

@media (hover: hover) {
	.rms .rms-arrow:hover {
		background-color: #111;
		color: #fff;
	}
}

.rms .rms-arrow[disabled] {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

.rms .rms-arrow--prev {
	inset-inline-start: 8px;
}

.rms .rms-arrow--next {
	inset-inline-end: 8px;
}

.rms .rms-arrow svg {
	width: 45%;
	height: 45%;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.rms--rtl .rms-arrow svg {
	transform: scaleX(-1);
}

/* ---- Dots ---------------------------------------------------------- */

.rms-dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 4px;
}

.rms .rms-dot {
	position: relative;
	width: 10px;
	height: 10px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: #cfcfcf;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

/* larger invisible touch target */
.rms .rms-dot::after {
	content: "";
	position: absolute;
	inset: -8px;
}

.rms .rms-dot.is-active {
	background-color: #111;
}

@media (hover: hover) {
	.rms .rms-dot:hover {
		background-color: #111;
	}
}

.rms .rms-dot.is-active {
	transform: scale(1.25);
}

/* Nothing to scroll: hide navigation */
.rms.is-static .rms-arrow,
.rms.is-static .rms-dots {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.rms *,
	.rms *::before,
	.rms *::after {
		transition: none !important;
	}
}
