.footer {
  padding: 0 var(--main_block_padding);
  margin-bottom: 0.64rem;
}

.footer_item {
  display: flex;
  justify-content: space-between;
  border-radius: var(--rounded-20);
  background-color: var(--secondary);
  padding: 2.43rem 3.04rem;
}

.footer_item > img {
  order: 1;
  width: 8.47rem;
}

.footer_item_menu {
  order: 2;
}

.footer_item_contact {
  order: 3;
}

.footer_item_menu > h4,
.footer_item_contact > h4 {
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 1.21rem;
}

.footer_item_menu > ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.48rem;
  padding: 0;
}

.footer_item_contact > p {
  margin-bottom: 0.48rem;
}

.footer_item_menu > ul > li,
.footer_item_contact > p {
  color: var(--text-grey);
}

.footer_item_buttons {
  order: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.64rem;
}

.footer_item_buttons > a {
  display: flex;
  align-items: center;
  gap: 0.64rem;
  border-radius: var(--rounded-20);
  background: var(--text-dark);
  color: var(--text-light);
  padding: 0.24rem 0.73rem;
}

.footer_item_buttons > a > img {
  width: 1rem;
}

.footer_down {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-grey);
  font-weight: 400;
  padding: 0.64rem 0;
}

.footer_item_menu > ul > li > ul {
  padding: 0;
}

.footer_item_menu > ul > li > ul > li {
  padding-top: 0.48rem;
}

@media (max-width: 1024px) {
  .footer_item {
    flex-wrap: wrap;
    align-items: start;
    padding: 2rem;
  }

  .footer_item > img {
    order: 2;
    width: 14.18rem;
  }

  .footer_item_menu {
    order: 1;
  }

  .footer_item_menu > ul {
    display: flex;
    flex-direction: column;
  }

  .footer_item_menu > ul > li {
    margin-bottom: 1rem;
    font-size: 3rem;
    line-height: 5rem;
  }

  .footer_item_buttons {
    flex-direction: inherit;
    gap: 2.64rem;
  }

  .footer_item_buttons > a {
    gap: 2rem;
    padding: 1rem;
  }

  .footer_item_buttons > a > p {
    font-size: 2rem;
  }

  .footer_item_buttons > a > img {
    width: 2rem;
  }
}

/* Юридические ссылки в подвале: политика, согласия, настройки cookie.
   Ссылок несколько, поэтому переносим их строкой, а не растягиваем
   .footer_down через space-between. */
.footer_legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.36rem 1.21rem;
}

.footer_legal a:hover {
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .footer_down {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.6rem;
  }

  .footer_legal {
    justify-content: flex-start;
    gap: 1rem 2.4rem;
  }
}
