/* «Етапи збирання та монтажу». */
.bm-b-stages {
	border-top: 1px solid var(--bm-border);
	border-bottom: 1px solid var(--bm-border);
	background: #fff;
}
.bm-b-stages--dots {
	background:
		linear-gradient(rgba(255, 255, 255, .97) 0%, rgba(255, 255, 255, .86) 32%, rgba(255, 255, 255, .62) 72%, rgba(255, 255, 255, .5) 100%),
		url(../../assets/img/stages-bg-dots.webp) center / cover no-repeat #fff;
}
.bm-b-stages--rays {
	background:
		linear-gradient(#fff 0%, rgba(255, 255, 255, .92) 26%, rgba(255, 255, 255, .55) 62%, rgba(255, 255, 255, .2) 100%),
		url(../../assets/img/stages-bg-rays.webp) center bottom / cover no-repeat #fff;
}
.bm-b-stages .bm-shead { justify-content: center; margin-bottom: 56px; text-align: center; }
.bm-b-stages .bm-eyebrow { justify-content: center; margin-bottom: 14px; font: 500 20px/1.3 var(--bm-fd); letter-spacing: 0; text-transform: none; color: var(--bm-strong); }
.bm-b-stages .bm-eyebrow::before { content: none; }
.bm-b-stages .bm-h2 { max-width: 760px; margin-inline: auto; text-wrap: balance; }

.bm-b-stages__grid { --gap-x: 40px; --gap-y: 56px; display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: var(--gap-y) var(--gap-x); }
/* 9-10 stages: two rows of five (the template sets no column count) */
.bm-b-stages__grid:has(> .bm-b-stages__item:nth-child(9)) { --cols: 5; }
/* the line: box to box inside a row, none after the last box of a row */
.bm-b-stages__item::after {
	content: "";
	position: absolute;
	top: calc(50% + 11px); /* middle of the box (the item has 22 px on top for the number) */
	left: 100%;
	width: var(--gap-x);
	border-top: 1px solid var(--bm-g300);
}
.bm-b-stages__item:last-child::after,
.bm-b-stages__item:nth-child(4n)::after { content: none; }
.bm-b-stages__grid:has(> .bm-b-stages__item:nth-child(9)) > .bm-b-stages__item:nth-child(4n):not(:last-child)::after { content: ""; }
.bm-b-stages__grid:has(> .bm-b-stages__item:nth-child(9)) > .bm-b-stages__item:nth-child(5n)::after { content: none; }
.bm-b-stages__item { position: relative; display: flex; flex-direction: column; padding-top: 22px; }
.bm-b-stages__item > .bm-b-stages__box { flex: 1; } /* equal box heights in a row, so the joining line sits mid-box */
.bm-b-stages__n {
	position: absolute;
	top: 0; left: 22px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px; height: 44px;
	border-radius: 50%;
	background: var(--bm-orange);
	box-shadow: 0 0 0 6px rgba(248, 90, 0, .18);
	color: #fff;
	font: 700 17px/1 var(--bm-fd);
}
.bm-b-stages__box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 132px;
	padding: 34px 26px 26px;
	border: 1px solid var(--bm-border);
	background: rgba(255, 255, 255, .94);
	text-align: center;
}
.bm-b-stages__name { font-size: 14.5px; font-weight: 400; line-height: 1.45; color: var(--bm-strong); text-wrap: balance; }
.bm-b-stages__days {
	font: 800 21px/1 var(--bm-fd);
	letter-spacing: .01em;
	text-transform: uppercase;
	color: var(--bm-strong);
}

@media (max-width: 1100px) {
	.bm-b-stages__grid { --gap-y: 30px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bm-b-stages__item::after { display: none; }
	.bm-b-stages .bm-eyebrow { font-size: 17px; }
}
@media (max-width: 767px) {
	.bm-b-stages__grid { gap: 22px 16px; }
	.bm-b-stages__n { left: 14px; width: 38px; height: 38px; font-size: 15px; }
	.bm-b-stages__box { min-height: 118px; padding: 28px 14px 20px; }
	.bm-b-stages__name { font-size: 13px; }
	.bm-b-stages__days { font-size: 20px; }
}
