/* Страница «Монтаж кондиционера под ключ» — /page/montazh.
   Макет: Figma bICfrHYCNbjWxzcDkJTwln
     десктоп 210:1791, после отправки 210:1979;
     мобильный 210:2145, после отправки 210:2341.
   Отступы посчитаны вычитанием координат макета (верх следующего − низ предыдущего).
   Контейнер сайта на 1440 — 1296 px контента, как в макете, поэтому размеры переносятся 1:1.
   Отдельный файл, а не правка сборки: откат — одной строкой в header.php. */

.page-montazh {
  padding-bottom: 78px;          /* низ формы 2072 → подвал 2150 */
  color: #000;
}

/* Сброс отступов. Сила — ровно один класс (0,1,0):
   - сильнее правил сайта для голых тегов (у ul там margin-left 30px, у p — margin-bottom 16px);
   - равна классам ниже по файлу, поэтому они (идущие позже) выигрывают.
   Грабли, на которые наступил: .page-montazh h2 (0,1,1) перебивал отступы классов,
   а :where() целиком (0,0,0) проигрывал правилам сайта. */
.page-montazh :where(h1, h2, p, ul, ol, li) {
  margin: 0;
  padding: 0;
}

.page-montazh :where(ul, ol) {
  list-style: none;
}

/* ---------- Первый экран ---------- */

.montazh-hero {
  display: grid;
  grid-template-columns: 624px 615px;
  column-gap: 46px;              /* 72+624=696 → картинка с 742 (справа остаётся 11) */
  align-items: start;
  padding-top: 47px;             /* низ шапки → заголовок (в макете 116 → 163) */
}

.montazh-title {
  margin-bottom: 20px;           /* 163+28 → 211 */
  font-size: 28px;
  font-weight: 700;
  line-height: 28px;             /* стиль iKlimat/H1: 100% */
}

.montazh-lead {
  margin-bottom: 48px;           /* 211+90 → 349 */
  font-size: 25px;
  line-height: 30px;             /* 3 строки = 90, как в макете */
}

.montazh-features {
  display: flex;
  gap: 48px;                     /* 72+176 → 296 */
  margin-bottom: 68px;           /* 349+152 → 569 */
}

.montazh-feature {
  display: flex;
  flex: 0 0 176px;               /* не сжимать: в узком блоке текст уходил в 3 строки */
  flex-direction: column;
  align-items: center;
  width: 176px;
  text-align: center;
}

.montazh-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 84px;
}

/* Размер значков задаём явно: на сайте общее правило растягивает svg/img */
.montazh-feature--master .montazh-feature-icon img    { width: 68px; height: 80px; }
.montazh-feature--materials .montazh-feature-icon img { width: 78px; height: 52px; }
.montazh-feature--check .montazh-feature-icon img     { width: 71px; height: 72px; }

.montazh-feature-text {
  margin-top: 16px;              /* 349+84 → 449 */
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.montazh-cta-title {
  margin-bottom: 16px;           /* 569+24 → 609 */
  font-size: 24px;
  font-weight: 700;
  line-height: 24px;
}

.montazh-cta-text {
  max-width: 576px;
  margin-bottom: 20px;           /* 609+46.8 → 675.45 */
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0.18px;
}

.page-montazh .button.montazh-cta-button,
.page-montazh .button.montazh-form-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 43px;
  padding: 12px 24px;
  border: 0;
  border-radius: 4px;
  background: var(--i-klimat-main-1, #ECA740);
  color: #F3F7FA;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.32px;
  text-align: center;
  text-decoration: none;
}

.page-montazh .button.montazh-cta-button {
  width: 289px;
}

.montazh-hero-image {
  display: block;
  width: 615px;
  height: 564px;
  margin-top: 3px;               /* картинка на 3 px ниже заголовка: 166 против 163 */
}

/* В макете картинка шире блока (110%) и сдвинута: слева срезано 38 px, справа 24 —
   object-position 61% воспроизводит ровно это соотношение. */
.montazh-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 61% 0;
}

/* ---------- Что входит + материалы ---------- */

.montazh-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 68px;              /* низ картинки 730 → 798 */
}

.montazh-card {
  height: 364px;
  padding: 28px;
  background: var(--i-klimat-text-secondary-3, #F3F7FA);
  border-radius: 9px;
}

.montazh-card-title {
  margin-bottom: 20px;           /* 28+24 → 72 */
  font-size: 24px;
  font-weight: 500;
  line-height: 24px;
}

.montazh-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Маркер — оранжевый круг 8 px, по центру строки, 16 px до текста */
.montazh-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  line-height: normal;
}

.montazh-list li::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--i-klimat-main-1, #ECA740);
}

.montazh-card-note {
  margin-top: 35px;              /* список 72+194=266 → 301 */
  font-size: 16px;
  font-style: italic;
  line-height: normal;
}

/* ---------- Цены ---------- */

.montazh-prices {
  margin-top: 80px;              /* 1162 → 1242 */
}

.montazh-h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 28px;
  color: var(--text-basic, #222529);
}

.montazh-prices .montazh-h2 {
  margin-bottom: 5px;            /* 1242+28=1270 → первая строка 1275 */
}

.montazh-price-table {
  width: 966px;
  border-collapse: collapse;
}

/* Строки по 55 px (основная высота строки в макете), фон у чётных — как в макете.
   В макете было 4 строки с неровными высотами 55/55/47/55; прайс от 01.10.2026 — 6 строк,
   ставим ровный ритм. Высота у строки таблицы — минимальная: длинное название её растянет. */
.montazh-price-table tr {
  height: 55px;
}

.montazh-price-table tr:nth-child(even) {
  background: var(--i-klimat-text-secondary-3, #F3F7FA);
}

.montazh-price-name {
  padding: 0 0 0 14px;           /* текст от 88 при фоне от 74 */
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
  vertical-align: middle;
}

.montazh-price-value {
  width: 129px;                  /* колонка 840–969, текст по центру */
  padding: 0 71px 0 0;           /* до правого края фона 1040 */
  box-sizing: content-box;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0.18px;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}

.montazh-price-value .rub {
  font-family: Inter, sans-serif;
}

/* ---------- Этапы + форма ---------- */

.montazh-bottom {
  display: grid;
  grid-template-columns: 636px 526px;
  justify-content: space-between;
  align-items: start;
  margin-top: 80px;              /* 1487 → 1567 */
}

/* Заголовок этапов — на 92 px ниже верха формы (1567 → 1659), как в макете.
   Центрирование по высоте формы давало −3,5 px: текстовые поля шагов в макете разной высоты. */
.montazh-steps-wrap {
  margin-top: 92px;
}

.montazh-steps-title {
  margin-bottom: 24px;           /* 1659+24 → 1707 */
  line-height: 24px;
  color: #000;
}

.montazh-steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.montazh-step {
  display: flex;
  align-items: center;
  gap: 20px;
}

.montazh-step-num {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #F4DBA4;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.montazh-step-body {
  display: flex;
  flex-direction: column;
  gap: 12px;                     /* заголовок 17 → описание на +29 */
}

.montazh-step-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 17px;
}

.montazh-step-text {
  font-size: 16px;
  line-height: 1.15;
}

.montazh-form-block {
  min-height: 505px;
  padding: 28px 32px;
  background: var(--i-klimat-text-secondary-3, #F3F7FA);
  border-radius: 7px;
  scroll-margin-top: 20px;
}

.montazh-form-title {
  margin-bottom: 20px;           /* 1595+27 → 1642 */
  font-size: 24px;
  font-weight: 700;
  line-height: 27px;
  color: var(--text-basic, #222529);
}

.montazh-form {
  display: flex;
  flex-direction: column;
}

.montazh-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;           /* 1642+75 → 1729 */
}

.montazh-field label {
  margin: 0;
  font-size: 16px;
  line-height: normal;
  color: #494847;
}

.montazh-field input,
.montazh-field textarea {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 20px;
  border: 1px solid #494847;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  color: #000;
  outline: none;
}

.montazh-field textarea {
  height: 95px;
  padding-top: 16px;
  resize: vertical;
}

.montazh-field input::placeholder,
.montazh-field textarea::placeholder {
  color: var(--i-klimat-text-secondary-1, #9CA0A4);
}

.montazh-field input.error {
  border-color: red;
}

.page-montazh .error-message {
  font-size: 14px;
  line-height: 1.2;
  color: red;
}

.page-montazh .error-message:empty {
  display: none;
}

/* Согласие: своё поле 22×22 по макету, настоящий чекбокс скрыт, но остаётся доступным */
.montazh-consent {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 0;               /* текстовое поле 1938 → 1958; 12 даёт поле */
  cursor: pointer;
}

.montazh-consent input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.montazh-consent-box {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 1px solid #494847;
  border-radius: 4px;
  background: #fff;
}

.montazh-consent input:checked + .montazh-consent-box::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid #494847;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.montazh-consent input:focus-visible + .montazh-consent-box {
  outline: 2px solid var(--i-klimat-main-1, #ECA740);
  outline-offset: 2px;
}

.montazh-consent-text {
  font-size: 16px;
  font-style: italic;
  line-height: normal;
  color: var(--text-light-1, #878E95);
}

.page-montazh .button.montazh-form-button {
  width: 100%;
  margin-top: 21px;              /* 1980 → 2001 */
  cursor: pointer;
}

.page-montazh .button.montazh-form-button:disabled {
  opacity: .6;
  cursor: default;
}

.montazh-form-error {
  margin-top: 8px;
}

/* Состояние «заявка отправлена» */
.montazh-sent-state {
  display: none;
}

.montazh-form-block.is-sent .montazh-form-state {
  display: none;
}

.montazh-form-block.is-sent .montazh-sent-state {
  display: block;
}

.montazh-form-block.is-sent {
  padding-top: 32px;             /* 1567 → 1599 */
}

.montazh-sent-title {
  max-width: 423px;
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 500;
  line-height: normal;
}

.montazh-sent-lead {
  max-width: 420px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0.18px;
}

.montazh-sent-image {
  display: block;
  width: 246px;
  height: 291px;
  margin-top: 54px;              /* 1648+46.8 → 1749 */
}

.montazh-sent-image img {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Планшет и телефон: одна колонка, размеры мобильного макета ---------- */
@media (max-width: 991px) {

  .page-montazh {
    padding-bottom: 60px;        /* 2962 → подвал 3022 */
  }

  .montazh-hero {
    grid-template-columns: 1fr;
    padding-top: 20px;           /* шапка 90 → заголовок 110 */
  }

  .montazh-title {
    margin-bottom: 16px;         /* 110+26 → 152 */
    font-size: 22px;
    line-height: normal;
    color: var(--text-basic, #222529);
  }

  .montazh-lead {
    margin-bottom: 40px;         /* 152+88 → 280 */
    font-size: 16px;
    line-height: 22px;
    letter-spacing: 0.16px;
  }

  /* Три значка в ряд по 112 px. Порядок на телефоне в макете другой:
     «Все необходимые материалы» первым, затем «Монтаж специалистами», «Запуск». */
  .montazh-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 41px;         /* 280+108 → 429 */
  }

  .montazh-feature {
    width: auto;
  }

  .montazh-feature--materials { order: 1; }
  .montazh-feature--master    { order: 2; }
  .montazh-feature--check     { order: 3; }

  .montazh-feature-icon {
    width: 49px;
    height: 50px;
  }

  .montazh-feature--master .montazh-feature-icon img    { width: 37px; height: 44px; }
  .montazh-feature--materials .montazh-feature-icon img { width: 47px; height: 32px; }
  .montazh-feature--check .montazh-feature-icon img     { width: 42px; height: 43px; }

  .montazh-feature-text {
    margin-top: 4px;             /* 280+50 → 334 */
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.21px;
  }

  .montazh-cta-title {
    margin-bottom: 12px;         /* 429+22 → 463 */
    font-size: 18px;
    font-weight: 600;
    line-height: 22px;
  }

  .montazh-cta-text {
    max-width: none;
    font-size: 16px;
    letter-spacing: 0.16px;
  }

  .page-montazh .button.montazh-cta-button {
    width: 100%;
    height: 44px;
  }

  .montazh-hero-image {
    width: 100%;
    height: auto;
    aspect-ratio: 351 / 293;
    margin-top: 28px;            /* кнопка 590 → картинка 618 */
  }

  .montazh-hero-image img {
    object-position: 50% 50%;
  }

  .montazh-cards {
    grid-template-columns: 1fr;
    gap: 32px;                   /* 1385 → 1417 */
    margin-top: 67px;            /* 911 → 978 */
  }

  .montazh-card {
    height: auto;
    padding: 24px;
  }

  .montazh-card-title {
    font-size: 18px;
    font-weight: 400;
    line-height: 18px;
  }

  .montazh-list {
    gap: 12px;
  }

  .montazh-list li {
    font-size: 14px;
  }

  .montazh-card-note {
    margin-top: 16px;            /* 199 → 215 */
    font-size: 14px;
  }

  .montazh-prices {
    margin-top: 60px;            /* 1730 → 1790 */
  }

  .montazh-h2 {
    font-size: 18px;
    line-height: 22px;
  }

  .montazh-prices .montazh-h2 {
    margin-bottom: 18px;         /* 1812 → 1830 */
  }

  .montazh-price-table {
    width: 100%;
  }

  /* Строки от 48 px; название в две-три строки растягивает строку — поля 7 px сверху и снизу */
  .montazh-price-table tr {
    height: 48px;
  }

  .montazh-price-name {
    padding: 7px 12px 7px 8px;   /* текст от 20 при фоне от 12 */
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.21px;
  }

  .montazh-price-value {
    width: 90px;                 /* колонка от 269 */
    padding-right: 4px;
    font-size: 14px;
    letter-spacing: 0.21px;
    text-align: left;
  }

  .montazh-bottom {
    grid-template-columns: 1fr;
    gap: 60px;                   /* 2428 → 2488 */
    margin-top: 60px;            /* 2027 → 2087 */
  }

  .montazh-steps-wrap {
    margin-top: 0;
  }

  .montazh-steps-title {
    margin-bottom: 28px;         /* 2087+22 → 2137 */
    font-size: 18px;
    font-weight: 600;
    line-height: 22px;
  }

  .montazh-steps {
    gap: 20px;                   /* 0+58 → 78 */
  }

  .montazh-step {
    gap: 32px;                   /* круг 38 → текст от 70 */
  }

  .montazh-step-num {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    font-size: 26.6px;
  }

  .montazh-step-body {
    gap: 8px;                    /* заголовок 17 → описание на +25 */
  }

  .montazh-step-title {
    font-size: 15px;
  }

  .montazh-step-text {
    font-size: 14px;
    line-height: 1.18;
  }

  .montazh-form-block {
    min-height: 474px;
    padding: 28px 16px;
  }

  .montazh-form-title {
    margin-bottom: 20px;         /* 2516+22 → 2558 */
    font-size: 20px;
    font-weight: 500;
    line-height: 22px;
    color: #000;
  }

  .montazh-field {
    gap: 8px;
  }

  .montazh-field label {
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: 0.21px;
  }

  .montazh-field input {
    height: 36px;
    padding-left: 18px;
    font-size: 14px;
  }

  .montazh-field textarea {
    height: 104px;
    padding-top: 8px;
    padding-left: 18px;
    font-size: 14px;
  }

  .montazh-consent {
    gap: 15px;
    margin-top: 8px;             /* 2833 → 2853 */
  }

  .montazh-consent-box {
    flex-basis: 16px;
    width: 16px;
    height: 16px;
    border-radius: 2px;
  }

  .montazh-consent input:checked + .montazh-consent-box::after {
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
  }

  .montazh-consent-text {
    font-size: 13px;
  }

  .page-montazh .button.montazh-form-button {
    margin-top: 20px;            /* 2871 → 2891 */
  }

  /* «Спасибо» на телефоне: картинка сверху, текст под ней */
  /* Текст в макете от 40 (блок от 12 → поле 28), ширина до 319 — справа поле 4 */
  .montazh-form-block.is-sent {
    padding: 40px 4px 28px 28px;
  }

  .montazh-form-block.is-sent .montazh-sent-state {
    display: flex;
    flex-direction: column;
  }

  /* В макете картинка на 11 px правее центра блока (слева 92 при блоке 12–363).
     Левый край от начала содержимого = ширина_блока/2 + 11 − 213/2 − 28;
     ширина_блока = содержимое + 32 (поля 28 и 4) → calc(50% − 107.5px).
     При блоке 351 это 52 px — ровно как в макете. */
  .montazh-sent-image {
    order: -1;
    align-self: flex-start;
    width: 213px;
    height: 252px;
    margin: 0 0 36px calc(50% - 107.5px); /* 2780 → 2816 */
  }

  .montazh-sent-title {
    max-width: 310px;
    font-size: 20px;
    letter-spacing: 0.3px;
  }

  .montazh-sent-lead {
    max-width: 319px;
    font-size: 14px;
    letter-spacing: 0.21px;
  }
}
