/**
 * Responsive sponsor carousel.
 * Theme-agnostic: uses its own neutral styles, sized to the container it sits
 * in (sidebar, footer, full width). JS sets how many slides show at once.
 */

.aahs-carousel {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.aahs-carousel__viewport {
	overflow: hidden;
}

.aahs-carousel__track {
	display: flex;
	align-items: stretch;
	transition: transform 0.5s ease;
	will-change: transform;
}

.aahs-carousel__slide {
	/* flex-basis is set inline by JS (100 / perView %). */
	flex: 0 0 100%;
	box-sizing: border-box;
	padding: 10px 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

/* The logo itself (link or span).
   Scoped to .aahs-carousel: the same .aahs-sponsor markup is also rendered by
   the footer strip / [sponsors] grid, which have their own (theme) styling —
   an unscoped width:100% here would force those into one logo per line. */
.aahs-carousel .aahs-sponsor {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	text-decoration: none;
	opacity: 0.85;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.aahs-carousel .aahs-sponsor:hover {
	opacity: 1;
	transform: translateY(-2px);
}

.aahs-carousel .aahs-sponsor img {
	max-width: 100%;
	height: auto;
	max-height: 90px;
	object-fit: contain;
	display: block;
}

/* Text fallback when no logo image is set. */
.aahs-carousel .aahs-sponsor__name {
	font-weight: 600;
	color: inherit;
	text-align: center;
	line-height: 1.2;
}

/* Bigger top-tier logos. */
.aahs-carousel .aahs-sponsor--level-1 img { max-height: 110px; }
.aahs-carousel .aahs-sponsor--level-3 img { max-height: 72px; }

/* Prev / next buttons. */
.aahs-carousel__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	display: grid;
	place-items: center;
	padding: 0;
	z-index: 2;
	opacity: 0;
	transition: opacity 0.2s ease, background 0.2s ease;
}

.aahs-carousel:hover .aahs-carousel__btn,
.aahs-carousel__btn:focus-visible {
	opacity: 1;
}

.aahs-carousel__btn:hover { background: rgba(0, 0, 0, 0.7); }
.aahs-carousel__btn--prev { left: 4px; }
.aahs-carousel__btn--next { right: 4px; }

/* Hide arrows when everything already fits (JS adds this class). */
.aahs-carousel.is-static .aahs-carousel__btn,
.aahs-carousel.is-static .aahs-carousel__dots {
	display: none;
}

/* Dots. */
.aahs-carousel__dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 8px;
}

.aahs-carousel__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.2);
	cursor: pointer;
}

.aahs-carousel__dot.is-active {
	background: rgba(0, 0, 0, 0.55);
}

/* Call-to-action button under the carousel (e.g. "Sponsor us!"). */
.aahs-carousel__cta-wrap {
	text-align: center;
	margin-top: 14px;
}

.aahs-carousel__cta {
	display: inline-block;
	padding: 12px 26px;
	border-radius: 9px;
	background: var(--blue, #2b5fb0);
	color: #fff;
	font-family: var(--display, 'Saira Condensed', sans-serif);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.2s ease;
}

.aahs-carousel__cta:hover,
.aahs-carousel__cta:focus-visible {
	background: var(--blue-bright, #4f87d8);
	transform: translateY(-1px);
	color: #fff;
}

/* Respect reduced-motion: no sliding animation. */
@media (prefers-reduced-motion: reduce) {
	.aahs-carousel__track {
		transition: none;
	}
}
