.site-footer {
  position: relative;
  background: #003a8c;
  color: #ffffff;
}

.back-top {
  position: fixed;
  right: max(24px, calc((100vw - 1600px) / 2 + 24px));
  bottom: 32px;
  left: auto;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  color: #0052d9;
  box-shadow:
    0 0 0 8px rgba(0, 112, 255, 0.12),
    0 0 24px rgba(0, 112, 255, 0.28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.back-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.back-top.is-visible:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 8px rgba(0, 112, 255, 0.18),
    0 0 28px rgba(0, 112, 255, 0.38);
}

.back-top.is-visible:active {
  transform: translateY(0);
}

.back-top.is-on-footer {
  position: absolute;
  top: 0;
  bottom: auto;
  transform: translateY(-50%);
}

.back-top.is-visible.is-on-footer:hover {
  transform: translateY(calc(-50% - 2px));
}

.back-top.is-visible.is-on-footer:active {
  transform: translateY(-50%);
}

.back-top img,
.back-top svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.back-top svg {
  width: 22px;
  height: 22px;
}

.site-footer__inner {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-footer__main {
  display: flex;
  gap: 48px;
  padding: 64px 0 0px;
}

.site-footer__nav {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px 20px;
  min-width: 0;
}

.site-footer__col-title {
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: #ffffff;
}

.site-footer__col-title::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  margin-top: 10px;
  background: #ffffff;
}

.site-footer__links {
  list-style: none;
}

.site-footer__links li + li {
  margin-top: 12px;
}

.site-footer__links a {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 1);
  text-decoration: none;
  transition: color 0.25s ease;
}

.site-footer__links a:hover {
  color: #ffffff;
}

.site-footer__contact {
  padding-bottom: 82px;
  flex-shrink: 0;
  width: 370px;
  padding-left: 48px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  text-align: right;
}

.site-footer__contact-item + .site-footer__contact-item {
  margin-top: 28px;
}

.site-footer__contact-label {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  color: rgba(255, 255, 255, 1);
}

.site-footer__phone {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.site-footer__address {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
}

.site-footer__qrcode {
  display: block;
  width: 108px;
  height: 108px;
  margin-left: auto;
  padding: 6px;
  border-radius: 4px;
  background: #ffffff;
  object-fit: contain;
}

.site-footer__bar {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.site-footer__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px 24px 28px;
}

.site-footer__copyright {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 1);
}

.site-footer__legal {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-footer__legal a {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 1);
  text-decoration: none;
  transition: color 0.25s ease;
}

.site-footer__legal a:hover {
  color: #ffffff;
}

.site-footer__legal-divider {
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 1600px) {
  .site-footer__inner {
    padding: 0 24px;
  }

  .site-footer__main {
    gap: 40px;
  }

  .site-footer__contact {
    width: 320px;
    padding-left: 32px;
    padding-bottom: 64px;
  }

  .site-footer__nav {
    gap: 20px 16px;
  }

  .back-top {
    right: max(20px, calc((100vw - 1600px) / 2 + 20px));
  }
}

@media (max-width: 1024px) {
  .site-footer__main {
    flex-direction: column;
    gap: 40px;
    padding: 48px 0 0;
  }

  .site-footer__nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer__contact {
    width: 100%;
    padding-left: 0;
    padding-bottom: 48px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 32px;
    text-align: left;
  }

  .site-footer__qrcode {
    margin-left: 0;
  }

  .site-footer__bar-inner {
    padding: 20px 24px 24px;
  }

  .back-top {
    right: 20px;
  }
}

@media (max-width: 768px) {
  .site-footer__inner {
    padding: 0 16px;
  }

  .site-footer__main {
    padding: 40px 0 0;
    gap: 32px;
  }

  .site-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
  }

  .site-footer__col-title {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .site-footer__links a {
    font-size: 13px;
  }

  .site-footer__contact {
    padding-bottom: 40px;
    padding-top: 28px;
  }

  .site-footer__phone {
    font-size: 24px;
  }

  .site-footer__bar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 16px 24px;
  }

  .site-footer__copyright,
  .site-footer__legal a {
    font-size: 12px;
  }

  .back-top {
    width: 40px;
    height: 40px;
    right: 12px;
    bottom: 20px;
    box-shadow:
      0 0 0 4px rgba(0, 112, 255, 0.1),
      0 0 12px rgba(0, 112, 255, 0.18);
  }

  .back-top.is-visible:hover {
    box-shadow:
      0 0 0 4px rgba(0, 112, 255, 0.14),
      0 0 14px rgba(0, 112, 255, 0.24);
  }

  .back-top img {
    width: 24px;
    height: 24px;
    margin: auto;
  }
}
