/**
 * Event sponsors strip (Ranch Hand Weekend widget, render_sponsors()): the
 * presenting sponsor fixed on the left, the rest scrolling on the right.
 * Navy, because the City's logos are the white / reversed versions.
 *
 * @package Kingsville
 */

.kv-ev-sponsors {
	background: var(--kv-primary);
	color: var(--kv-text-inverse);
	padding: 26px 0;
	border-bottom: 3px solid var(--kv-secondary);
}

/* Event pages pad every .kv-container top and bottom; this band sets its own. */
.kv-ev-sponsors > .kv-container.kv-ev-sponsors__inner {
	padding-top: 0;
	padding-bottom: 0;
}

.kv-ev-sponsors__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 40px;
}

.kv-ev-sponsors__inner--solo {
	grid-template-columns: 1fr;
	justify-items: center;
}

.kv-ev-sponsors__label {
	margin: 0 0 12px;
	font-family: var(--kv-font-nav);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--kv-secondary);
}

.kv-ev-sponsors__presenting {
	padding-right: 40px;
	border-right: 1px solid rgba(255, 255, 255, 0.2);
	text-align: center;
}

.kv-ev-sponsors__inner--solo .kv-ev-sponsors__presenting {
	padding-right: 0;
	border-right: 0;
}

/* ".kv-ev-sponsors img.…": Elementor's ".elementor img { height: auto; max-width: 100% }" outranks a lone class. */
.kv-ev-sponsors img.kv-ev-sponsors__presenting-logo {
	display: block;
	height: 84px;
	width: auto;
	max-width: 240px;
	margin: 0 auto;
	object-fit: contain;
}

.kv-ev-sponsors__more {
	min-width: 0;
}

.kv-ev-sponsors__marquee {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

/* The list is printed twice; sliding by one copy's width (half the track, plus
   half a gap) loops without a jump. */
.kv-ev-sponsors__track {
	display: flex;
	align-items: center;
	gap: 56px;
	width: max-content;
	margin: 0;
	padding: 0;
	list-style: none;
	animation: kv-sponsor-scroll var(--kv-sponsor-duration, 36s) linear infinite;
}

.kv-ev-sponsors__marquee:hover .kv-ev-sponsors__track,
.kv-ev-sponsors__marquee:focus-within .kv-ev-sponsors__track {
	animation-play-state: paused;
}

@keyframes kv-sponsor-scroll {
	to { transform: translateX(calc(-50% - 28px)); }
}

.kv-ev-sponsors__item {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 64px;
}

.kv-ev-sponsors__item a {
	display: flex;
	align-items: center;
}

.kv-ev-sponsors img.kv-ev-sponsors__logo {
	display: block;
	height: auto;
	width: auto;
	max-height: 56px;
	max-width: 200px;
	object-fit: contain;
}

/* A dark logo on a white backing (Neessen, 1PointFive). */
.kv-ev-sponsors__item--plate {
	padding: 6px 14px;
	border-radius: var(--kv-radius);
	background: #fff;
}

.kv-ev-sponsors__item--plate img.kv-ev-sponsors__logo {
	max-height: 52px;
}

.kv-ev-sponsors a:focus-visible {
	outline: 2px solid var(--kv-secondary);
	outline-offset: 4px;
}

@media (max-width: 767px) {
	.kv-ev-sponsors {
		padding: 22px 0;
	}

	.kv-ev-sponsors__inner {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.kv-ev-sponsors__presenting {
		padding: 0 0 18px;
		border-right: 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	}

	.kv-ev-sponsors img.kv-ev-sponsors__presenting-logo {
		height: 68px;
	}

	.kv-ev-sponsors__more {
		text-align: center;
	}

	.kv-ev-sponsors img.kv-ev-sponsors__logo {
		max-height: 44px;
		max-width: 160px;
	}

	.kv-ev-sponsors__item--plate img.kv-ev-sponsors__logo {
		max-height: 38px;
	}
}

/* No motion: the logos sit still, wrapped and centred, and the second copy goes. */
@media (prefers-reduced-motion: reduce) {
	.kv-ev-sponsors__marquee {
		-webkit-mask-image: none;
		mask-image: none;
	}

	.kv-ev-sponsors__track {
		flex-wrap: wrap;
		justify-content: center;
		gap: 20px 40px;
		width: auto;
		animation: none;
	}

	.kv-ev-sponsors__item[aria-hidden="true"] {
		display: none;
	}
}
