/* ============================================================
   Страница раздела. Шаблон один на все 12 направлений,
   меняются тексты, цены и фотографии.
   Подключается вторым файлом после style.css.
   ============================================================ */

/* ---------- Обложка ---------- */

.cover {
  position: relative; min-height: 62svh; display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 48px) 0 clamp(40px, 5vw, 68px);
  isolation: isolate; overflow: hidden;
}
.cover img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
}
.cover::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(15, 19, 24, .96) 6%, rgba(15, 19, 24, .72) 52%, rgba(15, 19, 24, .5));
}
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--white); }
.crumbs span { color: rgba(255, 255, 255, .3); }
.cover h1 { max-width: 16ch; }
.cover .lead { margin-top: 18px; }
.cover-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* цена «от» — два числа, потому что кузовной ремонт и покраска считаются по-разному */
.price-from { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 30px; }
.price-from div { border-left: 2px solid var(--accent); padding-left: 16px; }
.price-from b {
  font-family: 'Unbounded', sans-serif; font-size: clamp(20px, 2vw, 27px);
  font-weight: 700; display: block; line-height: 1.1;
}
.price-from span { font-size: 14px; color: var(--muted); display: block; margin-top: 4px; }

/* ---------- Полоса преимуществ раздела ---------- */

.badges { border-bottom: 1px solid var(--hairline-2); padding: clamp(28px, 3.4vw, 46px) 0; }
.badges-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.badge-i { display: flex; gap: 14px; align-items: flex-start; }
.badge-i svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.badge-i b { display: block; font-family: 'Unbounded', sans-serif; font-size: 15px; font-weight: 500; }
.badge-i span { font-size: 14px; color: var(--muted); display: block; margin-top: 5px; line-height: 1.45; }

/* ---------- Таблица работ ---------- */

.works-two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.plist { border-top: 1px solid var(--light-2); }
.plist h3 { margin: 0 0 4px; }
.prow {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  padding: 15px 0; border-bottom: 1px solid var(--light-2);
}
.prow .nm { font-size: 16px; }
.prow .pr {
  font-family: 'Unbounded', sans-serif; font-size: 15px; font-weight: 500; white-space: nowrap;
}
.plist-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-bottom: 14px; border-bottom: 2px solid var(--ink);
}
.plist-head small { font-size: 13px; color: var(--ink-muted); }
.pnote {
  margin-top: 18px; font-size: 14px; color: var(--ink-muted); line-height: 1.55;
  background: rgba(47, 125, 246, .07); border-left: 2px solid var(--accent);
  padding: 14px 18px; border-radius: 0 var(--r) var(--r) 0;
}

/* ---------- Когда пора приехать ---------- */

.signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.sign {
  border: 1px solid var(--hairline-2); border-radius: var(--r); padding: 22px;
  background: var(--bg-2); display: flex; gap: 14px; align-items: flex-start;
  position: relative;
}
/* номер — крупно в правом верхнем углу, полупрозрачным акцентом */
.sign b {
  font-family: 'Unbounded', sans-serif; font-weight: 700; color: var(--accent);
  font-size: 42px; line-height: 1; opacity: .26;
  position: absolute; top: 14px; right: 16px;
}
.sign p { font-size: 15px; line-height: 1.5; padding-right: 54px; }

/* ---------- Как проходит работа ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: st; }
.step {
  border: 1px solid var(--light-2); border-radius: var(--r); padding: 26px;
  background: var(--white); position: relative;
}
/* номер шага — крупно в правом верхнем углу, тем же стилем, что в .sign */
.step::before {
  counter-increment: st; content: counter(st, decimal-leading-zero);
  font-family: 'Unbounded', sans-serif; font-size: 40px; font-weight: 700;
  color: var(--accent); opacity: .28; line-height: 1;
  position: absolute; top: 14px; right: 16px;
}
.step h3 { margin-bottom: 10px; padding-right: 58px; }
.step p { font-size: 15px; color: var(--ink-muted); line-height: 1.55; }
.step.free { border-color: var(--accent); }
/* плашка в потоке над заголовком — правый верхний угол теперь занят номером */
.step .free-mark {
  display: inline-block; margin-bottom: 12px; font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; font-family: 'Unbounded', sans-serif; font-weight: 500;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 100px; padding: 3px 10px;
}

/* ---------- Оборудование ---------- */

.eq-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.eq {
  border: 1px solid var(--hairline-2); border-radius: var(--r); overflow: hidden;
  background: var(--bg-2);
}
.eq img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.eq .t { padding: 20px 22px 24px; }
.eq h3 { margin-bottom: 8px; }
.eq p { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---------- Галерея работы ---------- */

.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gal figure { border-radius: var(--r); overflow: hidden; position: relative; }
.gal img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; transition: transform .6s var(--ease); }
.gal figure:hover img { transform: scale(1.05); }
.gal figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 18px 16px; font-size: 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, .88), transparent);
}

/* ---------- Гарантия ---------- */

.warranty {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
  border: 1px solid var(--hairline); border-radius: var(--r); padding: clamp(28px, 3.4vw, 48px);
  background: var(--bg-2);
}
.warranty .big {
  font-family: 'Unbounded', sans-serif; font-size: clamp(44px, 6vw, 88px); font-weight: 700;
  line-height: .95; color: var(--accent);
}
.warranty .big small { display: block; font-size: 16px; color: var(--white); font-weight: 500; margin-top: 12px; }
.warranty ul { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.warranty li { font-size: 15px; color: var(--muted); display: flex; gap: 11px; align-items: flex-start; }
.warranty li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  margin-top: 9px; flex-shrink: 0;
}

/* ---------- Сами / профильные (аутсорс) ---------- */

.outsource {
  border: 1px solid var(--hairline); border-radius: var(--r);
  padding: clamp(28px, 3.4vw, 48px); background: var(--bg-2);
}
.outsource .lead { max-width: 760px; }
.outsource-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 30px; }
.outsource-cols h3 { margin-bottom: 14px; }
.outsource-cols h3 span { color: var(--accent); }
.outsource-cols ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.outsource-cols li { font-size: 15px; color: var(--muted); display: flex; gap: 11px; align-items: flex-start; }
.outsource-cols li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  margin-top: 9px; flex-shrink: 0;
}
.outsource-note {
  margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--hairline-2);
  display: flex; gap: 14px; align-items: flex-start;
}
.outsource-note svg { color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.outsource-note p { font-size: 15px; line-height: 1.55; }
.outsource-note b { color: var(--accent); }
@media (max-width: 860px) { .outsource-cols { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Соседние разделы ---------- */

.near { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.near a {
  border: 1px solid var(--hairline-2); border-radius: var(--r); padding: 18px 20px;
  background: var(--bg-2); display: flex; justify-content: space-between; align-items: center; gap: 12px;
  transition: border-color .24s var(--ease), transform .24s var(--ease);
}
.near a:hover { border-color: var(--accent); transform: scale(1.04); position: relative; z-index: 2; }
.near .nm { font-size: 15px; }
.near .pr { font-family: 'Unbounded', sans-serif; font-size: 13px; color: var(--muted); white-space: nowrap; }

/* колонки, задаваемые классом — инлайн-стили ломают мобильные медиа-запросы */
.grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }

/* ---------- Адаптив ---------- */

@media (max-width: 1180px) {
  .badges-grid, .eq-grid, .near { grid-template-columns: repeat(2, 1fr); }
  .signs, .steps { grid-template-columns: repeat(2, 1fr); }
  .gal { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 860px) {
  .works-two { grid-template-columns: 1fr; gap: 32px; }
  .warranty { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 720px) {
  .cover { min-height: auto; padding-top: calc(var(--header-h) + 28px); }
  .badges-grid, .signs, .steps, .eq-grid, .gal, .near { grid-template-columns: 1fr; }
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr !important; }
  .price-from { gap: 18px; }
}
