/* ═══════════════════════════════════════════════════════════════
   cvesp-shell.css — ОБЩИЙ КАРКАС САЙТА cvesp.ru
   ───────────────────────────────────────────────────────────────
   Шапка + навигация (mega-меню) + sticky-кнопка контактов + подвал.
   Подключается на ВСЕХ страницах (главная и внутренние) ПЕРЕД
   страничным CSS. Правка здесь меняет каркас сразу везде.

   Состав:
     0. Минимальный сброс
     1. Hero-обёртка (фон head.jpg) — .cvh-hero-wrap
     2. Шапка — .cvh-hdr
     3. Навигация + mega-меню — .cvh-nav / .cvh-mega
     4. Sticky-FAB (телефон/почта/заявка) — .cvh-fab
     5. Подвал — .cv-footer
   ═══════════════════════════════════════════════════════════════ */


/* ████████████████████████████████████████████████████████████████
   0. МИНИМАЛЬНЫЙ СБРОС
   ████████████████████████████████████████████████████████████████ */
*, *::before, *::after { box-sizing: border-box; }
body  { margin: 0; padding: 0; background: #f4f7fd; font-family: var(--cv-font-body); }
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; margin: 0; padding: 0; }
img   { max-width: 100%; height: auto; display: block; border: 0; }
h1, h2, h3 { margin: 0; }


/* ████████████████████████████████████████████████████████████████
   1. HERO-ОБЁРТКА — фон head.jpg на всю ширину
   ████████████████████████████████████████████████████████████████ */
.cvh-hero-wrap {
  background:
    repeating-linear-gradient(to bottom right, rgba(26,111,181,.2) 0%, rgba(23,68,105,.2) 100%),
    url("../img/head.jpg") center top / cover no-repeat fixed;
  padding-bottom: 90px;
}
/* Раньше тут был мобильный фолбэк .cvh-hero-wrap { background-attachment: scroll },
   но он растягивал фон под высоту блока. Оставляем fixed (как у подвала .cv-footer,
   который рендерится корректно): фон масштабируется под экран и не «едет». */
@media (max-width: 560px) {
  .cvh-hero-wrap { padding-bottom: 100px; }
}
/* Компактная обёртка для внутренних страниц — только шапка+меню,
   без нижнего отступа под hero-контент. */
.cvh-hero-wrap--bar { padding-bottom: 0; }


/* ████████████████████████████████████████████████████████████████
   2. ШАПКА
   ████████████████████████████████████████████████████████████████ */
.cvh-hdr { padding: 0 18px; }
.cvh-hdr-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 0 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cvh-hdr-logo img { width: auto; height: auto; max-height: 120px; display: block; }

.cvh-hdr-contacts {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.cvh-hdr-contacts a {
  color: rgba(255,255,255,.9);
  font-family: var(--cv-font-body);
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  transition: color .2s;
}
.cvh-hdr-contacts a[href^="mailto"] { color: #adf279; }
.cvh-hdr-contacts a:hover { color: #fff; }

.cvh-hdr-social { display: flex; gap: 8px; align-items: center; }
.cvh-hdr-social a { display: flex; }
.cvh-hdr-social img { width: 28px; height: 28px; opacity: .8; transition: opacity .2s; }
.cvh-hdr-social a:hover img { opacity: 1; }

@media (max-width: 768px) {
  .cvh-hdr-contacts { gap: 12px; }
  .cvh-hdr-contacts a { font-size: 12px; }
}
@media (max-width: 540px) {
  .cvh-hdr-inner { padding: 20px 0; gap: 14px; }
  .cvh-hdr-contacts { margin-left: 0; order: 3; width: 100%; }
  .cvh-hdr-social { margin-left: auto; }
}


/* ████████████████████████████████████████████████████████████████
   3. НАВИГАЦИЯ
   ████████████████████████████████████████████████████████████████ */
.cvh-nav { background: rgba(8,50,77,.5); position: relative; }
.cvh-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* Скрытый чекбокс для мобильного бургера */
.cvh-nav-cb { display: none; }

/* Бургер — скрыт на десктопе */
.cvh-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 14px 0;
  margin-left: auto;
}
.cvh-burger span {
  display: block; width: 24px; height: 2px;
  background: rgba(255,255,255,.8); border-radius: 2px; transition: all .25s;
}
.cvh-nav-cb:checked ~ .cvh-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.cvh-nav-cb:checked ~ .cvh-burger span:nth-child(2) { opacity: 0; }
.cvh-nav-cb:checked ~ .cvh-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Список пунктов */
.cvh-nav-list { display: flex; flex-flow: row nowrap; }
.cvh-nav-list > li { display: flex; }
.cvh-nav-list > li > a {
  display: flex; align-items: center;
  padding: 26px 18px;
  color: rgba(255,255,255,.82);
  font-family: var(--cv-font-body);
  font-size: 13.2px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap;
  transition: color .2s, background .2s;
}
.cvh-nav-list > li > a:hover {
  color: #adf279;
  background: rgba(255,255,255,.08);
}

/* Chevron у пунктов с подменю */
.cvh-nav-arrow {
  margin-left: 6px;
  opacity: .55;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), opacity .25s ease;
  vertical-align: 1px;
}
.cvh-has-sub:hover > a .cvh-nav-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* ───── Mega-меню (Stripe / Vercel style) ───── */
.cvh-mega {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.35),
              0 4px 12px -4px rgba(0,0,0,.15);
  padding: 28px;
  width: max-content;
  min-width: 600px;
  max-width: 720px;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity .25s ease, transform .25s cubic-bezier(.2,.7,.3,1);
}
.cvh-has-sub:hover .cvh-mega,
.cvh-has-sub:focus-within .cvh-mega {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
/* Невидимый «мостик» между пунктом и панелью — чтобы курсор не «срывался» */
.cvh-mega::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: -10px; height: 10px;
}

.cvh-mega-left {
  display: flex; flex-direction: column;
  padding: 14px;
  border: 1px solid rgba(20,59,92,.08);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background .2s ease, border-color .2s ease;
}
.cvh-mega-left:hover {
  background: #f4f7fd;
  border-color: rgba(20,59,92,.16);
}
.cvh-mega-title {
  font-family: var(--cv-font-body);
  font-size: 22px; font-weight: 700;
  color: #143b5c;
  margin: 0 0 12px;
  letter-spacing: 0;
  text-transform: none;
}
.cvh-mega-desc {
  font-family: var(--cv-font-body);
  font-size: 13px; font-weight: 400;
  line-height: 1.55;
  color: #6b7c8e;
  margin: 0 0 24px;
}
.cvh-mega-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--cv-font-body);
  font-size: 12px; font-weight: 700;
  color: #1a6fb5;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: auto;
  align-self: flex-start;
  transition: gap .25s ease, color .25s ease;
}
.cvh-mega-cta::after {
  content: '→';
  font-size: 14px; font-weight: 400;
  transition: transform .25s ease;
}
.cvh-mega-left:hover .cvh-mega-cta { gap: 12px; color: #143b5c; }
.cvh-mega-left:hover .cvh-mega-cta::after { transform: translateX(3px); }

.cvh-mega-right {
  display: flex; flex-direction: column; gap: 2px;
}
.cvh-mega-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(20,59,92,.08);
  border-radius: 10px;
  transition: background .2s ease, border-color .2s ease;
}
.cvh-mega-item:hover {
  background: #f4f7fd;
  border-color: rgba(20,59,92,.16);
}
.cvh-mega-icon {
  flex-shrink: 0;
  width: 38px; height: 38px;
  background: #eef4fb;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1a6fb5;
  transition: background .2s ease, color .2s ease, transform .25s ease;
}
.cvh-mega-item:hover .cvh-mega-icon {
  background: #1a6fb5;
  color: #fff;
  transform: scale(1.05);
}
.cvh-mega-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.cvh-mega-name {
  font-family: var(--cv-font-body);
  font-size: 16px; font-weight: 400;
  color: #143b5c;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}
.cvh-mega-sub {
  font-family: var(--cv-font-body);
  font-size: 12px; font-weight: 400;
  color: #6b7c8e;
  line-height: 1.45;
}

/* ── Мобильное меню ── */
@media (max-width: 768px) {
  .cvh-nav-inner { flex-wrap: wrap; justify-content: flex-start; }
  .cvh-burger    { display: flex; }

  .cvh-nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .cvh-nav-cb:checked ~ .cvh-nav-list { display: flex; }

  .cvh-nav-list > li { flex-direction: column; }
  .cvh-nav-list > li > a { padding: 14px 0; }

  /* Mega-меню на мобильном — раскрытым стеком в тёмно-синей шапке */
  .cvh-mega {
    position: static;
    transform: none;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    background: rgba(0,0,0,.18);
    box-shadow: none;
    border-radius: 0;
    padding: 14px 16px;
    grid-template-columns: 1fr;
    gap: 12px;
    opacity: 1;
    pointer-events: auto;
  }
  .cvh-mega::before { display: none; }
  .cvh-has-sub:hover .cvh-mega,
  .cvh-has-sub:focus-within .cvh-mega { transform: none; }

  .cvh-mega-left {
    padding: 0 0 12px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .cvh-mega-title { color: rgba(255,255,255,.95); font-size: 16px; margin-bottom: 6px; }
  .cvh-mega-desc { color: rgba(255,255,255,.6); font-size: 12px; margin-bottom: 10px; }
  .cvh-mega-cta { color: #adf279; }
  .cvh-mega-cta:hover { color: #c7f99e; }

  .cvh-mega-right { gap: 4px; }
  .cvh-mega-item { padding: 8px 10px; }
  .cvh-mega-item:hover { background: rgba(255,255,255,.06); }
  .cvh-mega-icon {
    width: 32px; height: 32px;
    background: rgba(255,255,255,.1);
    color: #adf279;
  }
  .cvh-mega-item:hover .cvh-mega-icon {
    background: #adf279; color: #143b5c;
  }
  .cvh-mega-name { color: rgba(255,255,255,.92); font-size: 13px; }
  .cvh-mega-sub  { color: rgba(255,255,255,.55); font-size: 11px; }
}


/* ████████████████████████████████████████████████████████████████
   4. STICKY FAB-STACK — главная + под-кнопки (телефон, почта)
   ████████████████████████████████████████████████████████████████ */
.cvh-fab-stack {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity .4s ease,
              transform .4s cubic-bezier(.2,.7,.3,1);
}
body.cvh-scrolled .cvh-fab-stack {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cvh-fab {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #174469;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 12px 28px -8px rgba(0,0,0,.45),
              0 2px 6px -2px rgba(0,0,0,.25);
  transition: background .25s ease,
              transform .35s cubic-bezier(.2,.7,.3,1),
              opacity .35s ease,
              box-shadow .25s ease;
}
.cvh-fab svg { transition: transform .3s ease; }
.cvh-fab:hover {
  background: #1a6fb5;
  transform: scale(1.06);
  box-shadow: 0 16px 36px -8px rgba(0,0,0,.5),
              0 4px 10px -2px rgba(26,111,181,.4);
}

.cvh-fab--main {
  width: 64px; height: 64px;
  background: #143b5c;
}
.cvh-fab--main:hover { background: #1a6fb5; }
.cvh-fab--main:hover svg { transform: scale(1.05); }

.cvh-fab--phone:hover svg { transform: rotate(-12deg) scale(1.1); }
.cvh-fab--email:hover svg { transform: translateY(-2px) scale(1.08); }

/* Под-кнопки — спрятаны, появляются при hover/focus главной группы */
.cvh-fab--sub {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(.75);
}
.cvh-fab-stack:hover .cvh-fab--sub,
.cvh-fab-stack:focus-within .cvh-fab--sub {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
/* Лёгкий stagger при раскрытии */
.cvh-fab--phone { transition-delay: 0s; }
.cvh-fab-stack:hover .cvh-fab--phone,
.cvh-fab-stack:focus-within .cvh-fab--phone { transition-delay: .04s; }
.cvh-fab-stack:hover .cvh-fab--email,
.cvh-fab-stack:focus-within .cvh-fab--email { transition-delay: .1s; }

@media (max-width: 560px) {
  .cvh-fab-stack    { right: 16px; bottom: 16px; gap: 10px; }
  .cvh-fab          { width: 48px; height: 48px; }
  .cvh-fab--main    { width: 56px; height: 56px; }
  /* На тач-экранах под-кнопки видны сразу — hover недоступен */
  .cvh-fab--sub     { opacity: 1; pointer-events: auto; transform: none; }
}


/* ████████████████████████████████████████████████████████████████
   5. ПОДВАЛ САЙТА
   ████████████████████████████████████████████████████████████████ */
.cv-footer {
  font-family: var(--cv-font-body);
  /* Фото head.jpg + полупрозрачный синий оверлей (как в шапке и блоке «О нас») */
  background:
    linear-gradient(rgba(15,50,114,.5), rgba(15,50,114,.5)),
    url("../img/head.jpg") center / cover no-repeat fixed;
  background-color: #0f3272;
  color: #9fb3da;
  letter-spacing: .2px;
  box-sizing: border-box;
  /* Статика reg.ru: подвал — прямой потомок <body>, full-width сам собой.
     (Раньше тут был приём width:100vw для выхода из S3-контейнера ~960px.) */
}
.cv-footer *, .cv-footer *::before, .cv-footer *::after { box-sizing: border-box; }
.cv-footer a { text-decoration: none; color: inherit; }

.cv-footer-top {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: 36px;
}
@media (max-width: 900px) {
  .cv-footer-top { grid-template-columns: 1fr 1fr; gap: 32px 28px; }
}
@media (max-width: 540px) {
  .cv-footer-top { grid-template-columns: 1fr; gap: 28px; padding: 36px 20px 24px; }
}

/* ── Колонка "О компании" ── */
.cv-footer-brand-name {
  font-family: var(--cv-font-head);
  font-size: 24px;
  color: #9fb3da;
  margin-bottom: 12px;
  line-height: 1;
}
.cv-footer-brand-desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
  color: #9fb3da;
}
.cv-footer-social {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.cv-footer-social a {
  height: 38px;
  padding: 0 15px;
  border-radius: 9px;
  border: 1.5px solid #2f5495;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9fb3da;
  font-size: 14px;
  font-weight: 400;
  transition: background .2s, border-color .2s, color .2s;
}
.cv-footer-social a:hover {
  background: #1a4fa0;
  border-color: #1a4fa0;
  color: #ffffff;
}
.cv-footer-social svg {
  width: 18px; height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Колонки-ссылки ── */
.cv-footer-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #9fb3da;
  margin-bottom: 14px;
}
/* <nav class="cv-footer-links"> — колонки ссылок подвала во flex-столбик. */
.cv-footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cv-footer-links a {
  font-size: 14px;
  font-weight: 400;
  color: #9fb3da;
  transition: color .2s;
  width: fit-content;
}
.cv-footer-links a:hover { color: #ffffff; }

/* ── Колонка "Контакты" ── */
.cv-footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.cv-footer-contact {
  display: flex;
  gap: 9px;
  font-size: 14px;
  font-weight: 400;
  color: #9fb3da;
  line-height: 1.5;
}
.cv-footer-contact svg {
  width: 16px; height: 16px;
  stroke: #7f95c4; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  margin-top: 2px;
}
.cv-footer-contact.is-phone span { color: #9fb3da; font-weight: 400; }
.cv-footer-contact a { color: inherit; }
.cv-footer-contact a:hover { color: #ffffff; }
.cv-footer-maplink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: #d99a2f;
  font-size: 14px;
  font-weight: 400;
  transition: color .2s;
}
.cv-footer-maplink:hover { color: #e0a943; }
.cv-footer-maplink svg {
  width: 15px; height: 15px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ── Нижняя строка ── */
.cv-footer-bottom {
  border-top: 1px solid #1d3f7a;
}
.cv-footer-bottom-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.cv-footer-copyright {
  font-size: 12px;
  font-weight: 400;
  color: #9fb3da;
}
.cv-footer-requisites {
  font-size: 12px;
  font-weight: 400;
  color: #8497c4;
}
@media (max-width: 540px) {
  .cv-footer-bottom-inner { padding: 14px 20px; }
}
