/* Reference lock: existing Hangcha graphite/scarlet system, contact-first footer. */
.hc-footer-v3 {
  --footer-text: #d6dde0;
  --footer-muted: #aab4ba;
  --footer-line: #354047;
  background: #161c20;
  color: var(--footer-text);
}
.hc-footer-v3 .hc-footer-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr .9fr;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 36px;
}
.hc-footer-v3 .hc-footer-direct { min-width: 0; }
.hc-footer-v3 a { color: var(--footer-text); text-decoration: none; }
.hc-footer-v3 a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.hc-footer-v3 :is(a, summary):focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.hc-footer-v3 .hc-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: #fff;
  border-radius: 2px;
}
.hc-footer-logo img:first-child { width: 76px; height: 36px; object-fit: contain; }
.hc-footer-logo img:last-child { width: 106px; height: auto; }
.hc-footer-logo > span { width: 1px; height: 26px; background: #d0d7db; }
.hc-footer-v3 .hc-footer-description {
  margin: 12px 0 18px;
  color: var(--footer-muted);
  font-size: 13px;
  line-height: 1.6;
}
.hc-footer-reach { display: grid; justify-items: start; }
.hc-footer-v3 .hc-footer-phone {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #fff;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  letter-spacing: -.35px;
}
.hc-footer-v3 .hc-footer-email { display: inline-flex; align-items: center; min-height: 36px; font-size: 15px; }
.hc-footer-hours { color: var(--footer-muted); font-size: 13px; line-height: 1.6; }
.hc-footer-addresses { display: grid; gap: 14px; margin: 24px 0; }
.hc-footer-addresses address { font-style: normal; }
.hc-footer-addresses address > span {
  display: block;
  margin-bottom: 3px;
  color: var(--footer-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hc-footer-addresses address > a { display: block; font-size: 13px; line-height: 1.7; }
.hc-footer-addresses a > span { display: inline-block; margin-left: 6px; }
.hc-footer-v3 .hc-footer-quote {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 2px;
  background: var(--c-accent, #e30613);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 160ms ease;
}
.hc-footer-v3 .hc-footer-quote:hover { background: var(--c-accent-hover, #b8000c); text-decoration: none; }
.hc-footer-platforms { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hc-footer-v3 :is(.hc-footer-avito, .hc-footer-social) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid var(--footer-line);
  border-radius: 2px;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.hc-footer-v3 :is(.hc-footer-avito, .hc-footer-social):hover { background: #242e34; border-color: #68777f; text-decoration: none; }
.hc-footer-avito { padding: 9px 11px; font-size: 13px; white-space: nowrap; }
.hc-footer-social { width: 44px; }
.hc-footer-platforms .hc-social-icon { display: block; width: 22px; height: 22px; }
.hc-footer-v3 .hc-footer-group { min-width: 0; border: 0; padding: 0; background: none; }
.hc-footer-v3 .hc-footer-group > summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: default; padding: 0; }
.hc-footer-group > summary::-webkit-details-marker { display: none; }
.hc-footer-v3 .hc-footer-group > summary h2 {
  margin: 0;
  max-width: none;
  color: #fff;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.hc-footer-group > summary .hc-icon { display: none; }
.hc-footer-group nav { display: grid; gap: 0; margin-top: 16px; }
.hc-footer-v3 .hc-footer-group nav a { display: flex; align-items: center; min-height: 40px; padding: 7px 0; font-size: 14px; line-height: 1.5; }
.hc-footer-v3 .hc-footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
  padding-top: 22px;
  padding-bottom: 24px;
  border-top: 1px solid var(--footer-line);
  color: var(--footer-muted);
  font-size: 12px;
  line-height: 1.6;
}
.hc-footer-identity { display: grid; gap: 4px; }
.hc-footer-legal-links { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.hc-footer-legal-links a { display: inline-flex; align-items: center; min-height: 36px; }
.hc-footer-price-note { flex-basis: 100%; margin: 0; }
.hc-footer-stage { font-size: 11px; }
@media (min-width: 701px) and (max-width: 1100px) {
  .hc-footer-v3 .hc-footer-layout { grid-template-columns: 1.45fr 1fr 1fr; gap: 24px; }
  .hc-footer-direct { grid-row: span 2; }
  .hc-footer-v3 .hc-footer-phone { font-size: 21px; }
}
@media (max-width: 767px) {
  /* Keep CTA/safe-area clearance inside the dark footer, not the white body.
     A stable reserve also protects footer links when JavaScript is unavailable. */
  body.hc-theme { padding-bottom: 0; }
  body.hc-theme:not(.hc-page-blog) .hc-footer-v3 { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 700px) {
  .hc-footer-v3 .hc-footer-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; padding-bottom: 0; }
  .hc-footer-direct { padding-bottom: 24px; }
  .hc-footer-v3 .hc-footer-description { margin: 10px 0 12px; }
  .hc-footer-v3 .hc-footer-phone { min-height: 44px; font-size: 23px; }
  .hc-footer-v3 .hc-footer-email { min-height: 44px; }
  .hc-footer-addresses { gap: 12px; margin: 20px 0; }
  .hc-footer-addresses address > a { display: flex; align-items: center; min-height: 44px; font-size: 14px; line-height: 1.55; }
  .hc-footer-v3 .hc-footer-group { border-top: 1px solid var(--footer-line); }
  .hc-footer-v3 .hc-footer-group > summary { min-height: 54px; cursor: pointer; }
  .hc-footer-group > summary .hc-icon { display: block; color: var(--footer-muted); transition: transform 160ms ease; }
  .hc-footer-group[open] > summary .hc-icon { transform: rotate(180deg); }
  .hc-footer-group nav { margin: 0 0 14px; }
  .hc-footer-v3 .hc-footer-group nav a { min-height: 44px; font-size: 15px; }
  .hc-footer-v3 .hc-footer-legal { display: grid; gap: 4px; padding-top: 18px; padding-bottom: 24px; }
  .hc-footer-registration { font-size: 11px; }
  .hc-footer-legal-links a { min-height: 44px; }
}
@media (max-width: 767px) {
  /* The browser's bottom/overscroll surface follows the page canvas, not the
     footer box. Only darken it once the footer covers the visible content. */
  html.hc-footer-canvas,
  html.hc-footer-canvas body.hc-theme { background-color: #161c20; }
}
@media (prefers-reduced-motion: reduce) {
  .hc-footer-v3 *, .hc-footer-v3 *::before, .hc-footer-v3 *::after { transition: none; }
}
