.site-footer {
  margin-top: clamp(40px, 5vw, 72px);
  padding: 0 0 40px;
  border-top: 1px solid var(--border-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, rgba(255, 255, 255, 0) 22%),
    var(--bg-page);
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr);
  gap: clamp(26px, 3vw, 48px);
  padding: clamp(34px, 4vw, 56px) 0 clamp(24px, 3vw, 36px);
}

.site-footer__nav,
.site-footer__contacts,
.site-footer__brand-wrap,
.site-footer__legal-wrap {
  min-width: 0;
}

.site-footer__nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: clamp(18px, 2vw, 30px);
}

.site-footer__nav-group {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 12px;
}

.site-footer__title {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.96);
}

.site-footer__nav-group > .site-footer__title {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.site-footer__nav-list,
.site-footer__contacts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.site-footer__nav-item,
.site-footer__contacts-item {
  margin: 0;
}

.site-footer__link,
.site-footer__contact-link,
.site-footer__legal-link,
.site-footer__messenger-link {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  transition: color var(--transition-base), opacity var(--transition-base);
}

.site-footer__link {
  color: rgba(255, 255, 255, 0.72);
}

.site-footer__contacts-column {
  display: grid;
  gap: 12px;
  padding: 22px 20px;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background:
    radial-gradient(
      110% 120% at 100% 0%,
      rgba(255, 96, 0, 0.12) 0%,
      rgba(255, 96, 0, 0) 52%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0) 100%),
    rgba(18, 19, 21, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 30px rgba(0, 0, 0, 0.22);
}

.site-footer__contacts-column > .site-footer__title {
  margin-bottom: 0;
  font-size: 15px;
}

.site-footer__contacts-groups {
  display: grid;
  gap: 12px;
}

.site-footer__contacts-group {
  display: grid;
  gap: 7px;
  padding: 0;
}

.site-footer__contacts-group-title {
  margin: 0;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.site-footer__contacts-group-body {
  display: grid;
  gap: 8px;
}

.site-footer__contact-link {
  color: rgba(255, 255, 255, 0.88);
}

.site-footer__contact-link--phone {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--text-primary);
}

.site-footer__messengers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer__messenger-link {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    color var(--transition-base),
    border-color var(--transition-base),
    background-color var(--transition-base),
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

.site-footer__messenger-link::before {
  content: "";
  width: 18px;
  height: 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.95;
  filter: invert(1);
}

.site-footer__messenger-link--whatsapp::before {
  background-image: url("../assets/img/icon-whatsapp.png");
}

.site-footer__messenger-link--telegram::before {
  background-image: url("../assets/img/icon-telegram.png");
}

.site-footer__messenger-link--max::before {
  background-image: url("../assets/img/icon-max.png");
}

.site-footer__messenger-link--vk::before {
  background-image: url("../assets/img/icon-vk.png");
}

.site-footer__meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.site-footer__bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 14px 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.site-footer__brand-wrap {
  display: grid;
  gap: 8px;
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-primary);
}

.site-footer__brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: min(100%, 40px);
  height: 40px;
}

.site-footer__brand-logo-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.site-footer__brand-text {
  min-width: 0;
}

.site-footer__copyright {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-dim);
}

.site-footer__legal-wrap {
  display: grid;
  gap: 10px;
  justify-items: end;
  align-content: end;
}

.site-footer__legal-links {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.site-footer__requisites {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-dim);
}

.site-footer__link:focus-visible,
.site-footer__contact-link:focus-visible,
.site-footer__messenger-link:focus-visible,
.site-footer__legal-link:focus-visible,
.site-footer__brand:focus-visible {
  outline: none;
  color: var(--text-primary);
  box-shadow: var(--focus-ring);
  border-radius: 6px;
}

@media (hover: hover) and (pointer: fine) {
  .site-footer__link:hover,
  .site-footer__contact-link:hover,
  .site-footer__messenger-link:hover,
  .site-footer__legal-link:hover {
    color: var(--text-primary);
  }

  .site-footer__messenger-link:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 96, 0, 0.18);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  }
}

@media (max-width: 1199px) {
  .site-footer {
    padding-bottom: 36px;
  }

  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 36px;
    padding-bottom: 24px;
  }

  .site-footer__nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
  }

  .site-footer__contacts-column {
    max-width: 600px;
  }

  .site-footer__bottom {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 14px;
  }

  .site-footer__legal-wrap {
    justify-items: start;
  }

  .site-footer__legal-links {
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .site-footer {
    padding-bottom: 32px;
  }

  .site-footer__top {
    gap: 22px;
    padding-top: 28px;
    padding-bottom: 20px;
  }

  .site-footer__nav-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .site-footer__title {
    font-size: 15px;
  }

  .site-footer__contacts-group-title {
    font-size: 10px;
  }

  .site-footer__contacts-column {
    padding: 18px 16px;
  }

  .site-footer__link,
  .site-footer__contact-link,
  .site-footer__legal-link,
  .site-footer__messenger-link {
    font-size: 15px;
    line-height: 1.5;
  }

  .site-footer__messenger-link {
    width: 40px;
    height: 40px;
  }

  .site-footer__bottom {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 14px;
    padding-top: 16px;
  }

  .site-footer__brand {
    font-size: 18px;
  }

  .site-footer__brand-logo {
    width: min(100%, 34px);
    height: 34px;
  }

  .site-footer__legal-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

html[data-theme="light"] .site-footer {
  border-top-color: rgba(16, 20, 24, 0.14);
  background:
    linear-gradient(180deg, rgba(17, 22, 28, 0.02) 0%, rgba(17, 22, 28, 0) 24%),
    #f6f8fb;
}

html[data-theme="light"] .site-footer__title {
  font-size: 17px;
  font-weight: 700;
  color: #111111;
}

html[data-theme="light"] .site-footer__brand {
  color: #101418;
}

html[data-theme="light"] .site-footer__contact-link--phone {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: #111111;
}

html[data-theme="light"] .site-footer__contact-link:not(.site-footer__contact-link--phone) {
  color: #374151;
}

html[data-theme="light"] .site-footer__link,
html[data-theme="light"] .site-footer__legal-link {
  color: #374151;
}

html[data-theme="light"] .site-footer__meta,
html[data-theme="light"] .site-footer__copyright,
html[data-theme="light"] .site-footer__requisites {
  color: #4b5563;
}

html[data-theme="light"] .site-footer__contacts-group-title {
  color: rgba(16, 20, 24, 0.62);
}

html[data-theme="light"] .site-footer__nav-group > .site-footer__title {
  border-bottom-color: rgba(16, 20, 24, 0.16);
}

html[data-theme="light"] .site-footer__contacts-column {
  background:
    linear-gradient(180deg, rgba(17, 22, 28, 0.04) 0%, rgba(17, 22, 28, 0) 100%),
    #eef2f7;
  border-color: rgba(16, 20, 24, 0.2);
  box-shadow:
    0 10px 28px rgba(16, 20, 24, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

html[data-theme="light"] .site-footer__messenger-link {
  background: rgba(23, 27, 34, 0.92);
  border-color: rgba(16, 20, 24, 0.32);
  color: #ffffff;
}

html[data-theme="light"] .site-footer__bottom {
  border-top-color: rgba(16, 20, 24, 0.14);
}

@media (hover: hover) and (pointer: fine) {
  html[data-theme="light"] .site-footer__link:hover,
  html[data-theme="light"] .site-footer__contact-link:hover,
  html[data-theme="light"] .site-footer__legal-link:hover {
    color: #ff6000;
  }

  html[data-theme="light"] .site-footer__messenger-link:hover {
    background: rgba(16, 20, 24, 0.96);
    border-color: rgba(255, 96, 0, 0.45);
    box-shadow: 0 10px 22px rgba(16, 20, 24, 0.18);
    transform: translateY(-1px);
  }
}

@media (max-width: 767px) {
  html[data-theme="light"] .site-footer__title {
    font-size: 16px;
  }

  html[data-theme="light"] .site-footer__contact-link--phone {
    font-size: 17px;
  }
}
