.jpth-marquee {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--jpth-row-gap, 2vw);
	width: 100%;
	overflow: hidden;
}

.jpth-row {
	position: relative;
	z-index: 1;
	width: 100%;
	/* overflow is intentionally not hidden here — the parent marquee clips.
	   This allows negative margin-block values to overlap rows without clipping text. */
	margin-block: var(--jpth-row-padding, 0px);
}

.jpth-marquee--fill-viewport {
	height: 100vh;
}

.jpth-marquee--fill-viewport .jpth-row {
	flex: 1;
	display: flex;
	align-items: center;
}

.jpth-track {
	display: flex;
	width: max-content;
	will-change: transform;
	animation: jpth-marquee-left 30s linear infinite;
}

.jpth-row--right .jpth-track {
	animation-name: jpth-marquee-right;
}

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

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

.jpth-group {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	gap: var(--jpth-item-gap, 2vw);
	padding-inline-end: var(--jpth-item-gap, 2vw);
}

.jpth-item {
	display: inline-block;
	white-space: nowrap;
	line-height: 1;
	transition: color 0.3s ease;
}

.jpth-marquee--pause-hover .jpth-row:hover .jpth-track {
	animation-play-state: paused;
}

.jpth-marquee--paused .jpth-track {
	animation-play-state: paused !important;
}

.jpth-separator {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	align-self: center;
	color: inherit;
	line-height: 0;
}

/* Size SVG icons rendered by Elementor's Icons Manager */
.jpth-separator svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

@media (prefers-reduced-motion: reduce) {
	.jpth-track {
		animation: none;
	}
}

/* --- 3D effects --- */

/* Shared perspective context for the per-row 3D styles. */
.jpth-marquee--3d-depth,
.jpth-marquee--3d-cylinder {
	perspective: var(--jpth-perspective, 1200px);
	transform-style: preserve-3d;
}

.jpth-marquee--3d-depth .jpth-row,
.jpth-marquee--3d-cylinder .jpth-row {
	transform-style: preserve-3d;
	transition: transform 0.3s ease;
}

/* Tilted Wall: the whole marquee leans back, like looking up at a building. */
.jpth-marquee--3d-wall {
	transform: perspective(var(--jpth-perspective, 1200px)) rotateX(var(--jpth-tilt, -20deg));
	transform-origin: 50% 100%;
}

/* Depth Parallax: alternating rows sit further back and fade slightly. */
.jpth-marquee--3d-depth .jpth-row:nth-child(even) {
	transform: translateZ(calc(var(--jpth-depth, 60px) * -1));
	opacity: 0.7;
}

/* Cylinder: rows curve away from the viewer based on distance from center. */
.jpth-marquee--3d-cylinder .jpth-row {
	transform: rotateX(calc(var(--jpth-row-i, 0) * var(--jpth-tilt, -8deg))) translateZ(var(--jpth-depth, 60px));
}

/* Isometric Grid: the whole marquee is rotated onto an isometric plane. */
.jpth-marquee--3d-isometric {
	transform: perspective(var(--jpth-perspective, 1200px)) rotateX(50deg) rotateZ(-30deg);
	transform-origin: 50% 50%;
}

/* Reflection: progressive enhancement, supported in Chromium-based browsers and Safari. */
.jpth-marquee--reflection {
	-webkit-box-reflect: below 4px linear-gradient(transparent, transparent 55%, rgba(255, 255, 255, 0.18));
}
