/* ===== Footer ===== */

.footer {
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background-color: var(--accent);
  border-radius: 4.2rem 4.2rem 0 0;
  margin-top: var(--section-margin);
  padding: var(--block-padding) 0;
  background-image: url(../icons/footer-bg.svg);
  background-repeat: no-repeat;
  background-position: right bottom;
  background-size: 149rem auto;
}

.footer__body {
  display: flex;
  flex-direction: column;
}

.footer__logo {
  position: absolute;
  z-index: 0;
  right: 0;
  top: 0;
  width: 47.4rem;
  height: auto;
  pointer-events: none;
}

.footer .wrapper {
  position: relative;
  z-index: 1;
}

.footer h4,
.footer a {
  color: var(--light-bg);
}

.footer__contacts {
  position: relative;
  z-index: 1;
  margin-bottom: 6rem;
}

.footer__contacts-list {
  display: flex;
  gap: var(--gap);
}

.footer__contacts-link {
  width: 5.2rem;
  height: 5.2rem;
  border-radius: var(--border-radius-small);
  background-color: var(--light-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--quad);
}

.footer__contacts-link svg {
  width: 2.8rem;
  height: auto;
}

.footer__contacts-link svg path {
  transition: var(--quad);
}

.footer__contacts-link:hover {
  background-color: var(--hover-color);
}

.footer__contacts-link:hover path {
  fill: var(--light-bg);
}

.footer__contacts-link--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.footer__nav {
  display: flex;
  gap: var(--section-margin);
  margin-bottom: 6rem;
}

.footer__nav-group {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.footer__nav-title {
  font-size: var(--h4-font-size);
  font-weight: 700;
  color: var(--light-bg);
}

a.footer__nav-title:hover {
  color: var(--blue);
}

.footer__nav-title--label {
  cursor: default;
}

.footer__link:hover {
  color: var(--blue);
}

.footer__legal {
  display: flex;
  gap: 1.6rem;
  align-items: center;
}

.footer__legal .footer__link {
  font-size: 1.4rem;
  opacity: 0.45;
}

.footer__legal .footer__link:hover {
  opacity: 0.75;
}

.footer__copyright {
  margin-top: 1.2rem;
  color: var(--light-bg);
  font-size: 1.4rem;
  opacity: 0.4;
}

.footer__phone {
  margin-top: 1.2rem;
  color: var(--light-bg);
  font-size: 1.4rem;
  text-decoration: none;
  opacity: 0.45;
}

.footer__phone:hover {
  opacity: 0.75;
}

/* ===== Footer: responsive ===== */

@media (max-width: 768px) {
  .footer {
    padding: 2.4rem;
    background-image: none;
  }

  .footer__link {
    font-size: 1.3rem;
  }

  .footer h4 {
    font-size: 2.4rem;
    margin-bottom: 2rem;
  }

  .footer .wrapper {
    margin: 0;
  }

  .footer__logo {
    top: 0;
    right: 0;
    width: min(50%, 24rem);
  }

  .footer__body {
    /* высота логотипа минус верхний padding футера + небольшой зазор */
    padding-top: max(0.8rem, calc(min(50%, 24rem) * 226 / 474 - 1.2rem));
  }

  .footer__contacts-link {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 1.2rem;
  }

  .footer__contacts-link svg {
    width: 1.7rem;
    height: 1.7rem;
  }

  .footer__nav {
    flex-direction: column;
    margin-top: 1.6rem;
    margin-bottom: 3.2rem;
    width: 100%;
  }

  .footer__nav-title {
    font-size: 2.4rem;
  }

  .footer__legal {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.8rem;
  }

  .footer__legal .footer__link {
    font-size: 1.05rem;
    width: 100%;
  }

  .footer__copyright {
    font-size: 1.05rem;
  }

  .footer__phone {
    font-size: 1.05rem;
  }
}
