/*
 * Блок «етапи» на сторінках послуг (.how-it-work). Було: вертикальна схема з
 * великими іконками на два екрани і рамка з самим написом у кінці. Стало: кроки
 * картками в один ряд і рядок запису. Тексти кроків ті самі, з адмінки.
 * Підключає mu-plugins/eyeq-cro.php; кнопку в рядок запису додає він же.
 */

body .how-it-work {
	padding: 56px 0 60px !important;
}

body .how-it-work .content {
	max-width: 1171px;
	margin: 0 auto;
	padding: 0 15px;
}

body .how-it-work .title_1 {
	margin: 0 0 28px !important;
	text-align: left !important;
}

/* ---------- Кроки картками (від 768 px; на телефоні лишається список теми) ---------- */

@media (min-width: 768px) {
	body .how-it-work .stages {
		display: grid !important;
		grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
		gap: 16px;
		margin: 0 !important;
		padding: 0;
		counter-reset: eqstep;
	}

	body .how-it-work .stages .stages__item {
		position: relative;
		display: flex !important;
		flex-direction: column;
		flex: none !important;
		box-sizing: border-box;
		width: auto !important;
		max-width: none !important;
		min-height: 0 !important;
		height: auto !important;
		margin: 0 !important;
		padding: 30px 30px 32px !important;
		background: #fff;
		border: 1px solid #d7e6f3;
		border-radius: 10px;
		counter-increment: eqstep;
	}

	/* номер кроку */
	body .how-it-work .stages .stages__item::before {
		content: counter(eqstep);
		position: absolute;
		top: 26px;
		right: 28px;
		font-size: 40px;
		line-height: 1;
		font-weight: 700;
		color: #d7e6f3;
		font-variant-numeric: tabular-nums;
	}

	/* лінії схеми і шар-заглушка поверх іконки */
	body .how-it-work .stages .line-wrap,
	body .how-it-work .stages .stage-line_hrz,
	body .how-it-work .stages .img_fade {
		display: none !important;
	}

	body .how-it-work .stages .stages-item_img {
		order: -1;
		display: block !important;
		flex: none !important;
		width: auto !important;
		max-width: none !important;
		height: auto !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	body .how-it-work .stages .stages-img {
		display: block !important;
		flex: none !important;
		width: auto !important;
		height: auto !important;
		margin: 0 !important;
		padding: 0 !important;
	}

	body .how-it-work .stages .stages-img > img {
		display: block;
		width: 52px !important;
		height: 52px !important;
		object-fit: contain;
	}

	/* текст кроку: без появи при прокручуванні */
	body .how-it-work .stages .stages-item_txt {
		flex: none !important;
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 18px 0 0 !important;
		opacity: 1 !important;
		visibility: visible !important;
		animation: none !important;
	}

	body .how-it-work .stages .stages-item_txt .sub-title {
		margin: 0 0 10px !important;
		font-size: 18px !important;
		line-height: 1.3 !important;
		font-weight: 700;
		color: #141414 !important;
		text-align: left !important;
		text-wrap: balance;
	}

	body .how-it-work .stages .stages-item_txt p {
		margin: 0 !important;
		font-size: 14px !important;
		line-height: 1.55 !important;
		color: #4a5560 !important;
		text-align: left !important;
	}

	body .how-it-work .stages .stages-item_txt p + p { margin-top: 8px !important; }
	body .how-it-work .stages .stages-item_txt p:empty { display: none; }
}

/* планшет: картки вужчі — відступ трохи менший */
@media (min-width: 768px) and (max-width: 1099px) {
	body .how-it-work .stages .stages__item { padding: 26px 24px 28px !important; }
	body .how-it-work .stages .stages__item::before { top: 22px; right: 22px; }
}

/* на широкому екрані — рівні ряди без «хвоста»: 5 кроків в один ряд, 6 — по три */
@media (min-width: 1100px) {
	body .how-it-work .stages:has(> .stages__item:nth-child(5)) { grid-template-columns: repeat(5, 1fr); }
	body .how-it-work .stages:has(> .stages__item:nth-child(6)) { grid-template-columns: repeat(3, 1fr); }
	body .how-it-work .stages:has(> .stages__item:nth-child(7)) { grid-template-columns: repeat(4, 1fr); }

	/* рівно 5 вузьких карток у ряд — відступ трохи менший, щоб текст не стискався */
	body .how-it-work .stages:has(> .stages__item:nth-child(5)):not(:has(> .stages__item:nth-child(6))) .stages__item { padding: 26px 22px 28px !important; }
	body .how-it-work .stages:has(> .stages__item:nth-child(5)):not(:has(> .stages__item:nth-child(6))) .stages__item::before { top: 22px; right: 20px; }
	body .how-it-work .stages:has(> .stages__item:nth-child(5)):not(:has(> .stages__item:nth-child(6))) .stages-item_txt .sub-title { font-size: 17px !important; }
}

/* ---------- Рядок запису замість рамки з написом ---------- */

body .how-it-work .sign-block__body {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 14px 24px;
	width: auto !important;
	max-width: none !important;
	min-height: 0 !important;
	height: auto !important;
	margin: 16px 0 0 !important;
	padding: 24px 30px !important;
	background: #0f4c81 !important;
	border: 0 !important;
	border-radius: 10px;
	text-align: left !important;
}

body .how-it-work .sign-block__body::before,
body .how-it-work .sign-block__body::after,
body .how-it-work .sign-block__body .icon {
	display: none !important;
}

body .how-it-work .sign-block__body .sub-title_big {
	position: relative;
	flex: 1 1 280px;
	width: auto !important;
	margin: 0 !important;
	font-size: 20px !important;
	line-height: 1.3 !important;
	font-weight: 700;
	color: #fff !important;
	text-align: left !important;
	opacity: 1 !important;
	visibility: visible !important;
	animation: none !important;
}

body .how-it-work .sign-block__body .sub-title_big::before { display: none !important; }

body .how-it-work .eq-steps-cta {
	position: relative;
	display: flex;
	flex: 0 0 auto;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 22px;
}

body .how-it-work .eq-steps-cta .eq-steps-cta__btn.btn {
	margin: 0;
	padding: 14px 26px;
}

body .how-it-work .eq-steps-cta__tel,
body .how-it-work .eq-steps-cta__tel:hover {
	font-size: 19px;
	font-weight: 700;
	color: #fff;
	white-space: nowrap;
	text-decoration: none;
}

body .how-it-work .eq-steps-cta__tel:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 767px) {
	body .how-it-work { padding: 36px 0 40px !important; }
	body .how-it-work .title_1 { margin-bottom: 18px !important; }
	body .how-it-work .sign-block__body { padding: 18px 16px !important; }
	body .how-it-work .sign-block__body .sub-title_big { flex-basis: 100%; font-size: 18px !important; }
	body .how-it-work .eq-steps-cta { flex: 1 1 100%; }
	body .how-it-work .eq-steps-cta .eq-steps-cta__btn.btn { flex: 1 1 100%; }
}
