/**
 * Achievements block (blocks/content/achievements.php)
 *
 * Centered heading + subtitle over a row of award items (circular badge +
 * title + name). Gray circle placeholder when an item has no image.
 */

.dm-achievements {
	padding-block: clamp(3rem, 6vw, 5.5rem);
}

.dm-achievements__inner {
	padding-inline: 16px;
}

/* ---- Header --------------------------------------------------------- */
.dm-achievements__head {
	text-align: center;
	max-width: 38rem;
	margin: 0 auto clamp(2.4rem, 5vw, 2.2rem);
}

.dm-achievements__heading {
	margin: 0;
	color: var(--dm-fg-default-primary);                      /* Semantics/fg/default/primary */
	font-family: var(--font-display, "IM Fell Double Pica", serif);
	font-weight: 400;
	font-style: normal;                  /* roman lead */
	font-size: clamp(2.25rem, 4.2vw, 3.25rem);
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.dm-achievements__heading em {
	font-style: italic;
}

.dm-achievements__subtitle {
	margin: 2rem auto 0;
	max-width: 32rem;
	color: var(--dm-fg-default-primary);
	font-family: var(--font-display, "IM Fell Double Pica", serif);
	font-size: 20px;
	line-height: 1.2;
}

/* ---- Awards row ----------------------------------------------------- */
.dm-achievements__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(1.5rem, 3vw, 3rem);
	justify-items: center;
}

.dm-achievements__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	max-width: 22rem;
}

.dm-achievements__badge {
	display: block;
	width: clamp(140px, 13vw, 180px);
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	overflow: hidden;
	background: var(--dm-ext-grey);                  /* placeholder circle */
}

.dm-achievements__badge-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dm-achievements__item-title {
	margin: clamp(1.25rem, 2vw, 1.75rem) 0 0;
	color: var(--dm-fg-default-primary);                      /* Semantics/fg/default/primary */
	font-family: var(--font-display, "IM Fell Double Pica", serif);
	font-weight: 400;
	font-style: normal;                  /* heading/h4 */
	font-size: clamp(1.6rem, 2.4vw, 2rem); /* caps at Figma 32px */
	line-height: 1.2;                    /* 120% → 38.4px */
}

.dm-achievements__item-name {
	margin: 0.1rem 0 0;
	color: var(--dm-fg-default-primary);                      /* Semantics/fg/default/primary */
	font-family: var(--font-sans, "Roboto Condensed", sans-serif);
	font-size: 16px;                     /* body/md/regular */
	font-weight: 400;
	line-height: 1.4;                    /* 140% → 22.4px */
}

/* ---- Responsive ----------------------------------------------------- */
@media (max-width: 767px) {
	.dm-achievements {
		padding-block: 3rem;
	}

	/* Header aligns left on mobile (centered only on desktop). */
	.dm-achievements__head {
		text-align: left;
		max-width: none;
		margin: 0 0 2.25rem;
	}

	/* Figma heading-mobile/h6-M: IM FELL Double Pica, 18px, 120%. */
	.dm-achievements__subtitle {
		margin: 1.5rem auto 0;
		font-size: 18px;
	}

	/* One award per row: circle on the left, title + name stacked on the right. */
	.dm-achievements__grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.dm-achievements__item {
		flex-direction: row;
		align-items: center;
		text-align: left;
		gap: 1rem;
		max-width: none;
		width: 100%;
	}

	.dm-achievements__badge {
		flex: 0 0 auto;
		width: clamp(100px, 18vw, 150px);
	}

	.dm-achievements__item-text {
		min-width: 0;                    /* let long titles wrap instead of overflowing */
	}

	.dm-achievements__item-title {
		margin-top: 0;                   /* no top gap; badge is now beside it */
	}
}

/* ---- Small desktop (1024-1280): match the Figma board ---------------- *
 * Figma "Home Page - Small Desktop" > section container (1987:16280):
 * px-100 py-80; header gap 32 (heading 52/110%/-1.04px, subtitle 20/120% at
 * 500px); 40px to the list; three flex-1 items 32px apart, each a 180px badge
 * with 24px to its label block (title 32px, award name 16px, 4px apart).
 * Must stay at the end of the file: a media query adds no specificity. */
@media (min-width: 1024px) and (max-width: 1280.98px) {
	.dm-achievements {
		padding-block: 80px;
	}

	.dm-achievements__inner {
		/* The capped 1080 container already provides Figma's 100px gutter. */
		padding-inline: 0;
	}

	.dm-achievements__head {
		max-width: none;
		margin-bottom: 40px;
	}

	.dm-achievements__subtitle {
		margin-top: 32px;
		max-width: 500px;
	}

	.dm-achievements__grid {
		gap: 32px;
	}

	.dm-achievements__item {
		max-width: none;                /* flex-1 across the 1080 row */
		gap: 24px;
	}

	.dm-achievements__badge {
		width: 180px;
		height: 180px;
	}

	.dm-achievements__item-title {
		font-size: 32px;                /* heading/h4 */
	}
}
