/* ============================================================
   ПОТОЛКИ42 — sections.css
   Калькулятор, визуализация, открытая смета, работы, отзывы,
   чужая смета, FAQ, контакты, футер, модалки, тосты
   ============================================================ */

/* ================= Честный калькулятор ================= */
.calc { position: relative; }
.calc__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(22px, 3vw, 40px); align-items: start; }
.calc__panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: clamp(22px, 3vw, 34px); box-shadow: var(--sh-sm);
  display: flex; flex-direction: column; gap: 24px;
}
.calc__row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.calc__label { font-weight: 800; font-size: 15px; }
.calc__value { font-family: var(--f-display); font-size: 15px; color: var(--brand-deep); white-space: nowrap; }

/* Слайдер площади */
.range {
  width: 100%; appearance: none; height: 8px; border-radius: 6px; margin-top: 6px;
  background: linear-gradient(90deg, var(--brand) var(--fill, 40%), var(--bg-3) var(--fill, 40%));
  outline-offset: 4px;
}
.range::-webkit-slider-thumb {
  appearance: none; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand);
  box-shadow: 0 4px 12px rgba(var(--brand-rgb), .4); cursor: grab;
  transition: transform var(--tr);
}
.range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.range::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: 3px solid var(--brand); box-shadow: 0 4px 12px rgba(var(--brand-rgb), .4); cursor: grab;
}
.range-ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); font-weight: 600; margin-top: 7px; }

/* Сегменты */
.seg { display: grid; grid-auto-flow: column; gap: 6px; background: var(--bg-2); padding: 6px; border-radius: 14px; }
.seg--3 { grid-template-columns: repeat(3, 1fr); grid-auto-flow: row; }
.seg--2 { grid-template-columns: repeat(2, 1fr); grid-auto-flow: row; }
.seg button {
  padding: 11px 10px; border-radius: 10px; font-size: 14px; font-weight: 700;
  color: var(--muted); transition: var(--tr); text-align: center;
}
.seg button:hover { color: var(--ink); }
.seg button.is-active { background: var(--surface); color: var(--brand-ink); box-shadow: var(--sh-sm); }
.seg button small { display: block; font-size: 11px; font-weight: 600; color: var(--faint); margin-top: 2px; }
.seg button.is-active small { color: var(--brand-deep); }

/* Палитра цветов цветного полотна */
.calc__colors { margin-top: 12px; display: flex; flex-direction: column; gap: 9px; }
/* .calc__colors имеет display:flex — он перебивает UA-стиль атрибута hidden,
   поэтому палитра была видна сразу. Явно гасим: показывается только при «Цветной». */
.calc__colors[hidden] { display: none; }
.calc__color-name { font-weight: 700; color: var(--brand-deep); text-transform: none; letter-spacing: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--sw, #ccc);
  border: 2px solid rgba(15, 23, 42, .12);
  box-shadow: inset 0 0 0 2px #fff, var(--sh-sm);
  cursor: pointer; transition: var(--tr); position: relative;
}
.swatch:hover { transform: scale(1.1); }
.swatch.is-active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 3px rgba(var(--brand-rgb), .25), var(--sh-sm);
}
.swatch.is-active::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 10px; height: 6px;
  border-left: 2.5px solid #0F172A; border-bottom: 2.5px solid #0F172A;
  transform: rotate(-45deg) translate(0, -1px); border-radius: 1px; opacity: .75;
}

/* Счётчик */
.counter { display: inline-flex; align-items: center; gap: 0; background: var(--bg-2); border-radius: 14px; padding: 5px; }
.counter button {
  width: 42px; height: 42px; border-radius: 11px; background: var(--surface);
  box-shadow: var(--sh-sm); display: grid; place-content: center;
  font-size: 20px; font-weight: 800; color: var(--brand-deep);
  transition: var(--tr);
}
.counter button:hover { color: var(--brand); transform: scale(1.05); }
.counter button:disabled { opacity: .35; pointer-events: none; }
.counter output { min-width: 64px; text-align: center; font-weight: 800; font-size: 17px; font-family: var(--f-display); }

/* Тумблер */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.switch-row__label { font-weight: 800; font-size: 15px; }
.switch-row__label small { display: block; font-weight: 600; color: var(--faint); font-size: 12px; margin-top: 2px; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.switch i {
  position: absolute; inset: 0; border-radius: 999px; background: var(--bg-3);
  transition: var(--tr);
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(var(--ink-rgb), .25);
  transition: transform var(--tr);
}
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(22px); }

/* Селекты калькулятора */
.calc__selects { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Результат — «честная смета» */
.result {
  background: var(--grad-ink); color: var(--on-dark-text, #E9F5F1);
  border-radius: var(--r-xl); padding: clamp(24px, 3vw, 34px);
  box-shadow: var(--sh-lg); position: relative; overflow: hidden;
}
.result::before {
  content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(var(--brand-rgb), .4), transparent 70%);
}
.result__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.result__title { font-family: var(--f-display); font-size: 17px; }
.result__badge {
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(var(--accent-rgb), .16); color: var(--accent-on-dark, #FFD58A);
  padding: 7px 13px; border-radius: var(--r-pill);
}
.result__rows { display: flex; flex-direction: column; }
.result__row {
  display: flex; justify-content: space-between; gap: 14px; padding: 11px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .16); font-size: 14.5px;
}
.result__row span { color: rgba(233, 245, 241, .78); }
.result__row b { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.result__row--total { border-bottom: 0; padding-top: 16px; }
.result__row--total span { font-weight: 800; color: #fff; font-size: 15.5px; }
.result__total {
  font-family: var(--f-display); font-size: clamp(26px, 3vw, 34px); color: var(--accent-on-dark, #FFD58A);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.result__meta { margin-top: 6px; font-size: 13px; color: rgba(233, 245, 241, .65); }
.result__meta b { color: var(--on-dark-2, #9FE8D8); }
.result__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.result__chips .chip { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); color: var(--on-dark-text, #E9F5F1); box-shadow: none; font-size: 12.5px; padding: 7px 13px; }
.result__chips .chip svg { color: var(--on-dark, #7FE0C8); }
.result__cta { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.result__cta .btn { width: 100%; }
.result__hint { text-align: center; font-size: 12.5px; color: rgba(233, 245, 241, .55); }

/* ================= Визуализация по фото ================= */
.viz__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(26px, 4vw, 54px); align-items: center; }
.viz__list { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.viz__list li { display: flex; gap: 14px; align-items: flex-start; }
.viz__list .icon-tile { width: 44px; height: 44px; border-radius: 13px; }
.viz__list .icon-tile svg { width: 21px; height: 21px; }
.viz__list b { display: block; font-size: 15.5px; }
.viz__list p { color: var(--muted); font-size: 14px; margin-top: 2px; }

.viz__media { position: relative; }
.viz__media .ba { transform: rotate(1.4deg); }
.viz__media .fb { position: absolute; z-index: 4; }
.viz__media .fb--1 { top: -36px; right: 12px; }

/* Загрузка фото */
.upload {
  display: block; position: relative;
  margin-top: 22px; border: 2px dashed var(--line-2); border-radius: var(--r-lg);
  background: var(--surface-2); padding: 22px; text-align: center; cursor: pointer;
  transition: var(--tr);
}
.upload:hover, .upload.is-drag { border-color: var(--brand); background: var(--brand-soft); }
.upload.is-error { border-color: var(--coral); background: rgba(240, 90, 90, .06); }
.upload svg { width: 34px; height: 34px; color: var(--brand); margin-inline: auto; }
.upload b { display: block; margin-top: 10px; font-size: 15px; }
.upload p { font-size: 12.5px; color: var(--faint); margin-top: 3px; }
.upload input { display: none; }
.upload__preview {
  display: none; margin: 0 auto 12px; max-width: 190px; border-radius: 12px;
  box-shadow: var(--sh-md); overflow: hidden; position: relative;
}
.upload__preview img { width: 100%; height: auto; }
.upload__preview .upload__remove {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(var(--ink-rgb), .65); color: #fff; display: grid; place-content: center;
}
.upload__preview .upload__remove svg { width: 13px; height: 13px; color: #fff; margin: 0; }
.upload.has-file .upload__preview { display: block; }

/* ================= Открытая смета ================= */
.estimate__grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(26px, 4vw, 54px); align-items: center; }
.estimate__points { margin-top: 22px; display: flex; flex-direction: column; gap: 13px; }
.estimate__points li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.estimate__points svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 2px; }

.doc {
  background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-lg);
  border: 1px solid var(--line); overflow: hidden;
  transform: rotate(.8deg); transition: transform var(--tr-slow), box-shadow var(--tr-slow);
  position: relative;
}
.doc:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 30px 70px -20px rgba(var(--ink-rgb), .25); }
.doc__head {
  padding: 20px 28px; border-bottom: 1px dashed var(--line-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.doc__title { font-family: var(--f-display); font-size: 15px; }
.doc__num { font-size: 12.5px; color: var(--faint); font-weight: 600; }
.doc__body { padding: 10px 28px 6px; }
.doc__row {
  display: flex; align-items: baseline; gap: 12px; padding: 11px 0;
  font-size: 14.5px; transition: background var(--tr);
}
.doc__row:hover { background: var(--surface-2); }
.doc__row .doc__name { color: var(--ink-2); }
.doc__row .doc__qty { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.doc__row .doc__dots { flex: 1; border-bottom: 1.5px dotted var(--line-2); transform: translateY(-4px); }
.doc__row .doc__sum { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc__row--sub .doc__sum { color: var(--muted); font-weight: 700; }
.doc__total {
  margin: 8px 28px 24px; background: var(--grad-ink); color: #fff;
  border-radius: 16px; padding: 16px 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.doc__total span { font-size: 13.5px; color: rgba(255, 255, 255, .75); font-weight: 700; }
.doc__total b { font-family: var(--f-display); font-size: 21px; color: var(--accent-on-dark, #FFD58A); white-space: nowrap; }
.doc__stamp {
  position: absolute; right: 26px; top: 64px; transform: rotate(9deg);
  border: 2.5px solid rgba(var(--brand-rgb), .5); color: rgba(var(--brand-rgb), .65);
  font-family: var(--f-display); font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; padding: 9px 15px; border-radius: 10px;
  pointer-events: none;
}
.doc__fine { padding: 0 28px 22px; }

/* ================= Работы (галерея) ================= */
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.filters button {
  padding: 11px 20px; border-radius: var(--r-pill); font-size: 14px; font-weight: 700;
  color: var(--muted); background: var(--surface); border: 1px solid var(--line);
  transition: var(--tr);
}
.filters button:hover { color: var(--brand-ink); border-color: var(--brand); }
.filters button.is-active { background: var(--grad-ink); color: #fff; border-color: transparent; box-shadow: var(--sh-md); }

/* На телефоне фильтры — карусель без переноса (как табы в админке):
   прокрутка свайпом, скрытый скроллбар, подсказка «докрутится» по краям */
@media (max-width: 640px) {
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    /* Карусель тянется от края экрана до края: кнопки прижаты
       к гуттеру контента, но скроллится вся ширина */
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-bottom: 4px;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }
}

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gcard {
  position: relative; border-radius: var(--r-lg); overflow: hidden; cursor: zoom-in;
  box-shadow: var(--sh-sm); background: var(--bg-3);
  transition: transform var(--tr-slow), box-shadow var(--tr-slow), opacity .4s ease, scale .4s ease;
}
.gcard:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); }
.gcard img { width: 100%; height: 250px; object-fit: cover; transition: transform .8s cubic-bezier(.22, 1, .36, 1); }
.gcard:hover img { transform: scale(1.07); }
.gcard__overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px; color: #fff;
  background: linear-gradient(180deg, transparent 45%, rgba(var(--ink-rgb), .82) 100%);
  opacity: 0; transition: opacity var(--tr);
}
.gcard:hover .gcard__overlay, .gcard:focus-visible .gcard__overlay { opacity: 1; }
.gcard__tag {
  align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(var(--brand-rgb), .9); padding: 6px 11px; border-radius: var(--r-pill); margin-bottom: 8px;
}
.gcard__title { font-weight: 800; font-size: 16px; }
.gcard__meta { font-size: 13px; opacity: .85; margin-top: 3px; }
.gcard__zoom {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255, 255, 255, .92); color: var(--ink); display: grid; place-content: center;
  transform: scale(.6); opacity: 0; transition: var(--tr);
}
.gcard__zoom svg { width: 19px; height: 19px; }
.gcard:hover .gcard__zoom { transform: scale(1); opacity: 1; }
.gcard.is-hidden { display: none; }
.gallery.is-animating .gcard:not(.is-hidden) { animation: gcard-in .45s ease both; }
@keyframes gcard-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* На телефоне карточка работы — целиком: фото без обрезки (height auto),
   подписи видны всегда (наведения нет), лупа не нужна */
@media (max-width: 640px) {
  .gcard img { height: auto; }
  .gcard__overlay { opacity: 1; }
  .gcard__zoom { display: none; }
}

/* Лайтбокс */
.lightbox {
  position: fixed; inset: 0; z-index: 120; display: none;
  background: rgba(9, 26, 28, .92); backdrop-filter: blur(8px);
  padding: 4vh 4vw;
}
.lightbox.is-open { display: grid; place-content: center; }
.lightbox img {
  max-width: min(1100px, 92vw); max-height: 84vh; border-radius: var(--r-lg);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .5); animation: modal-in .35s ease;
}
.lightbox__close {
  position: absolute; top: 20px; right: 20px; width: 48px; height: 48px; border-radius: 14px;
  background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-content: center;
  transition: var(--tr);
}
.lightbox__close:hover { background: rgba(255, 255, 255, .25); transform: rotate(90deg); }
.lightbox__close svg { width: 22px; height: 22px; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-content: center; transition: var(--tr);
}
.lightbox__nav:hover { background: var(--brand); }
.lightbox__nav svg { width: 22px; height: 22px; }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }
.lightbox__counter { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.8); font-weight: 700; font-size: 14px; }

/* ================= Отзывы ================= */
.reviews-wrap { position: relative; }
.reviews-wrap .swiper { padding: 10px 6px 54px !important; }
/* Карточки одной высоты: слайд по умолчанию height:100% (не растягивается),
   возвращаем auto — flex-лента тянет все слайды по самой высокой карточке,
   футер с автором прижат к нижней кромке у всех карточек. Работает и в
   fallback-ленте (без Swiper / режим правки). */
.reviews .swiper-slide, .reviews-fallback .swiper-slide { height: auto; }
.rcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 26px 26px 22px; height: 100%; display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--sh-sm);
}
.rcard__stars { display: flex; gap: 3px; color: var(--accent); }
.rcard__stars svg { width: 17px; height: 17px; fill: currentColor; }
.rcard__stars svg.is-off { opacity: .18; }
.rcard__text { font-size: 15px; color: var(--ink-2); flex: 1; }
.rcard__foot { display: flex; align-items: center; gap: 13px; border-top: 1px dashed var(--line-2); padding-top: 14px; }
.rcard__avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: var(--grad-brand); color: #fff; display: grid; place-content: center;
  font-weight: 800; font-size: 16px;
}
.rcard__name { font-weight: 800; font-size: 14.5px; }
.rcard__meta { font-size: 12.5px; color: var(--faint); }
.rcard__branch {
  margin-left: auto; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--brand-deep); background: var(--brand-soft); padding: 5px 10px; border-radius: var(--r-pill);
  white-space: nowrap;
}
.reviews .swiper-pagination-bullet { background: var(--line-2); opacity: 1; width: 8px; height: 8px; }
.reviews .swiper-pagination-bullet-active { background: var(--brand); width: 24px; border-radius: 6px; }

/* Fallback без Swiper: горизонтальный скролл */
.reviews-fallback .swiper-wrapper { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 16px; }
.reviews-fallback .rcard { min-width: 320px; scroll-snap-align: start; }

/* ---------- Мини-галерея в карточке отзыва (фото/видео) ----------
   Лента в один ряд у нижней кромки карточки; элементов больше трёх —
   прокручивается вбок (scroll-snap). Клик открывает просмотрщик (media.js). */
.rcard__media {
  display: flex; gap: 8px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 4px; margin-bottom: -4px;
  scrollbar-width: thin;
}
.rcard__media:empty { display: none; }
.rcard__thumb {
  position: relative; flex: none;
  width: 86px; height: 86px; border-radius: 12px; overflow: hidden;
  cursor: zoom-in; scroll-snap-align: start;
  background: var(--bg-2);
}
.rcard__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rcard__thumb:hover img { transform: scale(1.06); transition: transform .35s ease; }
.rcard__thumb-play {
  position: absolute; inset: 0; display: grid; place-content: center;
  background: rgba(13, 43, 46, .28); color: #fff; pointer-events: none;
}
.rcard__thumb-play svg { width: 22px; height: 22px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }

/* ================= Наши обзоры (видео-галерея) ================= */
.vreviews-wrap { position: relative; }
.vreviews-wrap .swiper { padding: 10px 6px 54px !important; }
.vreviews .swiper-pagination { bottom: 12px; }
.vreviews .swiper-pagination-bullet { background: var(--line-2); opacity: 1; width: 8px; height: 8px; }
.vreviews .swiper-pagination-bullet-active { background: var(--brand); width: 24px; border-radius: 6px; }

/* Круглые стрелки по бокам ленты — как в референсе владельца */
.vreviews-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--sh-sm);
  display: grid; place-content: center; cursor: pointer; transition: var(--tr);
}
.vreviews-nav svg { width: 20px; height: 20px; transform: rotate(180deg); }
.vreviews-nav--next svg { transform: none; }
.vreviews-nav:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.vreviews-nav--prev { left: -8px; }
.vreviews-nav--next { right: -8px; }

/* Карточка обзора: вертикальное видео 9:14, текст поверх кадра */
.vcard {
  position: relative; height: 100%;
  border-radius: 18px; outline: none;
  cursor: pointer;
}
.vcard__media {
  position: relative; overflow: hidden; border-radius: 18px;
  aspect-ratio: 9 / 14; background: var(--ink);
  box-shadow: var(--sh-sm);
  transition: transform .35s ease, box-shadow .35s ease;
}
.vcard:hover .vcard__media, .vcard:focus-visible .vcard__media {
  transform: translateY(-4px); box-shadow: var(--sh-lg);
}
.vcard__poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: opacity .4s ease;
}
.vcard__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .4s ease;
}
.vcard.is-previewing .vcard__video { opacity: 1; }
.vcard__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(13,43,46,0) 46%, rgba(13,43,46,.72) 100%);
}
.vcard__play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-content: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.vcard__play svg { width: 26px; height: 26px; }
.vcard:hover .vcard__play, .vcard.is-previewing .vcard__play { opacity: 0; transform: translate(-50%, -50%) scale(.8); }
.vcard__tag {
  position: absolute; left: 16px; right: 16px; bottom: 44px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-soft, #FDEBC8); pointer-events: none;
}
.vcard__title {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  font-weight: 800; font-size: 16px; line-height: 1.3; color: #fff;
  pointer-events: none;
}

/* Fallback без Swiper (и режим редактора): статичная лента со скроллом.
   Слайды Swiper по умолчанию width:100% — компактим до ширины карточки,
   иначе в ленте видна одна карточка и пустота справа. */
.vreviews-fallback .swiper-wrapper {
  display: flex; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: 16px;
}
.vreviews-fallback .swiper-slide { width: auto; flex: 0 0 auto; display: flex; }
.vreviews-fallback .vcard { min-width: 240px; max-width: 240px; width: 240px; scroll-snap-align: start; }

/* Блок выключен в админке (Дизайн → «Блоки сайта»).
   В режиме редактора показываем — иначе его не настроить. */
html.p42-vrev-off #vreviews { display: none; }
html.p42-vrev-off.p42e-on #vreviews { display: block; }

/* ================= Просмотрщик фото/видео (media.js) ================= */
.p42m {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(9, 24, 26, .94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.p42m.is-open { opacity: 1; visibility: visible; }
.p42m__stage { position: absolute; inset: 0; display: grid; place-content: center; padding: 44px 76px; }
.p42m__img { max-width: 100%; max-height: calc(100vh - 88px); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.p42m__video { max-width: 100%; max-height: calc(100vh - 88px); width: min(94vw, calc((100vh - 88px) * 0.65)); border-radius: 14px; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.p42m__close {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; display: grid; place-content: center;
  cursor: pointer; transition: background .2s ease, transform .2s ease;
}
.p42m__close:hover { background: rgba(255,255,255,.25); transform: rotate(90deg); }
.p42m__close svg { width: 20px; height: 20px; }
.p42m__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; display: grid; place-content: center;
  cursor: pointer; transition: background .2s ease;
}
.p42m__nav:hover { background: var(--brand); }
.p42m__nav svg { width: 22px; height: 22px; }
.p42m__nav--prev { left: 18px; }
.p42m__nav--next { right: 18px; }
.p42m__counter {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.82); font-weight: 700; font-size: 14px;
}
@media (max-width: 700px) {
  .p42m__stage { padding: 20px 14px; }
  .p42m__nav { top: auto; bottom: 18px; transform: none; width: 44px; height: 44px; }
  .p42m__nav--prev { left: 14px; }
  .p42m__nav--next { right: 14px; }
  .p42m__counter { bottom: 30px; }
  .p42m__video { width: auto; }
}
@media (max-width: 700px) {
  .vreviews-nav { display: none; } /* на телефоне листают свайпом */
  .vcard__title { font-size: 15px; }
  /* статичная лента (без Swiper) на телефоне — карточка почти на весь экран */
  .vreviews-fallback .vcard { min-width: 78vw; max-width: 78vw; width: 78vw; }
}

/* ================= Чужая смета ================= */
.check-strip {
  border-radius: var(--r-xl); padding: clamp(26px, 4vw, 44px);
  background: var(--grad-ink); color: var(--on-dark-text, #E9F5F1); box-shadow: var(--sh-lg);
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 30px; align-items: center;
}
.check-strip::before {
  content: ''; position: absolute; left: -70px; bottom: -90px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(247, 183, 51, .25), transparent 70%);
}
.check-strip__title { font-family: var(--f-display); font-size: clamp(21px, 2.6vw, 28px); }
.check-strip__text { margin-top: 12px; color: rgba(233, 245, 241, .8); font-size: 15.5px; }
.check-strip__points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.check-strip__points .chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: var(--on-dark-text, #E9F5F1); box-shadow: none; font-size: 13px; }
.check-strip__points .chip svg { color: var(--on-dark, #7FE0C8); }
.check-form {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px;
  backdrop-filter: blur(6px);
}
.check-form .input, .check-form .textarea { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .18); color: #fff; }
.check-form .input::placeholder { color: rgba(255, 255, 255, .5); }
.check-form .input:focus { border-color: var(--on-dark, #7FE0C8); box-shadow: 0 0 0 4px rgba(var(--on-dark-rgb, 127, 224, 200), .18); }
.check-form .checkbox { color: rgba(233, 245, 241, .65); }

/* ================= FAQ ================= */
.faq { max-width: 860px; margin-inline: auto; display: flex; flex-direction: column; gap: 12px; }
.faq__item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: box-shadow var(--tr), border-color var(--tr);
}
.faq__item.is-open { box-shadow: var(--sh-md); border-color: var(--brand); }
.faq__q {
  width: 100%; display: flex; align-items: center; gap: 16px; text-align: left;
  padding: 20px 24px; font-weight: 800; font-size: 16.5px; color: var(--ink);
}
.faq__q:hover { color: var(--brand-ink); }
.faq__q-text { flex: 1; min-width: 0; }
.faq__icon {
  margin-left: auto; flex: none; width: 34px; height: 34px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-deep);
  display: grid; place-content: center; transition: transform var(--tr), background var(--tr), color var(--tr);
}
.faq__icon svg { width: 17px; height: 17px; }
.faq__item.is-open .faq__icon { transform: rotate(45deg); background: var(--brand); color: #fff; }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s cubic-bezier(.22, 1, .36, 1); }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a-inner { overflow: hidden; }
.faq__a-content { padding: 0 24px 22px; color: var(--muted); font-size: 15px; }

/* ================= Контакты ================= */
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(26px, 4vw, 50px); align-items: start; }
.contact-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(24px, 3vw, 36px); box-shadow: var(--sh-md);
}
.contact-card__title { font-family: var(--f-display); font-size: 20px; margin-bottom: 18px; }
.contact-list { display: flex; flex-direction: column; gap: 15px; }
.contact-list a, .contact-list div { display: flex; align-items: center; gap: 14px; font-weight: 700; }
.contact-list .icon-tile { width: 44px; height: 44px; border-radius: 13px; }
.contact-list .icon-tile svg { width: 21px; height: 21px; }
.contact-list small { display: block; font-weight: 600; color: var(--faint); font-size: 12.5px; }
.contact-list a:hover .icon-tile { background: var(--brand); color: #fff; }

.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-content: center;
  background: var(--bg-2); color: var(--ink-2); transition: var(--tr);
}
.socials a:hover { background: var(--brand); color: #fff; transform: translateY(-3px); box-shadow: var(--sh-brand); }
.socials svg { width: 22px; height: 22px; }

.contact__lead { font-size: clamp(20px, 2.4vw, 26px); font-family: var(--f-display); line-height: 1.3; }
.contact__text { margin-top: 14px; color: var(--muted); font-size: 16px; max-width: 480px; }
.contact__form { margin-top: 26px; display: flex; flex-direction: column; gap: 16px; }
/* Универсальные колонки «имя + телефон» — работают в любой форме (viz, contact, модалки) */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row > * { min-width: 0; }

/* ================= Футер ================= */
.footer { background: var(--grad-ink); color: var(--on-dark-text-dim, #B9D6CF); margin-top: 40px; }
.footer__main {
  display: grid; grid-template-columns: 1.3fr .7fr .8fr 1fr; gap: 34px;
  padding: clamp(44px, 6vw, 70px) 0 40px;
}
.footer .logo__text { color: #fff; }
.footer .logo__city { color: rgba(185, 214, 207, .7); }
.footer__about { margin-top: 16px; font-size: 14px; line-height: 1.65; color: rgba(185, 214, 207, .8); max-width: 300px; }
.footer__title { color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.footer__links { display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer__links a { color: rgba(185, 214, 207, .85); transition: var(--tr); }
.footer__links a:hover { color: #fff; transform: translateX(3px); }
.footer__contact { display: flex; flex-direction: column; gap: 11px; font-size: 14.5px; }
.footer__contact a { display: flex; gap: 10px; align-items: center; font-weight: 700; color: #fff; }
.footer__contact svg { width: 17px; height: 17px; color: var(--accent); flex: none; }
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .1); padding: 20px 0 26px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  font-size: 13px; color: rgba(185, 214, 207, .6);
}
.footer__model { display: inline-flex; align-items: center; gap: 8px; }
.footer__model svg { width: 15px; height: 15px; color: var(--accent); }

/* ================= Кнопка наверх ================= */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--surface); color: var(--brand-deep); box-shadow: var(--sh-lg);
  display: grid; place-content: center;
  opacity: 0; pointer-events: none; transform: translateY(14px);
  transition: var(--tr);
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--brand); color: #fff; }
.to-top svg { width: 21px; height: 21px; }

/* ================= Модалки ================= */
.modal { position: fixed; inset: 0; z-index: 110; display: none; }
.modal.is-open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(9, 26, 28, .6); backdrop-filter: blur(6px); }
.modal__wrap {
  position: relative; height: 100%; display: grid; place-items: center; padding: 20px;
  overflow-y: auto;
  /* Скролл внутри окна не «протекает» на страницу: ни колесом, ни свайпом */
  overscroll-behavior: contain;
  overflow-x: hidden;
}
.modal__panel {
  position: relative; width: min(560px, 100%);
  background: var(--surface); border-radius: var(--r-xl);
  padding: clamp(26px, 4vw, 40px); box-shadow: 0 40px 100px -20px rgba(9, 26, 28, .45);
  max-height: calc(100vh - 40px); overflow-y: auto;
}
.modal__close {
  position: absolute; top: 16px; right: 16px; width: 42px; height: 42px;
  border-radius: 13px; background: var(--bg-2); color: var(--ink-2);
  display: grid; place-content: center; transition: var(--tr);
}
.modal__close:hover { background: var(--coral); color: #fff; transform: rotate(90deg); }
.modal__close svg { width: 18px; height: 18px; }

/* Квиз */
.quiz__progress { display: flex; gap: 7px; margin-bottom: 22px; }
.quiz__progress i { height: 6px; flex: 1; border-radius: 4px; background: var(--bg-3); transition: var(--tr); }
.quiz__progress i.is-done { background: var(--grad-brand); }
.quiz__step { display: none; animation: quiz-in .35s cubic-bezier(.22, 1, .36, 1); }
.quiz__step.is-active { display: block; }
@keyframes quiz-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.quiz__num { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.quiz__q { font-family: var(--f-display); font-size: clamp(18px, 2.4vw, 22px); margin: 10px 0 18px; line-height: 1.35; }
.quiz__opts { display: flex; flex-direction: column; gap: 10px; }
.quiz__opt {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 16px 18px; border-radius: 15px; border: 1.5px solid var(--line-2);
  font-weight: 700; font-size: 15px; transition: var(--tr); background: var(--surface-2);
}
.quiz__opt:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateX(4px); }
.quiz__opt .radio {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--line-2); display: grid; place-content: center; transition: var(--tr);
}
.quiz__opt .radio::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); transform: scale(0); transition: transform var(--tr); }
.quiz__opt.is-picked { border-color: var(--brand); background: var(--brand-soft); }
.quiz__opt.is-picked .radio { border-color: var(--brand); }
.quiz__opt.is-picked .radio::after { transform: scale(1); }
.quiz__nav { display: flex; gap: 12px; margin-top: 20px; }
/* width:auto — иначе на ≤560px .btn { width:100% } растягивает «Назад»
   на всю строку и выталкивает «Показать мой путь» за экран (гор. скролл) */
.quiz__nav .btn { flex: 1; width: auto; }
.quiz__back { flex: 0 0 auto !important; }
@media (max-width: 420px) {
  .quiz__nav { flex-wrap: wrap; }
  .quiz__nav .btn { flex: 1 1 100%; }
}

.quiz__result { text-align: center; }
.quiz__result .icon-tile { width: 70px; height: 70px; margin: 0 auto 16px; border-radius: 22px; }
.quiz__result .icon-tile svg { width: 34px; height: 34px; }
.quiz__branch {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 7px 14px; border-radius: var(--r-pill); margin-bottom: 12px;
}
.quiz__branch--a { background: var(--accent-soft); color: var(--accent-deep); }
.quiz__branch--b { background: var(--brand-soft); color: var(--brand-deep); }

/* ================= Тосты ================= */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 130; display: flex; flex-direction: column; gap: 10px; width: min(420px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--grad-ink); color: #fff; padding: 15px 18px;
  border-radius: 16px; box-shadow: var(--sh-lg); font-size: 14.5px; font-weight: 600;
}
.toast svg { width: 20px; height: 20px; color: var(--on-dark, #7FE0C8); flex: none; }
.toast--error svg { color: var(--on-dark-error, #FFB4A1); }

/* ================= Адаптив ================= */
@media (max-width: 1080px) {
  .calc__grid, .viz__grid, .estimate__grid, .contact__grid { grid-template-columns: 1fr; }
  .check-strip { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .viz__media { order: -1; }
  .footer__main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr; }
  /* .gcard img { height: auto } задан выше — фото работы видно целиком */
  .form-row { grid-template-columns: 1fr; }
  .footer__main { grid-template-columns: 1fr; gap: 26px; }
  .calc__selects { grid-template-columns: 1fr; }
  .doc__stamp { display: none; }
  /* Длинная CTA («Хочу визуализацию и точную смету по фото») на телефоне
     переносится на 2 строки, а не вылезает за панель сметы */
  .result__cta .btn { white-space: normal; line-height: 1.3; padding-block: 14px; }
}
@media (max-width: 480px) {
  /* Компактная смета: узкие паддинги, без колонки количества */
  .doc__head { padding: 16px 18px; }
  .doc__body { padding: 8px 18px 4px; }
  .doc__row { gap: 8px; }
  .doc__qty { display: none; }
  .doc__total { margin: 8px 18px 20px; padding: 14px 16px; }
  .doc__fine { padding: 0 18px 20px; }

  /* Селектор из 3 кнопок («Тип полотна») не помещается в 3 колонки на узких экранах */
  .seg--3 { grid-template-columns: 1fr 1fr; }
  .seg--3 button:nth-child(3) { grid-column: 1 / -1; }
  .seg button { padding-inline: 8px; }
}

/* ================= Согласие в формах (label.politic + чекбокс) =================
   Обязательная галочка + фраза «Я даю согласие на обработку…»:
   «согласие…» и «политика…» внутри текста — ссылки на документы
   из админки (data-doc, js/content.js). Пока галочка не стоит,
   заявка не отправляется (js/main.js подсвечивает строку). */
.politic {
  margin: 18px 0;
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--faint, #7C8B88);
}
.politic a {
  color: var(--brand-deep, #0B7E6C);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .15s;
}
.politic a:hover { color: var(--brand, #0FA48C); }
.check-form .politic { color: rgba(233, 245, 241, .65); }
.check-form .politic a { color: var(--on-dark, #7FE0C8); }

/* Чекбокс согласия: фирменный, 20px, скругление как у карточек */
.politic--check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.politic--check .politic__box {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  border: 1.5px solid var(--line, #DEE9E6);
  border-radius: 6px;
  background: var(--surface, #fff);
  cursor: pointer;
  position: relative;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.politic--check .politic__box:hover { border-color: var(--brand, #0FA48C); }
.politic--check .politic__box:checked {
  background: var(--brand, #0FA48C);
  border-color: var(--brand, #0FA48C);
}
.politic--check .politic__box:checked::after {
  content: '';
  position: absolute;
  left: 5.5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}
.politic--check .politic__box:focus-visible {
  outline: 2px solid var(--brand, #0FA48C);
  outline-offset: 2px;
}
/* Тёмная форма («Разобрать смету»): коробка на тёмном фоне */
.check-form .politic--check .politic__box {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(233, 245, 241, .35);
}
.check-form .politic--check .politic__box:checked { background: var(--brand, #0FA48C); }

/* Отправка без галочки: строка ошибки + короткая встряска */
.politic--check.is-error .politic__box {
  border-color: var(--coral, #F0704A);
  box-shadow: 0 0 0 3px rgba(240, 112, 74, .18);
}
.politic--check.is-error span { color: var(--coral, #F0704A); }
.check-form .politic--check.is-error span { color: var(--on-dark-error, #FFB59E); }
.politic--check.is-error { animation: politic-shake .32s ease; }
@keyframes politic-shake {
  20% { transform: translateX(-4px); }
  45% { transform: translateX(3px); }
  70% { transform: translateX(-2px); }
  90% { transform: translateX(1px); }
}
@media (prefers-reduced-motion: reduce) {
  .politic--check.is-error { animation: none; }
}

/* ================= Юридические документы в футере ================= */
.footer__legal {
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  padding-bottom: 16px; margin-bottom: 16px;
  /* Разделительная линия здесь ОДНА — ниже, у .footer__bottom (border-top):
     вторая полоса над ней была дублем и убрана */
}
.footer__legal a { font-size: 13px; color: rgba(185, 214, 207, .75); transition: color .15s; }
.footer__legal a:hover { color: #fff; }

/* ================= Плашка согласия на cookie =================
   Текст и ссылка «Согласие на куки» — из админки (js/content.js). */
.cookie-bar {
  position: fixed; left: 22px; bottom: 22px; z-index: 105;
  width: min(440px, calc(100vw - 44px));
  background: var(--grad-ink, #0D2B2E); color: var(--on-dark-text, #E9F5F1);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  box-shadow: 0 24px 60px -18px rgba(9, 26, 28, .55);
  padding: 18px 20px;
  opacity: 0; transform: translateY(16px);
  transition: opacity .35s ease, transform .35s ease;
}
.cookie-bar.is-shown { opacity: 1; transform: none; }
.cookie-bar__text { font-size: 13.5px; line-height: 1.55; color: rgba(233, 245, 241, .85); }
.cookie-bar__actions { display: flex; align-items: center; gap: 16px; margin-top: 13px; }
.cookie-bar__more {
  font-size: 12.5px; font-weight: 700; color: var(--on-dark, #7FE0C8);
  text-decoration: underline; text-underline-offset: 3px;
}
.cookie-bar__more:hover { color: #fff; }
.cookie-bar__ok {
  margin-left: auto; appearance: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 13px;
  padding: 10px 20px; border-radius: 11px;
  background: var(--brand, #0FA48C); color: #fff;
  transition: filter .15s, transform .15s;
}
.cookie-bar__ok:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ================= Мобильная адаптация: дополнения ================= */
@media (max-width: 640px) {
  /* Все всплывающие окна — во весь экран телефона */
  .modal__wrap {
    padding: 0;
    /* Выравнивание по верху: при place-items:center окно выше экрана
       вылезает ОБЕИМУ сторонами, и верхняя (заголовок формы!) становится
       недостижимой для скролла — классическая ловушка центрирования */
    place-items: start;
  }
  .modal__panel {
    width: 100%;
    max-height: none;
    min-height: 100%;
    height: auto;
    border-radius: 0;
    padding: 22px 18px 34px;
  }
  .modal__close { top: 10px; right: 10px; }
  /* Плашка cookie — на всю ширину низа */
  .cookie-bar { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 14px 16px; }
  .footer__legal { gap: 6px 18px; padding-bottom: 14px; margin-bottom: 14px; }
  .footer__legal a { font-size: 12.3px; }
}

/* ================= Мобильная нижняя панель быстрой связи =================
   «Позвонить» · MAX · «Написать» · «Контакты» (аккордеон с телефоном,
   адресом, режимом работы и доп. телефоном). Видна только на телефонах
   (≤640px); в режиме редактора (?edit=) — всегда, иначе её не настроить.
   Выключается в админке («Дизайн» → «Мобильные блоки»): серверная сборка
   ставит html.p42-mbar-off. Иконок станет больше — лента прокручивается
   вбок (как табы в админке), скроллбар скрыт. */
.mobilebar { display: none; }

/* Общие стили ленты и аккордеона — вне медиазапроса: на десктопе они
   нужны режиму правки (?edit=), иначе панель там голая и уезжает
   под контент страницы */
.mobilebar__bar {
  display: flex; align-items: stretch; gap: 4px;
  background: rgba(var(--surface-rgb, 255, 255, 255), .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line, #DEE9E6);
  box-shadow: 0 -14px 34px -20px rgba(var(--ink-rgb, 13, 43, 46), .4);
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.mobilebar__bar::-webkit-scrollbar { display: none; }
.mobilebar__btn {
  flex: 1 0 auto; min-width: 76px; scroll-snap-align: start;
  appearance: none; border: 0; background: none; font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 12px; font-size: 11px; font-weight: 700; color: var(--ink-2, #33504F);
  transition: background var(--tr), color var(--tr);
}
.mobilebar__btn svg { width: 21px; height: 21px; color: var(--brand, #0FA48C); transition: color var(--tr); }
.mobilebar__btn:hover, .mobilebar__btn[aria-expanded="true"] { background: var(--brand-soft, #DFF3EE); color: var(--brand-ink, #085F52); }

/* Аккордеон «Контакты»: раскрывается НАД панелью */
.mobilebar__sheet {
  position: absolute; left: 8px; right: 8px; bottom: calc(100% + 8px);
  background: var(--surface, #fff); border: 1px solid var(--line, #DEE9E6);
  border-radius: 16px; box-shadow: var(--sh-lg, 0 24px 60px -18px rgba(9, 26, 28, .35));
  padding: 6px;
}
.mobilebar.is-open .mobilebar__sheet { animation: mbar-sheet .22s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes mbar-sheet {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
}
.mobilebar__row {
  display: flex; gap: 12px; align-items: center;
  padding: 11px 12px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2, #33504F); line-height: 1.35;
}
a.mobilebar__row:hover { background: var(--brand-soft, #DFF3EE); color: var(--brand-ink, #085F52); }
.mobilebar__row svg { width: 18px; height: 18px; color: var(--brand, #0FA48C); flex: none; }

@media (max-width: 640px) {
  .mobilebar {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0;
    /* Ниже мобильного меню (89), модалок (110), cookie (105) и тостов (130):
       меню и окна накрывают панель целиком */
    z-index: 85;
  }
  .mobilebar__bar {
    height: var(--mbar-h);
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom, 0px));
  }
  /* Контент не уезжает под панель; плавающие элементы — выше неё */
  body { padding-bottom: calc(var(--mbar-h) + env(safe-area-inset-bottom, 0px)); }
  .to-top { bottom: calc(var(--mbar-h) + 14px + env(safe-area-inset-bottom, 0px)); }
  .cookie-bar { bottom: calc(var(--mbar-h) + 12px + env(safe-area-inset-bottom, 0px)); }
  .toasts { bottom: calc(var(--mbar-h) + 12px + env(safe-area-inset-bottom, 0px)); }
}

/* Панель выключена в админке — оффсеты не нужны */
html.p42-mbar-off .mobilebar { display: none !important; }
html.p42-mbar-off body { padding-bottom: 0; }

/* Аккордеон открыт: cookie-плашка в той же зоне — уступает место */
body.p42-mbar-open .cookie-bar { opacity: 0 !important; pointer-events: none !important; }

/* Режим редактора: панель видна всегда (и на широком экране — компактной
   «таблеткой» по центру), аккордеон раскрыт, чтобы строки были кликабельны */
html.p42e-on .mobilebar { display: block; }
html.p42e-on .mobilebar__sheet[hidden] { display: block; }
@media (min-width: 641px) {
  html.p42e-on .mobilebar {
    position: fixed; left: 50%; right: auto; transform: translateX(-50%);
    width: min(460px, calc(100vw - 24px)); bottom: 12px;
    z-index: 96; /* поверх контента, под модалками/панелями редактора */
  }
  html.p42e-on .mobilebar .mobilebar__bar {
    height: auto; padding: 6px 8px; border-radius: 18px;
    border: 1px solid var(--line, #DEE9E6);
    border-top: 1px solid var(--line, #DEE9E6);
    box-shadow: var(--sh-lg, 0 24px 60px -18px rgba(9, 26, 28, .35));
  }
  html.p42e-on .mobilebar .mobilebar__btn { padding-block: 8px; }
  html.p42e-on .mobilebar .mobilebar__sheet { bottom: calc(100% + 12px); }
}

/* ================= Карусель на телефоне: «Работы» и «Этапы» =================
   Включается в админке («Дизайн» → «Мобильные блоки»): серверная сборка
   ставит html.p42-works-carousel / html.p42-steps-carousel. По умолчанию
   выключено — классическая вертикальная вёрстка (для портфолио и аргументов
   продажи она конверсионнее). Паттерн обнаружения — «пик»: край следующей
   карточки выглядывает из-за экрана, свайп не нужно угадывать.
   Десктоп не затронут — всё только внутри ≤640px. */
@media (max-width: 640px) {
  html.p42-works-carousel .gallery {
    display: flex; flex-wrap: nowrap;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 12px;
    /* От крайнего края до крайнего, как фильтры-чипы */
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-bottom: 4px;
  }
  html.p42-works-carousel .gallery::-webkit-scrollbar { display: none; }
  html.p42-works-carousel .gcard {
    flex: 0 0 auto; width: min(80vw, 330px); scroll-snap-align: start;
  }
  html.p42-works-carousel .gcard.is-hidden { display: none; }

  html.p42-steps-carousel .steps__grid {
    display: flex; flex-wrap: nowrap;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 12px;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-bottom: 4px;
  }
  html.p42-steps-carousel .steps__grid::-webkit-scrollbar { display: none; }
  /* В ленте карточка этапа выглядит как на десктопе (иконка, номер, текст) */
  html.p42-steps-carousel .step {
    flex: 0 0 auto; width: min(76vw, 300px); scroll-snap-align: start;
    display: block;
  }
  html.p42-steps-carousel .step__num { grid-row: auto; margin-bottom: 40px; }
  html.p42-steps-carousel .step .icon-tile { display: grid; position: absolute; top: 62px; left: 20px; }
  html.p42-steps-carousel .step__title { margin-top: 66px; }
}
