/* SMMP client-logo marquee - SHARED, REUSABLE module.
 *
 * To use on any page:
 *   1. give the logo row container the CSS ID  smmp-logo-marquee  (Advanced -> CSS ID;
 *      container _css_classes do NOT emit on this install, which is why it is an id)
 *   2. add the page id to the smmp-logo-marquee block in the child theme functions.php
 * The row then becomes a seamless auto-scrolling strip via assets/js/smmp-marquee.js.
 * Works on both e-con-full and e-con-boxed containers. Without JS - or under
 * prefers-reduced-motion - it stays a static wrapped row. */

#smmp-logo-marquee .elementor-widget-image { flex: 0 0 auto; }

#smmp-logo-marquee img {
	height: 92px;
	width: auto;
	max-width: none;
	object-fit: contain;
}

@media (max-width: 1024px) { #smmp-logo-marquee img { height: 72px; } }
@media (max-width: 767px)  { #smmp-logo-marquee img { height: 52px; } }

/* --- classes below are applied at runtime by smmp-marquee.js --- */
#smmp-logo-marquee.smmp-marquee,
#smmp-logo-marquee > .e-con-inner.smmp-marquee {
	flex-wrap: nowrap;
	justify-content: flex-start;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}

@media (max-width: 767px) {
	#smmp-logo-marquee.smmp-marquee,
	#smmp-logo-marquee > .e-con-inner.smmp-marquee {
		-webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
		mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
	}
}

#smmp-logo-marquee .smmp-marquee-track {
	display: flex;
	align-items: center;
	gap: 36px;
	width: max-content;
	flex: 0 0 auto;
	animation: smmp-marquee-scroll 16s linear infinite;
	will-change: transform;
}

@media (max-width: 767px) { #smmp-logo-marquee .smmp-marquee-track { gap: 24px; } }

#smmp-logo-marquee.smmp-marquee:hover .smmp-marquee-track,
#smmp-logo-marquee > .e-con-inner.smmp-marquee:hover .smmp-marquee-track {
	animation-play-state: paused;
}

@keyframes smmp-marquee-scroll {
	to { transform: translateX(var(--smmp-marquee-shift, -100%)); }
}
