/* ==========================================================================
   v2 — footer. Отдельный слой: legacy Journal2-футер остальных страниц
   не затрагивается.
   ========================================================================== */

html.v2-footer-active .v2-site-footer {
  --v2-footer-bg: #2B2530;
  --v2-footer-bg-soft: #352E3A;
  --v2-footer-paper: #F8F7F6;
  --v2-footer-muted: rgba(248, 247, 246, .68);
  --v2-footer-line: rgba(185, 153, 228, .28);
  --v2-footer-accent: #B999E4;
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: var(--v2-footer-bg) !important;
  color: var(--v2-footer-paper) !important;
  font-family: 'Inter v2', 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 14px;
  line-height: 1.55;
}

/* Common footer всё ещё завершает документ и подключает Journal2-скрипты.
   На v2 его legacy-разметка скрыта, а на остальных маршрутах не меняется. */
html.v2-footer-active footer:not(.v2-site-footer),
html.v2-footer-active #bottom-modules { display: none !important; }

html.v2-footer-active .v2-site-footer,
html.v2-footer-active .v2-site-footer *,
html.v2-footer-active .v2-site-footer *::before,
html.v2-footer-active .v2-site-footer *::after { box-sizing: border-box; }

html.v2-footer-active .v2-site-footer a {
  color: inherit;
  text-decoration: none;
}

html.v2-footer-active .v2-site-footer a:focus-visible,
html.v2-footer-active .v2-site-footer summary:focus-visible {
  outline: 2px solid var(--v2-footer-accent);
  outline-offset: 3px;
}

html.v2-footer-active .v2-footer-wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

html.v2-footer-active .v2-footer-grid {
  display: grid;
  grid-template-columns: 5fr 3fr 3fr;
  gap: 48px;
  padding: 48px 0;
}

html.v2-footer-active .v2-footer-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

html.v2-footer-active .v2-footer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 16px;
  margin: 0;
  padding: 0;
  color: var(--v2-footer-paper);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
  list-style: none;
}

html.v2-footer-active .v2-footer-heading::-webkit-details-marker { display: none; }
html.v2-footer-active .v2-footer-heading::marker { display: none; content: ''; }

html.v2-footer-active .v2-footer-chevron {
  display: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease-out;
}

html.v2-footer-active .v2-footer-panel { margin-top: 16px; }

html.v2-footer-active .v2-footer-about {
  max-width: 46ch;
  margin: 0;
  color: var(--v2-footer-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
}

html.v2-footer-active .v2-footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

html.v2-footer-active .v2-footer-links a {
  color: var(--v2-footer-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  transition: color 160ms ease-out;
}

html.v2-footer-active .v2-footer-links a:hover { color: var(--v2-footer-paper); }

html.v2-footer-active .v2-footer-contacts {
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(240px, 1fr) auto;
  align-items: center;
  gap: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--v2-footer-line);
}

html.v2-footer-active .v2-footer-phone-group { min-width: 0; }
html.v2-footer-active .v2-footer-contact-heading {
  display: block;
  color: var(--v2-footer-muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

html.v2-footer-active .v2-footer-phone-list {
  display: flex;
  flex-direction: column;
  max-width: 310px;
  margin-top: 8px;
}

html.v2-footer-active .v2-footer-phone {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  min-height: 40px;
  color: var(--v2-footer-paper);
  font-variant-numeric: tabular-nums;
  transition: color 160ms ease-out;
}

html.v2-footer-active .v2-footer-phone:hover { color: var(--v2-footer-accent); }
html.v2-footer-active .v2-footer-phone span { color: var(--v2-footer-muted); font-size: 12px; }
html.v2-footer-active .v2-footer-phone strong { color: currentColor; font-size: 14px; font-weight: 600; white-space: nowrap; }
html.v2-footer-active .v2-footer-phone .v2-phone-note {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin-left: 7px;
  padding: 0 6px;
  border-radius: 99px;
  background: rgba(185, 153, 228, .14);
  color: var(--v2-footer-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  vertical-align: 1px;
}

html.v2-footer-active .v2-footer-contact-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

html.v2-footer-active .v2-footer-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--v2-footer-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  transition: color 160ms ease-out;
}

html.v2-footer-active a.v2-footer-contact:hover { color: var(--v2-footer-paper); }
html.v2-footer-active .v2-footer-contact svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--v2-footer-accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html.v2-footer-active .v2-footer-socials { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
html.v2-footer-active .v2-footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--v2-footer-line);
  border-radius: 50%;
  color: var(--v2-footer-paper);
  transition: color 160ms ease-out, border-color 160ms ease-out, background 160ms ease-out;
}
html.v2-footer-active .v2-footer-socials a:hover {
  border-color: var(--v2-footer-accent);
  background: rgba(185, 153, 228, .1);
  color: var(--v2-footer-accent);
}
html.v2-footer-active .v2-footer-socials svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html.v2-footer-active .v2-footer-socials .is-filled { fill: currentColor; stroke: none; }

html.v2-footer-active .v2-footer-trust {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 20px 0;
  border-top: 1px solid var(--v2-footer-line);
}

html.v2-footer-active .v2-footer-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--v2-footer-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

html.v2-footer-active .v2-footer-trust-item svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--v2-footer-accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

html.v2-footer-active .v2-footer-payments {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 120px;
}

html.v2-footer-active .v2-footer-payments svg { display: block; height: 24px; }
html.v2-footer-active .v2-footer-visa { width: 64px; }
html.v2-footer-active .v2-footer-visa text {
  fill: var(--v2-footer-paper);
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: -.08em;
}
html.v2-footer-active .v2-footer-mastercard { width: 42px; }
html.v2-footer-active .v2-footer-mastercard circle:first-child { fill: #EB5A52; }
html.v2-footer-active .v2-footer-mastercard circle:last-child { fill: #F2A84B; fill-opacity: .88; }

html.v2-footer-active .v2-footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 56px;
  padding: 12px 0;
  border-top: 1px solid var(--v2-footer-line);
  color: rgba(248, 247, 246, .52);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}

html.v2-footer-active .v2-footer-legal a { transition: color 160ms ease-out; }
html.v2-footer-active .v2-footer-legal a:hover { color: var(--v2-footer-paper); }

/* Один осмысленный переход к футеру вместо пустоты + резкого цветового обрыва. */
html.v2-footer-active .pbb2 > .v2-section:last-child { padding-bottom: 64px; }
html.v2-footer-active .pbb2 > .v2-bleed:last-child .v2-b2b { padding-bottom: 64px; }

@media (min-width: 768px) {
  html.v2-footer-active .v2-footer-section > .v2-footer-panel { display: block !important; }
  html.v2-footer-active .v2-footer-heading { cursor: default; pointer-events: none; }
}

@media (max-width: 767px) {
  html.v2-footer-active .v2-footer-wrap { padding: 0 20px; }
  html.v2-footer-active .v2-footer-grid { display: block; padding: 12px 0; }

  html.v2-footer-active .v2-footer-section { border-bottom: 1px solid var(--v2-footer-line); }
  html.v2-footer-active .v2-footer-section:last-child { border-bottom: 0; }
  html.v2-footer-active .v2-footer-heading {
    min-height: 52px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  html.v2-footer-active .v2-footer-chevron { display: block; }
  html.v2-footer-active .v2-footer-section[open] .v2-footer-chevron { transform: rotate(90deg); }
  html.v2-footer-active .v2-footer-panel { margin: 0; padding: 8px 0 16px; }
  html.v2-footer-active .v2-footer-links { gap: 0; }
  html.v2-footer-active .v2-footer-links a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
  }

  html.v2-footer-active .v2-footer-contacts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 0;
    padding: 20px 0;
  }
  html.v2-footer-active .v2-footer-phone-list { max-width: none; margin-top: 8px; }
  html.v2-footer-active .v2-footer-phone { grid-template-columns: 72px minmax(0, 1fr); min-height: 48px; }
  html.v2-footer-active .v2-footer-phone strong { font-size: 15px; }
  html.v2-footer-active .v2-footer-contact-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 16px;
  }
  html.v2-footer-active .v2-footer-contact { width: 100%; min-height: 40px; }
  html.v2-footer-active .v2-footer-socials { justify-content: flex-start; margin-top: 16px; }

  html.v2-footer-active .v2-footer-trust {
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
    gap: 0;
    min-height: 0;
    padding: 8px 0;
  }
  html.v2-footer-active .v2-footer-trust-item,
  html.v2-footer-active .v2-footer-payments {
    min-width: 0;
    min-height: 56px;
    padding: 10px 8px;
  }
  html.v2-footer-active .v2-footer-trust-item:nth-child(even),
  html.v2-footer-active .v2-footer-payments { border-left: 1px solid var(--v2-footer-line); }
  html.v2-footer-active .v2-footer-trust-item:nth-child(n+3),
  html.v2-footer-active .v2-footer-payments { border-top: 1px solid var(--v2-footer-line); }
  html.v2-footer-active .v2-footer-trust-item { white-space: normal; }
  html.v2-footer-active .v2-footer-payments { justify-content: flex-start; gap: 8px; }
  html.v2-footer-active .v2-footer-payments svg { height: 22px; }

  html.v2-footer-active .v2-footer-legal {
    min-height: 72px;
    padding: 16px 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
  }

  html.v2-footer-active .pbb2 > .v2-section:last-child { padding-bottom: 40px; }
  html.v2-footer-active .pbb2 > .v2-bleed:last-child .v2-b2b { padding-bottom: 40px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  html.v2-footer-active .v2-footer-grid { grid-template-columns: 4fr 3fr 3fr; gap: 32px; }
  html.v2-footer-active .v2-footer-contacts { grid-template-columns: minmax(280px, 1.2fr) minmax(220px, 1fr) auto; align-items: flex-start; gap: 24px; }
  html.v2-footer-active .v2-footer-trust { grid-template-columns: 1fr 1fr; justify-content: stretch; }
  html.v2-footer-active .v2-footer-payments { justify-content: flex-start; }
}
