/*
 * Палитра: нейтральные лайм/янтарь как на Squarespace, тёмные hero-блоки.
 */
:root {
  --accent: #c0d52c;
  --accent-soft: #d4e84a;
  --light-accent: #eae9ea;
  --dark-accent: #65615c;

  --bg: var(--light-accent);
  --surface: #ffffff;
  --text: #111111;
  --muted: var(--dark-accent);

  --primary: #f2c400;
  --primary-hover: #d8a900;
  --primary-contrast: #111111;

  --hero-1: #2d2b28;
  --hero-2: #1a1918;
  --hero-3: #0a0a0a;
  --section-dark-1: #5e5a56;
  --section-dark-2: #4a4744;
  --footer-bg: #0a0a0a;

  --border: rgba(0, 0, 0, 0.09);
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  --shadow-btn: 0 8px 26px rgba(242, 196, 0, 0.38);

  --radius-lg: 4px;
  --radius-md: 4px;

  /* запас под фикс. панель + отступ липкой сметы на странице калькулятора */
  --client-quick-bar-stack: 68px;

  /* Единый размер: выпадающие списки и поля количества (калькулятор, сборка щита) */
  --site-control-min-height: 44px;
  --site-control-pad-y: 10px;
  --site-control-pad-x: 12px;
  --site-control-font-size: 0.9rem;

  /* Анимация «кабеля» в hero: синяя, красная и белая жила */
  --hc-a: #2f7dff;
  --hc-b: #ff3b30;
  --hc-c: #ffffff;
  --hc-a-glow: rgba(47, 125, 255, 0.45);
  --hc-b-glow: rgba(255, 59, 48, 0.45);
  --hc-c-glow: rgba(255, 255, 255, 0.55);

  /* Единая высота hero первой секции на всех страницах */
  --hero-min-height: 68vh;
  --hero-min-height-mobile: 46vh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
  /* Не просвечивает «тёмная щель» при резиновой прокрутке Safari */
  background-color: var(--bg);
  /* iOS: не менять масштаб текста произвольно */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

main {
  min-width: 0;
}

body {
  margin: 0;
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-top: calc(240px + 3rem); /* фиксированный хедер + логотип 240px */
  padding-bottom: calc(var(--client-quick-bar-stack) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
  /* iOS: уменьшает задержку ~300ms перед click */
  touch-action: manipulation;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  z-index: 1000;
}

.skip-link:focus {
  left: 12px;
}

/* Layout — ширина контента как у Squarespace 7.1 (~1400px), отступы как у референса */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  z-index: 999;
  padding-top: env(safe-area-inset-top, 0px);
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  overflow: visible;
  /* Слой композиции — меньше артефактов при скролле на iOS */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Видна только на мобильных — горизонтальные «чипы» с ключевыми разделами */
.header-mobile-strip {
  display: none;
}

.header-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
  margin-right: 0;
}

.logo-img {
  height: 240px;
  width: auto;
  max-width: min(840px, 92vw);
  object-fit: contain;
  display: block;
}

/* Navigation — одна линия по высоте текста (inline-flex + min-height) */
.nav {
  display: flex;
  align-items: center;
  align-content: center;
  gap: 6px 8px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  position: relative;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  border-radius: var(--radius-md);
  transition: background 160ms ease, color 160ms ease;
  box-sizing: border-box;
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(255, 59, 48, 0.96),
    rgba(47, 125, 255, 0.88)
  );
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 220ms ease;
}

.nav a:hover {
  background: rgba(192, 213, 44, 0.18);
  color: var(--text);
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.nav a.active {
  background: rgba(192, 213, 44, 0.26);
  color: var(--text);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.nav-toggle-label {
  font-weight: 750;
}

.nav-toggle-icon {
  display: inline-block;
  width: 18px;
  height: 12px;
  margin-right: 10px;
  background: linear-gradient(
    to bottom,
    #1a1a1a 0 2px,
    transparent 2px 5px,
    #1a1a1a 5px 7px,
    transparent 7px 10px,
    #1a1a1a 10px 12px
  );
  vertical-align: middle;
}

/* Десктоп: пункты в одну строку, без «пляски» по высоте; при нехватке места — горизонтальный скролл */
@media (min-width: 861px) {
  /* Высокий логотип: поднимаем меню к полосе «Электро-Монтаж» */
  .header-content {
    align-items: flex-end;
    padding-bottom: 10px;
  }

  .header .nav,
  .header .header-cta.btn {
    transform: translateY(-4.625rem);
  }

  .header .nav {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .header .nav a {
    flex-shrink: 0;
  }

  .header .header-cta.btn {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    box-sizing: border-box;
  }
}

/* Buttons — сплошные, почти прямоугольные как на корпоративных Squarespace */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: none;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, #ffe45a 0%, #f2c400 100%);
  color: var(--primary-contrast);
  transition: transform 120ms ease, box-shadow 120ms ease, background 160ms ease, filter 160ms ease;
  box-shadow: var(--shadow-btn);
}

button.btn {
  cursor: pointer;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #fff5c5 0%, #d8a900 100%);
  filter: brightness(1.02);
}

.btn-secondary {
  background: #ffffff;
  border: 2px solid var(--primary);
  color: var(--text);
  box-shadow: none;
}

.btn-secondary:hover {
  background: #fffaf0;
  border-color: var(--primary-hover);
}

.btn-ghost {
  background: transparent;
  box-shadow: none;
  border: 2px solid rgba(101, 97, 92, 0.35);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(242, 196, 0, 0.12);
  border-color: var(--primary);
}

/* Одна ячейка 24×24 для всех трёх мессенджеров */
.btn-messenger__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  box-sizing: border-box;
}

svg.btn-messenger__icon {
  display: block;
}

img.btn-messenger__icon {
  object-fit: cover;
  display: block;
}

/* Одинаковая форма и размер кнопок мессенджеров в ряду */
.form-messengers .btn-messenger {
  flex: 1 1 0;
  min-width: min(100%, 7.5rem);
  max-width: 100%;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
}

@media (max-width: 480px) {
  .form-messengers .btn-messenger {
    flex: 1 1 100%;
    min-width: 0;
  }
}

.btn-messenger--whatsapp {
  background: linear-gradient(180deg, #2de06a 0%, #25d366 100%);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.btn-messenger--whatsapp:hover {
  background: linear-gradient(180deg, #33e870 0%, #1fb855 100%);
  filter: brightness(1.02);
}

.btn-messenger--telegram {
  background: linear-gradient(180deg, #36b0f0 0%, #229ed9 100%);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 6px 20px rgba(34, 158, 217, 0.35);
}

.btn-messenger--telegram:hover {
  background: linear-gradient(180deg, #4cbbf5 0%, #1c8ec4 100%);
  filter: brightness(1.02);
}

.btn-messenger--max {
  background: linear-gradient(180deg, #2a2485 0%, #0d0d5b 45%, #241675 100%);
  color: #f5f4fc;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 20px rgba(13, 13, 91, 0.4);
}

.btn-messenger--max:hover {
  background: linear-gradient(180deg, #3530a0 0%, #12127a 45%, #2d1a90 100%);
  border-color: rgba(255, 255, 255, 0.2);
  filter: none;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 900px 480px at 15% -10%, rgba(192, 213, 44, 0.5), transparent 55%),
    radial-gradient(ellipse 700px 400px at 90% 30%, rgba(192, 213, 44, 0.18), transparent 50%),
    linear-gradient(165deg, var(--hero-1) 0%, var(--hero-2) 45%, var(--hero-3) 100%);
  display: flex;
  align-items: center;
  text-align: center;
  min-height: var(--hero-min-height);
}

.hero--services {
  background:
    radial-gradient(ellipse 800px 420px at 85% 0%, rgba(192, 213, 44, 0.4), transparent 55%),
    linear-gradient(165deg, #3a3835 0%, var(--hero-2) 55%, var(--hero-3) 100%);
}

.hero--about {
  background:
    radial-gradient(ellipse 600px 380px at 25% 15%, rgba(192, 213, 44, 0.28), transparent 50%),
    linear-gradient(165deg, var(--hero-3) 0%, var(--hero-1) 50%, #000000 100%);
}

.hero--about .hero-content {
  padding: clamp(1.15rem, 3.2vw, 1.8rem) 0;
  max-width: min(92rem, 100%);
}

.hero-about-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: clamp(1.2rem, 3.4vw, 2.6rem);
  align-items: center;
}

.hero-about-copy {
  min-width: 0;
  width: 100%;
  max-width: none;
}

.hero--about .hero-content h1 {
  text-align: center;
  margin-bottom: 0;
}

.hero-about-logo {
  margin: 0;
  justify-self: end;
  width: min(100%, 520px);
  max-width: 520px;
  transform: translateY(-18px);
}

.hero-about-logo img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
  background: transparent;
}

.hero-about-intro {
  margin-top: clamp(0.65rem, 1.9vw, 1rem);
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  text-align: left;
  padding: clamp(0.8rem, 2.2vw, 1.1rem) clamp(0.8rem, 2vw, 1.1rem);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(0, 0, 0, 0.28) 100%
  );
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 4px solid color-mix(in srgb, var(--accent) 82%, #ffffff 18%);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.12),
    0 18px 42px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hero-about-intro p {
  margin: 0 0 1.05rem;
  color: rgba(255, 255, 255, 0.93);
  font-weight: 500;
  font-size: clamp(1.06rem, 2.2vw, 1.18rem);
  line-height: 1.62;
  letter-spacing: 0.015em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Первый абзац — «крючок»: крупнее и контрастнее */
.hero-about-intro p:first-child {
  font-size: clamp(1.2rem, 2.8vw, 1.38rem);
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
  letter-spacing: 0.01em;
  margin-bottom: 0.85rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-about-intro p:nth-child(2) {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.97);
}

.hero-about-intro p:last-child {
  margin-bottom: 0;
  margin-top: 0.05rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: clamp(1rem, 2.05vw, 1.1rem);
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
}

.hero-about-highlight {
  color: #d7ef63;
  font-weight: 700;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.45),
    0 0 18px rgba(192, 213, 44, 0.35);
}

@media (max-width: 520px) {
  .hero-about-intro {
    padding: 1.15rem 1rem;
    border-radius: 12px;
  }

  .hero-about-intro p {
    letter-spacing: 0.01em;
  }
}

@media (max-width: 900px) {
  .hero-about-content {
    grid-template-columns: 1fr;
  }

  .hero-about-logo {
    justify-self: center;
    max-width: 360px;
    margin-top: 0.35rem;
    transform: translateY(-8px);
  }
}

/* Сетка показателей layout25 (Webflow) — страница «О нас» */
.about-layout25 .w-layout-grid.layout25_item-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3.25rem);
  align-items: start;
}

.about-layout25 .layout25_text-wrapper {
  min-width: 0;
}

.about-layout25 .margin-bottom.margin-xxsmall {
  margin-bottom: 0.5rem;
}

.about-layout25 .heading-style-h2 {
  margin: 0;
  font-size: clamp(2.75rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--text);
}

.about-layout25 .text-span-20,
.about-layout25 .text-span-21 {
  color: var(--primary);
}

.about-layout25 .layout25_text-wrapper p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.62;
  color: var(--muted);
  max-width: 32rem;
}

@media (max-width: 640px) {
  .about-layout25 .w-layout-grid.layout25_item-list {
    grid-template-columns: 1fr;
  }
}

.hero--contact {
  background:
    radial-gradient(ellipse 900px 450px at 50% -5%, rgba(192, 213, 44, 0.45), transparent 55%),
    linear-gradient(165deg, var(--hero-2) 0%, #2d2b28 40%, var(--hero-3) 100%);
}

.hero--prices {
  background:
    radial-gradient(ellipse 750px 400px at 10% 20%, rgba(192, 213, 44, 0.35), transparent 52%),
    linear-gradient(165deg, #2a2825 0%, var(--hero-1) 45%, var(--hero-2) 100%);
}

.hero--works {
  background:
    radial-gradient(ellipse 820px 440px at 70% 0%, rgba(192, 213, 44, 0.32), transparent 52%),
    linear-gradient(165deg, var(--hero-2) 0%, var(--hero-1) 50%, var(--hero-3) 100%);
}

.works-lead {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}

.works-showcase {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.works-card h3 {
  margin-top: 0;
}

.works-card__media {
  margin: -1.5rem -1.35rem 1rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.works-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.works-card__media--schematic img {
  object-fit: contain;
  object-position: center;
  padding: 0.5rem;
  background: #f6f7f2;
}

.works-card--text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Фон hero: анимация «прокладки» кабеля по трассам */
.hero-cable-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.5;
}

.hero-cable-bg__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-cable-bg__path {
  fill: none;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-miterlimit: 16;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.hero-cable-bg__path--a,
.hero-cable-bg__path--b,
.hero-cable-bg__path--c {
  stroke-width: 5.5;
  animation: heroCableLay 14s ease-in-out infinite;
}

.hero-cable-bg__path--a-glow,
.hero-cable-bg__path--b-glow,
.hero-cable-bg__path--c-glow {
  stroke-width: 1.25;
  animation: heroCableLay 14s ease-in-out infinite;
}

.hero-cable-bg__path--a-glow {
  stroke: var(--hc-a-glow);
}

.hero-cable-bg__path--b-glow {
  stroke: var(--hc-b-glow);
}

.hero-cable-bg__path--c-glow {
  stroke: var(--hc-c-glow);
}

.hero-cable-bg__path--b,
.hero-cable-bg__path--b-glow {
  animation-duration: 18s;
  animation-delay: -4s;
}

.hero-cable-bg__path--c,
.hero-cable-bg__path--c-glow {
  animation-duration: 11s;
  animation-delay: -2s;
}

.hero-cable-bg__path--a {
  stroke: var(--hc-a);
}

.hero-cable-bg__path--b {
  stroke: var(--hc-b);
}

.hero-cable-bg__path--c {
  stroke: var(--hc-c);
}

@media (prefers-reduced-motion: reduce) {
  .hero-cable-bg {
    opacity: 0.22;
  }

  .hero-cable-bg__path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* Телефон: линии «кабеля» над затемнением — как на десктопе, заметнее на маленьком экране */
@media (max-width: 860px) {
  body:has(.hero .hero-cable-bg) .hero .overlay {
    z-index: 0;
  }

  body:has(.hero .hero-cable-bg) .hero .hero-cable-bg {
    z-index: 1;
    opacity: 0.58;
  }

  body:has(.hero .hero-cable-bg) .hero-cable-bg__path--a,
  body:has(.hero .hero-cable-bg) .hero-cable-bg__path--b,
  body:has(.hero .hero-cable-bg) .hero-cable-bg__path--c {
    stroke-width: 4.25;
  }
}

@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  body:has(.hero .hero-cable-bg) .hero .hero-cable-bg {
    opacity: 0.28;
  }
}

@keyframes heroCableLay {
  0%,
  6% {
    stroke-dashoffset: 100;
    opacity: 0.25;
  }
  10% {
    opacity: 0.85;
  }
  42% {
    stroke-dashoffset: 0;
    opacity: 0.9;
  }
  58% {
    stroke-dashoffset: 0;
    opacity: 0.85;
  }
  72% {
    stroke-dashoffset: 0;
    opacity: 0.35;
  }
  88%,
  100% {
    stroke-dashoffset: 100;
    opacity: 0.2;
  }
}

.price-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent) 4%, var(--surface)) 0%,
    var(--surface) 100%
  );
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.price-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.price-table th,
.price-table td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.price-table th {
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent-soft) 45%, #ffffff) 0%,
    color-mix(in srgb, var(--accent) 18%, #ffffff) 100%
  );
  position: sticky;
  top: 0;
  z-index: 1;
}

.price-table tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.price-table tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.price-table tbody tr:last-child td {
  border-bottom: none;
}

.price-table td:last-child {
  font-weight: 600;
  color: color-mix(in srgb, var(--text) 85%, var(--accent));
  white-space: nowrap;
}

.price-note {
  margin: 1.25rem auto 0;
  max-width: 42rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

.price-note--lead {
  margin-top: 0;
  margin-bottom: 1.6rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.price-block {
  margin-top: 1.25rem;
  padding: clamp(0.8rem, 1.8vw, 1rem);
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent) 6%, var(--surface)) 0%,
    var(--surface) 100%
  );
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.05);
}

.price-block:first-of-type {
  margin-top: 0;
}

.price-section-title {
  margin: 0 0 0.8rem;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.52rem;
}

.price-section-title::before {
  content: "";
  width: 0.55rem;
  height: 1.2rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent) 100%);
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(3rem, 8vw, 5rem) 0;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-content h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
  letter-spacing: -0.02em;
}

.hero-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  font-size: 1.1rem;
  margin-top: 1rem;
  margin-bottom: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-subtitle .hero-subtitle-accent {
  color: var(--accent-soft);
  font-weight: 600;
}

.hero-lead {
  margin: 1.25rem 0 0;
}

.hero-phone {
  color: var(--accent-soft);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.hero-phone:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.hero-badges {
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 900px;
}

.badge {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(192, 213, 44, 0.4);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  box-shadow: none;
}

/* Главная — слегка уменьшенные шрифты и отступы (высота как у всех hero) */
.home-page .hero-content {
  padding: clamp(2.85rem, 7.5vw, 4.5rem) 0;
  max-width: 50rem;
}

.home-page .hero-content h1 {
  font-size: clamp(1.92rem, 4.2vw, 3.05rem);
}

.home-page .hero-kicker {
  font-size: 0.72rem;
  margin: 0 0 0.65rem;
}

.home-page .hero-subtitle {
  font-size: 1.05rem;
  margin-top: 0.85rem;
}

.home-page .hero-lead-text {
  font-size: clamp(0.9rem, 1.9vw, 1.03rem);
  max-width: 37rem;
}

.home-page .hero-lead-text__line + .hero-lead-text__line {
  margin-top: 0.35em;
}

.home-page .hero-lead {
  margin: 1.1rem 0 0;
}

.home-page .hero-phone {
  font-size: clamp(1.08rem, 2.3vw, 1.4rem);
}

.home-page .hero-actions {
  margin-top: 18px;
  gap: 11px;
}

.home-page .hero-actions .btn {
  padding: 12px 24px;
  font-size: 0.92rem;
}

.home-page .hero-badges {
  margin: 18px auto 0;
  gap: 11px;
  max-width: 820px;
}

.home-page .hero-badges .badge {
  padding: 10px 12px;
  font-size: 0.86rem;
}

/* Карусель «Наши услуги»: те же относительные размеры, что у hero на главной */
.home-page .service-selector__title {
  font-size: clamp(1.75rem, 3.5vw, 2.55rem);
  line-height: 1.12;
}

.home-page .service-selector__excerpt {
  font-size: clamp(0.9rem, 1.9vw, 1.03rem);
  line-height: 1.55;
}

.home-page .service-selector__more.btn {
  padding: 12px 24px;
  font-size: 0.92rem;
}

/* Sections — чередование белого и светло-серого как на лендинге-референсе */
.section {
  padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}

.section--surface {
  background: #ffffff;
}

.section--muted {
  background: var(--light-accent);
}

.section-title {
  margin: 0 0 clamp(1.5rem, 3vw, 2rem);
  text-align: center;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-title--sm {
  font-size: 1.4rem;
}

.section-dark,
.dark {
  background: linear-gradient(180deg, var(--section-dark-1) 0%, var(--section-dark-2) 100%);
  color: #f5f5f4;
}

.section-dark .muted,
.section-dark p {
  color: rgba(245, 245, 244, 0.92);
}

/* Grid / Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.35rem;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.04);
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
}

/* Карточка услуги «Розетки» + иллюстрация под ней */
.service-card-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.service-card-stack__photo {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.06);
  background: var(--surface);
}

.service-card-stack__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  object-position: center 38%;
}

.section-dark .card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.section-dark .card p {
  color: rgba(245, 245, 244, 0.9);
}

/* FAQ */
.faq details {
  text-align: left;
}

.faq summary {
  cursor: pointer;
  font-weight: 850;
}

.faq p {
  margin: 12px 0 0;
  color: var(--muted);
}

.section-dark .faq p {
  color: rgba(245, 245, 244, 0.9);
}

/* CTA helpers */
.cta {
  text-align: center;
}

.cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.cta p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.footer {
  background: linear-gradient(180deg, #141414 0%, var(--footer-bg) 100%);
  color: #e5e5e5;
  padding: 34px 0;
  border-top: 3px solid rgba(192, 213, 44, 0.45);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-nav a {
  color: #f5f5f4;
  text-decoration: none;
  font-weight: 750;
  padding: 6px 10px;
  border-radius: 12px;
}

@media (max-width: 640px) {
  .footer-nav {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    align-items: stretch;
  }

  .footer-nav a {
    padding: 14px 12px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 1rem;
    font-weight: 650;
  }

  .footer-nav a:first-of-type {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .footer-nav a:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
}

.footer-nav a:hover {
  background: rgba(192, 213, 44, 0.2);
  color: #ffffff;
}

.footer-link {
  color: var(--accent-soft);
  text-decoration: none;
  font-weight: 800;
}

/* Contact */
.contact-map-section {
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.contact-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: stretch;
}

.contact-map-frame-wrap {
  min-width: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
  min-height: min(360px, 55vw);
}

.contact-map-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: min(360px, 55vw);
  border: 0;
}

/* Видео «как добраться» — страница магазина */
.shop-route-video-wrap {
  margin-top: clamp(1.5rem, 4vw, 2.35rem);
  max-width: min(560px, 100%);
  margin-left: auto;
  margin-right: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #0f0f0f;
}

@media (min-width: 901px) {
  .shop-route-video-wrap {
    margin-right: calc((100vw - min(1400px, 100vw)) / -2 - clamp(6px, 1.4vw, 14px));
  }
}

.shop-route-video {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.shop-info-card {
  max-width: 40rem;
  margin: 0.35rem auto 0;
  padding: clamp(1.2rem, 3vw, 1.65rem) clamp(1.15rem, 3vw, 1.75rem);
  text-align: left;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  background:
    radial-gradient(ellipse 95% 85% at 0% 0%, rgba(192, 213, 44, 0.16), transparent 58%),
    linear-gradient(168deg, #ffffff 0%, #f8faf4 100%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07);
}

.shop-info-card__kicker {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 45%, var(--muted));
}

.shop-info-card__address {
  margin: 0 0 0.85rem;
  font-size: clamp(1.02rem, 2.15vw, 1.18rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  max-width: 36rem;
}

.shop-info-card__note {
  margin: 0 0 1.15rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, var(--accent));
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--muted);
}

.shop-info-card__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.1rem;
}

.shop-info-card__cta-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.shop-info-card__phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: clamp(1rem, 2.3vw, 1.1rem);
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  color: var(--primary-contrast);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, rgba(0, 0, 0, 0.18));
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.35) inset,
    0 8px 22px rgba(192, 213, 44, 0.38);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    filter 140ms ease;
}

.shop-info-card__phone:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow:
    0 2px 0 rgba(255, 255, 255, 0.4) inset,
    0 12px 28px rgba(192, 213, 44, 0.45);
}

.shop-info-card__phone:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, #111);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .shop-info-card__cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .shop-info-card__phone {
    width: 100%;
    max-width: 18rem;
  }
}

.shop-gallery-section {
  padding-top: clamp(1.4rem, 3.2vw, 2.2rem);
}

.shop-gallery-section .container {
  padding: clamp(1rem, 2.6vw, 1.6rem);
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  background:
    radial-gradient(ellipse 120% 90% at 15% 0%, rgba(192, 213, 44, 0.18), transparent 52%),
    linear-gradient(165deg, #ffffff 0%, #f7f8f2 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.shop-gallery-lead {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.shop-gallery-grid {
  margin-top: clamp(1rem, 2.5vw, 1.6rem);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(0.9rem, 2.2vw, 1.35rem);
}

.shop-gallery-card {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-gallery-card:nth-child(1) {
  grid-column: 1 / span 8;
  grid-row: 1 / span 2;
}

.shop-gallery-card:nth-child(2) {
  grid-column: 9 / span 4;
  grid-row: 1 / span 1;
}

.shop-gallery-card:nth-child(3) {
  grid-column: 9 / span 4;
  grid-row: 2 / span 1;
}

.shop-gallery-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
}

.shop-gallery-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.shop-gallery-card:hover img {
  transform: scale(1.04);
}

.shop-gallery-card:nth-child(1) img {
  aspect-ratio: 16 / 11;
}

.shop-gallery-card:nth-child(2) img,
.shop-gallery-card:nth-child(3) img {
  aspect-ratio: 4 / 2.45;
}

.shop-gallery-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.85rem 0.9rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0) 0%, rgba(10, 10, 10, 0.78) 72%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.contact-map-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.contact-map-heading {
  text-align: left;
  margin-bottom: 0.75rem;
}

.contact-map-lead {
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--muted);
}

.contact-map-list {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-map-list__link {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 100%;
}

.contact-map-list__link:hover {
  color: var(--primary-hover);
}

.contact-map-list__icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--primary);
  opacity: 0.9;
}

.contact-map-actions {
  margin-top: auto;
}

@media (max-width: 900px) {
  .shop-gallery-section .container {
    border-radius: 14px;
    padding: 0.85rem;
  }

  .contact-map-layout {
    grid-template-columns: 1fr;
  }

  .shop-gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .shop-gallery-card:nth-child(1),
  .shop-gallery-card:nth-child(2),
  .shop-gallery-card:nth-child(3) {
    grid-column: auto;
    grid-row: auto;
  }

  .shop-gallery-card:nth-child(1) img,
  .shop-gallery-card:nth-child(2) img,
  .shop-gallery-card:nth-child(3) img {
    aspect-ratio: 4 / 3;
  }

  .contact-map-info {
    order: -1;
  }

  .contact-map-heading {
    text-align: center;
  }

  .contact-map-lead {
    text-align: center;
  }

  .contact-map-list {
    align-items: center;
  }

  .contact-map-list__link {
    text-align: left;
  }

  .contact-map-actions {
    display: flex;
    justify-content: center;
  }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

/* Иначе колонка сетки не сужается — подписи полей шире, чем сами input */
.contact-grid > .card {
  min-width: 0;
}

.contact-line {
  margin: 8px 0;
  font-weight: 700;
}

.contact-phone-list {
  margin: 0 0 12px;
  padding-left: 1.15rem;
  font-weight: 600;
  line-height: 1.55;
}

.contact-phone-list li {
  margin: 0.65em 0;
}

.contact-phone-list .contact-link {
  font-weight: 800;
}

.contact-phone-numbers {
  margin: 0;
  font-weight: 600;
}

.contact-phone-desc {
  margin: 0.35em 0 0;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.45;
}

.contact-phone-sep {
  font-weight: 600;
  color: var(--muted);
}

.contact-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
}

.contact-muted {
  color: var(--muted);
}

.form {
  display: grid;
  gap: 14px;
  min-width: 0;
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  text-align: left;
  min-width: 0;
}

.form-row > * {
  min-width: 0;
}

.form label {
  display: block;
  font-weight: 800;
  max-width: 100%;
  overflow-wrap: break-word;
}

.form input,
.form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  font-size: 14px;
  font-family: inherit;
}

.form input:focus,
.form textarea:focus {
  outline: 2px solid rgba(192, 213, 44, 0.65);
  outline-offset: 1px;
  border-color: rgba(192, 213, 44, 0.55);
}

.form textarea {
  resize: vertical;
}

.form-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.form-messengers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}


/* Mobile */
@media (max-width: 860px) {
  /* Запас до подстановки --header-measured из js/script.js (реальная высота .header) */
  :root {
    --header-mobile-fallback: 292px;
  }

  html {
    background-color: #ffffff;
    scroll-padding-top: var(--header-measured, var(--header-mobile-fallback));
    overscroll-behavior-y: auto;
    /* Плавный скролл по якорям на десктопе; на телефоне мешает инерции и даёт рывки */
    scroll-behavior: auto;
    height: 100%;
  }

  body {
    background: #ffffff;
    padding-top: 0;
    padding-bottom: calc(var(--client-quick-bar-stack) + env(safe-area-inset-bottom, 0px));
    min-height: 100%;
    min-height: -webkit-fill-available;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
    touch-action: manipulation;
  }

  /*
   * Отступ под фикс. шапку — только на первой секции .hero.
   * Раньше padding на main давал «белую щель»: фон body белый, тёмный градиент только у .hero.
   */
  main#main {
    padding-top: 0;
  }

  main#main > section.hero:first-child {
    padding-top: var(--header-measured, var(--header-mobile-fallback));
  }

  /* Прокрутка вниз на телефоне: только логотип + бургер + «Позвонить» */
  html.mobile-strip-retracted .header-mobile-strip {
    display: none !important;
  }

  /* backdrop-filter сильно нагружает композитинг в iOS Chrome/Safari */
  .header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: #ffffff;
  }

  .hero-badges {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Меню позиционируем относительно .container, а не фиксированного top: 70px */
  .header .container {
    position: relative;
  }

  .header-mobile-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px 6px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 6px max(12px, env(safe-area-inset-left, 0px)) 10px max(12px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .header-mobile-strip a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px 4px;
    min-height: 40px;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    text-decoration: none;
    color: #111111;
    background: var(--light-accent);
    border: 1px solid var(--border);
    border-radius: 8px;
    line-height: 1.2;
    word-break: break-word;
    hyphens: auto;
    -webkit-tap-highlight-color: transparent;
  }

  .header-mobile-strip a:active {
    background: rgba(192, 213, 44, 0.22);
    color: #111111;
  }

  .header-mobile-strip a.active {
    background: rgba(192, 213, 44, 0.4);
    border-color: rgba(170, 184, 37, 0.85);
    color: #111111;
    font-weight: 750;
  }

  .header-content {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto auto;
    align-items: center;
    column-gap: 6px;
    row-gap: 0;
    padding: 8px 0 8px;
  }

  .logo {
    min-width: 0;
    max-width: 100%;
    justify-self: start;
  }

  .nav-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    justify-self: end;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 11px;
  }

  /* Только иконка — привычный паттерн, больше места под логотип и «Позвонить» */
  .nav-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .nav-toggle-icon {
    margin-right: 0;
  }

  /* Как .nav-toggle: квадрат 44px, та же рамка/фон; вместо текста — иконка телефона */
  .header .header-cta.btn {
    justify-self: end;
    flex-shrink: 0;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
    margin-inline-end: 8px;
    gap: 0;
    font-size: 0;
    line-height: 0;
    letter-spacing: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-indent: -9999px;
    color: transparent;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .header .header-cta.btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--border);
    color: transparent;
  }

  .header .header-cta.btn:active {
    background: rgba(0, 0, 0, 0.05);
  }

  .header .header-cta.btn::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: #1a1a1a;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
  }

  .header-cta {
    padding: 0 14px;
    font-size: 0.8125rem;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    margin-top: 8px;
    margin-left: 0;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    max-height: min(72vh, 28rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .nav a {
    padding: 12px 16px;
    font-size: 1rem;
    min-height: 48px;
    justify-content: flex-start;
    white-space: normal;
    line-height: 1.35;
    width: 100%;
    box-sizing: border-box;
  }

  .nav.is-open {
    display: flex;
  }

  .logo-img {
    height: auto;
    max-height: 128px;
    width: auto;
    max-width: min(540px, 99vw);
    object-position: left center;
  }

  /* iOS Safari: при font-size < 16px в полях включается зум — выглядит как «поломка» */
  .form input,
  .form textarea {
    font-size: 16px;
  }

  .calc-qty-input,
  .panel-qty-input,
  .panel-device-model,
  .panel-row select {
    font-size: 16px;
  }

  .price-bot-input {
    font-size: 16px;
  }

  .hero {
    min-height: var(--hero-min-height-mobile);
  }

  .hero-content {
    padding: clamp(2rem, 6vw, 3rem) 0;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    font-size: 0.92rem;
  }

  .section {
    padding: clamp(2.4rem, 6.5vw, 3.2rem) 0;
  }

  .works-showcase {
    grid-template-columns: 1fr;
  }

  .container {
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }

  /* Калькулятор: на телефоне — карточки по строкам, кол-во всегда в зоне экрана без свайпа */
  .calc-wrap {
    min-width: 0;
    max-width: 100%;
  }

  .calc-lead,
  .calc-summary-lead,
  .calc-summary-bar__total,
  .calc-footnote {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    word-break: break-word;
  }

  .calc-table-wrap {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    -webkit-overflow-scrolling: touch;
  }

  .calc-table {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: 0.88rem;
    border-collapse: separate;
    border-spacing: 0;
    box-sizing: border-box;
  }

  .calc-table thead {
    display: none;
  }

  .calc-table tbody {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .calc-table tbody tr {
    display: grid;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr) minmax(0, 42%);
    column-gap: 12px;
    row-gap: 0.4rem;
    align-items: start;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
  }

  .calc-table tbody tr:last-child {
    border-bottom: none;
  }

  .calc-table tbody .calc-td-name {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    border-bottom: none;
    font-weight: 600;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    line-height: 1.45;
  }

  .calc-table tbody .calc-td-rate {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    border-bottom: none;
    white-space: normal;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
  }

  .calc-table tbody .calc-td-qty {
    grid-column: 1;
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    border-bottom: none;
    align-self: stretch;
  }

  .calc-table tbody .calc-td-qty::before {
    content: "Кол-во";
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 0.35rem;
  }

  .calc-table tbody .calc-td-line {
    grid-column: 2;
    display: block;
    width: auto;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    border-bottom: none;
    text-align: right;
    white-space: normal;
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.35;
    align-self: center;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .calc-qty-input {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: var(--site-control-min-height);
    padding: var(--site-control-pad-y) var(--site-control-pad-x);
    text-align: center;
    box-sizing: border-box;
    touch-action: manipulation;
  }

  .calc-root {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .calc-summary-bar {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .page-calculator .calc-toolbar .btn {
    width: 100%;
    max-width: 22rem;
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .calc-summary-bar {
    margin-left: 0;
    margin-right: 0;
  }

  .price-block {
    padding: 0.65rem;
  }

  .panel-builder-wrap .panel-builder-form > .panel-fieldset.panel-step-card,
  .panel-builder-wrap .panel-builder-preview {
    padding: 0.9rem 0.85rem;
  }
}

@media (max-width: 480px) {
  .price-table {
    min-width: 100%;
    font-size: 0.8rem;
  }

  .calc-table {
    font-size: 0.82rem;
  }

  .price-table th,
  .price-table td {
    padding: 0.45rem 0.35rem;
    word-break: break-word;
  }

  .price-table td:last-child {
    white-space: normal;
  }

  .calc-table tbody .calc-td-rate {
    font-size: 0.8rem;
  }

  .panel-row label {
    min-width: 0;
  }

  .panel-row select {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 560px) {
  :root {
    --header-mobile-fallback: 308px;
    --client-quick-bar-stack: 90px;
  }

  .client-quick-bar {
    padding-left: max(10px, env(safe-area-inset-left, 0px));
    padding-right: max(10px, env(safe-area-inset-right, 0px));
  }

  .client-quick-bar__link {
    min-height: 36px;
    font-size: 0.65rem;
    padding: 5px 4px;
  }

  .header-mobile-strip {
    gap: 5px;
    padding: 5px max(10px, env(safe-area-inset-left, 0px)) 9px max(10px, env(safe-area-inset-right, 0px));
  }

  .header-mobile-strip a {
    min-height: 38px;
    font-size: 0.65rem;
    padding: 5px 3px;
  }

  .grid.features,
  .grid.faq,
  .services-page .services-steps {
    grid-template-columns: 1fr;
  }

  .home-tools-grid {
    grid-template-columns: 1fr;
  }

  .logo-img {
    max-height: 118px;
    max-width: min(520px, 99vw);
  }

  .header-content {
    padding: 6px 0 8px;
    column-gap: 6px;
  }

  .nav {
    padding: 10px;
  }

  .nav a {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .hero-subtitle {
    font-size: 0.96rem;
    line-height: 1.5;
  }

  .btn {
    min-height: 44px;
  }

  .panel-3d-mount {
    height: min(320px, 62vw);
    min-height: 210px;
  }
}

/* Калькулятор сметы */
.calc-wrap {
  max-width: 900px;
  margin: 0 auto;
}

.calc-lead {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

.panel-equipment-notice {
  margin: -0.35rem 0 1.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  text-align: center;
  color: var(--text);
  /* тот же оттенок, что у логотипа (--accent), очень разбелённый */
  background: #f1f6d4;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface));
  border-radius: var(--radius-md);
  border: 1px solid #e2e9b8;
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
}

.panel-equipment-notice a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.calc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.calc-summary-bar {
  position: sticky;
  bottom: calc(var(--client-quick-bar-stack) + env(safe-area-inset-bottom, 0px));
  z-index: 8;
  /* На телефоне без отрицательных полей — иначе блок визуально уезжает влево (глобальное правило шло после @media и перебивало margin: 0) */
  margin: 1.5rem 0 0;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 861px) {
  .calc-summary-bar {
    margin-left: -12px;
    margin-right: -12px;
  }
}

.calc-summary-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.calc-summary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.calc-summary-actions .btn {
  min-width: 0;
}

.calc-summary-call {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.calc-summary-call:hover {
  color: var(--primary-hover);
}

.calc-summary-bar__total {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.calc-summary-bar__total span {
  color: var(--primary);
}

.calc-section {
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.calc-section-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  background: var(--light-accent);
}

.calc-section-summary::-webkit-details-marker {
  display: none;
}

.calc-section-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 0.15s ease;
}

.calc-section[open] .calc-section-summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.calc-section-title-text {
  text-align: left;
  font-size: 1.02rem;
}

.calc-section-badge {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  margin-right: 4px;
}

/* Мобильный summary калькулятора: сетка после базового flex, иначе заголовки вкладок обрезались */
@media (max-width: 860px) {
  .calc-section-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 12px;
    row-gap: 6px;
    justify-content: stretch;
  }

  .calc-section-title-text {
    grid-column: 1;
    grid-row: 1;
    display: block;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    word-break: normal;
    hyphens: auto;
    line-height: 1.4;
  }

  .calc-section-badge:empty {
    display: none;
  }

  .calc-section-badge {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    margin-right: 0;
    text-align: left;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }

  .calc-section-summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
    margin-left: 0;
    margin-top: 0;
  }

  .calc-section[open] .calc-section-summary::after {
    margin-top: 0;
  }
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.calc-table th,
.calc-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.calc-table th {
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(234, 233, 234, 0.5);
}

.calc-table tbody tr:last-child td {
  border-bottom: none;
}

.calc-td-name {
  color: var(--text);
}

.calc-td-rate {
  color: var(--muted);
  font-size: 0.88rem;
}

.calc-qty-input {
  width: 100%;
  min-height: var(--site-control-min-height);
  padding: var(--site-control-pad-y) var(--site-control-pad-x);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--site-control-font-size);
  line-height: 1.25;
  box-sizing: border-box;
}

.calc-td-line {
  font-weight: 600;
  text-align: right;
}

.calc-table-wrap {
  -webkit-overflow-scrolling: touch;
}

/* Широкий экран: таблица как таблица; на телефоне карточный вид задаётся выше в @media (max-width: 860px) */
@media (min-width: 861px) {
  .calc-table {
    min-width: 560px;
  }

  .calc-td-name {
    max-width: 320px;
  }

  .calc-td-rate {
    white-space: nowrap;
  }

  .calc-td-qty {
    width: 5.5rem;
  }

  .calc-qty-input {
    max-width: 5.5rem;
  }

  .calc-td-line {
    white-space: nowrap;
  }

  .calc-table-wrap {
    overflow-x: auto;
  }
}

.calc-footnote {
  margin-top: 1.5rem !important;
}

/* Калькулятор: компактный hero, секции и таблицы (calculator.html) */
.page-calculator .hero--prices .hero-content {
  padding: clamp(1.35rem, 3.8vw, 2rem) 0 clamp(1.2rem, 3.2vw, 1.75rem);
}

.page-calculator main > .section {
  padding: clamp(2rem, 4.5vw, 3rem) 0;
}

.page-calculator .calc-wrap .section-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
}

.page-calculator .calc-lead {
  margin: 0 0 0.65rem;
  font-size: 0.87rem;
  line-height: 1.42;
}

.page-calculator .calc-toolbar {
  margin-bottom: 0.65rem;
}

.page-calculator .calc-section {
  margin-bottom: 7px;
}

.page-calculator .calc-section-summary {
  padding: 9px 12px;
}

.page-calculator .calc-section-title-text {
  font-size: 0.9rem;
}

.page-calculator .calc-table {
  font-size: 0.81rem;
}

.page-calculator .calc-table th,
.page-calculator .calc-table td {
  padding: 0.38rem 0.5rem;
}

.page-calculator .calc-table th {
  font-size: 0.68rem;
  padding: 0.3rem 0.5rem;
}

.page-calculator .calc-td-rate {
  font-size: 0.8rem;
}

.page-calculator .calc-summary-bar {
  margin-top: 0.85rem;
  padding: 10px 12px;
  gap: 8px 12px;
}

.page-calculator .calc-summary-lead {
  font-size: 0.8rem;
  line-height: 1.38;
}

.page-calculator .calc-summary-bar__total {
  font-size: 0.95rem;
}

.page-calculator .calc-summary-actions {
  gap: 8px;
}

.page-calculator .calc-summary-actions .btn {
  padding: 9px 14px;
  font-size: 0.86rem;
}

.page-calculator .calc-footnote {
  margin-top: 0.85rem !important;
  font-size: 0.85rem;
}

/* Калькулятор: блок итога на телефоне строго по центру (перекрывает padding .page-calculator выше) */
@media (max-width: 860px) {
  .calc-summary-bar {
    text-align: center;
    align-items: center;
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }

  .page-calculator .calc-summary-bar {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }

  .calc-summary-lead {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .calc-summary-bar__total {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .calc-summary-actions {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  .calc-summary-call {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .page-panel-builder .panel-builder-wrap .panel-summary.calc-summary-bar {
    text-align: center;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
  }
}

.page-calculator .home-brands-section {
  padding: clamp(1.5rem, 3.5vw, 2.25rem) 0;
}

.page-calculator .home-brands-title {
  margin-bottom: 0.75rem;
}

.page-calculator .cta h2 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
}

.page-calculator .cta p {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
}

/* Контакты: компактная вёрстка (contact.html) */
.page-contact .hero--contact .hero-content {
  padding: clamp(1.1rem, 3.1vw, 1.65rem) 0 clamp(0.95rem, 2.6vw, 1.35rem);
}

.page-contact main > .section {
  padding: clamp(1.75rem, 3.8vw, 2.5rem) 0;
}

.page-contact .contact-grid {
  gap: 12px;
}

.page-contact .contact-grid > .card {
  padding: 1.05rem 1.1rem;
}

.page-contact .contact-grid .section-title {
  margin: 0 0 0.5rem;
  text-align: left;
  font-size: clamp(1.08rem, 2.15vw, 1.26rem);
}

.page-contact .contact-line {
  margin: 2px 0 5px;
}

.page-contact .contact-phone-list {
  margin: 0 0 6px;
}

.page-contact .contact-phone-list li {
  margin: 0.4em 0;
}

.page-contact .contact-phone-desc {
  font-size: 0.82rem;
  margin: 0.25em 0 0;
  line-height: 1.4;
}

.page-contact .contact-muted {
  margin: 0.45rem 0 0.65rem;
  font-size: 0.84rem;
  line-height: 1.4;
}

.page-contact .contact-info > .btn {
  padding: 10px 16px;
  font-size: 0.87rem;
}

.page-contact .contact-form-card .form {
  gap: 9px;
}

.page-contact .contact-form-card .form-row {
  gap: 5px;
}

.page-contact .contact-form-card .form input,
.page-contact .contact-form-card .form textarea {
  padding: 9px 11px;
  font-size: 13px;
}

.page-contact .contact-form-card .form textarea {
  min-height: 6.25rem;
}

.page-contact .form-messengers {
  gap: 7px;
  margin-top: 0;
}

.page-contact .form-messengers .btn-messenger {
  min-height: 42px;
  padding: 10px 12px;
  font-size: 0.85rem;
}

.page-contact .form-note {
  font-size: 0.76rem;
  line-height: 1.36;
  margin-top: 2px;
}

.page-contact .home-brands-section {
  padding: clamp(1.3rem, 3vw, 1.85rem) 0;
}

.page-contact .home-brands-title {
  margin-bottom: 0.55rem;
  font-size: clamp(1.15rem, 2.35vw, 1.5rem);
}

.page-contact .home-brands-grid {
  gap: clamp(0.42rem, 1.8vw, 0.8rem);
}

.page-contact .home-brands-note {
  margin-top: 0.58rem;
  font-size: 0.76rem;
  line-height: 1.42;
}

/* Наши работы: компактный hero и страница (works.html) */
.page-works .hero--works .hero-content {
  padding: clamp(1.35rem, 3.5vw, 1.95rem) 0 clamp(1.15rem, 2.9vw, 1.55rem);
}

.page-works main > .section {
  padding: clamp(2.05rem, 4.1vw, 2.85rem) 0;
}

.page-works .section-title {
  margin-bottom: clamp(1rem, 2.25vw, 1.45rem);
  font-size: clamp(1.45rem, 2.9vw, 1.9rem);
}

.page-works .works-showcase {
  gap: 15px;
}

.page-works .works-card {
  padding: 1.28rem 1.22rem;
}

.page-works .works-card h3 {
  font-size: 1.08rem;
  margin: 0.45rem 0 0.5rem;
}

.page-works .works-card p {
  font-size: 0.92rem;
  line-height: 1.54;
  margin: 0.42rem 0;
}

.page-works .works-panel-cta {
  margin-top: 0.65rem;
  font-size: 0.91rem;
}

.page-works .home-brands-section,
.services-page .home-brands-section {
  padding: clamp(1.55rem, 3.25vw, 2.1rem) 0;
}

.page-works .home-brands-title,
.services-page .home-brands-title {
  margin-bottom: 0.65rem;
  font-size: clamp(1.22rem, 2.5vw, 1.58rem);
}

.page-works .home-brands-grid,
.services-page .home-brands-grid {
  gap: clamp(0.5rem, 2vw, 0.95rem);
}

.page-works .home-brands-note,
.services-page .home-brands-note {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  line-height: 1.48;
}

.page-works .cta {
  padding: 0;
}

.page-works .cta h2 {
  margin-bottom: 0.42rem;
  font-size: clamp(1.22rem, 2.5vw, 1.58rem);
}

.page-works .cta p {
  margin: 0 0 0.72rem;
  font-size: 0.92rem;
  line-height: 1.48;
}

.page-works .cta .btn {
  padding: 11px 20px;
  font-size: 0.89rem;
}

/* Магазин: компактная типографика hero (shop.html) */
.page-shop .hero--about .hero-content {
  padding: clamp(0.95rem, 2.8vw, 1.4rem) 0 clamp(0.85rem, 2.4vw, 1.2rem);
  max-width: min(42rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

.page-shop .hero--about .hero-subtitle {
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

/* Сборка щита: компактная вёрстка (panel-builder.html) */
.page-panel-builder .hero--prices .hero-content {
  padding: clamp(1.3rem, 3.6vw, 1.9rem) 0 clamp(1.1rem, 3vw, 1.6rem);
}

/* Масштаб hero как у главного блока на главной (заголовок, подводка, кнопки) */
.page-prices .hero--prices .hero-content h1,
.page-works .hero--works .hero-content h1,
.page-calculator .hero--prices .hero-content h1,
.page-contact .hero--contact .hero-content h1,
.page-shop .hero--about .hero-content h1,
.page-panel-builder .hero--prices .hero-content h1 {
  font-size: clamp(1.92rem, 4.2vw, 3.05rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.page-prices .hero--prices .hero-subtitle,
.page-works .hero--works .hero-subtitle,
.page-calculator .hero--prices .hero-subtitle,
.page-contact .hero--contact .hero-subtitle,
.page-shop .hero--about .hero-subtitle,
.page-panel-builder .hero--prices .hero-subtitle {
  font-size: clamp(0.9rem, 1.9vw, 1.03rem);
  font-weight: 500;
  line-height: 1.55;
  margin-top: 0.85rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.page-prices .hero--prices .hero-actions,
.page-works .hero--works .hero-actions,
.page-calculator .hero--prices .hero-actions,
.page-contact .hero--contact .hero-actions,
.page-shop .hero--about .hero-actions,
.page-panel-builder .hero--prices .hero-actions {
  margin-top: 18px;
}

.page-prices .hero--prices .hero-actions .btn,
.page-works .hero--works .hero-actions .btn,
.page-calculator .hero--prices .hero-actions .btn,
.page-contact .hero--contact .hero-actions .btn,
.page-shop .hero--about .hero-actions .btn,
.page-panel-builder .hero--prices .hero-actions .btn {
  padding: 12px 24px;
  font-size: 0.92rem;
}

.page-panel-builder main > .section {
  padding: clamp(1.75rem, 4vw, 2.65rem) 0;
}

.page-panel-builder .panel-examples-section .section-title {
  margin-bottom: 0.5rem;
  font-size: clamp(1.32rem, 2.55vw, 1.82rem);
}

.page-panel-builder .panel-examples-section .panel-examples-lead {
  margin-bottom: 0.8rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.87rem;
}

.page-panel-builder .panel-examples-grid {
  gap: clamp(0.85rem, 2.2vw, 1.35rem);
}

.page-panel-builder .panel-examples-card img {
  min-height: 9rem;
}

.page-panel-builder .panel-examples-card figcaption {
  padding: 0.68rem 0.85rem 0.82rem;
  font-size: 0.81rem;
}

.page-panel-builder .panel-examples-gallery-link.panel-examples-more {
  margin-top: 0.8rem;
}

.page-panel-builder .panel-builder-wrap .section-title {
  margin: 0 0 0.38rem;
  font-size: clamp(1.28rem, 2.5vw, 1.75rem);
}

.page-panel-builder .panel-builder-wrap > .calc-lead {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.page-panel-builder .panel-builder-wrap .panel-equipment-notice {
  margin: 0 0 0.7rem;
  padding: 0.52rem 0.72rem;
  font-size: 0.82rem;
  line-height: 1.42;
}

.page-panel-builder .panel-builder-wrap {
  --panel-box-pad-y: 0.82rem;
  --panel-box-pad-x: 0.95rem;
}

.page-panel-builder .panel-builder-grid {
  gap: 0.95rem;
  margin-bottom: 0.95rem;
}

.page-panel-builder .panel-builder-form {
  gap: 0.72rem;
}

.page-panel-builder .panel-builder-wrap .panel-step-card--housing {
  max-height: 25rem;
}

.page-panel-builder .panel-builder-wrap .panel-step-card--devices {
  max-height: min(58vh, 31rem);
}

.page-panel-builder .panel-preview-title {
  font-size: 0.92rem;
  margin: 0 0 6px;
}

.page-panel-builder .panel-3d-lead {
  margin: 0 0 6px;
  font-size: 0.78rem;
}

.page-panel-builder .panel-3d-mount {
  height: min(300px, 48vw);
  min-height: 195px;
}

.page-panel-builder .panel-preview-title--secondary {
  margin-top: 0.75rem;
  padding-top: 0.55rem;
}

.page-panel-builder .panel-din-rails-stack {
  gap: 8px;
}

.page-panel-builder .panel-preview-meta,
.page-panel-builder .panel-din-drag-hint {
  margin-bottom: 6px;
  font-size: 0.75rem;
}

.page-panel-builder .panel-preview-note {
  margin-top: 6px;
  font-size: 0.72rem;
}

.page-panel-builder .panel-devices-hint {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  line-height: 1.42;
}

.page-panel-builder .panel-devices {
  gap: 7px;
}

.page-panel-builder .panel-line--device {
  gap: 6px 8px;
}

.page-panel-builder .panel-builder-wrap .panel-summary.calc-summary-bar {
  margin-top: 0.85rem;
  padding: 10px 12px;
  gap: 8px 12px;
}

.page-panel-builder .panel-builder-wrap .calc-summary-lead {
  font-size: 0.78rem;
  line-height: 1.35;
}

.page-panel-builder .panel-builder-wrap .calc-summary-bar__total {
  font-size: 0.93rem;
}

.page-panel-builder .panel-builder-wrap .calc-summary-actions {
  gap: 8px;
}

.page-panel-builder .panel-builder-wrap .calc-summary-actions .btn {
  padding: 9px 14px;
  font-size: 0.86rem;
}

.page-panel-builder .panel-builder-wrap .price-note.calc-footnote {
  margin-top: 0.75rem !important;
  font-size: 0.82rem;
}

.page-panel-builder .home-brands-section {
  padding: clamp(1.45rem, 3.2vw, 2.1rem) 0;
}

.page-panel-builder .home-brands-title {
  margin-bottom: 0.7rem;
}

.page-panel-builder .cta h2 {
  margin-bottom: 0.32rem;
  font-size: clamp(1.18rem, 2.4vw, 1.52rem);
}

.page-panel-builder .cta p {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
}

.panel-examples-section {
  background:
    radial-gradient(ellipse 78% 55% at 50% 0%, rgba(242, 196, 0, 0.14), transparent 60%),
    linear-gradient(180deg, #fffef8 0%, #fff9ef 55%, var(--surface) 100%);
}

.panel-examples-section .panel-examples-lead {
  max-width: 42rem;
  color: var(--text);
  display: block;
  margin: 0 auto 1.35rem;
  padding: 0.72rem 1rem;
  text-align: center;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--accent-soft) 22%, #ffffff) 0%,
    color-mix(in srgb, var(--accent) 18%, #f7f9f4) 100%
  );
  box-shadow: 0 6px 18px rgba(192, 213, 44, 0.18);
}

.panel-examples-grid {
  display: grid;
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.15rem, 2.8vw, 2rem);
  align-items: stretch;
}

.panel-examples-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--border));
  background: linear-gradient(165deg, #fffef6 0%, #fdf6e4 100%);
  box-shadow:
    0 1px 0 rgba(255, 252, 235, 0.9) inset,
    0 14px 32px rgba(242, 196, 0, 0.12);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.panel-examples-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 58%, var(--border));
  box-shadow:
    0 1px 0 rgba(255, 252, 235, 0.95) inset,
    0 20px 44px rgba(242, 196, 0, 0.2);
}

.panel-examples-card img {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 12rem;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center;
  background: linear-gradient(145deg, #f7efd9 0%, #ebe0c8 100%);
  padding: clamp(0.45rem, 1.4vw, 0.75rem);
}

.panel-examples-card figcaption {
  flex-shrink: 0;
  margin: 0;
  padding: 0.9rem 1rem 1.05rem;
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 600;
  text-align: center;
  color: #3a3428;
  background: linear-gradient(180deg, #fffef9 0%, #fff8ec 100%);
  border-top: 1px solid color-mix(in srgb, var(--primary) 38%, var(--border));
}

.panel-examples-more {
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

.panel-examples-gallery-link {
  text-align: center;
}

.panel-examples-more a {
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(101, 97, 92, 0.35);
}

.panel-examples-more a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

@media (max-width: 640px) {
  .panel-examples-grid {
    grid-template-columns: 1fr;
    max-width: min(100%, 24rem);
    margin-left: auto;
    margin-right: auto;
    gap: 1.1rem;
  }
}

@media (hover: none) {
  .panel-examples-card:hover {
    transform: none;
    border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
    box-shadow:
      0 1px 0 rgba(255, 252, 235, 0.9) inset,
      0 14px 32px rgba(242, 196, 0, 0.12);
  }
}

/* Щитовая галерея — works.html */
.works-card--panel-span {
  grid-column: 1 / -1;
}

.works-panel-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: -1.5rem -1.35rem 1rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  background: #1a1918;
}

.works-panel-gallery__cell {
  aspect-ratio: 1;
  overflow: hidden;
}

.works-panel-gallery__cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.works-panel-cta {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
}

.works-panel-cta a {
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(101, 97, 92, 0.35);
}

.works-panel-cta a:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

@media (max-width: 720px) {
  .works-panel-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Лайтбокс: клик по фото в галерее — просмотр крупно (js/script.js) */
.gallery-lightbox {
  border: none;
  padding: 0;
  margin: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100vh;
  background: transparent;
  box-sizing: border-box;
}

.gallery-lightbox:not([open]) {
  display: none !important;
}

.gallery-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.gallery-lightbox__inner {
  position: relative;
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  width: 100%;
  padding: max(0.5rem, env(safe-area-inset-top)) clamp(2.5rem, 5vw, 3.25rem)
    max(0.5rem, env(safe-area-inset-bottom)) clamp(2.5rem, 5vw, 3.25rem);
  margin: 0 max(0.25rem, env(safe-area-inset-right)) 0 max(0.25rem, env(safe-area-inset-left));
  box-sizing: border-box;
  /* Клики по «пустоте» вокруг снимка проходят к dialog — закрытие по тапу мимо фото */
  pointer-events: none;
}

.gallery-lightbox__inner .gallery-lightbox__img,
.gallery-lightbox__inner .gallery-lightbox__close,
.gallery-lightbox__inner .gallery-lightbox__nav {
  pointer-events: auto;
}

.gallery-lightbox__img {
  display: block;
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: background 0.2s ease;
}

.gallery-lightbox__nav svg {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
}

.gallery-lightbox__nav:hover,
.gallery-lightbox__nav:focus-visible {
  background: rgba(0, 0, 0, 0.75);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gallery-lightbox__nav[hidden] {
  display: none !important;
}

.gallery-lightbox__nav--prev {
  left: 0;
}

.gallery-lightbox__nav--next {
  right: 0;
}

.gallery-lightbox__close {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 3;
  border: 0;
  padding: 0.35rem 0.55rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 300;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 8px;
  cursor: pointer;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__close:focus-visible {
  background: rgba(0, 0, 0, 0.75);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.works-panel-gallery__cell img,
.home-works-showcase .works-card__media img,
.panel-examples-grid .panel-examples-card img,
.services-real-card__media img {
  cursor: zoom-in;
}

/* Конфигуратор электрощита (panel-builder.html) */
.panel-builder-wrap {
  max-width: 1100px;
  margin: 0 auto;
  --panel-box-pad-y: 1.15rem;
  --panel-box-pad-x: 1.25rem;
  --panel-box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.panel-builder-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 900px) {
  .panel-builder-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.panel-builder-form {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.panel-builder-wrap .panel-builder-form > .panel-fieldset.panel-step-card,
.panel-builder-wrap .panel-builder-preview {
  margin: 0;
  min-width: 0;
  padding: var(--panel-box-pad-y) var(--panel-box-pad-x);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--panel-box-shadow);
  box-sizing: border-box;
}

.panel-builder-wrap .panel-builder-form > .panel-fieldset.panel-step-card {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.panel-builder-wrap .panel-builder-form > .panel-step-card--housing {
  max-height: 30rem;
}

.panel-builder-wrap .panel-builder-form > .panel-step-card--devices {
  max-height: min(70vh, 36rem);
}

.panel-builder-wrap .panel-builder-form > .panel-step-card > .panel-legend {
  flex-shrink: 0;
}

.panel-fieldset {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.panel-legend {
  padding: 0 6px;
  font-weight: 700;
  font-size: 0.95rem;
}

.panel-radio-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.92rem;
  cursor: pointer;
}

.panel-radio-line input {
  margin-top: 4px;
}

.panel-internal {
  margin: 0.75rem 0 0 1.5rem;
  padding: 0.75rem 0.85rem;
  background: var(--light-accent);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-sizing: border-box;
}

.panel-housing-params {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0.85rem;
  background: var(--light-accent);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-sizing: border-box;
}

.panel-din-section {
  margin-top: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-sublegend {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.panel-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-row:last-child {
  margin-bottom: 0;
}

.panel-row label {
  min-width: 8rem;
  font-size: 0.88rem;
}

.panel-row select {
  flex: 1;
  min-width: 12rem;
  min-height: var(--site-control-min-height);
  padding: var(--site-control-pad-y) var(--site-control-pad-x);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--site-control-font-size);
  line-height: 1.25;
  box-sizing: border-box;
  background: var(--surface);
  color: var(--text);
}

.panel-devices-hint {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}

.panel-devices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-line {
  display: grid;
  grid-template-columns: 1fr minmax(4rem, 5.5rem);
  align-items: center;
  gap: 10px;
}

.panel-line--device {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(4rem, 5.25rem);
  gap: 8px 10px;
}

.panel-line label {
  font-size: 0.88rem;
}

.panel-device-model {
  min-width: 0;
  max-width: 100%;
  min-height: var(--site-control-min-height);
  padding: var(--site-control-pad-y) var(--site-control-pad-x);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--site-control-font-size);
  line-height: 1.25;
  box-sizing: border-box;
  background: var(--surface);
  color: var(--text);
}

.calc-qty-input:focus,
.calc-qty-input:focus-visible,
.panel-row select:focus,
.panel-row select:focus-visible,
.panel-device-model:focus,
.panel-device-model:focus-visible {
  outline: 2px solid rgba(192, 213, 44, 0.65);
  outline-offset: 1px;
  border-color: rgba(192, 213, 44, 0.55);
}

@media (max-width: 720px) {
  .panel-line--device {
    grid-template-columns: 1fr minmax(4rem, 5.25rem);
    grid-template-rows: auto auto;
  }

  .panel-line--device label {
    grid-column: 1 / -1;
  }

  .panel-line--device .panel-device-model {
    grid-column: 1 / 2;
  }

  .panel-line--device .panel-qty-input {
    grid-column: 2 / 3;
  }
}

.panel-toolbar {
  margin-top: 0.5rem;
}

.panel-preview-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.panel-preview-title--secondary {
  margin-top: 1.15rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.panel-3d-lead {
  margin: 0 0 10px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
}

.panel-3d-mount {
  width: 100%;
  height: min(420px, 56vw);
  min-height: 260px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.panel-3d-mount--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.1rem;
  height: auto;
  min-height: 140px;
}

.panel-3d-fallback {
  margin: 0;
  max-width: 26rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted, #5c5c5c);
  text-align: center;
}

.panel-preview-meta {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.panel-din-drag-hint {
  margin: 0 0 10px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}

body.panel-din-dragging {
  cursor: grabbing;
}

.panel-din-warn {
  margin: 0 0 10px;
  font-size: 0.84rem;
  color: #b42318;
  font-weight: 600;
}

.panel-din-rails-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-din-rail-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-din-rail-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.panel-din-rail-label span {
  color: var(--text);
}

.panel-din-rail--overflow .panel-din-rail {
  box-shadow: inset 0 0 0 2px rgba(180, 35, 24, 0.65);
}

.panel-rail-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.panel-row--rails {
  margin-bottom: 0;
}

.panel-din-section .panel-rail-hint {
  margin-top: 0.5rem;
}

.panel-builder-form > .panel-step-card .panel-devices {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  margin-right: -4px;
  -webkit-overflow-scrolling: touch;
}

.panel-din-rail {
  padding: 10px;
  background: #2d2b28;
  border-radius: var(--radius-md);
  border: 1px solid #1a1918;
  box-sizing: border-box;
}

.panel-din-grid {
  display: grid;
  gap: 3px;
  min-height: 52px;
}

.panel-din-block {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px 3px 4px;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--hero-2);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--accent) 100%);
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.panel-din-block-label {
  display: block;
  max-width: 100%;
  pointer-events: none;
}

.panel-din-block-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.38);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  flex-shrink: 0;
}

.panel-din-block-remove:hover {
  background: rgba(180, 35, 24, 0.95);
}

.panel-din-block-remove:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.panel-din-block-remove:active {
  transform: scale(0.94);
}

.panel-din-block:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.panel-din-block--dragging {
  opacity: 0.45;
  cursor: grabbing;
  position: relative;
  z-index: 2;
}

.panel-din-block:active:not(.panel-din-block--dragging) {
  cursor: grabbing;
}

.panel-din-block--selected {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.95),
    0 0 0 3px rgba(24, 24, 24, 0.9),
    0 0 0 5px var(--accent);
}

.panel-din-rest {
  min-height: 48px;
  background: repeating-linear-gradient(
    -45deg,
    #3d3a36,
    #3d3a36 4px,
    #353230 4px,
    #353230 8px
  );
  border-radius: 2px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.panel-preview-note {
  margin: 10px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.panel-builder-wrap .panel-summary.calc-summary-bar {
  margin: 1.25rem 0 0;
  padding: var(--panel-box-pad-y) var(--panel-box-pad-x);
  box-shadow: var(--panel-box-shadow);
  box-sizing: border-box;
}

/* О нас — история */
.about-story__body {
  max-width: 44rem;
  margin: 0 auto;
  text-align: left;
}

.about-story__body p {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text);
}

.about-story__body p:last-child {
  margin-bottom: 0;
}

.about-story__note {
  margin-top: 1.1rem !important;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-style: italic;
  color: var(--muted);
}

/* Быстрая панель для клиента (добавляется из js/script.js) */
.client-quick-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(0);
  transition: transform 0.22s ease;
}

.client-quick-bar.is-hidden {
  transform: translateY(calc(100% + env(safe-area-inset-bottom, 0px)));
}

.client-quick-bar__link {
  flex: 1 1 auto;
  min-width: 4.5rem;
  max-width: 10rem;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  background: var(--light-accent);
  border: 1px solid var(--border);
  transition: background 0.15s ease, color 0.15s ease;
}

.client-quick-bar__link:hover {
  background: var(--surface);
  color: var(--text);
}

.client-quick-bar__link--accent {
  background: var(--primary);
  color: var(--primary-contrast);
  border-color: transparent;
}

.client-quick-bar__link--accent:hover {
  background: var(--primary-hover);
  color: var(--primary-contrast);
}

/* Телефон: 2×2 как «чипы» в шапке (Услуги, Работы…) — компактнее по высоте */
@media (max-width: 860px) {
  :root {
    --client-quick-bar-stack: 94px;
  }

  .client-quick-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 6px;
    padding: 6px max(12px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px))
      max(12px, env(safe-area-inset-right, 0px));
    align-content: start;
    justify-items: stretch;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
  }

  .client-quick-bar__link {
    flex: initial;
    max-width: none;
    min-width: 0;
    min-height: 38px;
    padding: 6px 6px;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.2;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: break-word;
    hyphens: auto;
    -webkit-tap-highlight-color: transparent;
    color: #111111;
    background: var(--light-accent);
    border: 1px solid var(--border);
  }

  .client-quick-bar__link:hover {
    background: var(--surface);
    color: #111111;
  }

  .client-quick-bar__link--accent {
    background: var(--primary);
    color: var(--primary-contrast);
    border-color: transparent;
  }

  .client-quick-bar__link--accent:hover {
    background: var(--primary-hover);
    color: var(--primary-contrast);
  }

  /* Прайс: без гориз. скролла, колонки помещаются на экране */
  .price-table-wrap {
    overflow-x: hidden;
    margin-left: 0;
    margin-right: 0;
    border-radius: 12px;
  }

  .price-table {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    font-size: 0.78rem;
  }

  .price-table th,
  .price-table td {
    padding: 0.48rem 0.35rem;
    word-break: break-word;
    hyphens: auto;
    vertical-align: top;
  }

  .price-table th:first-child,
  .price-table td:first-child {
    width: 62%;
    padding-right: 0.25rem;
  }

  .price-table th:last-child,
  .price-table td:last-child {
    width: 38%;
    white-space: normal;
    text-align: right;
    font-weight: 600;
    padding-left: 0.25rem;
    line-height: 1.35;
  }

  .price-section-title {
    font-size: 1.02rem;
  }

  .price-block {
    padding: 0.6rem 0.5rem;
  }
}

/* «Наверх» — справа; «Помощь» (#priceBotRoot) — слева; общая высота bottom у обоих */
@media (max-width: 860px) {
  .scroll-top-fab {
    position: fixed;
    right: max(10px, env(safe-area-inset-right, 0px));
    left: auto;
    bottom: calc(var(--client-quick-bar-stack, 94px) + 10px + env(safe-area-inset-bottom, 0px));
    z-index: 28;
    width: 48px;
    height: 48px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--border) 85%, var(--text));
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, 10px, 0);
    transition:
      opacity 0.22s ease,
      transform 0.22s ease,
      visibility 0.22s ease;
  }

  .scroll-top-fab.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
  }

  .scroll-top-fab:active {
    background: var(--light-accent);
  }

  .scroll-top-fab:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
  }

  .scroll-top-fab svg {
    display: block;
    width: 22px;
    height: 22px;
  }

  .scroll-top-fab[hidden] {
    display: none !important;
  }

  body.no-quick-bar .scroll-top-fab {
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .scroll-top-fab {
    transition: none;
  }
}

/* Помощник по ценам (js/price-bot.js) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#priceBotRoot {
  position: fixed;
  right: 12px;
  bottom: calc(var(--client-quick-bar-stack, 68px) + 12px + env(safe-area-inset-bottom, 0px));
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  font-family: inherit;
}

#priceBotRoot > * {
  pointer-events: auto;
}

.price-bot-launcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  background: var(--hero-2);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.price-bot-launcher:hover {
  background: var(--hero-1);
  transform: translateY(-1px);
}

.price-bot-launcher__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-contrast);
  font-size: 1rem;
  font-weight: 700;
}

.price-bot-panel {
  width: min(380px, calc(100vw - 24px));
  max-height: min(520px, 85vh);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.price-bot-panel[hidden] {
  display: none !important;
}

.price-bot-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--light-accent);
  border-bottom: 1px solid var(--border);
}

.price-bot-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.price-bot-pane {
  display: none;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.price-bot-pane.is-active {
  display: flex;
}

.price-bot-pane--prices .price-bot-panel__chips {
  border-bottom: 1px solid var(--border);
}

.price-bot-pane--prices {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.price-bot-panel__close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: var(--radius-md);
}

.price-bot-panel__close:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}

.price-bot-panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 0;
  border-bottom: 1px solid var(--border);
  max-width: 100%;
}

.price-bot-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  box-sizing: border-box;
}

.price-bot-chip:hover {
  border-color: var(--primary);
  color: var(--hero-2);
}

.price-bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  max-height: 42vh;
  -webkit-overflow-scrolling: touch;
}

.price-bot-msg {
  display: flex;
}

.price-bot-msg--user {
  justify-content: flex-end;
}

.price-bot-msg--bot {
  justify-content: flex-start;
}

.price-bot-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.price-bot-msg--user .price-bot-bubble {
  background: var(--primary);
  color: var(--primary-contrast);
}

.price-bot-msg--bot .price-bot-bubble {
  background: var(--light-accent);
  color: var(--text);
}

.price-bot-block {
  margin: 0 0 0.55em;
  white-space: pre-line;
}

.price-bot-block:last-of-type {
  margin-bottom: 0;
}

.price-bot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.price-bot-action {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-contrast);
  background: var(--primary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
}

.price-bot-action:hover {
  background: var(--primary-hover);
}

.price-bot-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.price-bot-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 2.75rem;
  max-height: 120px;
}

.price-bot-send {
  align-self: flex-end;
}

@media (max-width: 860px) {
  body.price-bot-scroll-lock {
    overflow: hidden;
  }

  body.price-bot-scroll-lock .price-bot-panel:not([hidden]) {
    touch-action: manipulation;
  }

  body.price-bot-scroll-lock .price-bot-messages {
    touch-action: pan-y;
  }

  #priceBotRoot {
    right: auto;
    left: max(10px, env(safe-area-inset-left, 0px));
    bottom: calc(var(--client-quick-bar-stack, 94px) + 10px + env(safe-area-inset-bottom, 0px));
    align-items: flex-start;
  }

  .price-bot-launcher {
    padding: 10px 14px;
    font-size: 0.82rem;
    gap: 6px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
    transition:
      opacity 0.22s ease,
      transform 0.22s ease,
      visibility 0.22s ease;
  }

  #priceBotRoot.is-scroll-retracted .price-bot-launcher {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, calc(12px + env(safe-area-inset-bottom, 0px)), 0);
  }

  /* Открытая панель — почти на весь экран между шапкой и зоной кнопки «Помощь» */
  .price-bot-panel:not([hidden]) {
    position: fixed;
    left: max(10px, env(safe-area-inset-left, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    top: max(10px, calc(env(safe-area-inset-top, 0px) + 6px));
    bottom: calc(
      var(--client-quick-bar-stack, 94px) + 56px + env(safe-area-inset-bottom, 0px)
    );
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    height: auto;
    z-index: 10050;
    display: flex !important;
    flex-direction: column;
    border-radius: 16px;
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.06),
      0 12px 40px rgba(0, 0, 0, 0.2);
  }

  .price-bot-panel__head {
    flex-shrink: 0;
    padding: 12px 12px;
  }

  .price-bot-panel__title {
    font-size: 0.95rem;
    line-height: 1.25;
    padding-right: 4px;
  }

  .price-bot-pane--prices {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .price-bot-messages {
    flex: 1;
    min-height: 120px;
    max-height: none !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 12px 12px;
  }

  .price-bot-bubble {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .price-bot-form {
    flex-shrink: 0;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .price-bot-input {
    font-size: 16px;
    min-height: 3rem;
    max-height: 120px;
    line-height: 1.4;
    resize: none;
  }

  .price-bot-send {
    min-height: 48px;
    width: 100%;
    justify-content: center;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
  }

  .price-bot-panel__close {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .price-bot-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
  }

  .price-bot-panel__chips {
    flex-shrink: 0;
    padding-bottom: 8px;
  }

  @media (prefers-reduced-motion: reduce) {
    .price-bot-launcher {
      transition: none;
    }
  }
}

@media (max-width: 560px) {
  .price-bot-panel:not([hidden]) {
    left: max(8px, env(safe-area-inset-left, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    border-radius: 14px;
    top: max(8px, calc(env(safe-area-inset-top, 0px) + 4px));
  }
}

/* Страница «Услуги» — шаблон в духе vijtdereyt.be: editorial hero, сетка услуг, реализации, аудитории */
.services-page main > .section .container {
  max-width: min(1120px, 100%);
}

.services-page .section {
  padding: clamp(1.8rem, 4.2vw, 2.8rem) 0;
}

.services-page .hero.services-hero-editorial {
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  background-color: var(--hero-3);
  background-image:
    radial-gradient(ellipse 800px 420px at 85% 0%, rgba(192, 213, 44, 0.4), transparent 55%),
    linear-gradient(165deg, rgba(58, 56, 53, 0.78) 0%, rgba(26, 25, 24, 0.82) 55%, rgba(10, 10, 10, 0.86) 100%),
    url("../images/p2072799.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.services-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 42rem;
  /* Явные боковые отступы: трёхзначный padding(верх 0 низ) обнулял left/right и давал текст «впритык» */
  padding: clamp(1.4rem, 3.6vw, 2.1rem) max(18px, env(safe-area-inset-right, 0px)) clamp(1.4rem, 3.6vw, 2.1rem)
    max(18px, env(safe-area-inset-left, 0px));
  text-align: center;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

.services-page .services-hero-editorial .hero-subtitle {
  text-align: center;
}

.services-hero-kicker {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.services-hero-editorial h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3.4vw, 2.45rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 22ch;
  margin-left: auto;
  margin-right: auto;
}

.services-hero-lead {
  margin: 0.9rem 0 0;
  font-size: clamp(0.94rem, 1.12vw, 1rem);
  line-height: 1.52;
  color: rgba(255, 255, 255, 0.88);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.services-page .services-section-intro {
  margin-bottom: clamp(0.85rem, 2vw, 1.25rem);
}

.services-page .services-steps {
  gap: clamp(0.85rem, 1.8vw, 1.2rem);
}

.services-page .services-steps + * {
  margin-top: 0;
}

.services-page .services-steps .step-card h3 {
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.22;
  margin: 0;
}

.services-hero-actions {
  margin-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 720px) {
  .services-page .hero.services-hero-editorial {
    align-items: center;
  }

  .services-hero-inner {
    padding-top: 1.3rem;
    padding-bottom: 1.6rem;
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
  }

  .services-hero-editorial h1 {
    max-width: none;
    font-size: clamp(1.45rem, 6.5vw, 2.05rem);
  }

  .services-hero-lead {
    font-size: clamp(0.95rem, 3.8vw, 1.05rem);
    margin-top: 1.15rem;
  }

  .services-hero-kicker {
    margin-bottom: 0.55rem;
  }

  .services-hero-actions {
    margin-top: 1.35rem;
    gap: 10px;
  }

  .services-hero-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
    min-width: min(100%, 12rem);
  }
}

@media (max-width: 480px) {
  .about-layout25 .heading-style-h2 {
    font-size: clamp(1.6rem, 7vw, 2.35rem);
  }
}

.services-page .services-section-head,
.home-page .service-selector-section .services-section-head {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

.services-page .services-section-head.services-section-head--on-dark {
  color: #fff;
  margin: 0;
}

.services-page .services-section-intro,
.home-page .service-selector-section .services-section-intro {
  margin: 0 0 clamp(1.75rem, 3.5vw, 2.35rem);
  max-width: 40rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
}

.services-section-intro--narrow {
  max-width: 34rem;
}

/* «Услуги»: ширина блока брендов как у «Наши работы» (остальное — общие правила с .page-works выше) */
.services-page main > .section .container.home-brands-inner {
  max-width: min(1500px, 100%);
}

/* Плейсхолдеры иллюстраций в карусели услуг */
.services_item_image--placeholder {
  min-height: 11rem;
}

.services_item_image--lighting {
  background: linear-gradient(135deg, #fff9e6 0%, #ebe3c8 48%, #d9cfae 100%);
}

.services_item_image--cable {
  background: linear-gradient(145deg, #ecebe8 0%, #c9c7c2 52%, #a8a59e 100%);
}

.services_item_image--lowvolt {
  background: linear-gradient(155deg, #e8eef4 0%, #c8d2de 100%);
}

/* Карусель услуг (реф.: слайдер с волной, стрелками и точками) */
.service-selector-section {
  background: var(--bg);
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.service-selector {
  --service-card-h: clamp(300px, 48vw, 420px);
  --service-card-h-mobile: min(75vh, 480px);
  --service-card-visual-h-mobile: clamp(140px, 34vw, 200px);
  outline: none;
}

.service-selector:focus-visible {
  box-shadow: 0 0 0 3px rgba(192, 213, 44, 0.55);
  border-radius: var(--radius-lg);
}

.service-selector__viewport {
  position: relative;
  margin: 0 auto;
  max-width: 1100px;
}

.service-selector__track {
  position: relative;
  min-height: var(--service-card-h);
}

@media (min-width: 900px) {
  .service-selector__track {
    min-height: var(--service-card-h);
  }
}

.service-selector__slide {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100%, 1100px);
  max-width: 100%;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition:
    transform 0.5s cubic-bezier(0.33, 1, 0.68, 1),
    opacity 0.45s ease;
  will-change: transform, opacity;
}

.service-selector__slide.is-active {
  z-index: 4;
  opacity: 1;
  transform: translate(-50%, -50%) translateX(0) scale(1);
  pointer-events: auto;
}

.service-selector__slide.is-prev,
.service-selector__slide.is-next {
  z-index: 2;
  opacity: 0.52;
  pointer-events: none;
}

.service-selector__slide.is-prev {
  transform: translate(-50%, -50%) translateX(-52%) scale(0.88);
}

.service-selector__slide.is-next {
  transform: translate(-50%, -50%) translateX(52%) scale(0.88);
}

.service-selector__slide.is-passive {
  z-index: 0;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.78);
}

.service-selector__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 42%);
  gap: 0;
  column-gap: 0;
  align-items: stretch;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 16px 40px rgba(0, 0, 0, 0.09),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  overflow: hidden;
  border: 1px solid var(--border);
  box-sizing: border-box;
  height: var(--service-card-h);
  min-height: var(--service-card-h);
  max-height: var(--service-card-h);
}

.service-selector__slide.is-active .service-selector__card {
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.05),
    0 22px 48px rgba(0, 0, 0, 0.11),
    0 0 0 1px rgba(255, 255, 255, 0.55) inset;
}

.service-selector__copy {
  position: relative;
  z-index: 1;
  padding: clamp(1.35rem, 3vw, 2.25rem) clamp(1.25rem, 3vw, 2rem);
  padding-right: clamp(2.5rem, 6vw, 3.5rem);
  background: var(--light-accent);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.service-selector__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.service-brand-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  margin: 0 0 0.65rem;
  padding: 0;
  list-style: none;
}

.service-brand-tabs li {
  margin: 0;
  padding: 0;
}

.service-brand-tab {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.25;
  text-transform: none;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 92%, var(--light-accent));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.service-brand-tab--schneider {
  color: #fff;
  background: #009639;
  border-color: #007a2e;
  box-shadow: 0 1px 2px rgba(0, 60, 30, 0.25);
}

.service-brand-tab--abb {
  color: #fff;
  background: #ff000f;
  border-color: #cc000c;
  box-shadow: 0 1px 2px rgba(120, 0, 10, 0.3);
}

.service-brand-tab--legrand {
  color: #e30613;
  background: #fff;
  border-color: #e30613;
  box-shadow: 0 1px 2px rgba(227, 6, 19, 0.12);
}

.service-brand-tab--siemens {
  color: #0097c7;
  background: #fff;
  border-color: #0097c7;
  box-shadow: 0 1px 2px rgba(0, 120, 170, 0.12);
}

.service-brand-tab--eaton {
  color: #005a9c;
  background: #fff;
  border-color: #005a9c;
  box-shadow: 0 1px 2px rgba(0, 50, 110, 0.12);
}

.service-brand-tab--hager {
  color: #0d9488;
  background: #fff;
  border-color: #0d9488;
  box-shadow: 0 1px 2px rgba(13, 116, 104, 0.12);
}

.service-brand-tab--iek {
  color: #1a1a1a;
  background: #ffd400;
  border-color: #e6be00;
  box-shadow: 0 1px 2px rgba(60, 50, 0, 0.15);
}

.service-brand-tab--ekf {
  color: #1a1a1a;
  background: #d1d5db;
  border-color: #9ca3af;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.service-brand-tab--dekraft {
  color: #0c2340;
  background: #fff;
  border-color: #0c2340;
  box-shadow: 0 1px 2px rgba(12, 35, 64, 0.12);
}

.service-selector__excerpt {
  margin: 0 0 1.1rem;
  font-size: 0.95rem;
  line-height: 1.58;
  color: var(--muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.service-selector__more.btn {
  align-self: flex-start;
  padding: 12px 24px;
  font-size: 0.9rem;
}

.service-selector__visual {
  position: relative;
  z-index: 0;
  min-height: 0;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  background: var(--light-accent);
}

/* Одна волна у левого края фото — цвет как у текстовой колонки, без «двойного» шва */
.service-selector__seam {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: clamp(52px, 10vw, 88px);
  z-index: 3;
  pointer-events: none;
}

.service-selector__seam-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.service-selector__visual img,
.service-selector__img-ph {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: 56% 42%;
  border-radius: 0;
  box-shadow: none;
  filter: none;
}

.service-selector__diagram {
  object-fit: cover;
  object-position: center;
  padding: 0;
  background: var(--surface);
}

.service-selector__img-ph {
  min-height: 0;
}

.service-selector__slide.is-active .service-selector__visual img,
.service-selector__slide.is-active .service-selector__visual .service-selector__img-ph {
  animation: serviceSelectorPhotoIn 0.55s ease-out forwards;
}

@keyframes serviceSelectorPhotoIn {
  from {
    opacity: 0.94;
  }

  to {
    opacity: 1;
  }
}

.service-selector__arrows {
  position: absolute;
  left: 50%;
  bottom: clamp(0.75rem, 2vw, 1.25rem);
  transform: translateX(-50%);
  display: flex;
  gap: 2.5rem;
  z-index: 6;
  pointer-events: none;
}

.service-selector__btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #242214;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.service-selector__btn:hover {
  background: #fff;
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.service-selector__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.service-selector__btn svg {
  width: 11px;
  height: auto;
}

.service-selector__btn--next svg {
  transform: scaleX(-1);
}

.service-selector__dots {
  list-style: none;
  margin: clamp(1.25rem, 3vw, 1.75rem) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.service-selector__dots li {
  margin: 0;
  padding: 0;
}

.service-selector__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.22);
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.service-selector__dot:hover {
  background: rgba(17, 17, 17, 0.4);
}

.service-selector__dot.is-active {
  background: var(--text);
  transform: scale(1.15);
}

.service-selector__dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .service-selector {
    --service-card-h-mobile: min(72vh, 460px);
    --service-card-visual-h-mobile: clamp(130px, 32vw, 190px);
  }

  .service-selector__track {
    min-height: var(--service-card-h-mobile);
  }

  .service-selector__card {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    height: var(--service-card-h-mobile);
    min-height: var(--service-card-h-mobile);
    max-height: var(--service-card-h-mobile);
  }

  .service-selector__copy {
    padding-right: clamp(1.25rem, 3vw, 2rem);
    order: 2;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    justify-content: flex-start;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .service-selector__visual {
    order: 1;
    flex: 0 0 var(--service-card-visual-h-mobile);
    height: var(--service-card-visual-h-mobile);
    min-height: var(--service-card-visual-h-mobile);
    max-height: var(--service-card-visual-h-mobile);
  }

  .service-selector__visual img,
  .service-selector__img-ph {
    min-height: 0;
    height: 100%;
    max-height: 100%;
  }

  .service-selector__seam {
    display: none;
  }

  .service-selector__slide.is-prev,
  .service-selector__slide.is-next {
    opacity: 0;
  }

  .service-selector__slide.is-active {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Узкие смартфоны: карусель в потоке документа — без «неба» под шапкой */
@media (max-width: 480px) {
  .service-selector__track {
    position: relative;
    min-height: 0 !important;
    height: auto;
    padding-bottom: 0.25rem;
  }

  .service-selector__slide {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    transform: none !important;
    opacity: 0;
    visibility: hidden;
    height: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .service-selector__slide.is-active {
    opacity: 1;
    visibility: visible;
    height: auto;
    overflow: visible;
    pointer-events: auto;
    z-index: 2;
  }

  .service-selector__slide.is-prev,
  .service-selector__slide.is-next {
    opacity: 0;
    visibility: hidden;
    height: 0;
  }

  .service-selector__card {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .service-selector__copy {
    flex: 0 1 auto !important;
    overflow: visible !important;
    padding-bottom: 0.5rem;
  }

  .service-selector__visual {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 11rem !important;
    max-height: 13rem !important;
  }

  .service-selector__visual img,
  .service-selector__visual .service-selector__img-ph {
    min-height: 11rem;
    max-height: 13rem;
    height: 12rem !important;
    object-fit: cover;
  }

  .service-selector__arrows {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    justify-content: center;
    margin-top: 0.5rem;
    pointer-events: auto;
  }

  .service-selector__dots {
    margin-top: 0.5rem;
  }

  .service-selector__btn {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 420px) {
  .service-selector__arrows {
    gap: 1.25rem;
  }
}

.service-selector.service-selector--reduced-motion .service-selector__slide {
  transition-duration: 0.01ms;
}

.service-selector.service-selector--reduced-motion .service-selector__visual img,
.service-selector.service-selector--reduced-motion .service-selector__visual .service-selector__img-ph {
  animation: none !important;
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .service-selector__slide {
    transition-duration: 0.01ms;
  }

  .service-selector__slide.is-active .service-selector__visual img,
  .service-selector__slide.is-active .service-selector__visual .service-selector__img-ph {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.services-realizations {
  background: linear-gradient(165deg, var(--section-dark-1) 0%, var(--section-dark-2) 100%);
  color: #f5f5f4;
}

.services-realizations__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.services-realizations__all {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(192, 213, 44, 0.45);
}

.services-realizations__all:hover {
  color: #fff;
  border-bottom-color: var(--accent);
}

.services-realizations__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}

.home-page .home-works-preview.services-realizations .services-section-head {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.home-page .home-works-preview.services-realizations .services-section-head.services-section-head--on-dark {
  color: #fff;
}

.home-page .home-works-preview.services-realizations .services-section-intro {
  margin: 0 0 clamp(1.2rem, 2.6vw, 1.8rem);
  max-width: 38rem;
  font-size: 0.98rem;
  line-height: 1.45;
  color: rgba(245, 245, 244, 0.78);
}

.services-real-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 24px);
  align-items: stretch;
}

.home-page .home-works-preview .services-real-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .home-page .home-works-preview .services-real-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .home-page .home-works-preview .services-real-grid {
    display: flex;
    overflow-x: auto;
    gap: 0.85rem;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .home-page .home-works-preview .services-real-card {
    min-width: min(86vw, 360px);
    scroll-snap-align: start;
  }

  .home-page .home-works-preview .services-real-card__media {
    aspect-ratio: 16 / 10;
  }

  .home-page .home-works-preview .services-real-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .home-page .home-works-preview .services-real-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.65rem;
    padding-bottom: 0.2rem;
  }

  .home-page .home-works-preview .services-real-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.35);
    transition: transform 0.15s ease, background 0.15s ease;
  }

  .home-page .home-works-preview .services-real-dot.is-active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.25);
  }
}

.services-real-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.services-real-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
}

.services-real-card__media {
  flex-shrink: 0;
  margin: 0;
  margin-top: auto;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.services-real-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.services-real-card__media--diagram img {
  object-fit: contain;
  object-position: center;
  padding: 0.4rem;
  background: rgba(0, 0, 0, 0.35);
}

.services-real-card__media--empty {
  min-height: 12rem;
  background: linear-gradient(145deg, rgba(192, 213, 44, 0.15) 0%, rgba(0, 0, 0, 0.35) 100%);
}

.services-real-card__label {
  display: block;
  flex-shrink: 0;
  margin: 0.95rem 1.1rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(245, 245, 244, 0.55);
}

.services-real-card__title {
  display: block;
  margin: 0 1.1rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.38;
  color: #fff;
}

.services-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 24px);
  align-items: stretch;
}

.services-audience-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(1.35rem, 2.5vw, 1.65rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.04);
}

.services-audience-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.12rem;
  font-weight: 650;
}

.services-audience-card p {
  margin: 0 0 1rem;
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.services-highlight-yellow {
  color: #f2c400;
  font-weight: 700;
}

.services-audience-card a {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
}

.services-audience-card a:hover {
  color: var(--primary-contrast);
  border-bottom-color: var(--accent);
}

.services-quote-block .container {
  max-width: 44rem;
}

.services-quote {
  margin: 0;
  padding: 0 0 0 1.15rem;
  border-left: 3px solid var(--accent);
}

.services-quote p {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-style: italic;
  font-weight: 450;
  line-height: 1.65;
  color: var(--text);
}

.services-quote-cta {
  margin: 1.25rem 0 0;
  text-align: center;
}

.services-quote-cta a {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.services-quote-cta a:hover {
  border-bottom-color: var(--accent);
}

.services-quote-cta .services-quote-btn {
  border-bottom: none;
  background: linear-gradient(180deg, #ffe45a 0%, #f2c400 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--primary-contrast);
  box-shadow: var(--shadow-btn);
}

.services-quote-cta .services-quote-btn:hover {
  background: linear-gradient(180deg, #fff5c5 0%, #d8a900 100%);
  border-bottom: none;
}

.services-page .services-steps {
  margin-top: 0.5rem;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.services-page .services-steps .step-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-height: clamp(260px, 23vw, 340px);
  padding: clamp(1.1rem, 2vw, 1.5rem);
  gap: 0.65rem;
}

.services-page .services-steps .step-card p {
  font-size: clamp(0.95rem, 1.25vw, 1.05rem);
  line-height: 1.5;
}

.services-page .services-steps .step-card:first-child {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(165deg, rgba(0, 0, 0, 0.54) 0%, rgba(0, 0, 0, 0.42) 100%),
    url("../images/step-application-bg.png") center 42% / cover no-repeat;
}

.services-page .services-steps .step-card:first-child h3,
.services-page .services-steps .step-card:first-child p {
  position: relative;
  z-index: 1;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.services-page .services-steps .step-card:nth-child(2) {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(165deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.36) 100%),
    url("../images/step-agreement-bg.png") center / cover no-repeat;
}

.services-page .services-steps .step-card:nth-child(2) h3,
.services-page .services-steps .step-card:nth-child(2) p {
  position: relative;
  z-index: 1;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.services-page .services-steps .step-card:nth-child(3) {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(165deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.36) 100%),
    url("../images/step-work-bg.png") center / cover no-repeat;
}

.services-page .services-steps .step-card:nth-child(3) h3,
.services-page .services-steps .step-card:nth-child(3) p {
  position: relative;
  z-index: 1;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.services-page .services-steps .step-card:nth-child(4) {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(165deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.36) 100%),
    url("../images/step-confirm-bg.png") center / cover no-repeat;
}

.services-page .services-steps .step-card:nth-child(4) h3,
.services-page .services-steps .step-card:nth-child(4) p {
  position: relative;
  z-index: 1;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.services-page .services-steps .step-card p {
  flex: 0 0 auto;
  margin-bottom: 0;
}

.services-bottom-cta {
  background: linear-gradient(165deg, var(--hero-2) 0%, var(--hero-3) 100%);
  color: #fff;
}

.services-bottom-cta__inner {
  text-align: center;
  padding: 0;
  max-width: 36rem;
  margin: 0 auto;
}

.services-bottom-cta__title {
  margin: 0;
  font-size: clamp(1.65rem, 3.2vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.services-bottom-cta__text {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.services-bottom-cta__actions {
  margin-top: 1.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (max-width: 900px) {
  .services-real-grid,
  .services-audience-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  }
}

@media (max-width: 720px) {
  .services-realizations__head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Главная страница — доп. блоки и герой */
.hero-lead-text {
  margin: 1rem 0 0;
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  line-height: 1.55;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.hero-lead-text__line {
  display: block;
}

.hero-lead-text__line + .hero-lead-text__line {
  margin-top: 0.4em;
}

.home-section-intro {
  max-width: 42rem;
  margin: -0.35rem auto 1.75rem;
  text-align: center;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--muted);
}

.home-section-intro--tight {
  margin-bottom: 1.35rem;
}

.home-popular .home-section-intro {
  margin-bottom: 2rem;
}

/* Карточки «Часто заказывают»: ровная сетка, акцент сверху, ссылка в «подвале» карточки */
.home-grid-tasks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .home-grid-tasks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
  }
}

@media (max-width: 520px) {
  .home-grid-tasks {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.home-task-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.home-task-card::before {
  content: "";
  display: block;
  height: 3px;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-soft) 100%);
}

.home-task-card__body {
  padding: 1.2rem 1.35rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-task-card__body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.28;
  color: var(--text);
}

.home-task-card__body p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--muted);
}

.home-task-card__more {
  margin-top: auto;
  padding: 0.7rem 1.35rem;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--light-accent) 70%, var(--surface));
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--dark-accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.home-task-card__more::after {
  content: "→";
  flex-shrink: 0;
  font-weight: 700;
  color: var(--primary-hover);
  transition: transform 0.2s ease, color 0.15s ease;
}

.home-task-card:hover {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

.home-task-card:hover .home-task-card__more {
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--text);
}

.home-task-card:hover .home-task-card__more::after {
  transform: translateX(4px);
  color: var(--text);
}

.home-task-card:focus-within {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent);
}

.home-task-card__more:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

@media (prefers-reduced-motion: reduce) {
  .home-task-card,
  .home-task-card__more::after {
    transition: none;
  }

  .home-task-card:hover {
    transform: none;
  }

  .home-task-card:hover .home-task-card__more::after {
    transform: none;
  }
}

.home-tools-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 18px;
  align-items: stretch;
}

.home-tool-tile {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  text-align: center;
}

.home-tool-tile h3 {
  margin-top: 0;
}

.home-tool-tile p {
  flex: 1;
  margin-bottom: 0;
}

.home-tool-tile__btn {
  margin-top: 1.1rem;
  align-self: center;
  width: 100%;
  max-width: 260px;
}

/* Главная — превью галереи работ */
.home-works-preview .home-section-intro {
  margin-bottom: 1.5rem;
}

.home-works-showcase {
  align-items: stretch;
}

.home-works-showcase .works-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.home-works-showcase .works-card p {
  flex: 1;
  margin-bottom: 0;
}

.home-works-preview__cta {
  margin: 7rem 0 0;
  text-align: center;
}

/* Главная — бренды: единый стиль «плитки», логотипы из файлов */
.home-brands-section {
  padding: clamp(1.35rem, 2.8vw, 2rem) 0;
}

.home-brands-inner {
  max-width: 1500px;
}

.home-brands-title.section-title {
  margin-bottom: 1rem;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.home-brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.65rem;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 100%;
}

.home-brands-item {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 4.25rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border) 90%, var(--text));
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-brands-item:hover,
.home-brands-item:focus-within {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.home-brands-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 1.85rem;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.2s ease;
}

.home-brands-logo--wide {
  max-height: 1.65rem;
}

/* CHINT (PNG) — крупный растр в ряду брендов */
.home-brands-logo--chint {
  max-height: 2.75rem;
}

/* IEK — узкая марка, чуть выше «широких» */
.home-brands-logo--iek {
  max-height: 1.95rem;
}

/* DEKraft (PNG) — приводим к общему размеру на мобиле */
.home-brands-logo--dekraft {
  max-height: 1.85rem;
}

/* Merlin Gerin (PNG) — приводим к общему размеру на мобиле */
.home-brands-logo--merlin-gerin {
  max-height: 1.85rem;
}

/* Legrand (PNG) — приводим к общему размеру на мобиле */
.home-brands-logo--legrand {
  max-height: 1.85rem;
}

/* Hager (PNG) — горизонтальный знак */
.home-brands-logo--hager {
  max-height: 2.75rem;
}

/* Gewiss (PNG) — горизонтальный знак */
.home-brands-logo--gewiss {
  max-height: 2.75rem;
}

/* EKF (PNG) — горизонтальный знак */
.home-brands-logo--ekf {
  max-height: 2.75rem;
}

@media (min-width: 640px) {
  .home-brands-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .home-brands-logo {
    max-height: 2rem;
  }

  .home-brands-logo--wide {
    max-height: 1.85rem;
  }

  .home-brands-logo--chint {
    max-height: 3.15rem;
  }

  .home-brands-logo--iek {
    max-height: 2.15rem;
  }

  .home-brands-logo--dekraft {
    max-height: 2rem;
  }

  .home-brands-logo--merlin-gerin {
    max-height: 2rem;
  }

  .home-brands-logo--legrand {
    max-height: 2rem;
  }

  .home-brands-logo--hager {
    max-height: 3.15rem;
  }

  .home-brands-logo--gewiss {
    max-height: 3.15rem;
  }

  .home-brands-logo--ekf {
    max-height: 3.15rem;
  }
}

@media (min-width: 960px) {
  .home-brands-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .home-brands-logo--chint {
    max-height: 3.4rem;
  }

  .home-brands-logo--dekraft {
    max-height: 7.75rem;
  }

  .home-brands-logo--merlin-gerin {
    max-height: 3.4rem;
  }

  .home-brands-logo--legrand {
    max-height: 3.4rem;
  }

  .home-brands-logo--hager {
    max-height: 3.4rem;
  }

  .home-brands-logo--gewiss {
    max-height: 3.4rem;
  }

  .home-brands-logo--ekf {
    max-height: 3.4rem;
  }
}

/* Узкий экран: логотипы брендов компактнее (перекрывает min-width:640/960 для ≤860px) */
@media (max-width: 860px) {
  .home-brands-section {
    padding: clamp(0.95rem, 2.2vw, 1.25rem) 0;
  }

  .home-brands-grid {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 0.48rem;
  }

  .home-brands-item {
    min-height: 3rem;
    padding: 0.42rem 0.5rem;
  }

  .home-brands-title.section-title {
    margin-bottom: 0.75rem;
    font-size: clamp(0.95rem, 3.2vw, 1.1rem);
  }

  .home-brands-logo {
    max-height: 1.22rem;
  }

  .home-brands-logo--wide {
    max-height: 1.06rem;
  }

  .home-brands-logo--chint {
    max-height: 1.48rem;
  }

  .home-brands-logo--iek {
    max-height: 1.22rem;
  }

  .home-brands-logo--dekraft {
    max-height: 2.2rem;
  }

  .home-brands-logo--merlin-gerin,
  .home-brands-logo--legrand,
  .home-brands-logo--hager,
  .home-brands-logo--gewiss,
  .home-brands-logo--ekf {
    max-height: 1.22rem;
  }
}


.home-brands-item:hover .home-brands-logo,
.home-brands-item:focus-within .home-brands-logo {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .home-brands-logo {
    transition: none;
  }

  .home-brands-item:hover .home-brands-logo,
  .home-brands-item:focus-within .home-brands-logo {
    transform: none;
  }
}

.home-brands-note {
  margin: 0.75rem auto 0;
  max-width: 34rem;
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--muted);
  opacity: 0.92;
}
