/* Отдельные стили нижней части главной страницы.
   Файл подключается после styles.css, поэтому гарантированно имеет приоритет. */

.site-footer,
.site-footer * {
  box-sizing: border-box;
}

.site-footer {
  position: relative;
  width: 100%;
  margin-top: 18px;
  padding: 34px 28px calc(108px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #d9e2eb;
  color: #24384d;
  background:
    linear-gradient(180deg, #f1f4f7 0%, #e9eef3 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.site-footer .footer-grid {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(120px, .85fr) minmax(150px, 1fr) minmax(190px, 1.35fr) minmax(130px, .9fr);
  gap: 24px;
  align-items: start;
}

.site-footer .footer-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}

.site-footer .footer-brand-column {
  gap: 10px;
}

.site-footer .footer-logo,
.site-footer .footer-logo:visited {
  display: inline-block;
  margin: 0 0 7px;
  padding: 0;
  color: #1687e8;
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.055em;
  text-decoration: none;
}

.site-footer .footer-heading {
  min-height: 24px;
  display: flex;
  align-items: center;
  color: #758599;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.site-footer .footer-link,
.site-footer .footer-link:visited,
.site-footer button.footer-link {
  appearance: none;
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #30475e;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: color .16s ease, transform .16s ease;
}

.site-footer .footer-link:hover,
.site-footer .footer-link:focus-visible {
  color: #1687e8;
  transform: translateX(2px);
  outline: none;
}

.site-footer .footer-disclaimer {
  width: 100%;
  max-width: 780px;
  margin: 28px auto 0;
  padding-top: 17px;
  border-top: 1px solid rgba(114, 134, 154, .25);
  color: #7d8c9b;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
}

.site-footer .footer-disclaimer span {
  display: block;
}

.site-footer .footer-disclaimer span + span {
  margin-top: 4px;
}

@media (max-width: 580px) {
  .site-footer {
    padding: 30px 20px calc(106px + env(safe-area-inset-bottom, 0px));
  }

  .site-footer .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 20px;
  }

  .site-footer .footer-brand-column {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(114, 134, 154, .18);
  }

  .site-footer .footer-brand-column .footer-logo {
    margin: 0;
  }

  .site-footer .footer-column:last-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 20px;
  }

  .site-footer .footer-column:last-child .footer-heading {
    grid-column: 1 / -1;
  }
}

@media (max-width: 390px) {
  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 23px;
  }

  .site-footer .footer-brand-column {
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .site-footer .footer-column:last-child {
    grid-column: auto;
    display: flex;
  }

  .site-footer .footer-heading {
    min-height: auto;
  }
}
