/*
 * Home page overrides — loaded after style.css, front page only.
 *
 * style.css is generated from the Next build and must not be edited, so the
 * client's changes to the home page live here instead.
 *
 * Services showcase: every card is the same size. The generated stylesheet
 * lays the cards out on a 12-column grid and gives the 1st, 2nd, 6th–9th and
 * 13th cards bigger spans by position (so the "size" followed the card's
 * order, not its `.featured` flag). This resets all of that to a plain grid.
 *
 * No !important: each selector below has the same specificity as the rule it
 * replaces in style.css, and this file loads later, so it wins by source order.
 */

/* Desktop: three equal columns. */
.svc-showcase-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-flow: row;
	grid-auto-rows: auto;
	gap: 22px;
}

/* Beats the per-position spans (nth-child 1, 2, 6-9, 13) at every width. */
.svc-showcase-grid > .reveal,
.svc-showcase-grid > .reveal:nth-child(n) {
	grid-column: auto;
	grid-row: auto;
}

/* One tile shape for all cards; the media layer is absolutely positioned. */
.svc-showcase-grid .svc-card {
	height: auto;
	aspect-ratio: 4 / 3;
}

/*
 * Titles sit in a narrower tile than the old 8-column hero card, and Thai
 * program names are long, so scale the type down and let them use the width.
 */
.svc-showcase-grid .svc-card-name {
	max-width: 100%;
	margin-bottom: 0;
	font-size: clamp(19px, 1.9vw, 24px);
}

/* Tablet: two columns. */
@media (max-width: 900px) {
	.svc-showcase-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px;
	}

	.svc-showcase-grid .svc-card-name {
		font-size: clamp(19px, 2.8vw, 22px);
	}
}

/* Mobile: one column. */
@media (max-width: 560px) {
	.svc-showcase-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.svc-showcase-grid .svc-card-name {
		font-size: 22px;
	}
}
