.roal-sponsors {
	--roal-sponsor-accent: #0a8a82;
	--roal-sponsor-text: #1a1a1a;
	--roal-sponsor-muted: #6b7280;
	--roal-sponsor-border: #e5e7eb;
	width: 100%;
	margin: 0 auto;
	font-family: inherit;
	color: var(--roal-sponsor-text);
}

.roal-sponsors * { box-sizing: border-box; }

.roal-sponsors__tier { margin-bottom: 3rem; }
.roal-sponsors__tier:last-child { margin-bottom: 0; }

.roal-sponsors__tier-title {
	text-align: center;
	font-size: 1.4rem;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--roal-sponsor-muted);
	margin: 0 0 1.5rem;
	position: relative;
}
.roal-sponsors__tier-title::after {
	content: '';
	display: block;
	width: 60px;
	height: 3px;
	background: var(--roal-sponsor-accent);
	margin: .5rem auto 0;
	border-radius: 2px;
}

/* Tier-specific accents for visual hierarchy. Match by class generated from tier name. */
.roal-sponsors__tier--title-sponsor .roal-sponsor__logo img { max-height: 180px; }
.roal-sponsors__tier--gold     .roal-sponsor__logo img { max-height: 130px; }
.roal-sponsors__tier--silver   .roal-sponsor__logo img { max-height: 100px; }
.roal-sponsors__tier--bronze   .roal-sponsor__logo img { max-height: 80px; }
.roal-sponsors__tier--supporter .roal-sponsor__logo img,
.roal-sponsors__tier--untiered .roal-sponsor__logo img { max-height: 70px; }

/* Flex grid: 4 sponsors per row on desktop, with the row centered when a
   tier has fewer items (so 1–3 sponsors don't sit left-aligned with empty
   space on the right). Wraps to fewer columns at smaller breakpoints. */
.roal-sponsors__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
	align-items: stretch;
}
.roal-sponsors__grid > .roal-sponsor {
	flex: 0 0 calc((100% - 4.5rem) / 4); /* 4 columns, 3 gaps × 1.5rem */
	max-width: calc((100% - 4.5rem) / 4);
}
@media (max-width: 991.98px) {
	.roal-sponsors__grid > .roal-sponsor {
		flex-basis: calc((100% - 3rem) / 3); /* 3 per row */
		max-width: calc((100% - 3rem) / 3);
	}
}
@media (max-width: 767.98px) {
	.roal-sponsors__grid > .roal-sponsor {
		flex-basis: calc((100% - 1.5rem) / 2); /* 2 per row */
		max-width: calc((100% - 1.5rem) / 2);
	}
}

/* Title sponsor — single full-width card, capped + centered */
.roal-sponsors__tier--title-sponsor .roal-sponsors__grid {
	max-width: 600px;
	margin: 0 auto;
}
.roal-sponsors__tier--title-sponsor .roal-sponsors__grid > .roal-sponsor {
	flex-basis: 100%;
	max-width: 100%;
}

/* ===== Primary sponsor — hero treatment so it clearly outranks the rest =====
   A single, wide, emphasized card with a noticeably larger logo, accent
   border, soft tinted background, lift shadow, and a "Primary Sponsor" badge. */
.roal-sponsors__tier--primary .roal-sponsors__tier-title {
	font-size: 1.7rem;
	color: var(--roal-sponsor-text);
}
.roal-sponsors__tier--primary .roal-sponsors__grid {
	max-width: 680px;
	margin: 0 auto;
}
.roal-sponsors__tier--primary .roal-sponsors__grid > .roal-sponsor {
	flex-basis: 100%;
	max-width: 100%;
}
.roal-sponsors__tier--primary .roal-sponsor {
	position: relative;
	padding: 2rem;
	border: 2px solid var(--roal-sponsor-accent);
	border-radius: 14px;
	background: linear-gradient(180deg, #ffffff 0%, #f3fbfa 100%);
	box-shadow: 0 14px 34px rgba(10, 138, 130, .16);
}
.roal-sponsors__tier--primary .roal-sponsor__logo { min-height: 160px; }
.roal-sponsors__tier--primary .roal-sponsor__logo img { max-height: 200px; } /* larger than every other tier */
.roal-sponsors__tier--primary .roal-sponsor__name { font-size: 1.2rem; margin-top: .25rem; }
.roal-sponsors__tier--primary .roal-sponsor:hover,
.roal-sponsors__tier--primary .roal-sponsor:focus-within {
	transform: translateY(-3px);
	box-shadow: 0 20px 44px rgba(10, 138, 130, .22);
}

/* Box container around every sponsor — applies whether or not the sponsor
   has a clickable link. Hover effects fire from the outer element so they
   work for both the link and the link-less variants. */
.roal-sponsor {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .5rem;
	width: 100%;
	padding: 1.25rem;
	border: 1px solid var(--roal-sponsor-border);
	border-radius: 8px;
	background: white;
	transition: border-color 200ms, transform 200ms, box-shadow 200ms;
}
.roal-sponsor:hover,
.roal-sponsor:focus-within {
	border-color: var(--roal-sponsor-accent);
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(10, 138, 130, .12);
}
/* Link is a passthrough — it inherits the box from .roal-sponsor and just
   fills the available space so the whole card is clickable. */
.roal-sponsor__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .5rem;
	width: 100%;
	text-decoration: none;
	color: inherit;
}

.roal-sponsor__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 80px;
}
.roal-sponsor__logo img {
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}
.roal-sponsor__logo--placeholder {
	background: #f3f4f6;
	border-radius: 6px;
	min-height: 80px;
	color: var(--roal-sponsor-muted);
	font-weight: 600;
	text-align: center;
	padding: .5rem;
}

.roal-sponsor__name {
	font-weight: 600;
	font-size: .95rem;
	text-align: center;
}
.roal-sponsor__blurb {
	font-size: .8rem;
	color: var(--roal-sponsor-muted);
	text-align: center;
	line-height: 1.4;
}

.roal-sponsors-empty {
	text-align: center;
	padding: 2rem;
	color: var(--roal-sponsor-muted);
	background: #f9fafb;
	border-radius: 8px;
}

@media (max-width: 480px) {
	.roal-sponsors__grid { gap: 1rem; }
	.roal-sponsors__grid > .roal-sponsor {
		flex-basis: calc((100% - 1rem) / 2);
		max-width: calc((100% - 1rem) / 2);
	}
	.roal-sponsors__tier--title-sponsor .roal-sponsors__grid > .roal-sponsor {
		flex-basis: 100%;
		max-width: 100%;
	}
}

/* ===== Strip layout (homepage teaser) ===== */
.roal-sponsors--strip {
	width: 100%;
	margin: 0 auto;
}
.roal-sponsors--strip .roal-sponsors__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem 2.5rem;
	justify-content: center;
	align-items: center;
}
.roal-sponsors--strip .roal-sponsor {
	display: inline-flex;
	flex: 0 0 auto;
	width: auto;
	/* Strip variant has no card chrome — undo the box from the main grid */
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}
.roal-sponsors--strip .roal-sponsor:hover,
.roal-sponsors--strip .roal-sponsor:focus-within {
	transform: none;
	box-shadow: none;
	border-color: transparent;
}
.roal-sponsors--strip .roal-sponsor__link,
.roal-sponsors--strip .roal-sponsor > * {
	padding: .5rem;
	border: 0;
	background: transparent;
	box-shadow: none;
	width: auto;
	gap: 0;
}
.roal-sponsors--strip .roal-sponsor__link:hover,
.roal-sponsors--strip .roal-sponsor__link:focus {
	transform: none;
	box-shadow: none;
	border-color: transparent;
}
.roal-sponsors--strip .roal-sponsor__logo {
	min-height: 0;
	height: 60px;
	transition: opacity 200ms ease, transform 200ms ease;
	opacity: .8;
}
.roal-sponsors--strip .roal-sponsor:hover .roal-sponsor__logo,
.roal-sponsors--strip .roal-sponsor__link:hover .roal-sponsor__logo,
.roal-sponsors--strip .roal-sponsor__link:focus .roal-sponsor__logo {
	opacity: 1;
	transform: scale(1.04);
}
.roal-sponsors--strip .roal-sponsor__logo img {
	height: 60px;
	max-height: 60px;
	max-width: 160px;
	width: auto;
	object-fit: contain;
}
.roal-sponsors--strip .roal-sponsor__name,
.roal-sponsors--strip .roal-sponsor__blurb {
	display: none;
}
@media (max-width: 575.98px) {
	.roal-sponsors--strip .roal-sponsors__grid { gap: 1rem 1.5rem; }
	.roal-sponsors--strip .roal-sponsor__logo,
	.roal-sponsors--strip .roal-sponsor__logo img { height: 44px; max-height: 44px; max-width: 130px; }
}
