/* ============================================================
   IVPOL.RU — компоненты: секции главной, внутренние страницы,
   формы, галерея, лайтбокс
   ============================================================ */

/* ---------- Статистика ---------- */
.stats {
  width: 100%;
  padding: clamp(26px, 3.4vw, 44px) var(--pad-x);
  background: var(--dark);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.4vw, 20px);
  padding: 6px clamp(12px, 2vw, 34px);
  border-left: 1px solid rgba(255, 255, 255, .14);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat svg {
  flex: none;
  width: clamp(34px, 3vw, 46px);
  height: clamp(34px, 3vw, 46px);
  color: var(--accent);
}
.stat b {
  display: block;
  font-size: clamp(19px, 1.9vw, 27px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}
.stat span {
  display: block;
  font-size: clamp(12.5px, 1.1vw, 15px);
  color: #9DAEBD;
  line-height: 1.4;
}

/* ---------- Карточки услуг ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .35s, box-shadow .35s;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-h);
}
.service-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.service-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.service-card:hover .service-card__media img { transform: scale(1.06); }

.service-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(18px, 1.8vw, 26px);
}
.service-card h3 {
  font-size: clamp(17px, 1.5vw, 21px);
  margin-bottom: .5em;
}
.service-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 18px;
  max-width: 46ch;
}
.service-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.service-card__link {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- Как мы работаем ---------- */
.steps {
  display: flex;
  align-items: stretch;
  gap: clamp(10px, 1.6vw, 26px);
  list-style: none;
}
.step {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step__top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.step__num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}
.step__icon { color: var(--dark); }
.step__arrow {
  margin-left: auto;
  color: #B9C3CD;
  flex: none;
}
.step h3 {
  font-size: clamp(15px, 1.3vw, 18px);
  margin: 0;
}
.step p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  max-width: 34ch;
}

/* ---------- Наши работы: лента ---------- */
.works-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}
.works-strip a {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--grey);
}
.works-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.works-strip a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(23, 38, 51, 0);
  transition: background .3s;
}
.works-strip a:hover img { transform: scale(1.08); }
.works-strip a:hover::after { background: rgba(23, 38, 51, .28); }

.works-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: clamp(22px, 3vw, 36px);
  flex-wrap: wrap;
}

/* ---------- Оборудование + заказчики ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 32px);
  align-items: stretch;
}

.equip-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(26px, 3vw, 46px);
  background: var(--dark);
  border-radius: var(--radius);
  color: #fff;
  overflow: hidden;
}
.equip-card::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 133, 13, .22), transparent 65%);
}
.equip-card > * { position: relative; z-index: 1; }
.equip-card h2 {
  color: #fff;
  font-size: clamp(24px, 2.4vw, 34px);
  margin: 0;
}
.equip-card p {
  color: #C9D4DE;
  font-size: 15.5px;
  margin: 0;
  max-width: 46ch;
}
.equip-card .btn { align-self: flex-start; }
.equip-photo {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.equip-photo img { width: 100%; height: auto; }

.clients-card {
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3vw, 46px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.clients-card h2 {
  font-size: clamp(22px, 2.2vw, 30px);
  text-align: center;
  margin-bottom: clamp(18px, 2vw, 28px);
}
.clients-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 18px);
  flex: 1;
}
.client {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: clamp(14px, 1.6vw, 22px);
  background: var(--grey);
  border-radius: 12px;
  text-align: center;
  transition: background .3s, transform .3s;
}
.client:hover {
  background: var(--accent-soft);
  transform: translateY(-4px);
}
.client img {
  height: clamp(38px, 4vw, 54px);
  width: auto;
  margin-bottom: 4px;
}
.client b { font-size: 15px; }
.client span { font-size: 12.5px; color: var(--muted); }

/* ---------- Отзывы ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 32px);
}
.review {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 2.2vw, 30px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .3s, box-shadow .3s;
}
.review:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}
.review__head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.review__avatar {
  width: 58px;
  height: 58px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--grey);
}
.review__stars {
  display: flex;
  gap: 3px;
  color: var(--accent);
  margin-bottom: 4px;
}
.review__name { font-weight: 800; font-size: 15.5px; }
.review__city { font-size: 13px; color: var(--muted); }
.review__text {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}
.review__text.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review__more {
  align-self: flex-start;
  background: none;
  border: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
}

/* ---------- Внутренние страницы: шапка ---------- */
.page-hero {
  position: relative;
  width: 100%;
  padding: clamp(52px, 8vw, 96px) var(--pad-x) clamp(40px, 6vw, 74px);
  background: var(--dark-3) url("../img/page-hero-bg.webp") center 55% / cover no-repeat;
  color: #fff;
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 22, 30, .95) 0%, rgba(13, 22, 30, .82) 50%, rgba(13, 22, 30, .5) 100%);
}
.page-hero__inner { position: relative; z-index: 1; }
.page-hero h1 {
  color: #fff;
  font-size: clamp(27px, 3.6vw, 48px);
  max-width: 900px;
  margin-bottom: .4em;
}
.page-hero p {
  color: #D3DCE4;
  font-size: clamp(15px, 1.5vw, 19px);
  max-width: 720px;
  margin: 0;
}

.breadcrumbs {
  margin-bottom: clamp(14px, 2vw, 22px);
  font-size: 13.5px;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}
.breadcrumbs li { color: #97A6B4; }
.breadcrumbs li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--accent);
}
.breadcrumbs a { color: #C9D4DE; }
.breadcrumbs a:hover { color: var(--accent); }

/* ---------- Контент внутренних страниц ---------- */
.prose {
  max-width: 860px;
}
.prose > * + * { margin-top: 0; }
.prose h2 {
  font-size: clamp(21px, 2.2vw, 30px);
  margin-top: clamp(30px, 4vw, 48px);
}
.prose h3 { font-size: clamp(17px, 1.7vw, 21px); margin-top: 1.6em; }
.prose p {
  font-size: clamp(15.5px, 1.3vw, 17px);
  line-height: 1.75;
  color: #3A4755;
}
.prose .lead {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.65;
  color: var(--text);
  font-weight: 600;
}
.prose a:not(.btn) {
  color: var(--accent-h);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose strong { color: var(--text); }

.feature-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 18px 0;
}
.feature-list li {
  position: relative;
  padding: 14px 18px 14px 50px;
  background: var(--grey);
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.5;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF850D' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.feature-list--dark li {
  background: rgba(255, 255, 255, .06);
  color: #E7EDF2;
}

.price-box {
  margin: clamp(22px, 3vw, 34px) 0;
  padding: clamp(20px, 2.6vw, 32px);
  background: var(--accent-soft);
  border-left: 5px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.price-box p { margin: 0 0 .5em; font-size: 15.5px; }
.price-box p:last-child { margin-bottom: 0; }
.price-box .price {
  display: inline-block;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  color: var(--accent-h);
  margin-right: 6px;
}

.cta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(30px, 4vw, 46px);
  padding: clamp(20px, 2.6vw, 32px);
  background: var(--dark);
  border-radius: var(--radius);
  color: #fff;
}
.cta-line p {
  margin: 0;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 700;
  max-width: 44ch;
}
.cta-line .tel {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}
.cta-line .tel:hover { color: #fff; }

.figure { margin: clamp(24px, 3vw, 36px) 0; }
.figure img {
  width: 100%;
  border-radius: var(--radius);
}
.figure figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- Контакты ---------- */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
  margin: clamp(22px, 3vw, 34px) 0;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(18px, 2vw, 26px);
  background: var(--grey);
  border-radius: var(--radius);
  transition: background .3s, transform .3s;
}
.contact-card:hover {
  background: var(--accent-soft);
  transform: translateY(-4px);
}
.contact-card svg { color: var(--accent); margin-bottom: 6px; }
.contact-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.contact-value {
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.45;
}
a.contact-value:hover { color: var(--accent-h); }

.map-box {
  margin: clamp(22px, 3vw, 34px) 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-box iframe {
  display: block;
  width: 100%;
  height: clamp(300px, 40vw, 440px);
  border: 0;
}
.map-note {
  margin: 0;
  padding: 12px 18px;
  background: var(--grey);
  font-size: 13.5px;
}
.map-note a { color: var(--accent-h); font-weight: 700; }

/* ---------- Формы ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 22px);
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-field--full { grid-column: 1 / -1; }
.form-field label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.form-field .req { color: var(--accent); }
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 133, 13, .15);
}
.form-field.has-error input,
.form-field.has-error textarea {
  border-color: #E4483F;
}
.form-error {
  font-size: 13px;
  color: #E4483F;
  min-height: 0;
}
.form-field:not(.has-error) .form-error { display: none; }

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.form-status {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
}
.form-status.is-ok { color: #1E9E5A; }
.form-status.is-err { color: #E4483F; }

.form-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.form-note a { color: var(--accent-h); font-weight: 700; }

.form-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.section-form {
  margin-top: clamp(28px, 4vw, 44px);
  padding: clamp(24px, 3.4vw, 44px);
  background: var(--grey);
  border-radius: var(--radius);
}
.section-form h2 { font-size: clamp(21px, 2.2vw, 30px); }
.section-form > p { color: var(--muted); max-width: 60ch; }

/* ---------- Галерея работ ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(10px, 1.4vw, 20px);
}
.gallery-item {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: var(--grey);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s ease;
}
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 25, 34, .55));
  opacity: 0;
  transition: opacity .3s;
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item:hover::after { opacity: 1; }
.gallery-item__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s, transform .3s;
}
.gallery-item:hover .gallery-item__zoom {
  opacity: 1;
  transform: none;
}

/* ---------- Лайтбокс ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 40px);
  background: rgba(8, 14, 20, .93);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox img.lb-img {
  max-width: min(92vw, 1400px);
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
  user-select: none;
}
.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, transform .2s;
  backdrop-filter: blur(4px);
}
.lb-btn:hover { background: var(--accent); transform: scale(1.06); }
.lb-close { top: clamp(12px, 2vw, 26px); right: clamp(12px, 2vw, 26px); }
.lb-prev { left: clamp(12px, 2vw, 30px); top: 50%; transform: translateY(-50%); }
.lb-next { right: clamp(12px, 2vw, 30px); top: 50%; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) scale(1.06); }
.lb-next:hover { transform: translateY(-50%) scale(1.06); }
.lb-caption {
  position: absolute;
  left: 50%;
  bottom: clamp(12px, 2vw, 26px);
  transform: translateX(-50%);
  max-width: min(86vw, 800px);
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(23, 38, 51, .85);
  color: #E7EDF2;
  font-size: 14px;
  text-align: center;
  backdrop-filter: blur(4px);
}
.lb-counter {
  position: absolute;
  top: clamp(18px, 2.4vw, 34px);
  left: 50%;
  transform: translateX(-50%);
  color: #97A6B4;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
}

/* ---------- 404 ---------- */
.err-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: clamp(60px, 10vw, 120px) var(--pad-x);
}
.err-page .err-code {
  font-size: clamp(72px, 14vw, 160px);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -.03em;
}
.err-page h1 { font-size: clamp(24px, 3vw, 36px); margin: 0; }
.err-page p { color: var(--muted); max-width: 52ch; margin: 0; }
.err-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Полоса преимуществ (лента на тёмном) ---------- */
.ribbon {
  width: 100%;
  padding: var(--pad-y) var(--pad-x);
  background: var(--dark-2);
  color: #fff;
}
.ribbon h2 {
  color: #fff;
  font-size: clamp(24px, 2.8vw, 38px);
  max-width: 900px;
  margin-bottom: clamp(22px, 3vw, 38px);
}
.ribbon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(12px, 1.6vw, 24px);
  list-style: none;
}
.ribbon-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(16px, 1.8vw, 24px);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: #E7EDF2;
  transition: background .3s, transform .3s;
}
.ribbon-item:hover {
  background: rgba(255, 255, 255, .09);
  transform: translateY(-4px);
}
.ribbon-item svg {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--accent);
}
.ribbon-item b { color: #fff; display: block; font-size: 16px; margin-bottom: 3px; }

/* ---------- Достижения / сертификат ---------- */
.awards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
}
.awards img {
  width: min(460px, 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.awards-text { flex: 1; min-width: 280px; }
.awards-text h2 { font-size: clamp(22px, 2.4vw, 32px); }
.awards-text p { color: var(--muted); font-size: 15.5px; }

/* ---------- Общие элементы навигации и связи ---------- */
.breadcrumbs {
  margin-bottom: clamp(16px, 2vw, 24px);
  font-size: 13px;
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  color: #B9C4CD;
}
.breadcrumbs li + li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 10px;
  border-top: 1.5px solid var(--accent);
  border-right: 1.5px solid var(--accent);
  transform: rotate(45deg);
}
.breadcrumbs li[aria-current="page"] {
  border-color: rgba(255, 209, 0, .4);
  background: rgba(255, 209, 0, .12);
  color: #fff;
}
.breadcrumbs a { color: inherit; }
.breadcrumbs a:hover { color: var(--accent); }

.contact-widget {
  position: fixed;
  z-index: 40;
  left: 20px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.contact-widget a {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .24);
  transition: transform .2s ease, box-shadow .2s ease;
}
.contact-widget a:hover,
.contact-widget a:focus-visible {
  transform: translateX(3px) scale(1.06);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .32);
}
.contact-widget svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.contact-widget__whatsapp { background: #49E670; }
.contact-widget__viber { background: #665CAC; }
.contact-widget__telegram { background: #3E99D8; }
.contact-widget__vk { background: #5076AA; }
.contact-widget__phone { background: #03C980; }

@media (max-width: 600px) {
  .contact-widget.contact-widget {
    top: auto;
    right: auto;
    bottom: 12px;
    left: 50%;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(16, 19, 21, .9);
    box-shadow: 0 8px 26px rgba(0, 0, 0, .28);
    transform: translateX(-50%);
    backdrop-filter: blur(8px);
  }
  .contact-widget.contact-widget a {
    width: 40px;
    height: 40px;
  }
}

/* ---------- Контакты ---------- */
.contacts-content,
.contacts-message .container {
  max-width: 1280px;
  margin-inline: auto;
}
.contacts-intro {
  max-width: 780px;
  margin-bottom: clamp(24px, 3vw, 38px);
}
.contacts-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent-h);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.contacts-intro h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 40px);
}
.contacts-intro .lead { margin: 0; }
.contacts-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: stretch;
  gap: clamp(18px, 2.8vw, 40px);
}
.contacts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: stretch;
  gap: 14px;
  margin: 0;
}
.contact-card {
  min-width: 0;
  min-height: 170px;
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(16, 19, 21, .06);
}
.contact-card:hover {
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 19, 21, .1);
}
.contact-card svg {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-h);
}
.contact-label { font-size: 11px; }
.contact-value {
  font-size: clamp(14px, 1.15vw, 17px);
  overflow-wrap: anywhere;
}
.contact-map {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(16, 19, 21, .08);
}
.map-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 22px;
}
.map-heading strong { font-size: 17px; }
.map-heading span:last-child { color: var(--muted); font-size: 13px; }
.contact-map iframe {
  flex: 1;
  min-height: 300px;
  height: clamp(300px, 32vw, 420px);
}
.contact-map .map-note {
  border-radius: 0 0 14px 14px;
}

.contacts-form-layout {
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr);
  align-items: start;
  gap: clamp(18px, 2.8vw, 40px);
}
.contact-form-aside {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 3vw, 42px);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 209, 0, .18), transparent 38%),
    var(--dark-2);
  color: #fff;
}
.contact-form-aside > * { position: relative; z-index: 1; }
.contact-form-aside h2 {
  margin: 8px 0 12px;
  color: #fff;
  font-size: clamp(25px, 2.5vw, 34px);
}
.contact-form-aside p {
  color: #D7D9D8;
  font-size: 15px;
}
.contact-form-aside__phone {
  display: inline-block;
  margin: 10px 0 18px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 600;
  white-space: nowrap;
}
.contact-form-aside__note {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  color: #D7D9D8;
  font-size: 13px;
}
.contacts-message .section-form {
  margin: 0;
  border: 1px solid rgba(16, 19, 21, .08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(16, 19, 21, .08);
}
.contacts-message .section-form h2 { margin-top: 0; }

/* ---------- Тематический чертёж для тёмных лент ---------- */
.stats,
.ribbon {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.stats::before,
.ribbon::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: radial-gradient(ellipse at 82% 50%, rgba(255, 133, 13, .12), transparent 42%);
  pointer-events: none;
}
.stats::after,
.ribbon::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  right: max(2%, calc((100% - 1440px) / 2));
  width: min(48%, 620px);
  height: 94%;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 880 260' fill='none' stroke='%23FFD100' stroke-opacity='.48' stroke-width='2'%3E%3Cpath d='M42 34h796v192H42zM42 128h198v98M240 34v94h256 M496 128v98M496 174h342'/%3E%3Cpath d='M240 128a28 28 0 0 1 28 28M496 128a28 28 0 0 1 28 28M240 174a28 28 0 0 1 28 28M496 174a28 28 0 0 1 28 28M62 50h154v60H62zM520 50h298v60H520zM520 194h298'/%3E%3Cpath d='M42 16h796M42 10v12M838 10v12M24 34v192M18 34h12M18 226h12' stroke-opacity='.32'/%3E%3C/svg%3E") right center / contain no-repeat;
  opacity: .92;
  pointer-events: none;
}
.stats > *,
.ribbon > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 980px) {
  .contacts-layout,
  .contacts-form-layout { grid-template-columns: minmax(0, 1fr); }
  .contact-map iframe { height: 360px; }
}

@media (max-width: 640px) {
  .contact-card { min-height: 0; }
  .contact-form-aside__phone { white-space: normal; }
  .stats::after,
  .ribbon::after {
    right: -15%;
    width: 72%;
    opacity: .45;
  }
}
