/* БЛОК 02 «Защита, которую не видно». Собран по макету
   C:\Users\De-sign\Desktop\masterplenok\.tmp\foto\1.png (1672 на 941).

   ⭐ Приём точного повторения: у блока задана ПРОПОРЦИЯ макета и включены
   контейнерные единицы. Тогда 1cqw это ровно 1 процент ширины блока, и любое
   число с макета переносится делением на 1672. Ничего не надо пересчитывать
   под 1920 или 1440: пропорции держатся сами на любой ширине.
   Например поле слева в макете 63 точки, здесь 63/1672*100 = 3.768cqw. */

.b2 {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  background: linear-gradient(155deg, #fdfdfd 0%, #f4f5f8 46%, #eef0f5 100%);
}

/* ── слои: волны сзади, машина спереди ───────────────────────────────── */

.b2__fon,
.b2__avto {
  position: absolute;
  pointer-events: none;
  user-select: none;
}
.b2__fon {
  inset: 0;
  z-index: 0;
}
.b2__fon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
  display: block;
}
.b2__avto {
  z-index: 1;
  left: 38.4cqw;
  top: 15.2cqw;
  width: 44.5cqw;
  height: auto;
  display: block;
}

/* ⛔ Здесь стояло `.b2 > *:not(.b2__fon):not(.b2__avto) { position: relative }`.
   Его специфичность (0,3,0) перебивала `position: absolute` у панели, выноски
   и оценки, объявленный одним классом (0,1,0). Узлы вставали в поток, уезжали
   на y=1226 при высоте блока 1062 и пропадали под overflow: hidden.
   Слой задаём каждому в его же правиле, position не трогаем. */

/* ── левая колонка ───────────────────────────────────────────────────── */

.b2__levo {
  position: absolute;
  z-index: 2;
  left: 3.768cqw;
  top: 9.5cqw;
  width: 40cqw;
}

.b2__nomer {
  display: flex;
  align-items: center;
  gap: 0.9cqw;
  margin: 0 0 1.4cqw;
  font-size: 0.84cqw;
  letter-spacing: 0.18em;
  color: #d81f2c;
  font-weight: 700;
}
.b2__nomer::before {
  content: "";
  width: 3.1cqw;
  height: 2px;
  background: var(--mp-krasnyy, #ef2737);
  border-radius: 2px;
}

.b2 h2 {
  margin: 0;
  font-family: "Oswald", "Arial Narrow", Arial, sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 2.95cqw;
  line-height: 1.378;
  letter-spacing: -0.005em;
  color: #242625;
}
/* Вторая половина заголовка красная: в макете смена цвета с третьей строки. */
.b2 h2 em {
  display: block;
  font-style: normal;
  color: var(--mp-krasnyy, #ef2737);
}

.b2__lid {
  margin: 2.2cqw 0 0;
  width: 32cqw;
  font-size: 1.02cqw;
  line-height: 1.62;
  color: #5a6472;
}

/* ── три мини-факта ──────────────────────────────────────────────────── */

.b2__fakty {
  display: flex;
  gap: 2.4cqw;
  margin: 3.2cqw 0 0;
  padding: 0;
  list-style: none;
}
.b2__fakty li {
  display: flex;
  align-items: center;
  gap: 0.9cqw;
}
.b2__fakty img {
  flex: 0 0 auto;
  width: 3.41cqw;
  height: 3.41cqw;
  padding: 0.6cqw;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid rgba(36, 38, 37, 0.09);
  border-radius: 1cqw;
  object-fit: contain;
}
.b2__fakty span {
  font-size: 0.87cqw;
  line-height: 1.4;
  color: #3d3f3e;
  white-space: nowrap;
}

/* ── кнопки ──────────────────────────────────────────────────────────── */

.b2__knopki {
  display: flex;
  gap: 1.25cqw;
  margin: 2.9cqw 0 0;
}
.b2__knopka {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4cqw;
  height: 4.006cqw;
  padding: 0 1.9cqw;
  border-radius: 1.2cqw;
  font-size: 1.02cqw;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.b2__knopka--glavnaya {
  min-width: 15.55cqw;
  background: var(--mp-krasnyy, #ef2737);
  color: #fff;
  box-shadow: 0 0.6cqw 1.6cqw rgba(239, 39, 55, 0.28);
}
.b2__knopka--tihaya {
  min-width: 13.87cqw;
  background: #fff;
  color: #242625;
  border: 1px solid rgba(36, 38, 37, 0.12);
}
.b2__knopka:hover { transform: translateY(-2px); }
.b2__knopka i {
  font-style: normal;
  font-size: 1.1cqw;
  line-height: 1;
  opacity: 0.85;
}

/* ── выноска у капота ────────────────────────────────────────────────── */

.b2__vynoska {
  position: absolute;
  z-index: 3;
  left: 41.2cqw;
  top: 21.05cqw;
  width: 15.2cqw;
  margin: 0;
  padding: 1cqw 1.2cqw;
  background: #fff;
  border-radius: 0.9cqw;
  box-shadow: 0 0.5cqw 1.8cqw rgba(36, 38, 37, 0.1);
}
.b2__vynoska b {
  display: block;
  font-size: 0.93cqw;
  color: #242625;
}
.b2__vynoska span {
  display: block;
  margin-top: 0.25cqw;
  font-size: 0.81cqw;
  color: #6b7280;
}
/* Тонкая линия от выноски к капоту, как в макете. */
.b2__vynoska::after {
  content: "";
  position: absolute;
  left: 1.7cqw;
  top: 100%;
  width: 1px;
  height: 8.6cqw;
  background: linear-gradient(180deg, rgba(239,39,55,.55), rgba(239,39,55,0));
}

/* ── оценка Яндекса ──────────────────────────────────────────────────── */

.b2__ocenka {
  position: absolute;
  z-index: 3;
  right: 1.44cqw;
  top: 5.62cqw;
  display: flex;
  align-items: center;
  gap: 0.7cqw;
  margin: 0;
  height: 2.81cqw;
  padding: 0 1.3cqw;
  background: #fff;
  border-radius: 0.75cqw;
  box-shadow: 0 0.35cqw 1.2cqw rgba(36, 38, 37, 0.08);
  font-size: 0.87cqw;
  color: #3d3f3e;
  white-space: nowrap;
}
.b2__ocenka b { font-size: 1.14cqw; color: #242625; }
/* Звёзды декоративные: смысл несёт число «5,0» рядом, в разметке они aria-hidden. */
.b2__ocenka i { font-style: normal; color: #f5b301; letter-spacing: 0.06em; }

/* ── правая панель навигации ─────────────────────────────────────────── */

.b2__navi {
  position: absolute;
  z-index: 3;
  left: 63.99cqw;
  top: 10.41cqw;
  width: 34.63cqw;
  height: 39.71cqw;
  padding: 2.2cqw 2.4cqw;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-radius: 1.5cqw;
  box-shadow: 0 1.2cqw 3.2cqw rgba(36, 38, 37, 0.08);
}
.b2__navi-zag {
  display: flex;
  align-items: center;
  gap: 0.8cqw;
  margin: 0 0 1.9cqw;
  font-size: 1.02cqw;
  font-weight: 600;
  color: #242625;
}
.b2__navi-zag::before {
  content: "";
  width: 1.7cqw;
  height: 2px;
  background: var(--mp-krasnyy, #ef2737);
}
.b2__setka {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1.7cqw;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* В макете линия под каждой парой красная и стоит в том числе под последней. */
.b2__setka li { border-bottom: 1px solid rgba(239, 39, 55, 0.55); }
.b2__setka a {
  position: relative;
  display: block;
  padding: 1.5cqw 0 1.5cqw 4.4cqw;
  text-decoration: none;
  color: #242625;
  transition: color 0.18s ease;
}
.b2__setka a:hover { color: var(--mp-krasnyy, #ef2737); }
/* Крупная серая цифра слева, как в макете: она фон, а не текст. */
.b2__setka a::before {
  content: attr(data-nomer);
  position: absolute;
  left: 0;
  top: 1cqw;
  font-family: "Oswald", Arial, sans-serif;
  font-weight: 700;
  font-size: 3.59cqw;
  line-height: 1;
  color: #eeeeef;
}
.b2__setka img {
  display: block;
  width: 2.87cqw;
  height: 2.87cqw;
  margin: 0 0 0.7cqw;
  object-fit: contain;
}
.b2__setka b {
  display: block;
  font-size: 1.02cqw;
  font-weight: 600;
  line-height: 1.35;
}

/* ── экраны ──────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .b2 { aspect-ratio: auto; padding: 6cqw 0 4cqw; }
  .b2__avto { position: relative; z-index: 1; width: 92%; margin: 2cqw auto 0; }
  /* ⛔ position: static ОТКЛЮЧАЕТ z-index, и фоновые волны (они absolute,
     z-index 0) ложились поверх заголовка и кнопок. Держим relative. */
  /* ⛔ Две ловушки разом. Первая: position: static ОТКЛЮЧАЕТ z-index, и волны
     фона (absolute, z-index 0) ложились поверх заголовка. Вторая: сделав узлы
     relative, нельзя оставлять им left/top от абсолютной раскладки, иначе
     relative СМЕЩАЕТ их на ту же величину и панель уезжает за край экрана.
     Поэтому relative плюс обязательный сброс смещений. */
  .b2__levo,
  .b2__navi,
  .b2__vynoska,
  .b2__ocenka {
    position: relative;
    inset: auto;
    z-index: 2;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    margin-inline: 3.768cqw;
  }
  .b2__ocenka { font-size: 3cqw; height: auto; padding: 1.6cqw 2.6cqw; }
  .b2__ocenka b { font-size: 3.6cqw; }
  /* На узком экране волны становятся пёстрым фоном под текстом: приглушаем. */
  .b2__fon { opacity: 0.35; }
  .b2__navi { height: auto; margin-top: 4cqw; }
  .b2__vynoska { display: none; }
  .b2__ocenka { display: inline-flex; margin-bottom: 3cqw; }
  .b2 h2 { font-size: 7cqw; }
  .b2__lid,
  .b2__fakty span,
  .b2__knopka,
  .b2__setka b,
  .b2__navi-zag { font-size: 2cqw; }
  .b2__fakty { flex-wrap: wrap; }
  .b2__fakty img { width: 7cqw; height: 7cqw; }
  .b2__setka a::before { font-size: 6cqw; }
  .b2__setka img { width: 5.6cqw; height: 5.6cqw; }
  /* min-width задан под десктоп: на узком экране он распирает кнопку за край. */
  .b2__knopka { height: 8cqw; border-radius: 2.4cqw; min-width: 0; max-width: 100%; }
  /* Крупная цифра на мобиле налезала на значок: даём ей место слева. */
  .b2__setka a { padding-left: 9cqw; }
  .b2__setka a::before { font-size: 7cqw; top: 1.4cqw; }
}
@media (max-width: 760px) {
  .b2__setka { grid-template-columns: 1fr; }
  .b2__setka li:nth-last-child(-n + 2) { border-bottom: 1px solid rgba(36, 38, 37, 0.1); }
  .b2__setka li:last-child { border-bottom: 0; }
  .b2__knopki { flex-direction: column; }
  .b2 h2 { font-size: 9cqw; }
  .b2__lid, .b2__fakty span, .b2__knopka, .b2__setka b, .b2__navi-zag { font-size: 3.4cqw; }
}

@media (prefers-reduced-motion: reduce) {
  .b2 * { transition: none !important; }
}
