/* Logo Carousel – Frontend Styles */

.lc-wrap {
	--lc-logo-height: 60px;
	--lc-gap: 60px;
	--lc-visible: 5;
	--lc-speed: 30s;

	width: 100%;
	padding: 20px 0;
	box-sizing: border-box;
}

.lc-titel {
	text-align: center;
	margin: 0 0 20px;
	font-size: 1.25rem;
}

.lc-viewport {
	width: 100%;
	overflow: hidden;
	position: relative;
	container-type: inline-size;

	/* Sanfter Fade an den Rändern */
	-webkit-mask-image: linear-gradient(
		to right,
		transparent 0,
		#000 80px,
		#000 calc(100% - 80px),
		transparent 100%
	);
	mask-image: linear-gradient(
		to right,
		transparent 0,
		#000 80px,
		#000 calc(100% - 80px),
		transparent 100%
	);
}

.lc-track {
	display: flex;
	width: max-content;
	animation: lc-scroll-left var(--lc-speed) linear infinite;
	will-change: transform;
}

.lc-track.lc-dir-right {
	animation-name: lc-scroll-right;
}

.lc-wrap.lc-pause-hover .lc-viewport:hover .lc-track {
	animation-play-state: paused;
}

.lc-slot {
	flex: 0 0 auto;
	/* Slot-Breite = (Viewport - Lücken) / Anzahl sichtbarer Logos.
	   Container-Query-Einheit cqi bezieht sich auf .lc-viewport. */
	width: calc(
		(100cqi - (var(--lc-visible) - 1) * var(--lc-gap)) / var(--lc-visible)
	);
	height: var(--lc-logo-height);
	margin-right: var(--lc-gap);
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

.lc-logo {
	max-height: 100%;
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	transition: opacity 0.2s ease;
}

.lc-slot a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-height: 100%;
	max-width: 100%;
}

.lc-slot a:hover .lc-logo,
.lc-slot a:focus .lc-logo {
	opacity: 0.75;
}

/* Endlos-Loop:
   Track enthält die Logo-Liste zweimal. Eine Verschiebung um -50 %
   der Gesamtbreite ist die exakte Länge der ersten Hälfte – die
   zweite Hälfte rückt nahtlos an die Startposition. Möglich durch
   margin-right (statt flex gap), das auch hinter dem letzten Slot
   greift und so beide Hälften strukturell identisch hält. */
@keyframes lc-scroll-left {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

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

/* Responsive: weniger sichtbare Logos auf kleineren Screens */
@media (max-width: 768px) {
	.lc-slot {
		width: calc((100cqi - 2 * var(--lc-gap)) / 3);
	}
}

@media (max-width: 480px) {
	.lc-wrap {
		padding: 10px 0;
	}
	.lc-titel {
		font-size: 1.1rem;
		margin-bottom: 12px;
	}
	.lc-slot {
		width: calc((100cqi - var(--lc-gap)) / 2);
	}
	.lc-viewport {
		-webkit-mask-image: linear-gradient(
			to right,
			transparent 0,
			#000 30px,
			#000 calc(100% - 30px),
			transparent 100%
		);
		mask-image: linear-gradient(
			to right,
			transparent 0,
			#000 30px,
			#000 calc(100% - 30px),
			transparent 100%
		);
	}
}

/* Animation respektiert reduzierte Bewegung */
@media (prefers-reduced-motion: reduce) {
	.lc-track {
		animation-duration: 120s;
	}
}
