/**
 * Canvas Clients: design variants.
 *
 * The base `.clients-grid` logo grid lives in the theme's style.css. This sheet
 * adds the optional design layers the Clients block's "Design Variant" control
 * offers, plus the marquee track. It is registered per-block in
 * Blocks\AssetRegistry, so it is only enqueued on pages that actually render a
 * clients block.
 *
 * Every colour, radius and easing here resolves through an existing token
 * (--bs-*, --cnvs-*) rather than a literal, so a variant follows the site's
 * palette instead of fighting it.
 *
 * @package Canvas_Core
 * @since   1.0.0
 */

/* ── Cards ────────────────────────────────────────────────────────────────── */

.clients-card li {
	padding: 1.5rem;
}

.clients-card li a {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--cnvs-contrast-0, #fff);
	border-radius: 0.5rem;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	padding: 1.5rem;
	transition: var(--cnvs-transition, all 0.3s ease);
}

.clients-card li a:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
	transform: translateY(-3px);
}

/* ── Dark strip ───────────────────────────────────────────────────────────── */

.clients-dark li a {
	opacity: 0.6;
	transition: opacity 0.3s ease;
}

.clients-dark li a:hover {
	opacity: 1;
}

.clients-dark img {
	filter: brightness(0) invert(1);
}

/* ── Bordered / outlined ──────────────────────────────────────────────────── */

.clients-bordered li {
	padding: 0.75rem;
}

.clients-bordered li a {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid var(--bs-gray-300);
	border-radius: 0.5rem;
	padding: 1.25rem;
	transition: var(--cnvs-transition, all 0.3s ease);
}

.clients-bordered li a:hover {
	border-color: var(--cnvs-themecolor);
	background: rgba(var(--bs-primary-rgb), 0.03);
}

/* ── Hover tooltip names ──────────────────────────────────────────────────── */

.clients-tooltip li a {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	position: relative;
	transition: var(--cnvs-transition, all 0.3s ease);
}

.clients-tooltip li a::after {
	content: attr(data-name);
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%) translateY(5px);
	background: var(--bs-dark);
	color: var(--cnvs-contrast-0, #fff);
	padding: 0.25rem 0.75rem;
	border-radius: 4px;
	font-size: 0.75rem;
	white-space: nowrap;
	opacity: 0;
	transition: var(--cnvs-transition, all 0.3s ease);
	pointer-events: none;
}

.clients-tooltip li a:hover::after {
	opacity: 1;
	transform: translateX(-50%) translateY(-5px);
}

.clients-tooltip li a:hover {
	transform: translateY(-5px);
}

/* ── Name + tagline captions ──────────────────────────────────────────────── */

.clients-tagline li {
	padding: 1rem;
	text-align: center;
}

.clients-tagline li a {
	display: block;
	padding: 1.5rem;
	border-radius: 0.5rem;
	background: var(--bs-light);
	transition: var(--cnvs-transition, all 0.3s ease);
}

.clients-tagline li a:hover {
	background: rgba(var(--bs-primary-rgb), 0.06);
}

.clients-tagline li img {
	margin-bottom: 0.75rem;
}

.clients-tagline .client-name {
	display: block;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--cnvs-heading-color);
}

.clients-tagline .client-tagline {
	display: block;
	font-size: 0.8rem;
	color: var(--cnvs-contrast-500);
}

/* ── Marquee / infinite scroll ────────────────────────────────────────────── */

.clients-marquee-wrapper {
	overflow: hidden;
	position: relative;
}

.clients-marquee-wrapper::before,
.clients-marquee-wrapper::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 80px;
	z-index: 2;
}

.clients-marquee-wrapper::before {
	left: 0;
	background: linear-gradient(90deg, var(--cnvs-body-bg), transparent);
}

.clients-marquee-wrapper::after {
	right: 0;
	background: linear-gradient(270deg, var(--cnvs-body-bg), transparent);
}

.clients-marquee {
	--cnvs-clients-marquee-duration: 25s;

	display: flex;
	align-items: center;
	animation: cnvsClientsMarquee var(--cnvs-clients-marquee-duration) linear infinite;
	width: max-content;
}

.clients-marquee img {
	height: 70px;
	margin: 0 2.5rem;
	opacity: 0.7;
	transition: opacity 0.3s ease;
}

.clients-marquee img:hover {
	opacity: 1;
}

@keyframes cnvsClientsMarquee {
	0% {
		transform: translateX(0);
	}

	100% {
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {

	.clients-marquee {
		animation: none;
	}

	.clients-card li a,
	.clients-bordered li a,
	.clients-tooltip li a,
	.clients-tagline li a {
		transition: none;
	}
}
