/* Компактная раскладка страницы /services/ai/.
   Три однотипные сетки карточек из первой версии заменены на:
   — переключаемые сценарии (табы на чистом CSS, без JS),
   — горизонтальную шкалу процесса,
   — строку принципов и три коротких блока про риски.
   Классы сайта (.section, .container, .title__65) переиспользуются как есть. */

/* ── Сценарии: табы ───────────────────────────────────────────── */
.ai-tabs__input { position: absolute; opacity: 0; pointer-events: none; }

.ai-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 32px;
}
.ai-tabs__nav label {
	cursor: pointer;
	border: 1px solid #e2e3ea;
	border-radius: 999px;
	padding: 12px 24px;
	font-size: 18px;
	line-height: 1.2;
	color: #2a2a2a;
	transition: border-color .25s linear, color .25s linear, background-color .25s linear;
	user-select: none;
}
.ai-tabs__nav label:hover { border-color: #237ae9; color: #237ae9; }

.ai-panel { display: none; }

#ai-tab-1:checked ~ .ai-tabs__nav label[for="ai-tab-1"],
#ai-tab-2:checked ~ .ai-tabs__nav label[for="ai-tab-2"],
#ai-tab-3:checked ~ .ai-tabs__nav label[for="ai-tab-3"],
#ai-tab-4:checked ~ .ai-tabs__nav label[for="ai-tab-4"],
#ai-tab-5:checked ~ .ai-tabs__nav label[for="ai-tab-5"] {
	background: #237ae9;
	border-color: #237ae9;
	color: #fff;
}
#ai-tab-1:checked ~ .ai-tabs__panels .ai-panel--1,
#ai-tab-2:checked ~ .ai-tabs__panels .ai-panel--2,
#ai-tab-3:checked ~ .ai-tabs__panels .ai-panel--3,
#ai-tab-4:checked ~ .ai-tabs__panels .ai-panel--4,
#ai-tab-5:checked ~ .ai-tabs__panels .ai-panel--5 { display: block; }

/* видимый фокус для клавиатуры */
.ai-tabs__input:focus-visible ~ .ai-tabs__nav label[for] { outline: none; }
.ai-tabs__input:focus-visible + .ai-tabs__input + .ai-tabs__input + .ai-tabs__input ~ .ai-tabs__nav label:first-child,
.ai-tabs__input:focus-visible ~ .ai-tabs__nav label { box-shadow: none; }

.ai-panel__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}
.ai-panel__col {
	border: 1px solid #e2e3ea;
	border-radius: 20px;
	padding: 28px 32px;
}
.ai-panel__col--after { background: #f4f7fa; border-color: transparent; }
.ai-panel__label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #9a9ea2;
	margin-bottom: 14px;
}
.ai-panel__col--after .ai-panel__label { color: #237ae9; }
.ai-panel__list { list-style: none; padding: 0; margin: 0; }
.ai-panel__list li {
	position: relative;
	padding-left: 24px;
	font-size: 18px;
	line-height: 1.4;
	color: #2a2a2a;
	margin-top: 14px;
}
.ai-panel__list li:first-child { margin-top: 0; }
.ai-panel__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 10px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #c4c8cc;
}
.ai-panel__col--after .ai-panel__list li::before { background: #237ae9; }

.ai-panel__need {
	margin-top: 24px;
	font-size: 17px;
	line-height: 1.45;
	color: #55595d;
}
.ai-panel__need b { color: #2a2a2a; font-weight: 500; }

/* ── Процесс: горизонтальная шкала ────────────────────────────── */
.ai-flow {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}
.ai-flow__step { position: relative; padding-top: 84px; }
.ai-flow__step::before {
	content: "";
	position: absolute;
	left: 0;
	right: -24px;
	top: 33px;
	height: 1px;
	background: #e2e3ea;
}
.ai-flow__step:last-child::before { right: 0; }
.ai-flow__num {
	position: absolute;
	left: 0;
	top: 0;
	width: 66px;
	height: 66px;
	border-radius: 50%;
	background: #237ae9;
	color: #fff;
	font-size: 34px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ai-flow__title { font-size: 22px; font-weight: 700; line-height: 1.2; }
.ai-flow__text { font-size: 16px; line-height: 1.45; color: #55595d; margin-top: 10px; }
.ai-flow__time {
	display: inline-block;
	margin-top: 12px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #f1f6fe;
	color: #237ae9;
	font-size: 14px;
	font-weight: 500;
}
.ai-flow__note {
	margin-top: 28px;
	font-size: 17px;
	color: #55595d;
}
.ai-flow__note b { color: #2a2a2a; font-weight: 500; }

/* ── Принципы одной строкой ───────────────────────────────────── */
.ai-principles {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}
.ai-principle { border-top: 2px solid #2a2a2a; padding-top: 16px; }
.ai-principle b { display: block; font-size: 20px; line-height: 1.2; }
.ai-principle span { display: block; font-size: 16px; line-height: 1.45; color: #55595d; margin-top: 8px; }

/* ── Риски: три коротких блока ────────────────────────────────── */
.ai-risks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ai-risk {
	background: #f4f7fa;
	border-radius: 20px;
	padding: 28px 32px;
}
.ai-risk b { display: block; font-size: 20px; line-height: 1.25; margin-bottom: 10px; }
.ai-risk span { display: block; font-size: 16px; line-height: 1.5; color: #55595d; }

/* ── Мобильные ────────────────────────────────────────────────── */
@media (max-width: 1023px) {
	.ai-flow, .ai-principles { grid-template-columns: repeat(2, 1fr); }
	.ai-risks { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
	/* пять кнопок в столбик занимали четыре ряда — на мобильных делаем ленту
	   с прокруткой пальцем; отрицательные поля выводят её под край экрана,
	   чтобы было видно, что список продолжается */
	.ai-tabs__nav {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		gap: 8px;
		margin: 0 -16px 24px;
		padding: 0 16px 2px;
	}
	.ai-tabs__nav::-webkit-scrollbar { display: none; }
	.ai-tabs__nav label { flex: 0 0 auto; white-space: nowrap; font-size: 15px; padding: 10px 16px; }
	.ai-panel__grid { grid-template-columns: 1fr; gap: 16px; }
	.ai-panel__col { padding: 22px 20px; border-radius: 16px; }
	.ai-panel__list li { font-size: 16px; }
	.ai-flow, .ai-principles { grid-template-columns: 1fr; gap: 20px; }
	.ai-flow__step::before { right: 0; }
	.ai-flow__title { font-size: 20px; }
	.ai-risk { padding: 22px 20px; border-radius: 16px; }
}


/* ── Пример расчёта ───────────────────────────────────────────────
   Иллюстрация к сценарию: арифметика, которую читатель примеряет на себя.
   Это НЕ кейс и не результат внедрения — об этом прямо сказано в сноске,
   чтобы блок не читался как отчёт о выполненном проекте. */
.ai-example {
	margin-top: 24px;
	border: 1px dashed #c3d7f5;
	border-radius: 20px;
	padding: 24px 32px;
	background: #fbfcfe;
}
.ai-example__label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #237ae9;
	margin-bottom: 12px;
}
.ai-example__text {
	font-size: 17px;
	line-height: 1.5;
	color: #2a2a2a;
}
.ai-example__text b { font-weight: 500; }
@media (max-width: 767px) {
	.ai-example { padding: 20px; border-radius: 16px; margin-top: 18px; }
	.ai-example__text { font-size: 16px; }
}

/* ── Модели и инструменты ─────────────────────────────────────────
   Плитки с логотипами: показываем, что не привязаны к одному поставщику. */
.ai-models__lead {
	font-size: 18px;
	line-height: 1.45;
	color: #55595d;
	max-width: 900px;
	margin-bottom: 32px;
}
.ai-models__lead b { color: #2a2a2a; font-weight: 500; }
.ai-models {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 16px;
}
.ai-model {
	border: 1px solid #e2e3ea;
	border-radius: 16px;
	padding: 22px 18px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
	transition: border-color .25s linear;
}
.ai-model:hover { border-color: #237ae9; }
.ai-model img { width: 40px; height: 40px; object-fit: contain; }
.ai-model span { font-size: 15px; line-height: 1.25; color: #2a2a2a; }
.ai-model small { display: block; font-size: 13px; color: #9a9ea2; margin-top: 4px; }
.ai-models__note {
	margin-top: 24px;
	font-size: 15px;
	line-height: 1.45;
	color: #7f8589;
}
@media (max-width: 767px) {
	.ai-models { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.ai-model { padding: 18px 12px; border-radius: 14px; }
	.ai-model img { width: 34px; height: 34px; }
	.ai-model span { font-size: 14px; }
	.ai-models__lead { font-size: 16px; margin-bottom: 24px; }
}
