/* Partner logos ticker - [sector_partner_marquee], sector-partners.php.
 * The track holds the list twice; shifting it left by one list width brings the copy to where
 * the original was, so the loop has no visible jump. Each list ends with a trailing gap
 * (padding-right = gap) so the seam between the copies is a normal gap.
 * sector-partners.js drives the movement (constant --sc-mq-speed, drag by hand) and marks the
 * strip .is-js; without the script the CSS animation below runs at --sc-mq-dur instead. */

.sc-marquee {
	--sc-mq-gap: 96px;
	--sc-mq-h: 56px;
	--sc-mq-max: 180px;
	--sc-mq-speed: 42;  /* px per second, read by the script */
	--sc-mq-dur: 120s;  /* no-script fallback */
	overflow: hidden;
	cursor: grab;
	touch-action: pan-y; /* a vertical swipe still scrolls the page; a sideways one drags the strip */
	/* soft edges instead of logos being cut off at the screen edge */
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.sc-marquee.is-dragging { cursor: grabbing; }

.sc-marquee-track {
	display: flex;
	width: max-content;
	animation: sc-marquee var(--sc-mq-dur) linear infinite;
	will-change: transform;
}

.sc-marquee.is-js .sc-marquee-track { animation: none; }

.sc-marquee:hover .sc-marquee-track { animation-play-state: paused; }

.sc-marquee-list {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: var(--sc-mq-gap);
	margin: 0;
	padding: 0 var(--sc-mq-gap) 0 0;
	list-style: none;
}

.sc-marquee-item { flex-shrink: 0; }

.sc-marquee-item img {
	display: block;
	width: auto;
	height: var(--sc-mq-h);
	max-width: var(--sc-mq-max);
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
	pointer-events: none;
}

@keyframes sc-marquee {
	to { transform: translateX(-50%); }
}

@media (max-width: 1023px) {
	.sc-marquee { --sc-mq-gap: 72px; --sc-mq-speed: 40; --sc-mq-dur: 110s; }
}

@media (max-width: 767px) {
	.sc-marquee { --sc-mq-gap: 56px; --sc-mq-h: 44px; --sc-mq-max: 140px; --sc-mq-speed: 34; --sc-mq-dur: 100s; }
}

/* Less motion, no script: a still strip that scrolls sideways. (With the script it simply
   stops moving on its own and can still be dragged.) */
@media (prefers-reduced-motion: reduce) {
	.sc-marquee:not(.is-js) { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
	.sc-marquee:not(.is-js) .sc-marquee-track { animation: none; }
	.sc-marquee:not(.is-js) .sc-marquee-list[aria-hidden="true"] { display: none; }
}
