/* =========================================================
   RENTAL TEMPLATE V2 — FOOTER
   Узкий футер в визуальной логике шапки.
   ========================================================= */

.site-footer {
  padding: 12px 0 24px;
}

.footer-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.footer-main {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(220px, .95fr) minmax(360px, 1.6fr) auto;
  gap: 28px;
  align-items: center;
  padding: 14px 18px;
}

.footer-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text-main);
}

.footer-brand-logo {
  width: 44px;
  height: 31px;
  flex: 0 0 44px;
  object-fit: contain;
}

.footer-brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.footer-brand-name {
  overflow: hidden;
  color: var(--text-main);
  font-size: 17px;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-brand-note {
  overflow: hidden;
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-links {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  transition: color .18s ease;
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.footer-template-link {
  position: relative;
}

.footer-template-link::before {
  content: "•";
  margin-right: 22px;
  color: color-mix(in srgb, var(--text-muted) 38%, transparent);
}

.footer-contacts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.footer-contact {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.footer-contact:hover {
  transform: translateY(-1px);
}

.footer-contact-telegram {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #229ed9 24%, var(--line));
  background: #fff;
}

.footer-contact-telegram:hover {
  border-color: color-mix(in srgb, #229ed9 52%, var(--line));
  box-shadow: 0 8px 20px rgba(20, 27, 40, .08);
}

.footer-contact-telegram img {
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.footer-contact-max {
  padding: 7px;
  background: linear-gradient(135deg, #42ccff 0%, #5555ee 62%, #9933dd 100%);
  box-shadow: 0 9px 22px rgba(82, 85, 238, .20);
}

.footer-contact-max:hover {
  box-shadow: 0 11px 26px rgba(82, 85, 238, .28);
}

.footer-contact-max img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
}

/* ---------- Legal line ---------- */

.footer-legal {
  display: grid;
  grid-template-columns: minmax(280px, .95fr) minmax(0, 2fr) auto;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 11px 18px 12px;
  background: color-mix(in srgb, var(--page-bg) 68%, #fff);
  color: var(--text-muted);
}

.footer-legal p {
  margin: 0;
}

.footer-legal-owner {
  font-size: 9.5px;
  line-height: 1.45;
}

.footer-legal-notes {
  min-width: 0;
  display: grid;
  gap: 2px;
  font-size: 9px;
  line-height: 1.35;
}

.footer-copy {
  color: var(--text-main);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

/* ---------- Tablet ---------- */

@media (max-width: 980px) {
  .footer-main {
    grid-template-columns: minmax(200px, 1fr) auto;
    gap: 18px;
  }

  .footer-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    padding-left: 53px;
  }

  .footer-legal {
    grid-template-columns: 1fr auto;
  }

  .footer-legal-notes {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .footer-copy {
    grid-column: 2;
    grid-row: 1;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 620px) {
  .site-footer {
    padding: 8px 0 16px;
  }

  .footer-shell {
    border-radius: 18px;
  }

  .footer-main {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 13px 14px;
  }

  .footer-brand {
    gap: 9px;
  }

  .footer-brand-logo {
    width: 40px;
    height: 28px;
    flex-basis: 40px;
  }

  .footer-brand-name {
    font-size: 15px;
  }

  .footer-brand-note {
    display: none;
  }

  .footer-contacts {
    gap: 7px;
  }

  .footer-contact {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 10px;
  }

  .footer-contact-telegram img {
    width: 28px;
    height: 28px;
  }

  .footer-contact-max {
    padding: 6px;
  }

  .footer-contact-max img {
    width: 23px;
    height: 23px;
  }

  .footer-links {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px 14px;
    padding-left: 47px;
  }

  .footer-links a {
    font-size: 10px;
  }

  .footer-template-link::before {
    margin-right: 14px;
  }

  .footer-legal {
    display: block;
    padding: 11px 14px 12px;
  }

  .footer-legal-owner {
    font-size: 9px;
  }

  .footer-legal-notes {
    margin-top: 8px;
    font-size: 8.5px;
  }

  .footer-copy {
    margin-top: 9px !important;
    font-size: 9.5px;
  }
}

@media (max-width: 390px) {
  .footer-main {
    padding-inline: 12px;
  }

  .footer-links {
    padding-left: 0;
  }

  .footer-template-link::before {
    display: none;
  }
}

/* CLIENT — Автофорсаж.com: широкий фирменный логотип */
.footer-brand-logo.footer-brand-logo-autoforsazh {
  width: 220px;
  height: 42px;
  flex: 0 0 220px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 980px) {
  .footer-brand-logo.footer-brand-logo-autoforsazh {
    width: 200px;
    height: 38px;
    flex-basis: 200px;
  }
}

@media (max-width: 620px) {
  .footer-brand-logo.footer-brand-logo-autoforsazh {
    width: 178px;
    height: 34px;
    flex-basis: 178px;
  }
}

@media (max-width: 980px) {
  .footer-links {
    padding-left: 0;
  }
}
