.footer {
  background-color: #ededee;
  padding: 56px 0 64px;
}
@media (max-width: 980px) {
  .footer {
    padding: 24px 16px;
  }
}
.footer__layout {
  margin: 0 auto;
  max-width: 1176px;
  display: grid;
  grid-template-columns: auto auto minmax(auto, 1fr) minmax(auto, 1fr) minmax(auto, 1fr);
  grid-template-rows: repeat(2, auto);
  grid-template-areas:
    "logo footer-nav footer-links-left footer-links-center footer-links-right"
    "logo footer-socials footer-links-left footer-links-center footer-links-right";
  column-gap: 93px;
}

@media (max-width: 1176px) {
  .footer__layout {
    column-gap: 20px;
  }
}

@media (max-width: 980px) {
  .footer__layout {
    grid-template-columns: repeat(4, minmax(auto, 1fr));
    grid-template-rows: repeat(3, auto);
    grid-template-areas:
    "logo footer-socials footer-socials footer-socials"
    "footer-nav footer-nav footer-nav footer-nav"
    "footer-links-mobile-left footer-links-mobile-left footer-links-mobile-right footer-links-mobile-right";
    gap: 32px 13px;
  }
}
.footer__logo:not(.footer__logo--rebranding) {
  width: 120px;
  height: 48px;
  display: inline-block;
  background: url(../img/header/otpusk-logo-black.svg) no-repeat center / contain;
}
.footer__logo--rebranding {
  grid-area: logo;
  width: 118px;
}
@media (max-width: 767px) {
  .footer__logo--rebranding {
    width: 88px;
  }
}
.footer__logo--rebranding img {
  max-width: 100%;
  height: auto;
}
[lang="lv"] .footer__logo,
[lang="lt"] .footer__logo {
  background-image: url(../img/header/logo-white-dot.svg);
}
.footer-nav {
  grid-area: footer-nav;
}
.footer-nav__item:not(:first-child) {
  margin-top: 16px;
}
.footer-socials {
  margin-top: 24px;
  grid-area: footer-socials;
  display: flex;
  gap: 24px;
}

@media (max-width: 980px) {
  .footer-socials {
    justify-content: right;
    margin-top: 0;
    align-self: center;
  }
}
.footer__button-link {
  display: flex;
  align-items: center;
  background: #fff;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  color: #0D0F10;
  transition: background-color .2s;
  position: relative;
  padding: 12px 12px 12px 19px;
  gap: 11px;
  border-radius: 12px;
}
.footer__button-link:not(:last-child) {
  margin-bottom: 16px;
}
.footer__button-link i {
  opacity: .5;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 981px) {
  .footer-links--mobile {
    display: none;
  }
}
@media (max-width: 980px) {
  .footer-links {
    gap: 24px;
  }
  .footer-links:not(.footer-links--mobile) {
    display: none;
  }
}
.footer-links__item {
  display: inline-block;
  border-radius: 12px;
  transition: background-color .2s;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 700;
}

.footer__link {
  font-size: 17px;
  font-weight: 700;
  color: #0D0F10;
  white-space: nowrap;
  line-height: 1;
  display: inline-block;
}

@media (max-width: 767px) {
  .footer__link {
    font-size: 15px;
  }
}

.footer__link:not(.footer__link--merged) {
  padding: 16px 16px 16px 16px;
}
.footer__link--merged:first-child {
  padding: 16px 0 16px 16px;
}
.footer__link--merged:last-child {
  padding: 16px 16px 16px 0;
}
@media (hover: hover) {
  .footer-links__item:hover,
  .footer__button-link:hover {
    background-color: #dedfe1;
    text-decoration: none;
  }

  .footer-links__item:hover a {
    text-decoration: none;
  }
}
@media (max-width: 980px) {
  .footer__link:not(.footer__link--merged),
  .footer__link--merged:not(:first-child),
  .footer__link--merged:not(:last-child) {
    padding: 0;
  }
}
@media (hover: hover) and (max-width: 980px) {
  .footer-links__item:hover,
  .footer__button-link:hover {
    background: none;
  }
}
.footer-links--left {
  grid-area: footer-links-left;
  margin-left: -16px;
}
.footer-links--center {
  grid-area: footer-links-center;
  margin-left: -25px;
}
.footer-links--right {
  grid-area: footer-links-right;
}
.footer-links--mobile-right {
  grid-area: footer-links-mobile-right;
}
.footer-links--mobile-left {
  grid-area: footer-links-mobile-left;
}

.footer__social {
  min-width: 24px;
  min-height: 24px;
  display: block;
  border-radius: 12px;
  position: relative;
}

.footer__social i {
  display: flex;
  width: 24px;
  height: 24px;
  background: no-repeat center / contain;
}
.footer__social.mail i {
  filter: brightness(50%);
}

@media (max-width: 320px) {
  [lang="lv"] .footer__logo,
  [lang="lt"] .footer__logo {
    width: 100px;
  }
}