/**
 * Section Cards Block Styles
 */

/* ─── Block wrapper ───────────────────────────────────────────────────────── */

.ct-section-cards {
	position: relative;
	box-sizing: border-box;
	background: var(--color-white);
	padding: 100px 0;
}

/* ─── Grid: 4 columns, 2 rows ─────────────────────────────────────────────── */

.ct-section-cards__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

/*
 * Auto-placement order (matches DOM):
 * Row 1: [content ×2] [card-0] [card-1]
 * Row 2: [card-2] [card-3] [spacer] [card-4]
 */

.ct-section-cards__content {
	grid-column: span 2;
}

/* ─── Content cell ────────────────────────────────────────────────────────── */

.ct-section-cards__badge {
	margin-bottom: 12px;
}

.ct-section-cards__title {
	color: var(--color-bg-deepest);
}

.ct-section-cards__title span {
	color: var(--color-purple-deep);
}

.ct-section-cards__text {
	margin: 0;
	font-weight: 500;
	font-size: 16px;
	line-height: 140%;
	color: var(--color-bg-deepest);
}

.ct-section-cards__text span {
	color: var(--color-neutral-600);
}

/* ─── Cards ───────────────────────────────────────────────────────────────── */

.ct-section-cards__card {
	position: relative;
	box-sizing: border-box;
	border-radius: 16px;
}

.ct-section-cards__card--icon {
	padding: 24px;
	min-height: 276px;
	display: flex;
	flex-direction: column;
	background: #F3F2F5;
}

.ct-section-cards__card--first {
	background-color: #FFFFFF;
	border: 1px solid #EFEDF2;
	overflow: hidden;
}

.ct-section-cards__card--first .ct-section-cards__card-icon {
	background: #F3F2F5;
}

.ct-section-cards__card--fourth {
	overflow: hidden;
}

/* Decorative background image (absolute <img>) */

.ct-section-cards__card-deco {
	position: absolute;
	right: 0;
	bottom: 0;
	z-index: 0;
	pointer-events: none;
	user-select: none;
}

.ct-section-cards__card--first > :not(.ct-section-cards__card-deco),
.ct-section-cards__card--fourth > :not(.ct-section-cards__card-deco) {
	position: relative;
	z-index: 1;
}

.ct-section-cards__card--last:not(.ct-section-cards__card--purple) {
	background: #FAFAFA;
}

.ct-section-cards__card--last:not(.ct-section-cards__card--purple) .ct-section-cards__card-icon {
	background: #F3F2F5;
}

.ct-section-cards__card--image {
	overflow: hidden;
}

.ct-section-cards__card-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ct-section-cards__card-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 10px;
	background: var(--color-white);
	flex-shrink: 0;
}

.ct-section-cards__card-icon img {
	width: 26px;
	height: 26px;
	object-fit: contain;
}

.ct-section-cards__card-title {
	margin-top: auto;
	margin-bottom: 12px;
	font-weight: 700;
	font-size: 16px;
	line-height: 100%;
	text-transform: uppercase;
	color: var(--color-bg-deepest);
}

.ct-section-cards__card-text {
	margin: 0;
	font-weight: 400;
	font-size: 14px;
	line-height: 130%;
	color: var(--color-bg-deepest);
}

/* ─── Last card: purple variant ───────────────────────────────────────────── */

.ct-section-cards__card--purple {
	background: var(--color-purple-deep);
}

.ct-section-cards__card--purple .ct-section-cards__card-title,
.ct-section-cards__card--purple .ct-section-cards__card-text {
	color: var(--color-white);
}

/* ─── Tablet (769px – 1024px) ────────────────────────────────────────────── */

@media (min-width: 769px) and (max-width: 1024px) {

	.ct-section-cards__grid {
		grid-template-columns: 1fr 1fr;
	}

	.ct-section-cards__content {
		grid-column: 1;
		grid-row: 1 / 3;
	}

	/* card-0 / --first */
	.ct-section-cards__card--first {
		grid-column: 2;
		grid-row: 1;
	}

	/* card-1 (2nd card, 3rd child of grid) */
	.ct-section-cards__grid > .ct-section-cards__card:nth-child(3) {
		grid-column: 2;
		grid-row: 2;
	}

	/* card-2 (3rd card, 4th child of grid) */
	.ct-section-cards__grid > .ct-section-cards__card:nth-child(4) {
		grid-column: 1;
		grid-row: 3;
	}

	/* card-3 / --fourth */
	.ct-section-cards__card--fourth {
		grid-column: 1;
		grid-row: 4;
	}

	.ct-section-cards__spacer {
		display: none;
	}

	/* card-4 / --last */
	.ct-section-cards__card--last {
		grid-column: 2;
		grid-row: 4;
	}

	.ct-section-cards__card--icon {
		min-height: 210px;
	}

	.ct-section-cards__card--image {
		height: 210px;
	}

}

/* ─── Mobile (≤ 768px) ────────────────────────────────────────────────────── */

@media (max-width: 768px) {

	.ct-section-cards {
		padding: 40px 0;
	}

	.ct-section-cards__grid {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.ct-section-cards__content {
		grid-column: span 1;
	}

	.ct-section-cards__spacer {
		display: none;
	}

	.ct-section-cards__badge {
		margin-bottom: 16px;
	}

	.ct-section-cards__text {
		font-size: 14px;
		margin-bottom: 20px;
	}

	.ct-section-cards__card--icon {
		padding: 16px;
		min-height: auto;
	}

	.ct-section-cards__card--image {
		height: 200px;
	}

	.ct-section-cards__card-icon {
		width: 40px;
		height: 40px;
		border-radius: 8px;
		margin-bottom: 20px;
	}

	.ct-section-cards__card-icon img {
		width: 20px;
		height: 20px;
	}

	.ct-section-cards__card-title {
		font-size: 14px;
		margin-bottom: 10px;
	}

	.ct-section-cards__card-text {
		font-size: 12px;
	}

	.ct-section-cards__card--first .ct-section-cards__card-deco {
		top: 0;
		right: 0;
		bottom: auto;
		left: auto;
		height: 100%;
		width: auto;
	}

	.ct-section-cards__card--fourth .ct-section-cards__card-deco {
		top: 0;
		left: 0;
		bottom: auto;
		right: auto;
		height: 100%;
		width: auto;
	}

}
