/**
 * Revive Logos: logo slider.
 * Sizes come from the slider's settings as --rhl-*-d / -t / -p (desktop / tablet / phone).
 * Without JavaScript, or for visitors who prefer reduced motion, the logos simply
 * sit in a neat centred row that wraps.
 */
.rhl {
	--rhl-h: var(--rhl-h-d, 110px);
	--rhl-w: var(--rhl-w-d, 220px);
	--rhl-g: var(--rhl-g-d, 72px);
	--rhl-n: var(--rhl-n-d, 5);
	position: relative;
	width: 100%;
	padding-top: var(--rhl-pt, 16px);
	padding-bottom: var(--rhl-pb, 16px);
}
@media (max-width: 1024px) {
	.rhl { --rhl-h: var(--rhl-h-t, 80px); --rhl-w: var(--rhl-w-t, 170px); --rhl-g: var(--rhl-g-t, 48px); --rhl-n: var(--rhl-n-t, 4); }
}
@media (max-width: 767px) {
	.rhl { --rhl-h: var(--rhl-h-p, 56px); --rhl-w: var(--rhl-w-p, 130px); --rhl-g: var(--rhl-g-p, 32px); --rhl-n: var(--rhl-n-p, 2); }
}

.rhl__viewport { overflow: hidden; }
.rhl .rhl__track {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	row-gap: calc(var(--rhl-g) / 2);
	margin: 0;
	padding: 0;
	list-style: none;
}
.rhl .rhl__item {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 calc(var(--rhl-g) / 2);
	list-style: none;
}
.rhl .rhl__item::before,
.rhl .rhl__item::marker { content: none; }
.rhl .rhl__link { display: block; line-height: 0; }

/* Every logo fits the same height, and no wider than the width limit, keeping its shape */
.rhl .rhl__img {
	display: block;
	width: auto;
	height: calc(var(--rhl-h) * var(--rhl-s, 1));
	max-width: calc(var(--rhl-w) * var(--rhl-s, 1));
	transform: translateY(var(--rhl-y, 0%));
	max-height: none;
	margin: 0;
	object-fit: contain;
	opacity: var(--rhl-o, 1);
	transition: opacity 0.4s ease, filter 0.4s ease;
	user-select: none;
	-webkit-user-drag: none;
}
.rhl--grey .rhl__img,
.rhl--grey-hover .rhl__img { filter: grayscale(1); }
.rhl--grey-hover .rhl__item:hover .rhl__img,
.rhl--grey-hover .rhl__link:focus-visible .rhl__img { filter: none; }
.rhl .rhl__item:hover .rhl__img,
.rhl .rhl__link:focus-visible .rhl__img { opacity: 1; }

/* Soft fade at the edges while it moves */
.rhl--fade.is-running:not(.is-static) .rhl__viewport {
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

/* ---------- Continuous scroll ---------- */
.rhl--scroll.is-running .rhl__track {
	flex-wrap: nowrap;
	justify-content: flex-start;
	width: max-content;
	animation: rhl-scroll var(--rhl-dur, 30s) linear infinite;
	will-change: transform;
}
.rhl--scroll.is-running[data-dir="right"] .rhl__track { animation-direction: reverse; }
.rhl--scroll.is-paused .rhl__track,
.rhl--scroll.rhl--hover-pause .rhl__viewport:hover .rhl__track,
.rhl--scroll .rhl__viewport:focus-within .rhl__track { animation-play-state: paused; }
@keyframes rhl-scroll {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(calc(-1 * var(--rhl-shift, 50%)), 0, 0); }
}

/* ---------- One logo at a time ---------- */
.rhl--step.is-running .rhl__track {
	flex-wrap: nowrap;
	justify-content: flex-start;
	transition: transform var(--rhl-move, 0.8s) cubic-bezier(0.65, 0, 0.35, 1);
	will-change: transform;
}
.rhl--step.is-running .rhl__track.is-jump { transition: none; }
.rhl--step.is-running .rhl__item {
	flex: 0 0 calc(100% / var(--rhl-n));
	min-width: 0;
}
.rhl--step.is-running .rhl__img { max-width: min(calc(var(--rhl-w) * var(--rhl-s, 1)), 100%); }
.rhl--step.is-running.is-static .rhl__track { justify-content: center; }

/* WPBakery adds 35px under content elements (e.g. a Raw HTML block holding the
   shortcode), which pushes the logos off-centre in their row. Remove it. */
.wpb_content_element:has(> .wpb_wrapper > .rhl) { margin-bottom: 0; }
