/* ==========================================================================
   School cards
   Logo + name tile, shared by the school archive and the homepage.
   ========================================================================== */

.school-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 24px;
}

.school-card a {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 100%;
	background: var(--color-surface);
	border-radius: var(--radius-lg);
	padding: 24px 16px;
	text-align: center;
	box-shadow: var(--shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.school-card a:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-md);
}

.school-card-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin-bottom: 16px;
}

.school-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.school-card-thumb .dp-icon-logo {
	width: 60%;
	height: 60%;
}

/* One of the visitor's recently viewed schools: outlined, with a label
   sitting on the top edge of the card. */
.school-card.is-recent a {
	box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-sm);
}

.school-card.is-recent a:hover {
	box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-md);
}

.school-card-badge {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translate(-50%, -50%);
	padding: 3px 10px;
	border-radius: var(--radius-pill);
	background: var(--color-primary);
	color: var(--color-on-primary);
	font-size: var(--text-2xs);
	font-weight: 700;
	white-space: nowrap;
}

.school-card-name {
	font-size: var(--text-base);
	font-weight: 600;
	color: var(--color-secondary);
	line-height: 1.4;
}

@media (max-width: 600px) {
	.school-grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
		gap: 16px;
	}

	.school-card a {
		padding: 16px 10px;
	}
}
