/* ---------- References ---------- */

.mcs-refs {
	background: var(--wp--preset--color--secondary);
	border-top: 1px solid var(--wp--preset--color--border);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.mcs-refs-intro {
	max-width: 42rem;
}

.mcs-refs-intro .mcs-lead {
	max-width: none;
	margin: 1rem 0 0;
}

.mcs-refs .wp-block-group.mcs-ref-grid,
.mcs-ref-grid {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.5rem;
	margin-top: 3rem;
}

.mcs-refs .mcs-ref-grid > .mcs-ref-card {
	min-width: 0;
}

.mcs-ref-card {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	min-width: 0;
	padding: 1.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--mcs-radius-xl);
	background: var(--wp--preset--color--base);
}

.mcs-ref-card > .wp-block-group:not(.mcs-ref-logo) {
	min-width: 0;
	flex: 1 1 auto;
}

.mcs-ref-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 6rem;
	padding: 1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--mcs-radius-lg);
	background: #fff;
	flex-shrink: 0;
}

.mcs-ref-logo .wp-block-image,
.mcs-ref-logo figure {
	margin: 0;
	width: 100%;
	max-width: 100%;
}

.mcs-ref-logo img {
	display: block;
	width: auto !important;
	max-width: 100%;
	height: auto !important;
	max-height: 3.25rem;
	object-fit: contain;
}

.mcs-ref-card h3 {
	margin: 0;
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: break-word;
}

.mcs-ref-card p {
	margin: 0.5rem 0 0;
	color: var(--wp--preset--color--muted);
	font-size: 0.875rem;
	line-height: 1.65;
}

/* Full-width cards: logo beside copy once there is horizontal room. */
@media (min-width: 600px) {
	.mcs-ref-card {
		flex-direction: row;
		align-items: center;
		padding: 2rem;
	}

	.mcs-ref-logo {
		width: 10rem;
	}
}

@media (min-width: 1200px) {
	.mcs-refs .wp-block-group.mcs-ref-grid,
	.mcs-ref-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}
