/* Single badge page */

.badge-detail-page {
	background: #faf7f2;
	color: var(--ink);
}

.badge-detail-banner {
	padding: 28px 0;
	background: var(--brand);
}

.badge-detail-banner-layer {
	background-image: url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?w=1600&auto=format&fit=crop');
}

.badge-detail-banner h1 {
	margin: 14px 0 8px;
	color: #fff;
	font-size: clamp(32px, 4vw, 46px);
}

.badge-detail-banner p {
	margin: 0;
	font-size: 18px;
}

.badge-banner-back {
	color: #fff;
	font-weight: 600;
	text-underline-offset: 4px;
}

.badge-detail-hero {
	padding: 32px 0;
	border-bottom: 1px solid var(--bdr);
	background: #faf7f2;
}

.badge-back-navigation {
	margin-bottom: 32px;
}

.badge-back-link {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	color: var(--brand-brown);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.badge-back-link:hover,
.badge-back-link:focus-visible {
	color: var(--brand);
}

.badge-hero-layout {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr) 190px;
	gap: 24px;
	align-items: start;
}

.badge-artwork-wrap {
	display: grid;
	place-items: center;
	aspect-ratio: 1;
	padding: 20px;
	border: 1px solid var(--bdr);
	border-radius: 18px;
	background: var(--panel);
	box-shadow: 0 18px 45px rgba(75, 68, 54, 0.12);
}

.badge-artwork {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.badge-eyebrow,
.badge-section-kicker {
	margin: 0 0 8px;
	color: var(--brand);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: uppercase;
}

.badge-hero-content {
	min-width: 0;
	padding: 24px;
	border: 1px solid var(--bdr);
	border-radius: 18px;
	background: #fff;
}

.badge-hero-content h2 {
	margin: 0 0 16px;
	color: var(--ink);
	font-size: 26px;
	font-weight: 500;
	line-height: 1.08;
}

.badge-description {
	max-width: 680px;
	color: var(--muted);
	font-size: 16px;
	line-height: 1.65;
}

.badge-description > :last-child {
	margin-bottom: 0;
}

.badge-hero-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--bdr);
}

.badge-hero-meta div {
	display: grid;
	gap: 2px;
}

.badge-hero-meta strong {
	color: var(--brand-brown);
	font-size: 24px;
	line-height: 1.1;
}

.badge-hero-meta span {
	color: var(--muted);
	font-size: 13px;
}

.badge-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 28px;
}

.badge-sponsor {
	display: grid;
	gap: 10px;
	align-self: start;
	align-content: center;
	padding: 20px;
	border: 1px solid var(--bdr);
	border-radius: 18px;
	background: #fff;
}

.badge-sponsor > span {
	color: var(--muted);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.badge-sponsor a {
	color: var(--brand-brown);
	text-decoration: none;
}

.badge-sponsor a strong,
.badge-sponsor > strong {
	display: block;
	font-size: 16px;
	margin-top: 8px;
}

.badge-sponsor-image {
	display: block;
	max-width: 100%;
	max-height: 180px;
	object-fit: contain;
}

.badge-levels-section,
.badge-competitions-section {
	padding: 32px 0;
}

.badge-levels-section {
	background: #faf7f2;
}

.badge-competitions-section {
	border-top: 1px solid var(--bdr);
	background: #faf9f7;
	scroll-margin-top: 24px;
}

.badge-section-heading {
	display: flex;
	justify-content: space-between;
	gap: 32px;
	align-items: end;
	margin-bottom: 28px;
}

.badge-section-heading h2 {
	margin: 0;
	color: var(--ink);
	font-size: 30px;
	font-weight: 600;
	line-height: 1.2;
}

.badge-section-heading > p {
	max-width: 480px;
	margin: 0;
	color: var(--muted);
	font-size: 15px;
	line-height: 1.55;
	text-align: right;
}

.badge-levels-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.badge-level-card {
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
	min-width: 0;
	padding: 12px;
	border: 1px solid var(--bdr);
	border-radius: 12px;
	background: var(--panel);
}

.badge-level-card img {
	display: block;
	width: 54px;
	height: 54px;
	object-fit: contain;
}

.badge-level-card div {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.badge-level-card span,
.badge-level-card strong {
	overflow-wrap: anywhere;
}

.badge-level-card span {
	color: var(--ink);
	font-size: 14px;
	font-weight: 600;
}

.badge-level-card strong {
	color: var(--muted);
	font-size: 12px;
	font-weight: 500;
}

.badge-competitions-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.badge-competition-card {
	display: grid;
	grid-template-rows: 200px 1fr;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--bdr);
	border-radius: 18px;
	background: var(--panel);
	transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.badge-competition-card:hover {
	border-color: var(--brand);
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(75, 68, 54, 0.1);
}

.badge-competition-image {
	display: grid;
	min-height: 0;
	place-items: center;
	overflow: hidden;
	background: #fff;
	color: var(--panel);
	font-size: 24px;
	font-weight: 700;
	text-decoration: none;
}

.badge-competition-image img {
	box-sizing: border-box;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	padding: 20px;
	object-fit: contain;
}

.badge-competition-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 20px;
	border-top: 1px solid var(--bdr);
}

.badge-competition-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin-bottom: 12px;
	color: var(--brand-green);
	font-size: 12px;
	font-weight: 600;
}

.badge-competition-content h3 {
	margin: 0 0 8px;
	font-size: 19px;
	font-weight: 600;
	line-height: 1.35;
}

.badge-competition-content h3 a {
	color: var(--ink);
	text-decoration: none;
}

.badge-competition-content h3 a:hover,
.badge-competition-content h3 a:focus-visible {
	color: #94401d;
}

.badge-competition-content p {
	margin: 0 0 20px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.5;
}

.badge-competition-link {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	margin-top: auto;
	color: var(--brand);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.badge-empty-state {
	margin: 0;
	padding: 24px;
	border: 1px solid var(--bdr);
	border-radius: 8px;
	background: var(--panel);
	color: var(--muted);
}

@media (max-width: 1100px) {
	.badge-hero-layout {
		grid-template-columns: 200px minmax(0, 1fr);
		gap: 36px;
	}

	.badge-sponsor {
		grid-column: 2;
		align-self: auto;
		padding: 20px 0 0;
		border-top: 1px solid var(--bdr);
		border-left: 0;
	}

	.badge-levels-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 760px) {
	.badge-detail-hero,
	.badge-levels-section,
	.badge-competitions-section {
		padding: 40px 0;
	}

	.badge-back-navigation {
		margin-bottom: 24px;
	}

	.badge-hero-layout {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.badge-artwork-wrap {
		width: min(220px, 70vw);
	}

	.badge-hero-content h1 {
		font-size: 38px;
	}

	.badge-sponsor {
		grid-column: 1;
	}

	.badge-section-heading {
		display: grid;
		gap: 12px;
		align-items: start;
	}

	.badge-section-heading > p {
		text-align: left;
	}

	.badge-levels-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.badge-competitions-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 420px) {
	.badge-levels-grid {
		grid-template-columns: 1fr;
	}
}