/* Card
--------------------------------------------- */

.card__section {
	padding: var(--wp--custom--layout--block-gap-xl) 0;
}

@media (width <768px) {
	.card__section {
		padding: var(--wp--custom--layout--block-gap-big) 0;
	}
}

.card__title {
	color: var(--wp--preset--color--cobalt);
	font-size: var(--wp--preset--font-size--fluid-24);
	margin-top: 0;
}

.card__row {
	display: flex;
	grid-gap: 20px;
	margin: 40px 0;
	flex-wrap: wrap;
}

.card__row:last-child {
	margin-bottom: 0
}

.card {
	display: flex;
	flex-direction: column;
	height: auto;
	width: 100%;
}

.card__top {
	display: flex;
	justify-content: center;
	margin-bottom: max(-20%, -40px);
	z-index: 2;

	>img {
		width: 50%;
		max-width: 100px;
	}

	&.no-icon {
		margin-bottom: 0;
	}
}

.card__content {
	flex-grow: 1;
	max-width: 100%;
	padding: max(20%, 40px) 1rem 1rem 1rem;
	word-break: break-word;

	&.no-icon {
		padding-top: 1rem;
	}
}

.card__heading {
	color: var(--wp--preset--color--cobalt);
	font-size: var(--wp--preset--font-size--body-xl);
}

/* Variations
--------------------------------------------- */

.card__section.bg-white {
	.card__content {
		background-color: var(--wp--preset--color--neutral);
	}
}

.card__section.bg-gray {
	.card__content {
		background-color: var(--wp--preset--color--white);
	}
}

.card__section.bg-cobalt,
.card__section.bg-emerald {
	.card__content {
		background-color: var(--wp--preset--color--white);
		color: var(--wp--preset--color--stone);
	}

	.card__title {
		color: var(--wp--preset--color--white);
	}

	;
}

/* Grid columns */
.card__section {

	&.grid-3 .card__row,
	&.grid-4 .card__row,
	&.grid-5 .card__row,
	&.grid-6 .card__row {
		display: grid;
	}

	&.grid-3 .card__row {
		grid-template-columns: repeat(3, 1fr);
	}

	&.grid-4 .card__row {
		grid-template-columns: repeat(4, 1fr);
	}

	&.grid-5 .card__row {
		grid-template-columns: repeat(5, 1fr);
	}

	&.grid-6 .card__row {
		grid-template-columns: repeat(6, 1fr);
	}
}

@media (width <=768px) {

	.card__section.grid-3 .card__row,
	.card__section.grid-4 .card__row,
	.card__section.grid-5 .card__row,
	.card__section.grid-6 .card__row {
		grid-template-columns: repeat(1, 1fr);
	}
}

@media (768px < width <=992px) {

	.card__section.grid-3 .card__row,
	.card__section.grid-4 .card__row,
	.card__section.grid-5 .card__row,
	.card__section.grid-6 .card__row {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (992px < width <=1140px) {

	.card__section.grid-4 .card__row,
	.card__section.grid-5 .card__row,
	.card__section.grid-6 .card__row {
		grid-template-columns: repeat(4, 1fr);
	}
}