/* Resource card grid - the compact resource card from the Resources page
   (page-resources-redesign.php keeps its own copy inline).
   Markup: .card-grid > .card-slot > Aera\aera_render_resource_card_by_id().
   Used by the homepage resources row. The !important flags beat the base
   card styles in aera.css (sass/components/_resource-card.scss). */

.card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 28px;
	align-items: start;
}

/* Grid stretches each slot to the row's tallest card; the card and its
   wrapper fill that height so every card in a row matches. */
.card-grid .card-slot {
	min-width: 0;
	height: 100%;
}

.card-grid .resource-card {
	display: flex;
	width: 100% !important;
	height: 100%;
	padding: 0 !important;
}

.card-grid .resource-card__row {
	padding: 0 !important;
}

.card-grid .resource-card__wrapper {
	height: 335px !important;
	min-height: 335px !important;
	overflow: hidden !important;
	cursor: pointer;
	transition: box-shadow 240ms cubic-bezier(0.22, 1, 0.36, 1), transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.card-grid .resource-card__wrapper:hover {
	box-shadow: 0 0 12px rgba(0, 97, 158, 0.25);
	transform: translateY(-3px);
}

.card-grid .resource-card__imageBorder {
	border-bottom: none !important;
}

.card-grid .resource-card__bgImage,
.card-grid .case-study-card__header {
	aspect-ratio: 299.33 / 79.23 !important;
}

.card-grid .resource-card__link-wrapper {
	padding: 16px;
}

.card-grid .resource-card__type {
	font-weight: bold;
	line-height: 1 !important;
	letter-spacing: 0.04em !important;
	color: #00619e !important;
	text-transform: capitalize !important;
}

.card-grid .resource-card__title {
	margin: 8px 0 10px !important;
	font-size: 20px !important;
	line-height: 1.2 !important;
	letter-spacing: 0 !important;
}

.card-grid .resource-card__text,
.card-grid .case-study-card__problem-text {
	display: -webkit-box !important;
	flex: none !important;
	min-height: 0 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	overflow: hidden !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	color: #5c6475 !important;
	text-overflow: ellipsis !important;
	white-space: normal !important;
	-webkit-box-orient: vertical !important;
}

.card-grid .resource-card__text {
	max-height: 3em !important;
	-webkit-line-clamp: 2 !important;
}

.card-grid .case-study-card__problem-text {
	-webkit-line-clamp: 4 !important;
}

.card-grid .resource-card__lastRow,
.card-grid .case-study-card__learn-more {
	display: none;
}

.card-grid .case-study-card__header {
	border-bottom: none;
}

.card-grid .case-study-card__company-details {
	margin-top: 16px !important;
	padding: 0 16px !important;
}

.card-grid .case-study-card__content {
	min-height: 335px !important;
}

.card-grid .case-study-card__content .resource-card__type {
	padding-left: 16px;
}

@media (prefers-reduced-motion: reduce) {
	.card-grid .resource-card__wrapper,
	.card-grid .resource-card__wrapper:hover {
		transition: none;
		transform: none;
	}
}

@media (max-width: 1106px) {
	.card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.card-grid .resource-card__title {
		display: -webkit-box !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
		-webkit-line-clamp: 2 !important;
		-webkit-box-orient: vertical !important;
	}
}

@media (max-width: 640px) {
	.card-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
