/* ==========================================================================
   Webbytroops Logo Marquee — marquee.css
   v1.1.0
   ========================================================================== */

/* --- Keyframes (CSS fallback — JS replaces these with pixel-exact values) - */

@keyframes wlm-scroll-left {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

@keyframes wlm-scroll-right {
	from { transform: translateX(-50%); }
	to   { transform: translateX(0); }
}

/* --- Section wrapper ------------------------------------------------------ */

.wlm__section {
	width: 100%;
	overflow: hidden;
}

/* --- Header --------------------------------------------------------------- */

.wlm__header {
	text-align: center;
	padding: 60px 20px 40px;
	max-width: 820px;
	margin: 0 auto;
}

/* Badge */
.wlm__badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #cdd5e0;
	background: rgba(255, 255, 255, 0.06);
	margin-bottom: 24px;
}

.wlm__badge-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #3b82f6;
	flex-shrink: 0;
}

/* Heading */
.wlm__heading {
	font-size: clamp(1.8rem, 4vw, 3rem);
	font-weight: 700;
	color: #ffffff;
	line-height: 1.2;
	margin: 0;
}

/* Gradient text on the highlighted number/word.
   Three-stop gradient — each stop colour and position is a CSS custom
   property written by the Elementor colour/slider controls.
   Defaults match the original design: #fff → #7ba7ff → #00f. */
.wlm__heading-highlight {
	background: linear-gradient(
		var(--wlm-hi-angle,     135deg),
		var(--wlm-hi-start,     #ffffff)  var(--wlm-hi-start-pos,   0%),
		var(--wlm-hi-mid,       #7ba7ff)  var(--wlm-hi-mid-pos,    40%),
		var(--wlm-hi-end,       #0000ff)  var(--wlm-hi-end-pos,   100%)
	);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	/* Solid fallback for browsers that don't support background-clip:text */
	color: #7ba7ff;
}

.wlm__heading-line {
	width: 60px;
	height: 3px;
	background: #3b82f6;
	margin: 18px auto 24px;
	border-radius: 2px;
}

/* Description */
.wlm__description {
	font-size: 1rem;
	color: #9ca3af;
	line-height: 1.75;
	margin: 0 0 32px;
}

/* Stats row */
.wlm__stats {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: nowrap;
	gap: 0;
	overflow-x: auto;
}

.wlm__stat {
	display: flex;
	align-items: baseline;
	gap: 6px;
	padding: 0 24px;
}

.wlm__stat-number {
	font-size: 1.05rem;
	font-weight: 700;
	color: #ffffff;
}

.wlm__stat-label {
	font-size: 0.875rem;
	color: #9ca3af;
}

.wlm__stat-sep {
	color: rgba(255, 255, 255, 0.2);
	font-size: 1.2rem;
	line-height: 1;
	user-select: none;
}

@media (max-width: 767px) {
	.wlm__stats {
		flex-direction: column;
		align-items: center;
		gap: 16px;
		overflow-x: visible;
	}

	.wlm__stat {
		padding: 0;
	}

	.wlm__stat-sep {
		display: none;
	}
}

/* --- Marquee rows --------------------------------------------------------- */

.wlm__rows {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-bottom: 60px;
}

/* Viewport: clips the infinite track.
   Extra top padding + negative margin lets card hover-lift (translateY)
   stay visible instead of being clipped by overflow:hidden. */
.wlm__viewport {
	overflow: hidden;
	position: relative;
	width: 100%;
	padding-top: 6px;
	margin-top: -6px;
	/* Isolate repaints to this element — no layout thrash from siblings */
	contain: layout paint;
}

/* Fade-edge gradient overlays */
.wlm__viewport--fade::before,
.wlm__viewport--fade::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	width: 100px;
	z-index: 2;
	pointer-events: none;
}

.wlm__viewport--fade::before { left:  0; }
.wlm__viewport--fade::after  { right: 0; }

/* Pause-on-hover — !important so it overrides any inline animation-play-state
   that may be set by JS or the browser's own animation shorthand expansion. */
.wlm__viewport--pause-hover:hover .wlm__track {
	animation-play-state: paused !important;
}

/* --- Track ----------------------------------------------------------------
   IMPORTANT: cards use margin-right instead of gap so the seamless loop
   maths work out: total track = 2 × N × (card_width + margin), and
   translateX(-50%) moves exactly N × (card_width + margin) — no jump.
   With flex gap the half-gap offset causes a visible stutter at the seam.
   ----------------------------------------------------------------------- */

.wlm__track {
	display: flex;
	width: max-content;
	padding: 12px 0;
	/* GPU-composite the animation to its own layer */
	will-change: transform;
}

.wlm__track--left {
	animation: wlm-scroll-left var(--wlm-speed, 40s) linear infinite;
}

.wlm__track--right {
	animation: wlm-scroll-right var(--wlm-speed, 40s) linear infinite;
}

/* Freeze animation in the Elementor editor panel */
.elementor-editor-active .wlm__track {
	animation-play-state: paused;
}

/* --- Card -----------------------------------------------------------------
   Dark glass-morphism style matching the original design reference.
   overflow:hidden is mandatory — it clips the image to the border-radius.
   ----------------------------------------------------------------------- */

.wlm__card {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Default gap between cards — Elementor overrides margin-right via its
	   card_gap control, keeping the loop math correct. */
	margin-right: 16px;
	height: 80px;
	min-width: 120px;
	padding: 12px 20px;
	box-sizing: border-box;
	border-radius: 12px;
	/* Glass style */
	background: #ffffff0f;
	border: 1px solid #ffffff21;
	box-shadow:
		0 4px 16px #00000059,
		0 1px 3px #0003,
		inset 0 1px #ffffff14;
	/* Clips image to border-radius */
	overflow: hidden;
	/* Smooth hover transition */
	transition:
		background     0.3s ease,
		border-color   0.3s ease,
		box-shadow     0.3s ease,
		transform      0.3s ease;
}

.wlm__card:hover {
	background: #ffffff1a;
	border-color: #fff3;
	transform: translateY(-2px);
	box-shadow:
		0 12px 32px #00000073,
		0 3px 8px #00000040,
		inset 0 1px #ffffff1f;
}

.wlm__card img {
	height: 100%;
	width: auto;
	max-width: 160px;
	object-fit: contain;
	display: block;
	/* Inherit border-radius clip from parent overflow:hidden */
}
