/**
 * Homepage client strip (front-page.php).
 * Namespaced with sr-logorail- so it never touches the global styles.
 */

.sr-logorail {
	display: grid;
	gap: 14px;
	/* Vertical padding leaves room for the hover lift, which would otherwise be
	   clipped by the overflow needed for the horizontal mask. */
	padding: 12px 0;
	overflow: hidden;
	/*
	 * The page is RTL; the strip must be laid out LTR so a max-content flex
	 * track starts at the left edge and a -50% translate loops seamlessly.
	 */
	direction: ltr;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

.sr-logorail__row { position: relative; }

.sr-logorail__track {
	display: flex;
	width: max-content;
	animation: sr-logorail-left 62s linear infinite;
	will-change: transform;
}

.sr-logorail__row--b .sr-logorail__track {
	animation-name: sr-logorail-right;
	animation-duration: 74s;
}

.sr-logorail__row:hover .sr-logorail__track,
.sr-logorail__row:focus-within .sr-logorail__track { animation-play-state: paused; }

.sr-logorail__group { display: flex; }

.sr-logorail__item {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 148px;
	height: 148px;
	margin-inline-end: 14px;
	padding: 14px;
	border: 1px solid var(--sr-border);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 12px 26px -24px rgba(9, 30, 66, .65);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.sr-logorail__item:hover {
	transform: translateY(-4px);
	border-color: #c9dbf3;
	box-shadow: 0 24px 42px -28px rgba(11, 74, 162, .6);
}

.sr-logorail__item img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform .25s ease;
}

.sr-logorail__item:hover img { transform: scale(1.06); }

@keyframes sr-logorail-left {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(-50%, 0, 0); }
}

@keyframes sr-logorail-right {
	from { transform: translate3d(-50%, 0, 0); }
	to { transform: translate3d(0, 0, 0); }
}

@media (max-width: 900px) {
	.sr-logorail { gap: 10px; }

	.sr-logorail__item {
		width: 120px;
		height: 120px;
		margin-inline-end: 10px;
		padding: 12px;
		border-radius: 16px;
	}

	.sr-logorail__track { animation-duration: 48s; }
	.sr-logorail__row--b .sr-logorail__track { animation-duration: 56s; }
}

@media (max-width: 600px) {
	.sr-logorail__item {
		width: 100px;
		height: 100px;
		margin-inline-end: 8px;
		padding: 10px;
		border-radius: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sr-logorail { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
	.sr-logorail__track { animation: none; }
}
