/* ==========================================================================
   Block: Project Grid (bga/project-grid)
   ========================================================================== */

.bga-project-grid__heading {
	margin-bottom: var(--sp-32);
}

/* Keep bottom padding before cloud dividers */
.bga-project-grid.section:has(+ .bga-cloud) {
	padding-bottom: var(--sp-48);
}

@media (min-width: 768px) {
	.bga-project-grid.section:has(+ .bga-cloud) {
		padding-bottom: var(--sp-80, 5rem);
	}
}

.bga-project-grid__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--sp-48);
}

@media (min-width: 768px) {
	.bga-project-grid__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.bga-project-grid__grid--cols-3 {
		grid-template-columns: repeat(3, 1fr);
	}

	.bga-project-grid__grid--cols-2 {
		grid-template-columns: repeat(2, 1fr);
	}
}

/*
 * Archive only (Bryce, 20 Jul): widen beyond 3 columns on large monitors so the
 * projects archive shows ~2 rows above the fold instead of 3 big cards then a
 * whitespace gap. Scoped to .bga-project-archive so the editorial project-grid
 * block (e.g. the front-page "Featured projects") keeps its 3-column cap.
 */
@media (min-width: 1600px) {
	.bga-project-archive .bga-project-grid__grid--cols-3 {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (min-width: 2100px) {
	.bga-project-archive .bga-project-grid__grid--cols-3 {
		grid-template-columns: repeat(5, 1fr);
	}
}
