/*
 * Customer needs. Figma 2131:47395 desktop (4 x 281 columns, 32 gap, numbered
 * bracket above), 2191:47205 mobile (2x2 grid, square tiles).
 */

.customer-needs .section-head { margin-bottom: 24px; }

.customer-needs__steps {
	--count: 4;
	--gap: 32px;
	position: relative;
	padding-top: 44px;              /* room for the bracket + numbers */
}

.customer-needs__list {
	display: grid;
	grid-template-columns: repeat(var(--count), minmax(0, 1fr));
	gap: 32px var(--gap);
}

/* Horizontal dashed line joining the column centres. */
.customer-needs__steps::before {
	--half: calc((100% - (var(--count) - 1) * var(--gap)) / var(--count) / 2);
	content: "";
	position: absolute;
	top: 0;
	left: var(--half);
	right: var(--half);
	border-top: 1px dashed var(--c-border-light);
}

.customer-needs__steps[style*="--count:1"]::before { display: none; }

.customer-needs__item {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

/* Vertical dashed tick from the line down to the number. */
.customer-needs__item::before {
	content: "";
	position: absolute;
	top: -40px;
	left: 50%;
	height: 24px;
	border-left: 1px dashed var(--c-border-light);
}

.customer-needs__number {
	position: absolute;
	z-index: 1;
	top: -16px;
	left: 50%;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	margin-left: -16px;
	border-radius: var(--r-m);
	background: var(--c-primary);
	color: var(--c-bg-purple);
	font: var(--f-header-2xs);
}

.customer-needs__media {
	display: grid;
	place-items: center;
	height: 200px;
	border-radius: var(--r-l);
	background: var(--c-bg-purple);
	overflow: hidden;
}

.customer-needs__img { width: 150px; height: 140px; object-fit: contain; }

.customer-needs__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.customer-needs__title { font: var(--f-header-s); color: var(--c-text-dark); }
.customer-needs__text { font: var(--f-body-s); color: var(--c-text-dark); }

@media (max-width: 1023px) {
	.customer-needs__steps { --gap: 16px; }
}

@media (max-width: 767px) {
	.customer-needs__steps { padding-top: 0; }

	.customer-needs__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px 16px;
	}

	.customer-needs__steps::before,
	.customer-needs__item::before { display: none; }

	.customer-needs__item { padding-top: 16px; }
	.customer-needs__number { top: 0; }

	.customer-needs__media {
		height: auto;
		aspect-ratio: 1;
	}

	.customer-needs__img { width: 120px; height: 112px; }
	.customer-needs__title { font: var(--f-header-xs); }
}
