/* Premium Image Marquee — Frontend Styles
   Smoothness is achieved via a pure CSS transform animation on a track that
   contains the image sequence duplicated exactly once. Animating a plain
   -50% translate on a GPU-accelerated transform (not left/margin) is what
   removes any jerk/reset-jump, because the duplicate sequence lines up
   pixel-perfectly with the original when the loop restarts. */

.pim-wrapper {
	position: relative;
	width: 100%;
	background: var(--pim-bg, transparent);
	padding: 8px 0;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pim-viewport {
	width: 100%;
	overflow: hidden;
	position: relative;
}

.pim-edge-fade .pim-viewport {
	-webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
	mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

.pim-track {
	display: flex;
	width: max-content;
	will-change: transform;
	animation-name: pim-scroll-left;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
	animation-duration: var(--pim-speed, 40s);
}

.pim-wrapper[data-direction="right"] .pim-track {
	animation-name: pim-scroll-right;
}

.pim-track.pim-paused,
.pim-wrapper:hover .pim-track.pim-hover-pause {
	animation-play-state: paused;
}

.pim-track-seq {
	display: flex;
	flex-shrink: 0;
	gap: var(--pim-gap, 20px);
	padding-right: var(--pim-gap, 20px);
}

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

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

.pim-item {
	margin: 0;
	flex: 0 0 auto;
	display: block;
	position: relative;
	height: var(--pim-img-h, 220px);
}

.pim-hover-effect .pim-item {
	transition: transform .35s cubic-bezier(.22,.68,0,1.71);
}

.pim-hover-effect .pim-item:hover {
	transform: translateY(-6px) scale(1.015);
	z-index: 2;
}

/* White "card" every logo sits inside — equal height, image centered
   and never distorted regardless of its natural aspect ratio. */
.pim-item-card {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: #ffffff;
	border-radius: var(--pim-radius, 14px);
	box-sizing: border-box;
	padding: 12% 14%;
	overflow: hidden;
	transition: box-shadow .35s ease;
}

.pim-shadow .pim-item-card {
	box-shadow: 0 6px 18px rgba(20,20,30,0.10), 0 1px 3px rgba(20,20,30,0.08);
}

.pim-shadow.pim-hover-effect .pim-item:hover .pim-item-card {
	box-shadow: 0 20px 40px rgba(20,20,30,0.18), 0 4px 10px rgba(20,20,30,0.10);
}

.pim-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: var(--pim-fit, contain);
	pointer-events: none;
	user-select: none;
}

/* --- Navigation Arrows --- */
.pim-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: none;
	cursor: pointer;
	color: #fff;
	background: var(--pim-accent, #6d28d9);
	opacity: 0.92;
	transition: opacity .2s ease, transform .2s ease;
}
.pim-nav:hover { opacity: 1; transform: translateY(-50%) scale(1.08); }
.pim-nav-prev { left: 10px; }
.pim-nav-next { right: 10px; }

.pim-nav-circle .pim-nav { border-radius: 50%; }
.pim-nav-square .pim-nav { border-radius: 6px; }
.pim-nav-minimal .pim-nav {
	background: rgba(255,255,255,0.85);
	color: #222;
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

/* --- Dot Pagination --- */
.pim-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}
.pim-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	border: none;
	padding: 0;
	background: rgba(120,120,130,0.3);
	cursor: pointer;
	transition: background .25s ease, transform .25s ease;
}
.pim-dot.is-active {
	background: var(--pim-active, var(--pim-accent, #6d28d9));
	transform: scale(1.25);
}

/* --- Responsive: image sizing per visible-count breakpoints ---
   The track's parent (.pim-viewport) has a real pixel width, but the track
   itself is width:max-content so percentage widths on .pim-item would
   resolve against the wrong box. Item widths are therefore calculated in
   JS (pim-marquee.js) against .pim-viewport's actual width and the
   desktop/tablet/mobile "images to show" counts, then written as inline
   px widths + custom property. The rule below is only a pre-JS fallback
   so images aren't invisible for a frame before JS runs. */
.pim-item {
	width: var(--pim-item-w, 240px);
}

@media (max-width: 1024px) {
	.pim-nav { width: 38px; height: 38px; }
}

@media (max-width: 640px) {
	.pim-nav { width: 34px; height: 34px; }
	.pim-item-card { padding: 9% 10%; }
}

.pim-empty, .pim-error {
	padding: 16px;
	background: #fff6f6;
	border: 1px solid #f3c6c6;
	border-radius: 8px;
	color: #a33;
	font-size: 14px;
}
