/**
 * Homepage clients / partner logo strip.
 *
 * Pure-CSS infinite marquee with GSAP enhancement when available.
 * Items keep their natural width — the track simply scrolls left
 * by 50% (one full duplicated set) for a seamless loop.
 *
 * @package Vantage_Journeys
 */

.clients-strip {
	position: relative;
	z-index: 2;
}

.clients-strip__wrapper {
	border: 1px solid var(--color-border);
	padding: 60px 30px 70px;
	background-color: var(--surface-grey-default);
	box-sizing: border-box;
}

@media (max-width: 1199.98px) {
	.clients-strip__wrapper {
		padding: 40px 30px 50px;
	}
}

/* ── Header ── */

.clients-strip__header {
	margin-bottom: 37px;
	text-align: center;
}

.clients-strip__title {
	margin: 0;
	font-family: var(--font-family-body);
	font-size: clamp(var(--font-size-md), 2vw, var(--font-size-lg));
	font-weight: var(--font-weight-regular);
	line-height: var(--line-height-snug);
	color: var(--color-text-primary);
}

@media (max-width: 1199.98px) {
	.clients-strip__title {
		font-size: 18px;
	}
}

/* ── Viewport — fade edges + hide overflow ── */

.clients-strip__viewport {
	position: relative;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(
		to right,
		transparent,
		#000 10%,
		#000 90%,
		transparent
	);
	mask-image: linear-gradient(
		to right,
		transparent,
		#000 10%,
		#000 90%,
		transparent
	);
}

/* ── Track (the scrolling <ul>) ── */

.clients-strip__track {
	display: flex;
	align-items: center;
	gap: 60px;
	width: max-content;
	margin: 0;
	padding: 0;
	list-style: none;
	animation: clients-strip-scroll 30s linear infinite;
}

/* Pause on hover */
.clients-strip__viewport:hover .clients-strip__track {
	animation-play-state: paused;
}

/* GSAP override — when GSAP is animating, kill the CSS animation. */
.clients-strip--is-animating .clients-strip__track {
	animation: none;
}

@keyframes clients-strip-scroll {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(-50%);
	}
}

/* Static fallback (reduced-motion / JS override). */
.clients-strip__track--static {
	flex-wrap: wrap;
	justify-content: center;
	width: 100%;
	max-width: 100%;
	animation: none;
}

/* ── Item ── */

.clients-strip__item {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ── Thumbnail container ── */

.clients-strip__thumbnail {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.clients-strip__thumbnail img {
	margin: 0 auto;
}

/* ── Logo image ── */

.clients-strip__logo {
	display: block;
	height: 50px;
	width: auto;
	object-fit: contain;
	object-position: center;
	filter: grayscale(100%);
	opacity: 0.7;
	transition: all 0.3s ease;
}

.clients-strip__item:hover .clients-strip__logo,
.clients-strip__item:focus-within .clients-strip__logo {
	filter: grayscale(0%);
	opacity: 1;
	transform: scale(1.05);
}

/* ── Responsive ── */

@media (max-width: 768px) {
	.clients-strip__track {
		gap: 30px;
	}

	.clients-strip__logo {
		height: 35px;
	}
}

/* ── Reduced-motion override ── */

@media (prefers-reduced-motion: reduce) {
	.clients-strip__viewport {
		-webkit-mask-image: none;
		mask-image: none;
	}

	.clients-strip__track {
		animation: none;
		flex-wrap: wrap;
		justify-content: center;
		width: 100%;
		max-width: 100%;
		gap: 30px 40px;
	}
}
