/* Logo Marquee Carousel — frontend marquee styles */

/* --lmc-duration: animation speed in seconds (higher = slower scroll)  */
/* --lmc-gap:      horizontal gap between logos in px                    */
/* --lmc-height:   max logo height in px                                 */

.lmc-marquee {
	--lmc-duration: 40s;
	--lmc-gap: 48px;
	--lmc-height: 80px;

	width: 100%;
	overflow: hidden;
	position: relative;
}

/* Fade edges for a polished look */
.lmc-marquee::before,
.lmc-marquee::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	width: 80px;
	z-index: 2;
	pointer-events: none;
}

.lmc-marquee::before {
	left: 0;
	background: linear-gradient(to right, var(--lmc-fade-color, #fff), transparent);
}

.lmc-marquee::after {
	right: 0;
	background: linear-gradient(to left, var(--lmc-fade-color, #fff), transparent);
}

/* Viewport clips overflow */
.lmc-marquee__viewport {
	overflow: hidden;
	width: 100%;
}

/* Track holds two identical groups side-by-side */
.lmc-marquee__track {
	display: flex;
	width: max-content;
	animation: lmc-scroll var(--lmc-duration) linear infinite;
	will-change: transform;
}

/* Pause on hover or keyboard focus */
.lmc-marquee:hover .lmc-marquee__track,
.lmc-marquee:focus-within .lmc-marquee__track {
	animation-play-state: paused;
}

/* Each group is a row of logos */
.lmc-marquee__group {
	display: flex;
	align-items: center;
	gap: var(--lmc-gap);
	padding-right: var(--lmc-gap);
	flex-shrink: 0;
}

/* Individual logo link */
.lmc-marquee__item {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
	outline-offset: 3px;
	transition: opacity 0.2s ease;
}

.lmc-marquee__item:hover {
	opacity: 0.75;
}

.lmc-marquee__item:focus-visible {
	outline: 2px solid #2271b1;
	border-radius: 3px;
}

/* Logo image */
.lmc-marquee__item img {
	display: block;
	height: var(--lmc-height);
	width: auto;
	max-width: none;
	object-fit: contain;
}

/* Keyframe: translate exactly 50% because the track is doubled */
@keyframes lmc-scroll {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

/* ---- Reduced motion: static horizontally-scrollable row ---- */
@media (prefers-reduced-motion: reduce) {
	.lmc-marquee__track {
		animation: none;
	}

	.lmc-marquee__viewport {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* Hide the duplicate group */
	.lmc-marquee__group[aria-hidden="true"] {
		display: none;
	}

	/* Remove fade overlays so logos at the edges aren't hidden */
	.lmc-marquee::before,
	.lmc-marquee::after {
		display: none;
	}
}
