/* ============================================================
   СЭС-Контроль · Мариуполь
   Редакционный стиль: бумага, волосяные линии, живая фотография,
   сдержанная типографика. Без карточек-пилюль и декоративных теней.
   ============================================================ */

:root {
  --paper:      #f6f5f1;
  --surface:    #ffffff;
  --ink:        #182430;
  --muted:      #5f6b78;
  --line:       #ddd9cf;
  --line-dark:  rgba(255,255,255,.16);
  --navy:       #0e2a47;
  --navy-deep:  #091d33;
  --red:        #c8102e;
  --red-dark:   #a50d26;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2,.7,.3,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

.container { width: min(1200px, 92%); margin: 0 auto; }
.container--narrow { width: min(760px, 92%); }

/* ---------- Типографика ---------- */
h1, h2, h3 { line-height: 1.15; letter-spacing: -.015em; color: var(--ink); }

.kicker {
  display: flex; align-items: center; gap: .8rem;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--red);
}
.kicker::before { content: ""; width: 30px; height: 2px; background: var(--red); flex-shrink: 0; }
.kicker--light { color: #ff6b7e; }
.kicker--light::before { background: #ff6b7e; }

.section__head { max-width: 40rem; margin-bottom: 3.2rem; }
.section__head h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); font-weight: 800; margin-top: 1.1rem; }
.section__sub { color: var(--muted); margin-top: .9rem; }
.section__head--left { margin-bottom: 2.2rem; }

/* ---------- Верхняя служебная полоса ---------- */
.topbar {
  background: var(--navy-deep);
  color: rgba(255,255,255,.72);
  font-size: .8rem;
  border-bottom: 1px solid var(--line-dark);
}
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem 0; flex-wrap: wrap; }
.topbar__place { display: flex; align-items: center; gap: .6rem; }
.topbar__place img { box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.citysel {
  font: inherit; font-size: .8rem; font-weight: 600;
  color: #fff; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.3); border-radius: 4px;
  padding: .15rem .35rem; cursor: pointer;
}
.citysel:hover { border-color: rgba(255,255,255,.6); }
.citysel option { color: #17222e; background: #fff; }
.topbar__meta { display: flex; align-items: center; gap: 1.4rem; }
.topbar__meta a { color: #fff; text-decoration: none; font-weight: 600; letter-spacing: .02em; }
.topbar__meta a:hover { color: #ff8a96; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s var(--ease);
}
.header--scrolled { box-shadow: 0 6px 24px rgba(14,42,71,.10); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: .85rem 0; }

.logo { display: flex; align-items: center; gap: .85rem; text-decoration: none; }
.logo img { height: 44px; width: auto; }
.logo__text { display: flex; flex-direction: column; line-height: 1.2; }
.logo__text strong { font-size: 1.15rem; color: var(--navy); letter-spacing: .01em; }
.logo__text small { font-size: .7rem; color: var(--muted); letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: 1.7rem; }
.nav a {
  color: var(--ink); text-decoration: none;
  font-size: .9rem; font-weight: 600;
  padding: .3rem 0; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px; background: var(--red);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }
.nav__cta {
  color: #fff !important; background: var(--red);
  padding: .6rem 1.15rem !important; border-radius: 4px;
  transition: background .25s var(--ease);
}
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--red-dark); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.burger span { width: 26px; height: 2px; background: var(--ink); transition: .3s var(--ease); }
.burger--open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger--open span:nth-child(2) { opacity: 0; }
.burger--open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Главный экран ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--navy-deep);
  color: #fff;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__video {
  width: 100%; height: 100%; object-fit: cover;
}
/* Если видео нет — показываем фото с лёгким Ken Burns */
.hero__media--image {
  background: url("../assets/img/hero-poster.jpg?v=2") center 30% / cover no-repeat;
  animation: kenburns 24s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { background-size: 105% auto; }
  to   { background-size: 118% auto; }
}
.hero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(9,29,51,.35) 0%, rgba(9,29,51,.55) 55%, rgba(9,29,51,.88) 100%),
    linear-gradient(100deg, rgba(9,29,51,.55) 0%, rgba(9,29,51,0) 65%);
}
.hero__ontop { display: none; }
.hero__content { position: relative; padding: 7rem 0 4.5rem; min-width: 0; }
.hero h1 {
  color: #fff;
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  font-weight: 800;
  max-width: 17em;
  margin: 1.3rem 0 1.2rem;
}
.hero__lead { color: rgba(255,255,255,.82); max-width: 33rem; font-size: 1.02rem; margin-bottom: 2rem; }
.hero__actions { display: flex; gap: .9rem; flex-wrap: wrap; }

.hero__facts { position: relative; border-top: 1px solid var(--line-dark); }
.hero__facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.hero__fact {
  padding: 1.3rem 1.6rem 1.5rem;
  border-left: 1px solid var(--line-dark);
  display: flex; flex-direction: column; gap: .15rem;
}
.hero__fact:first-child { border-left: 0; padding-left: 0; }
.hero__fact strong { font-size: .95rem; font-weight: 700; }
.hero__fact span { font-size: .8rem; color: rgba(255,255,255,.6); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block; cursor: pointer; border: 0;
  font-family: var(--font); font-size: .82rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  text-decoration: none; padding: 1rem 1.9rem; border-radius: 4px;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-dark); }
.btn--outline { border: 1px solid rgba(255,255,255,.5); color: #fff; background: transparent; }
.btn--outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--full { width: 100%; }

/* ---------- Доказательная строка вместо счётчиков ---------- */
.proof { background: var(--paper); border-bottom: 1px solid var(--line); }
.proof__inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 2.5rem; padding: 2.2rem 0;
}
.proof__main {
  font-size: clamp(1.1rem, 1.8vw, 1.45rem); font-weight: 750;
  color: var(--navy); line-height: 1.4; max-width: 26em;
  border-left: 3px solid var(--red); padding-left: 1.4rem;
}
.proof__main strong { color: var(--red); font-variant-numeric: tabular-nums; }
.proof__aside {
  color: var(--muted); font-size: .92rem; line-height: 1.55;
  max-width: 19em; text-align: right; flex-shrink: 0;
}

/* ---------- Секции ---------- */
.section { padding: 6rem 0; }
.section--paper { background: var(--paper); }

/* ---------- Двухколоночный макет: контент + сайдбар услуг ---------- */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px;
  gap: 3.2rem; align-items: start;
  padding: 4.5rem 0 5rem;
}
.layout__main { min-width: 0; }

.msection { padding: 3.4rem 0; border-top: 1px solid var(--line); }
.layout__main > .msection:first-child { border-top: 0; padding-top: 0; }
.layout__main .section__head { margin-bottom: 2.4rem; }
.layout__main .split { grid-template-columns: 1fr; gap: 2.2rem; }

.msection--navy {
  background:
    radial-gradient(700px 320px at 95% 0%, rgba(200,16,46,.14), transparent 60%),
    var(--navy-deep);
  color: #fff;
  border-top: 0; border-radius: 18px;
  padding: 2.8rem 2.4rem;
}
.msection--navy h2 { color: #fff; }

/* ---------- Сайдбар услуг ---------- */
.layout__side { min-width: 0; }
.sidepanel {
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(14,42,71,.07);
}
.sidepanel__head {
  padding: 1.2rem 1.3rem .95rem;
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.sidepanel__head h2 { font-size: 1.1rem; font-weight: 800; margin-top: .6rem; }
.sidepanel__more { color: var(--navy); text-decoration: none; display: flex; align-items: center; justify-content: space-between; transition: color .2s var(--ease); }
.sidepanel__more span { color: var(--red); transition: transform .25s var(--ease); }
.sidepanel__more:hover { color: var(--red); }
.sidepanel__more:hover span { transform: translateX(5px); }
.sidepanel__list { display: flex; flex-direction: column; }
.ssvc {
  display: flex; align-items: center; gap: .9rem;
  padding: .8rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: background .2s var(--ease);
}
.ssvc:hover { background: var(--paper); }
.ssvc img { width: 74px; height: 74px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.ssvc__body { display: flex; flex-direction: column; min-width: 0; gap: .2rem; }
.ssvc__body strong {
  color: var(--ink); font-size: .92rem; font-weight: 700; line-height: 1.3;
  transition: color .2s var(--ease);
}
.ssvc:hover .ssvc__body strong { color: var(--red); }
.ssvc__price { color: var(--red); font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ssvc__desc {
  color: var(--muted); font-size: .77rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sidepanel__foot { padding: 1rem 1rem 1.1rem; border-top: 1px solid var(--line); }
.sidepanel__hint { font-size: .72rem; color: var(--muted); text-align: center; margin-top: .55rem; }

/* ---------- Калькулятор ---------- */
.calc {
  background: var(--paper);
  border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden;
}
/* Шаги-аккордеон */
.cstep { border-top: 1px solid var(--line); }
.cstep:first-child { border-top: 0; }
.cstep summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem 1.6rem;
  font-weight: 700; font-size: .92rem; color: var(--navy);
  transition: color .2s var(--ease);
}
.cstep summary::-webkit-details-marker { display: none; }
.cstep summary::after {
  content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--red);
  transition: transform .25s var(--ease); line-height: 1;
}
.cstep[open] summary::after { transform: rotate(45deg); }
.cstep summary:hover { color: var(--red); }
.cstep__body { padding: .4rem 1.6rem 1.5rem; }
.calc__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.2rem; }
.calc__label {
  display: flex; flex-direction: column; gap: .55rem;
  font-size: .76rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.calc__opts {
  display: flex; flex-direction: column; gap: .65rem;
  border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 1.2rem;
}
.check {
  display: flex; align-items: center; gap: .6rem;
  font-size: .86rem; font-weight: 600; color: var(--ink);
  cursor: pointer;
}
.check input { accent-color: var(--red); width: 17px; height: 17px; flex-shrink: 0; cursor: pointer; }
.check span { margin-left: auto; color: var(--red); font-weight: 800; font-size: .8rem; font-variant-numeric: tabular-nums; }
.calc select {
  font: inherit; font-size: 1rem; font-weight: 600; color: var(--ink);
  padding: .85rem 1rem; width: 100%;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); cursor: pointer;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.calc select:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(200,16,46,.10);
}
.calc__area { display: flex; align-items: center; gap: 1.1rem; }
.calc input[type="range"] { flex: 1; min-width: 0; accent-color: var(--red); cursor: pointer; height: 28px; }
.calc output {
  font-size: .95rem; font-weight: 800; color: var(--navy);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  min-width: 4.5rem; text-align: right;
}
/* Итоговая полоса — внутри того же блока */
.calc__result {
  background: var(--navy-deep); color: #fff;
  display: flex; align-items: center; gap: 2rem;
  padding: 1.5rem 1.6rem;
}
.calc__pricebox { flex-shrink: 0; }
.calc__caption { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.calc__price {
  font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em;
  margin: .35rem 0 0; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.calc__price small { font-size: 1.05rem; font-weight: 600; color: rgba(255,255,255,.6); }
.calc__note { font-size: .82rem; color: rgba(255,255,255,.65); flex: 1; min-width: 220px; }
.calc__result .btn { flex-shrink: 0; }

/* ---------- Каталог услуг (страница services.html) ---------- */
.scards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.scard {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.scard:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(14,42,71,.13);
  border-color: #c9c4b8;
}
.scard__thumb { display: block; height: 185px; overflow: hidden; background: var(--paper); }
.scard__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.scard:hover .scard__thumb img { transform: scale(1.06); }
.scard__body { display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem 1.35rem 1.3rem; flex: 1; }
.scard__tag {
  font-size: .66rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--red);
}
.scard__body h3 { font-size: 1.12rem; font-weight: 750; transition: color .25s var(--ease); }
.scard:hover .scard__body h3 { color: var(--red); }
.scard__body > p { color: var(--muted); font-size: .88rem; flex: 1; }
.scard__foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: .5rem; padding-top: .9rem; border-top: 1px solid var(--line);
}
.scard__price { font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.scard__arrow { color: var(--red); font-weight: 800; transition: transform .25s var(--ease); }
.scard:hover .scard__arrow { transform: translateX(5px); }

/* ---------- Статьи в ряд ---------- */
.arow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 3rem; }

/* ---------- Фото-полоса: карусель на JS (пиксельная, бесшовная) ---------- */
.band { position: relative; min-height: 62vh; display: flex; align-items: center; overflow: hidden; background: var(--navy-deep); }
.band__flow { position: absolute; inset: 0; overflow: hidden; }
.band__track {
  display: flex; height: 100%; width: max-content;
  will-change: transform;
  backface-visibility: hidden;
}
.band__track img {
  height: 100%; width: auto; flex-shrink: 0;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.band__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(9,29,51,.82) 0%, rgba(9,29,51,.35) 60%, rgba(9,29,51,.15) 100%); }
.band__content { position: relative; z-index: 2; padding: 5rem 0; }

/* Водяной знак поверх медиа */
.wmark {
  position: absolute; right: 14px; bottom: 12px; z-index: 3;
  font-size: .6rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.6);
  background: rgba(9,29,51,.35);
  padding: .32rem .6rem; border-radius: 4px;
  pointer-events: none; user-select: none;
}
.hero__media .wmark { z-index: 2; }
.band__quote {
  color: #fff; font-size: clamp(1.4rem, 2.8vw, 2.2rem); font-weight: 750;
  line-height: 1.3; letter-spacing: -.01em; max-width: 21em; margin-top: 1.2rem;
}

/* ---------- Сплит-блоки ---------- */
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 4.5rem; align-items: start; }
.split--reverse { grid-template-columns: 1.15fr 1fr; }
.split__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
/* Фото целиком, без обрезки */
.split__media--full img { aspect-ratio: auto; height: auto; object-fit: contain; }
/* SEO-текст перед подвалом */
.seotext { background: var(--paper); border-top: 1px solid var(--line); padding: 3.2rem 0; }
.seotext h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 1rem; }
.seotext__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.seotext p { font-size: .82rem; color: var(--muted); line-height: 1.7; }
.split__caption {
  font-size: .78rem; color: var(--muted);
  padding: .7rem 0; border-bottom: 1px solid var(--line);
}

.point { display: flex; gap: 1.6rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.point:last-child { border-bottom: 1px solid var(--line); }
.point__num { font-size: .8rem; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; padding-top: .3rem; }
.point h3 { font-size: 1.05rem; font-weight: 750; margin-bottom: .35rem; }
.point p { color: var(--muted); font-size: .92rem; }

/* ---------- Шаги: удалено по решению владельца ---------- */

/* ---------- Документы ---------- */
.docs { list-style: none; }
.docs li { padding: 1.4rem 0 1.4rem 1.6rem; border-top: 1px solid var(--line); position: relative; }
.docs li:last-child { border-bottom: 1px solid var(--line); }
.docs li::before {
  content: ""; position: absolute; left: 0; top: 1.85rem;
  width: 9px; height: 9px; background: var(--red);
}
.docs h3 { font-size: 1.02rem; font-weight: 750; margin-bottom: .3rem; }
.docs p { color: var(--muted); font-size: .9rem; }

/* ---------- Объекты ---------- */
.objects { list-style: none; columns: 2; column-gap: 3rem; }
.objects li {
  break-inside: avoid;
  padding: .85rem 0; border-top: 1px solid var(--line);
  font-weight: 600; color: var(--navy); font-size: .95rem;
}

/* ---------- FAQ ---------- */
.acard {
  display: block; text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--red);
  border-radius: 10px; overflow: hidden;
  margin-bottom: 1.1rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.acard:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(14,42,71,.12);
  border-left-color: var(--navy);
}
.acard__thumb { display: block; height: 150px; overflow: hidden; }
.acard__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.acard:hover .acard__thumb img { transform: scale(1.05); }
.acard__body { display: block; padding: 1.1rem 1.3rem 1.3rem; }
.acard__tag {
  display: inline-block; font-size: .68rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
  margin-bottom: .5rem;
}
.acard__name { display: block; font-weight: 700; font-size: .98rem; line-height: 1.4; color: var(--ink); transition: color .25s var(--ease); }
.acard:hover .acard__name { color: var(--red); }
.acard__more {
  display: inline-flex; align-items: center; gap: .45rem;
  margin-top: .7rem; font-size: .8rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--navy);
}
.acard__more::after { content: "→"; transition: transform .25s var(--ease); }
.acard:hover .acard__more::after { transform: translateX(4px); }
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); padding: 1.2rem 0; }
.faq__item summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  font-weight: 700; font-size: 1.02rem; color: var(--ink);
  transition: color .2s var(--ease);
}
.faq__item summary:hover { color: var(--red); }
.faq__item summary::after {
  content: "+"; font-size: 1.35rem; font-weight: 400; color: var(--red);
  transition: transform .25s var(--ease); line-height: 1;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin-top: .8rem; color: var(--muted); font-size: .93rem; max-width: 40rem; }

/* ---------- Контакты ---------- */
.contacts { background: var(--navy-deep); color: #fff; padding: 6rem 0; }
.contacts__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 4.5rem; align-items: start; }
.contacts__info h2 { color: #fff; font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; margin: 1.1rem 0 .8rem; }
.contacts__lead { color: rgba(255,255,255,.75); max-width: 26rem; margin-bottom: 2.2rem; }
.contacts__list { display: flex; flex-direction: column; }
.contacts__list > div {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem;
  padding: .9rem 0; border-top: 1px solid var(--line-dark);
}
.contacts__list dt { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); padding-top: .15rem; }
.contacts__list dd { font-size: .98rem; }
.contacts__list a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); transition: border-color .2s; }
.contacts__list a:hover { border-color: #fff; }
/* Выбор способа написать на почту — модалка (структура как у .cb-*) */
.mailpick__btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.35); transition: border-color .2s;
}
.mailpick__btn:hover { border-color: #fff; }
.mailopt {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem 1rem; margin-top: .5rem;
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 600;
  background: #fff; cursor: pointer; width: 100%; font-family: inherit; text-align: left;
  transition: border-color .2s, color .2s;
}
.mailopt::after { content: "→"; color: var(--red); font-weight: 700; }
.mailopt:hover { border-color: var(--red); color: var(--red); }
.mailopt small { display: block; font-weight: 400; color: var(--muted); font-size: .74rem; }
.mailopt--copy.copied { color: #1a7f37; border-color: #1a7f37; }
.mailopt--copy.copied::after { content: "✓"; color: #1a7f37; }
.contacts__flags { display: flex; gap: .7rem; margin-top: 2rem; }
.contacts__flags img { box-shadow: 0 0 0 1px rgba(255,255,255,.25); }

.form {
  background: var(--surface); color: var(--ink);
  padding: 2.2rem; border-radius: 14px;
  box-shadow: 0 30px 70px rgba(0,0,0,.35);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 1rem;
}
.form::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--red), #ff6b7e 60%, var(--navy));
}
.form__title { font-size: 1.2rem; font-weight: 800; color: var(--navy); margin-bottom: .2rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: flex; flex-direction: column; gap: .4rem; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.form input, .form select, .form textarea {
  font: inherit; font-size: .95rem; font-weight: 500; color: var(--ink);
  padding: .85rem 1.05rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fbfaf8;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.form input:hover, .form select:hover, .form textarea:hover { border-color: #c8c3b6; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--red); background: #fff;
  box-shadow: 0 0 0 4px rgba(200,16,46,.10);
}
.form input.form__error { border-color: var(--red); box-shadow: 0 0 0 4px rgba(200,16,46,.10); }
.btn--arrow { position: relative; }
.btn--arrow::after { content: "→"; margin-left: .6rem; display: inline-block; transition: transform .25s var(--ease); }
.btn--arrow:hover::after { transform: translateX(4px); }
.form__perks {
  list-style: none; display: flex; justify-content: center; gap: 1.3rem; flex-wrap: wrap;
  padding-top: .3rem;
}
.form__perks li {
  font-size: .76rem; font-weight: 600; color: var(--muted);
  padding-left: 1.15rem; position: relative;
}
.form__perks li::before {
  content: ""; position: absolute; left: 0; top: .3em;
  width: 6px; height: 10px;
  border-right: 2px solid var(--red); border-bottom: 2px solid var(--red);
  transform: rotate(40deg) translateY(-2px);
}
.form__note { font-size: .72rem; color: var(--muted); text-align: center; }
.form__success { text-align: center; font-weight: 700; color: #17703a; background: #e9f6ee; border-radius: 8px; padding: .75rem; }

/* ---------- Подвал ---------- */
.footer { background: var(--navy-deep); color: rgba(255,255,255,.65); border-top: 1px solid var(--line-dark); }
.footer__inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 2rem; padding: 2.4rem 0; flex-wrap: wrap;
}
.footer__brand { display: flex; gap: 1rem; align-items: center; max-width: 32rem; }
.footer__brand img { height: 42px; width: auto; opacity: .9; }
.footer__brand strong { color: #fff; font-size: .95rem; }
.footer__brand p { font-size: .8rem; margin-top: .15rem; }
.footer__nav { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer__nav a { color: rgba(255,255,255,.65); text-decoration: none; font-size: .86rem; }
.footer__nav a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid var(--line-dark); padding: 1.1rem 0; font-size: .76rem; color: rgba(255,255,255,.45); }

/* ---------- Страница услуги ---------- */
.pagehero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--navy-deep);
}
.pagehero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pagehero__shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(9,29,51,.6) 0%, rgba(9,29,51,.85) 100%),
    linear-gradient(100deg, rgba(9,29,51,.6) 0%, rgba(9,29,51,0) 70%);
}
.pagehero__content { position: relative; padding: 4.5rem 0 4rem; }
.breadcrumb { font-size: .8rem; color: rgba(255,255,255,.6); margin-bottom: 1.6rem; }
.breadcrumb a { color: rgba(255,255,255,.85); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.3); }
.breadcrumb a:hover { border-color: #fff; }
.breadcrumb span::before { content: "·"; margin: 0 .6rem; color: rgba(255,255,255,.4); }
.pagehero h1 {
  color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 800; max-width: 20em; margin: 1.1rem 0 1rem;
}
.pagehero__lead { color: rgba(255,255,255,.82); max-width: 34rem; margin-bottom: 2rem; }
.pagehero__row { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.pagehero__price {
  font-size: 1.1rem; font-weight: 800; color: #fff;
  padding: .85rem 1.4rem;
  border: 1px solid rgba(255,255,255,.35); border-radius: 8px;
  background: rgba(255,255,255,.08);
  font-variant-numeric: tabular-nums;
}
.pagehero__price small { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); }

.pagebody { display: grid; grid-template-columns: 1fr 360px; gap: 4rem; align-items: start; padding: 4.5rem 0; }

.article { max-width: 44rem; }
.article h2 { font-size: 1.5rem; font-weight: 800; margin: 2.4rem 0 .9rem; }
.article h2:first-child { margin-top: 0; }
.article p { color: #3c4652; margin-bottom: 1rem; }
.article ul { margin: 0 0 1.2rem 1.2rem; color: #3c4652; }
.article li { margin-bottom: .45rem; }
.article li::marker { color: var(--red); }
.article strong { color: var(--ink); }

.article__note {
  border-left: 3px solid var(--red);
  background: var(--paper);
  padding: 1.2rem 1.4rem; border-radius: 0 8px 8px 0;
  margin: 1.8rem 0;
}
.article__note p { margin: 0; font-size: .92rem; }

/* Фото-примеры в статьях услуг */
.afigures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin: 1.4rem 0 1.9rem; }
.afigures--2 { grid-template-columns: repeat(2, 1fr); }
.afig { margin: 0; }
.afig img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line);
}
.afig figcaption { font-size: .78rem; color: var(--muted); padding-top: .5rem; line-height: 1.45; }
.afig strong { color: var(--ink); }
/* Фото целиком (без обрезки) с синей тонировкой, как у hero-видео */
.afig--full img { aspect-ratio: auto; height: auto; object-fit: contain; }
.afig__media { position: relative; display: block; }
.afig__media--tint::after {
  content: ""; position: absolute; inset: 0; border-radius: 10px; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(9,29,51,.18) 0%, rgba(9,29,51,.30) 55%, rgba(9,29,51,.48) 100%),
    linear-gradient(100deg, rgba(9,29,51,.30) 0%, rgba(9,29,51,0) 65%);
}

/* Сравнение видов вредителей (прусак vs чёрный, крыса vs мышь) */
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin: 1.4rem 0 1.9rem; }
.vs__col {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden;
}
.vs__col img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.vs__body { padding: 1rem 1.2rem 1.2rem; }
.vs__name { font-size: 1rem; font-weight: 800; color: var(--navy); }
.vs__latin { font-size: .74rem; color: var(--muted); font-style: italic; display: block; margin: .15rem 0 .6rem; }
.vs__body ul { margin: 0 0 0 1.1rem; font-size: .86rem; color: #3c4652; }
.vs__body li { margin-bottom: .3rem; }
.vs__body li::marker { color: var(--red); }

.pagebody__aside { position: sticky; top: 100px; }

.pricecard {
  background: var(--navy-deep); color: #fff;
  border-radius: 14px; overflow: hidden;
}
.pricecard__head { padding: 1.6rem 1.8rem 0; }
.pricecard__label { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.pricecard__value { font-size: 2rem; font-weight: 800; margin: .4rem 0 0; font-variant-numeric: tabular-nums; }
.pricecard__value small { font-size: .9rem; font-weight: 600; color: rgba(255,255,255,.65); }
.pricecard__list { list-style: none; padding: 1.2rem 1.8rem; }
.pricecard__list li {
  font-size: .88rem; color: rgba(255,255,255,.82);
  padding: .55rem 0 .55rem 1.5rem; position: relative;
  border-top: 1px solid var(--line-dark);
}
.pricecard__list li::before {
  content: "✓"; position: absolute; left: 0; color: #ff6b7e; font-weight: 800;
}
.pricecard__foot { padding: 0 1.8rem 1.8rem; }
.pricecard__hint { font-size: .75rem; color: rgba(255,255,255,.5); text-align: center; margin-top: .8rem; }

.related { margin-top: 1.6rem; border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem 1.6rem; background: var(--surface); }
.related__title { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.related a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .7rem 0; border-top: 1px solid var(--line);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem;
  transition: color .2s var(--ease);
}
.related a span { color: var(--muted); font-weight: 600; font-size: .82rem; white-space: nowrap; }
.related a:hover { color: var(--red); }

.ctaband { background: var(--paper); border-top: 1px solid var(--line); padding: 3.5rem 0; }
.ctaband__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.ctaband h2 { font-size: 1.4rem; font-weight: 800; }
.ctaband p { color: var(--muted); margin-top: .3rem; }

/* Логотип разработчика — в тёмном подвале */
.footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer__dev { position: relative; display: inline-block; flex-shrink: 0; }
.footer__dev-img { display: block; width: 130px; height: auto; mix-blend-mode: screen; }
.footer__dev-img--hover { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; }
.footer__dev:hover .footer__dev-img--hover,
.footer__dev:active .footer__dev-img--hover { opacity: 1; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s var(--ease); }
.reveal--visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__media--image { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1020px) {
  .split, .split--reverse { grid-template-columns: 1fr; gap: 2.6rem; }
  .split--reverse .split__media { order: -1; }
  .contacts__grid { grid-template-columns: 1fr; gap: 3rem; }
  .pagebody { grid-template-columns: 1fr; }
  .pagebody__aside { position: static; order: -1; }
  .layout { grid-template-columns: 1fr; padding: 3.5rem 0 4rem; }
  .layout__side { position: static; order: -1; max-height: none; }
  .sidepanel { max-height: none; }
  .scards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .section { padding: 4rem 0; }
  .contacts { padding: 4rem 0; }
  /* Hero: видео сверху, заголовок поверх него как на ПК */
  .hero { min-height: 0; display: block; }
  .hero__media { position: relative; inset: auto; height: 62vw; min-height: 250px; max-height: 460px; }
  .hero__shade {
    background:
      linear-gradient(180deg, rgba(9,29,51,.25) 0%, rgba(9,29,51,.45) 55%, rgba(9,29,51,.85) 100%),
      linear-gradient(100deg, rgba(9,29,51,.45) 0%, rgba(9,29,51,0) 65%);
  }
  .hero__ontop {
    display: block;
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: 1.2rem 4% 1.3rem;
  }
  .hero__ontop .kicker { font-size: .62rem; }
  .hero__ontop h1 {
    color: #fff; font-size: 1.32rem; line-height: 1.22;
    font-weight: 800; margin-top: .7rem; max-width: 22em;
  }
  .hero__content .kicker, .hero__content h1 { display: none; }
  .hero__content { padding: 1.6rem 0 2.2rem; }
  .hero__lead { font-size: .95rem; margin-bottom: 1.4rem; }
  .hero__facts-grid { grid-template-columns: 1fr; }
  .hero__fact { border-left: 0; border-top: 1px solid var(--line-dark); padding-left: 0; }
  .hero__fact:first-child { border-top: 0; }
  .proof__inner { flex-direction: column; align-items: flex-start; gap: .9rem; padding: 1.8rem 0; }
  .proof__aside { text-align: left; }
  /* Карусель на телефоне: лента в своих пропорциях, кадр виден почти целиком, текст под ней */
  .band { min-height: 0; display: block; }
  .band__flow { position: relative; inset: auto; height: 34vw; min-height: 135px; }
  .band__content { position: relative; padding: 1.6rem 0 2rem; }
  .objects { columns: 1; }
  .topbar__meta span { display: none; }
  .band { min-height: 52vh; }
  .form__row { grid-template-columns: 1fr; }
  .form { padding: 1.6rem; }
  .arow { grid-template-columns: 1fr; }
  .calc__grid { grid-template-columns: 1fr; }
  .afigures, .afigures--2 { grid-template-columns: 1fr; }
  .vs { grid-template-columns: 1fr; }
  .scards { grid-template-columns: 1fr; }
  .cstep summary { padding: .9rem 1.2rem; font-size: .86rem; }
  .cstep__body { padding: .3rem 1.2rem 1.3rem; }
  .calc__result { flex-direction: column; align-items: stretch; gap: 1.1rem; padding: 1.4rem 1.2rem; }
  .calc__price { font-size: 2rem; }
  .calc__note { min-width: 0; }

  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 84%);
    background: var(--navy-deep);
    flex-direction: column; align-items: flex-start;
    padding: 5.5rem 2rem 2rem; gap: 1.4rem;
    transform: translateX(100%);
    transition: transform .35s var(--ease);
    z-index: 90;
  }
  .nav--open { transform: translateX(0); }
  .nav a { color: #fff; font-size: 1.05rem; }
  .burger { display: flex; z-index: 95; }
  .burger--open span { background: #fff; }
}

/* ============================================================
   Виджеты связи (js/widgets.js): кнопка обратного звонка (.cb-*),
   чат «Онлайн-консультация» (.chat-*)
   ============================================================ */

/* ---------- Кнопка-трубка слева внизу ---------- */
.cb-fab {
  position: fixed; left: 1.4rem; bottom: 1.4rem; z-index: 80;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--red); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(200,16,46,.35);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.cb-fab:hover { background: var(--red-dark); transform: scale(1.06); }

/* ---------- Модалка обратного звонка ---------- */
.cb-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(9,29,51,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.cb-modal {
  position: relative; width: min(400px, 100%);
  background: var(--paper); border-top: 4px solid var(--red);
  padding: 2.2rem 1.8rem 1.8rem; text-align: center;
}
.cb-close {
  position: absolute; top: .5rem; right: .7rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: var(--muted);
}
.cb-close:hover { color: var(--red); }
.cb-title { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.cb-sub { font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.cb-phone {
  display: block; margin: 1.1rem 0;
  font-size: 1.5rem; font-weight: 800; color: var(--red);
  text-decoration: none; font-variant-numeric: tabular-nums;
}
.cb-phone:hover { color: var(--red-dark); }
.cb-divider {
  display: flex; align-items: center; gap: .8rem;
  color: var(--muted); font-size: .75rem;
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 1.1rem;
}
.cb-divider::before, .cb-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.cb-form input {
  width: 100%; padding: .8rem 1rem; margin-bottom: .7rem;
  border: 1px solid var(--line); background: var(--surface);
  font: inherit; color: var(--ink);
}
.cb-form input:focus { outline: none; border-color: var(--red); }
.cb-form .form__error { border-color: var(--red); background: #fdf0f2; }
.cb-note { font-size: .72rem; color: var(--muted); margin-top: .8rem; }
.cb-note a { color: var(--red); }
.cb-success {
  margin-top: .9rem; font-weight: 700; color: var(--navy);
  border-left: 3px solid var(--red); padding: .5rem .8rem;
  background: var(--surface); text-align: left;
}

/* ---------- Чат «Онлайн-консультация» справа внизу ---------- */
.chat-fab {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 80;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--navy); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(14,42,71,.35);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.chat-fab:hover { background: var(--navy-deep); transform: scale(1.06); }
.chat-badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 20px; height: 20px; border-radius: 10px;
  background: var(--red); color: #fff;
  font-size: .7rem; font-weight: 800; line-height: 20px;
  text-align: center; padding: 0 5px;
  border: 2px solid var(--surface);
}
.chat-window {
  position: fixed; right: 1.4rem; bottom: 5.8rem; z-index: 90;
  width: min(340px, calc(100vw - 2.8rem)); height: min(460px, 70vh);
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
  box-shadow: 0 12px 40px rgba(9,29,51,.25);
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--navy-deep); color: #fff; padding: .8rem 1rem;
}
.chat-head__title { font-weight: 800; font-size: .95rem; }
.chat-head__sub { font-size: .72rem; color: rgba(255,255,255,.65); }
.chat-close {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.7); font-size: 1.5rem; line-height: 1;
}
.chat-close:hover { color: #fff; }
.chat-log {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: .6rem;
}
.chat-msg {
  max-width: 82%; padding: .55rem .85rem; font-size: .88rem; line-height: 1.45;
  word-wrap: break-word;
}
.chat-msg--user {
  align-self: flex-end; background: var(--red); color: #fff;
  border-radius: 12px 12px 2px 12px;
}
.chat-msg--admin {
  align-self: flex-start; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px 12px 12px 2px;
}
.chat-form {
  display: flex; gap: .5rem; padding: .7rem;
  border-top: 1px solid var(--line); background: var(--surface);
}
.chat-form input {
  flex: 1; min-width: 0; padding: .6rem .8rem;
  border: 1px solid var(--line); font: inherit; color: var(--ink);
}
.chat-form input:focus { outline: none; border-color: var(--navy); }
.chat-form button {
  width: 42px; flex-shrink: 0; border: none; cursor: pointer;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s var(--ease);
}
.chat-form button:hover { background: var(--red); }

/* Атрибут hidden должен побеждать display:flex у оверлея и окна чата */
.cb-overlay[hidden], .chat-window[hidden] { display: none; }

@media (max-width: 760px) {
  .cb-fab, .chat-fab { width: 52px; height: 52px; left: 1rem; bottom: 1rem; }
  .chat-fab { left: auto; right: 1rem; }
  .chat-window { right: 1rem; bottom: 5rem; }
}
