/* Nidau Volley – sponsor logos: band on team pages, grid on the homepage. */
.nv-sponsor-band,
.nv-sponsor-grid-section {
	--nv-sponsor-line: var(--line-soft, #C9C8C2);
}
.nv-sponsor-band ul,
.nv-sponsor-grid {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Logos: same height, always in their original colours. Sponsors without a usable
   logo show their name in the heading font at the same visual height. */
.nv-sponsor-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}
.nv-sponsor-logo img {
	display: block;
	width: auto;
	max-width: 180px;
	height: 40px;
	object-fit: contain;
}
.nv-sponsor-name {
	display: block;
	font-family: "Archivo Narrow", sans-serif;
	font-weight: 900;
	text-transform: uppercase;
	color: var(--ink, #0E0E10);
	font-size: 24px;
	line-height: 40px;
	white-space: nowrap;
}
.nv-sponsor-band a.nv-sponsor-logo,
.nv-sponsor-grid a.nv-sponsor-logo {
	text-decoration: none; /* beats the theme link underline */
}
a.nv-sponsor-text:hover .nv-sponsor-name {
	color: var(--club-blue, #00629B);
}
a.nv-sponsor-logo:focus-visible {
	outline: 2px solid var(--club-blue, #00629B);
	outline-offset: 4px;
}

/* Band (team pages) */
.nv-sponsor-band {
	overflow: hidden;
	border-block-end: 1px solid var(--nv-sponsor-line);
	padding-block: 18px;
}
.nv-sponsor-track {
	display: flex;
	align-items: center;
	gap: 64px;
	width: max-content;
	animation: nv-sponsor-scroll var(--nv-sponsor-duration, 40s) linear infinite;
}
.nv-sponsor-band:hover .nv-sponsor-track,
.nv-sponsor-band:focus-within .nv-sponsor-track {
	animation-play-state: paused;
}
/* With JavaScript the track moves in whole pixels (assets/sponsors.js), not by the CSS animation. */
.nv-sponsor-track.nv-sponsor-js {
	animation: none;
	will-change: transform;
}
@keyframes nv-sponsor-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(calc(-50% - 32px)); }
}
@media (prefers-reduced-motion: reduce) {
	.nv-sponsor-track {
		animation: none;
		width: auto;
		flex-wrap: wrap;
		justify-content: center;
		gap: 24px 48px;
		padding-inline: 16px;
	}
	.nv-sponsor-repeat { display: none; }
}

/* Grid (homepage): equal 2:1 cells, 5 per row (4 on tablets, 2 on phones; an incomplete
   last row is centred). Each logo's width comes from NV_SV_Sponsors::balance(), so all
   logos cover about the same area; names without a logo use the same cell. */
.nv-sponsor-grid-section {
	max-width: 1440px;
	margin: 0 auto;
	padding: 120px 64px;
}
.nv-sponsor-grid {
	--nv-sponsor-cols: 5;
	--nv-sponsor-gap: 16px;
	margin-top: 40px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--nv-sponsor-gap);
}
.nv-sponsor-cell {
	flex: 0 0 calc((100% - (var(--nv-sponsor-cols) - 1) * var(--nv-sponsor-gap)) / var(--nv-sponsor-cols));
	aspect-ratio: 2 / 1;
	background-color: var(--white, #FFFFFF);
	container-type: inline-size;
}
/* The shortcode sits in an Elementor paragraph slot, whose ".e-paragraph-base a" rule unsets display. */
.nv-sponsor-grid .nv-sponsor-logo,
.nv-sponsor-band .nv-sponsor-logo { display: flex; align-items: center; justify-content: center; }
.nv-sponsor-grid .nv-sponsor-logo { width: 100%; height: 100%; }
.nv-sponsor-grid .nv-sponsor-logo img { width: 50%; max-width: 78%; height: auto; max-height: 74%; object-fit: contain; }
.nv-sponsor-grid .nv-sponsor-name {
	font-size: 8.6cqi;
	line-height: 1.05;
	padding-inline: 10%;
	display: block;
	white-space: normal;
	text-align: center;
	text-wrap: balance;
}

@media (max-width: 1024px) {
	.nv-sponsor-grid-section { padding: 96px 32px; }
	.nv-sponsor-grid { --nv-sponsor-cols: 4; }
}
@media (max-width: 767px) {
	.nv-sponsor-band { padding-block: 14px; }
	.nv-sponsor-track { gap: 40px; }
	.nv-sponsor-logo img { height: 32px; max-width: 140px; }
	.nv-sponsor-name { font-size: 20px; line-height: 32px; }
	.nv-sponsor-grid-section { padding: 64px 16px; }
	.nv-sponsor-grid { --nv-sponsor-cols: 2; --nv-sponsor-gap: 12px; }
}
