/* ==========================================================================
   Доска бытовых услуг — карточка мастера (Сочи, посудомойки).
   Мобайл-first. Копия дизайн-скелета доски объявлений.
   ========================================================================== */

:root {
  --bg:            #ffffff;
  --ink:           #2c2c2e;
  --ink-2:         #565656;
  --ink-3:         #9aa0a6;
  --line:          #e6e7ea;
  --link:          #2f80ed;
  --link-red:      #f0523c;

  --green:         #22c257;   /* CTA «Позвонить» */
  --green-press:   #1aa848;
  --blue:          #2f80ed;   /* CTA «Написать» */
  --blue-press:    #1f6fd6;
  --star:          #ffb300;
  --online:        #22c257;

  --ph:            #eef0f2;

  --radius:        10px;
  --radius-sm:     8px;

  --maxw:          1160px;
  --pad:           16px;

  --font: "Rubik", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
figure { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ==========================================================================
   КНОПКИ
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 500;
  line-height: 1.2;
  transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
  user-select: none;
  text-align: center;
}
.btn:active { transform: translateY(1px); }

.btn--outline {
  background: #fff;
  border: 1px solid #d5d7db;
  color: var(--ink);
  padding: 9px 18px;
  font-size: 14px;
  border-radius: var(--radius);
}
.btn--outline:hover { border-color: var(--ink-3); }

.btn--green {
  background: var(--green);
  color: #fff;
  min-height: 50px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 400;
}
.btn--green:hover { background: var(--green-press); }

.btn--write {
  background: var(--blue);
  color: #fff;
  min-height: 50px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 400;
}
.btn--write:hover { background: var(--blue-press); }

/* ==========================================================================
   ШАПКА
   ========================================================================== */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.site-header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: center;
}
.logo__img { width: auto; height: 55px; }
.site-header__tagline { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.site-header__note { font-size: 12px; font-style: italic; color: var(--ink-3); margin-top: 1px; }
.site-header__submit { display: none; }

/* ==========================================================================
   MAIN
   ========================================================================== */
.main { padding-top: 14px; padding-bottom: 36px; }

/* Разделительные линии между блоками */
.description,
.issues,
.callback,
.address,
.reviews,
.vreviews,
.zone,
.faq {
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.zone { scroll-margin-top: 16px; }

/* ==========================================================================
   СТРОКА НАД ФОТО: номер объявления + действия (шейр, избранное)
   ========================================================================== */
.list-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.list-topbar__num { font-size: 13px; color: var(--ink-3); }
.list-topbar__actions { display: flex; gap: 2px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 0;
  background: none;
  color: var(--ink-3);
  border-radius: 50%;
  transition: background .15s ease, color .15s ease, transform .08s ease;
}
.icon-btn:hover { background: #f2f3f5; }
.icon-btn:active { transform: scale(.9); }
.icon-btn--fav.is-liked { color: var(--link-red); }
.icon-btn--fav.is-liked svg { fill: var(--link-red); }

/* ==========================================================================
   ГАЛЕРЕЯ (свайп, счётчик, точки)
   ========================================================================== */
.gallery { position: relative; }

.gallery__track {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }

.gallery__slide {
  flex: 0 0 93%;             /* текущий кадр шире, следующий лишь выглядывает полоской */
  aspect-ratio: 1 / 1;       /* почти квадрат — крупный кадр как на эталоне */
  scroll-snap-align: start;
}
.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: var(--ph);
}

.gallery__counter {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(0,0,0,.62);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
  z-index: 3;
}

.gallery__arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.9);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.gallery__arrow:hover { background: #fff; }
.gallery__arrow:active { transform: translateY(-50%) scale(.94); }
.gallery__arrow--prev { left: 10px; }
.gallery__arrow--next { right: 10px; }

.gallery__dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.gallery__dots button {
  width: 7px; height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d3d6db;
  transition: background .2s ease, width .2s ease;
}
.gallery__dots button.is-active {
  background: var(--ink);
  width: 20px;
  border-radius: 4px;
}

/* ==========================================================================
   ЗАГОЛОВОК ОБЪЯВЛЕНИЯ
   ========================================================================== */
.list-top__title {
  font-size: 27px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--ink);
  margin-top: 16px;
}

/* ==========================================================================
   ПАНЕЛЬ (просмотры/цена, мастер, кнопки)
   ========================================================================== */
.list-top__panel { margin-top: 14px; }

/* Просмотры + цена */
.list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.list-meta__views {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--ink-3);
}
.list-meta__price {
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
}

.list-sep { margin: 12px 0; }

.list-side__num { color: var(--ink-3); font-size: 14px; }
.list-side__field { color: var(--ink-3); font-size: 13px; margin-top: 12px; }

/* Мастер: аватар + инфо */
.master {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.master__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ph);
  flex-shrink: 0;
}
.master__name { font-size: 19px; font-weight: 700; }
.master__role { font-size: 13.5px; color: var(--ink-3); margin-top: 1px; }
.master__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.stars { display: inline-flex; gap: 1px; }
.master__rating-num { font-size: 15px; font-weight: 700; }
.master__reviews { color: var(--link-red); font-size: 14px; font-weight: 500; }
.master__reviews:hover { text-decoration: underline; }
.master__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 3px;
}
.dot-online {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--online);
}

/* Кнопки Позвонить / Написать */
.master__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

/* Статус «в сети» по центру, с пульсацией */
.online-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-2);
}
.dot-online--pulse { animation: onlinePulse 1.8s ease-out infinite; }
@keyframes onlinePulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,194,87,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(34,194,87,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,194,87,0); }
}

/* Плашки (документы проверены / может сегодня) */
.badges {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.badge {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: #eef2f7;             /* серая заливка как на скрине */
  transition: background .15s ease, transform .05s ease;
}
.badge:hover { background: #e4ebf2; }
.badge:active { transform: scale(.995); }
.badge__icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; }
.badge__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.badge__title { font-size: 15px; font-weight: 600; color: var(--ink); }
.badge__sub { font-size: 13px; font-weight: 300; color: var(--ink-2); }
.badge__chevron {
  color: var(--ink-3);
  flex-shrink: 0;
  transition: transform .2s ease;
}
.badge:hover .badge__chevron { transform: translateX(4px); }

/* Лёгкая компактная плашка (время ответа) */
.badge--slim { padding: 9px 14px; }
.badge__ic {
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  background: #e3f6e9;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.badge__slim-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; color: var(--ink); }

/* ==========================================================================
   ПОДРОБНОСТИ (характеристики)
   ========================================================================== */
.details { margin-top: 22px; }
.details__title { font-size: 24px; font-weight: 700; }
.details__list { margin-top: 12px; display: flex; flex-direction: column; gap: 11px; }
.details__item { display: flex; align-items: center; gap: 9px; font-size: 16px; color: var(--ink); }
.details__ic { color: var(--ink-3); flex-shrink: 0; }
.details__more {
  margin-top: 14px;
  background: none; border: 0; padding: 0;
  color: var(--ink);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.details__more:hover { color: var(--link); }

/* Список характеристик в поп-апе — метка сверху, значение снизу, плотно + разделители */
.specs { margin-top: 8px; }
.specs__row { padding: 7px 0; border-bottom: 1px solid var(--line); }
.specs__row:last-child { border-bottom: 0; }
.specs__row dt { font-size: 13.5px; color: var(--ink-3); }
.specs__row dd { font-size: 16px; color: var(--ink); margin: 2px 0 0; line-height: 1.4; }
.specs__link { color: var(--link); text-decoration: underline; }

/* ==========================================================================
   ОПИСАНИЕ
   ========================================================================== */
.section-title { font-size: 24px; font-weight: 700; color: var(--ink); }

.description { margin-top: 28px; }
.description > p { font-size: 15.5px; line-height: 1.55; color: var(--ink); margin-top: 20px; }
.description strong { font-weight: 700; }

/* Карточка-приветствие мастера */
.greeting {
  margin-top: 20px;
  padding: 16px;
  border-radius: 14px;
  background: #f5f7fa;
}
.greeting__avatar {
  float: left;
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin: 2px 12px 2px 0;
}
.greeting__text { font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.desc-lead { font-size: 16px; }

.description ul { margin-top: 20px; }
.description li {
  margin-top: 6px;
  line-height: 1.5;
  font-size: 15.5px;
  color: var(--ink);
}
.desc-arrows li::before { content: "➤ "; color: var(--ink-2); font-size: 12px; }
.desc-checks li::before { content: "✓ "; color: var(--green); font-weight: 700; }
.desc-bullets li::before { content: "• "; color: var(--ink-2); }

.desc-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.desc-link:hover { color: var(--link); }

.desc-sep { margin: 20px 0; }
.desc-keywords { font-size: 14px; color: var(--ink-3); line-height: 1.5; }

/* ==========================================================================
   ПЛАШКА «ВЫЕЗД 0 ₽» + ЗАГЛУШКА ИКОНКИ
   ========================================================================== */
.freecheck { margin-top: 24px; }
.happyhours { margin-top: 16px; }
.happyhours .badge__title { white-space: nowrap; font-size: 14px; }
.promo-timer { color: var(--green); font-weight: 700; white-space: nowrap; }
.promo-timer-big { margin-top: 14px; font-size: 16px; color: var(--ink); }
.icon-ph {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #e3e6ea;
  color: #9aa0a6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-ph--lg { width: 56px; height: 56px; margin-bottom: 14px; border-radius: 14px; }

/* ==========================================================================
   ЧАСТЫЕ НЕИСПРАВНОСТИ
   ========================================================================== */
.issues-track {
  margin-top: 16px;
  position: relative;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.issues-track::-webkit-scrollbar { display: none; }
.issue {
  flex: 0 0 92%;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #f5f7fa;
  border-radius: 14px;
  padding: 20px 18px;
  overflow: hidden;
}
.issue__num {
  position: absolute; bottom: 6px; right: 14px;
  font-size: 68px; font-weight: 800; line-height: 1;
  color: rgba(20,30,50,.07);
}
.issue__title { position: relative; font-size: 18px; font-weight: 700; color: var(--ink); }
.issue__list { margin-top: 12px; }
.issue__list li {
  position: relative;
  padding-left: 15px;
  margin-top: 7px;
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink-2);
}
.issue__list li::before { content: "•"; position: absolute; left: 2px; color: var(--ink-3); }
.issue__price { margin-top: auto; padding-top: 16px; font-size: 26px; font-weight: 700; color: var(--ink-2); }

.issues { padding-bottom: 10px; }
@media (min-width: 768px) {
  .issue { flex-basis: 47%; }
}

/* ==========================================================================
   ФОРМА ОБРАТНОГО ЗВОНКА
   ========================================================================== */
.callback__box { background: #f5f7fa; border-radius: 14px; padding: 18px 16px; margin-top: 4px; }
.callback__head { display: flex; gap: 12px; align-items: center; }
.callback__ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
}
.callback__headtext { display: flex; flex-direction: column; }
.callback__htitle { font-size: 16px; font-weight: 700; color: var(--ink); }
.callback__hsub { font-size: 13px; color: var(--ink-3); line-height: 1.4; margin-top: 2px; }
.callback__form { margin-top: 14px; }
.callback__row { display: flex; flex-direction: column; gap: 10px; }
.callback__input {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  border: 1px solid #d5d7db;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}
.callback__input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,128,237,.12); }
.callback__btn { flex-shrink: 0; white-space: nowrap; width: 100%; }
@media (min-width: 620px) {
  .callback__row { flex-direction: row; }
  .callback__btn { width: auto; }
}
.callback__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.callback__agree {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  cursor: pointer;
}
.callback__agree input { flex-shrink: 0; width: 15px; height: 15px; accent-color: var(--green); }
.callback__agree a { color: var(--link); text-decoration: underline; }

/* ==========================================================================
   АДРЕС
   ========================================================================== */
.address { margin-top: 28px; }
.address__district { font-size: 13.5px; color: var(--ink-3); margin-top: 12px; }
.address__line { font-size: 15.5px; color: var(--ink); margin-top: 6px; line-height: 1.5; }
.address__map { display: inline-block; margin-top: 12px; color: var(--link); }
.address__map:hover { text-decoration: underline; }

/* ==========================================================================
   ОТЗЫВЫ
   ========================================================================== */
.reviews { margin-top: 28px; }
.reviews__summary { margin-top: 8px; font-size: 16px; color: var(--ink); }
.rate-stars { color: var(--star); letter-spacing: 1.5px; font-size: 15px; white-space: nowrap; }

.reviews__list { margin-top: 18px; display: flex; flex-direction: column; gap: 22px; }
.review__head { display: flex; align-items: center; gap: 10px; }
.review__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; font-size: 16px;
  flex-shrink: 0;
}
img.review__avatar { object-fit: cover; }
.star-empty { color: #d3d6db; }
.review__name { font-weight: 600; font-size: 16px; }
.review__date { font-size: 14px; color: var(--ink-3); margin-top: 1px; }
.review__rating { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 15px; }
.review__deal { color: var(--ink-3); }
.review__service { font-size: 15px; color: var(--ink-3); margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review__text { font-size: 16px; line-height: 1.55; color: var(--ink); margin-top: 8px; }

.reviews__more {
  margin-top: 20px;
  padding: 11px 22px;
  background: #eef2f7;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  color: var(--ink);
  transition: background .15s ease;
}
.reviews__more:hover { background: #e4ebf2; }

/* ==========================================================================
   ВИДЕО ОТЗЫВЫ
   ========================================================================== */
.vreviews { margin-top: 30px; }
.vgallery {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.vgallery::-webkit-scrollbar { display: none; }
.vthumb {
  flex: 0 0 46%;
  position: relative;
  border: 0; padding: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ph);
  aspect-ratio: 9 / 16;
  scroll-snap-align: start;
  cursor: pointer;
}
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vthumb__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.vthumb:hover .vthumb__play { background: rgba(0,0,0,.12); }

/* Модалка видео-плеера */
.modal--video { padding: 0; }
.modal--video .modal__backdrop { background: rgba(0,0,0,.9); }
.vmodal__stage {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  pointer-events: none;
}
.vmodal__player {
  height: 88vh;
  max-height: 88vh;
  width: auto;
  max-width: calc(100vw - 32px);
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #000;
  border-radius: 12px;
  pointer-events: auto;
}
.vmodal__close {
  position: fixed; top: 14px; right: 14px;
  z-index: 3;
  background: rgba(255,255,255,.18); color: #fff;
}
.vmodal__close:hover { background: rgba(255,255,255,.3); }
.vmodal__nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  z-index: 3;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,.18); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.vmodal__nav:hover { background: rgba(255,255,255,.3); }
.vmodal__nav:active { transform: translateY(-50%) scale(.94); }
.vmodal__nav--prev { left: 10px; }
.vmodal__nav--next { right: 10px; }

/* Галерея гарантий (компактная) + просмотр фото */
.ggallery {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.ggallery::-webkit-scrollbar { display: none; }
.gthumb {
  flex: 0 0 38%;
  border: 0; padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ph);
  aspect-ratio: 3 / 4;
  scroll-snap-align: start;
  cursor: pointer;
}
.gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pmodal__img {
  max-height: 88vh;
  max-width: calc(100vw - 32px);
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  pointer-events: auto;
}

/* ==========================================================================
   ЗОНА ВЫЕЗДА
   ========================================================================== */
.zone { margin-top: 28px; }
.zone__note { margin-top: 12px; font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.zone__map {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.zone__map iframe { display: block; width: 100%; height: 360px; border: 0; }
.zone__link { display: inline-block; margin-top: 12px; color: var(--link); }
.zone__link:hover { text-decoration: underline; }

/* ==========================================================================
   FAQ (аккордеон)
   ========================================================================== */
.faq__list { margin-top: 6px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "";
  width: 9px; height: 9px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform .2s ease;
  flex-shrink: 0;
  margin-top: -3px;
}
.faq__item[open] .faq__q::after { transform: rotate(-135deg); margin-top: 3px; }
.faq__a { padding-bottom: 18px; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.faq__a p + p { margin-top: 12px; }
.faq__a ul { margin: 10px 0; }
.faq__a li { position: relative; padding-left: 16px; margin-top: 6px; }
.faq__a li::before { content: "•"; position: absolute; left: 2px; color: var(--ink-3); }
.faq-link { color: var(--link); font-weight: 700; text-decoration: underline; }
.faq-link:hover { text-decoration: none; }

/* Поисковые запросы в самом низу — мелко и бледно */
.page-keywords {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: #b9bdc5;
  line-height: 1.5;
}

/* ==========================================================================
   МОДАЛКИ (поп-апы)
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal__card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 30px 24px 24px;
  max-width: 380px;
  width: 100%;
  text-align: left;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal__card--wide {
  max-width: 460px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;               /* сама карточка не скроллится — крестик всегда виден */
}
.modal__card--wide .modal__title { flex-shrink: 0; padding-right: 40px; padding-bottom: 16px; }
.modal__counter { font-size: 15px; font-weight: 400; color: var(--ink-3); }
.modal__scroll { overflow-y: auto; flex: 1 1 auto; }
.modal__card--wide .modal__actions { flex-shrink: 0; }
.modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  border: 0; background: #eef0f2; color: var(--ink-2);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 2;
}
.modal__close:hover { background: #e2e5e9; }
.modal__icon { width: 56px; height: 56px; margin: 0 0 14px; }
.modal__title { font-size: 26px; font-weight: 700; }
.modal__title--nowrap { white-space: nowrap; font-size: 22px; }
.modal__text { font-size: 17px; color: var(--ink-2); margin-top: 12px; line-height: 1.5; }
.modal__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.modal__actions--one { grid-template-columns: 1fr; }
.modal__icon-svg {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: #e3f6e9;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 14px;
}

/* Тост */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(28,28,30,.94);
  color: #fff;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 10px;
  z-index: 120;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100vw - 24px);
}
.toast[hidden] { display: none; }
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

body.no-scroll { overflow: hidden; }

/* ==========================================================================
   COOKIE-БАННЕР
   ========================================================================== */
.cookie {
  position: fixed;
  left: 8px; right: 8px; bottom: 8px;
  z-index: 200;
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 4px 22px rgba(0,0,0,.14);
  padding: 8px 28px 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--ink-2);
}
.cookie[hidden] { display: none; }
.cookie__text { flex: 1; line-height: 1.35; }
.cookie__text a { color: var(--link); text-decoration: underline; }
.cookie__ok {
  flex-shrink: 0;
  border: 0;
  background: var(--ink);
  color: #fff;
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 500;
}
.cookie__ok:hover { background: #000; }
.cookie__close {
  position: absolute; top: 5px; right: 5px;
  width: 22px; height: 22px;
  border: 0; background: none;
  color: var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.cookie__close:hover { background: #f2f3f5; }
@media (min-width: 768px) {
  .cookie { padding: 12px 38px 12px 14px; gap: 12px; font-size: 12.5px; border-radius: 12px; }
  .cookie__text { line-height: 1.45; }
  .cookie__ok { padding: 8px 18px; font-size: 13px; }
  .cookie__close { top: 8px; right: 8px; width: 26px; height: 26px; }
}

/* ==========================================================================
   ФУТЕР
   ========================================================================== */
.site-footer {
  background: #1c1c1e;
  margin-top: 34px;
  padding: 26px 0 34px;
  font-size: 12.5px;
  line-height: 1.6;
}
.footer__disclaimer { color: #8a8a90; }
.footer__legal { margin-top: 14px; color: #b4b4ba; }
.footer__copy { margin-top: 8px; color: #77777d; }
.site-footer a { color: #b4b4ba; text-decoration: underline; }
.site-footer a:hover { color: #fff; }

/* ==========================================================================
   ЮРИДИЧЕСКАЯ СТРАНИЦА (политика)
   ========================================================================== */
.legal { padding: 22px 0 44px; }
.legal__back { display: inline-block; color: var(--link); font-size: 14px; }
.legal__back:hover { text-decoration: underline; }
.legal h1 { font-size: 26px; font-weight: 700; margin-top: 14px; }
.legal h2 { font-size: 18px; font-weight: 700; margin-top: 26px; }
.legal p { margin-top: 10px; line-height: 1.6; color: var(--ink-2); font-size: 15px; }

/* ==========================================================================
   СТРАНИЦА «СПАСИБО»
   ========================================================================== */
.thanks {
  padding: 44px 0 60px;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.thanks__card { max-width: 440px; }
.thanks__icon {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--green);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 6px 18px rgba(34,194,87,.3);
}
.thanks__title { font-size: 28px; font-weight: 700; color: var(--ink); }
.thanks__text { margin-top: 14px; font-size: 16px; color: var(--ink-2); line-height: 1.55; }
.thanks__note { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.thanks__btn { margin-top: 26px; min-width: 240px; }

/* ==========================================================================
   STICKY-ПАНЕЛЬ СНИЗУ (мобайл)
   ========================================================================== */
.sticky-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(0,0,0,.09);
  transform: translateY(115%);
  transition: transform .28s ease;
}
.sticky-bar.is-visible { transform: translateY(0); }
body.sticky-active { padding-bottom: 74px; }
@media (min-width: 768px) {
  .sticky-bar { display: none; }
  body.sticky-active { padding-bottom: 0; }
}

/* ==========================================================================
   ПЛАНШЕТ / ДЕСКТОП
   ========================================================================== */
@media (min-width: 768px) {
  :root { --pad: 24px; }

  .site-header__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    gap: 20px;
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .logo__img { height: 65px; }
  .site-header__text { flex: 1; }
  .site-header__submit { display: inline-flex; }

  .main { padding-top: 24px; }

  /* Раскладка: медиа-колонка слева, панель мастера справа */
  .list-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    column-gap: 32px;
    align-items: start;
  }
  .list-top__panel { margin-top: 0; }

  .list-top__title { font-size: 36px; margin-top: 18px; }

  .gallery__slide {
    flex-basis: 100%;
    aspect-ratio: 4 / 3;       /* натуральная форма — бока не режутся, текст на фото виден */
  }
  .gallery__arrow { display: flex; }
}

/* ============================================================
   ЧАТ-КОНСУЛЬТАНТ (виджет в стиле Jivo)
   ============================================================ */
.cw {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  width: 370px;
  max-width: calc(100vw - 24px);
  font-family: var(--font);
}
.cw[hidden] { display: none; }

/* значок нового сообщения (1) на кнопках «Написать» */
.btn--write { position: relative; overflow: visible; }
.write-badge {
  position: absolute;
  top: -9px;
  right: -9px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  background: var(--link-red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(240,82,60,.5);
  transform-origin: center;
  animation: writeBadgeShake 1s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
}
/* дёрганье + яркое мигание, чтобы привлекало внимание */
@keyframes writeBadgeShake {
  0%   { transform: rotate(0deg) scale(1);    box-shadow: 0 2px 8px rgba(240,82,60,.5); }
  10%  { transform: rotate(-16deg) scale(1.15); }
  20%  { transform: rotate(14deg) scale(1.15); box-shadow: 0 0 0 6px rgba(240,82,60,.28), 0 2px 10px rgba(240,82,60,.7); }
  30%  { transform: rotate(-12deg) scale(1.12); }
  40%  { transform: rotate(10deg) scale(1.1); }
  50%  { transform: rotate(0deg) scale(1.05);  box-shadow: 0 0 0 0 rgba(240,82,60,0), 0 2px 8px rgba(240,82,60,.5); }
  100% { transform: rotate(0deg) scale(1);     box-shadow: 0 2px 8px rgba(240,82,60,.5); }
}

.cw__close {
  position: absolute;
  top: -6px;
  left: -14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #6b7280;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: transform .12s ease, color .12s ease;
}
.cw__close:hover { color: #2c2c2e; }
.cw__close:active { transform: scale(.9); }

.cw__window {
  display: flex;
  flex-direction: column;
  height: 540px;
  max-height: calc(100vh - 40px);
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(20,24,48,.28);
}

.cw__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #343a5c 0%, #2b2f4a 100%);
  color: #fff;
}
.cw__headtext { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cw__title { font-size: 16px; font-weight: 600; line-height: 1.25; }
.cw__status { font-size: 12.5px; color: #c3c7dd; display: flex; align-items: center; gap: 6px; }
.cw__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 3px rgba(34,194,87,.25); }

.cw__call {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s ease, transform .12s ease;
}
.cw__call:hover { background: var(--green-press); }
.cw__call:active { transform: scale(.92); }

.cw__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7f8fa;
}

/* ряд сообщения: аватар мастера + пузырь */
.cw__row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}
.cw__row--user { justify-content: flex-end; }
.cw__row--bot { justify-content: flex-start; }
.cw__ava {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}
.cw__msg {
  position: relative;
  max-width: 78%;
  padding: 9px 12px 6px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.cw__msg--bot {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.cw__msg--user {
  background: var(--green);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.cw__time {
  display: block;
  font-size: 10px;
  line-height: 1;
  margin-top: 4px;
  text-align: right;
  opacity: .6;
}
.cw__msg--user .cw__time { color: #fff; opacity: .8; }
.cw__msg--err {
  align-self: center;
  background: #fdecea;
  color: #b3261e;
  border: 1px solid #f6c9c4;
  font-size: 13px;
  max-width: 100%;
  text-align: center;
}

/* индикатор «печатает» */
.cw__typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; border-bottom-left-radius: 4px; }
.cw__typing span { width: 7px; height: 7px; border-radius: 50%; background: #b8bdc7; animation: cwBlink 1.2s infinite ease-in-out; }
.cw__typing span:nth-child(2) { animation-delay: .2s; }
.cw__typing span:nth-child(3) { animation-delay: .4s; }
@keyframes cwBlink { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }

.cw__form {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.cw__input {
  flex: 1 1 auto;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 14.5px;
  color: var(--ink);
  padding: 8px 4px;
  background: transparent;
}
.cw__input::placeholder { color: var(--ink-3); }
.cw__send {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--green);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .12s ease, transform .12s ease, opacity .12s ease;
}
.cw__send:hover { background: var(--green-press); }
.cw__send:active { transform: scale(.9); }
.cw__send:disabled { opacity: .45; cursor: default; }

/* появление */
.cw:not([hidden]) .cw__window { animation: cwIn .22s ease; }
@keyframes cwIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* мобильный — почти на весь экран, вокруг затемнённая подложка (виден край сайта) */
@media (max-width: 560px) {
  .cw {
    position: fixed;
    /* top/left/width/height полностью держит JS через visualViewport (см. chat.js) -
       при фокусе на поле ввода браузер панорамирует видимую область под клавиатуру,
       и position:fixed сам по себе за этим не следит ни в одном мобильном браузере */
    top: 0; left: 0;
    width: 100%; height: 100dvh;  /* дефолт до первого срабатывания JS */
    bottom: auto; right: auto; max-width: none;
    padding: 12px;
    background: rgba(0, 0, 0, .5);   /* затемнение сайта по краям */
    display: flex;
  }
  .cw__window {
    width: 100%;
    height: auto;
    max-height: none;
    flex: 1 1 auto;
  }
  /* крестик — в шапку слева, звонок остаётся справа (не пересекаются) */
  .cw__close {
    top: 20px; left: 20px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    box-shadow: none;
    z-index: 3;
  }
  .cw__close:hover { color: #fff; background: rgba(255, 255, 255, .3); }
  .cw__head { padding-left: 62px; }   /* место под крестик слева */
}

/* ==========================================================================
   ДЕСКТОП ≥1024: весь контент в ширину фото, справа липкая карточка мастера
   ========================================================================== */
@media (min-width: 1024px) {
  .main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    column-gap: 32px;
    align-items: start;
  }
  .main > * { grid-column: 1; }
  .list-top { display: contents; }
  .list-top__media { grid-column: 1; grid-row: 1; }
  .list-top__panel {
    grid-column: 2;
    grid-row: 1 / span 40;
    align-self: start;
    position: sticky;
    top: 16px;
  }
}

/* Стрелки прокрутки горизонтальных лент (только десктоп, на тач работает свайп) */
.hscroll { position: relative; }
.hscroll__arrow { display: none; }
@media (min-width: 1024px) and (hover: hover) {
  .hscroll__arrow {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.95);
    color: var(--ink);
    box-shadow: 0 2px 10px rgba(0,0,0,.22);
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background .15s ease, transform .08s ease;
  }
  .hscroll__arrow[hidden] { display: none; }
  .hscroll__arrow:hover { background: #fff; }
  .hscroll__arrow:active { transform: translateY(-50%) scale(.94); }
  .hscroll__arrow--prev { left: 8px; }
  .hscroll__arrow--next { right: 8px; }
}
