/* Футер */
.footer {
  display: flex;
  flex-wrap: wrap;
  height: 323px;
  background: #1c1c1c;
  margin-bottom: 0;
  padding-top: 0;
  overflow: hidden;
  font-family: "Inter", sans-serif;
  margin-top: 100px;
}

/* Контейнер блоков */
.footer__blocks {
  display: flex;
  flex-wrap: wrap;
  max-width: 1350px;
  width: calc(100% - 20px);
  margin: 0 auto;
  position: relative;
}

/* Все блоки футера на десктопе */
.footer__block-1,
.footer__block-2,
.footer__block-3,
.footer__block-4,
.footer__block-5,
.footer__block-6 {
  min-width: 0; /* Предотвращает переполнение */
}

/* Блок 1: Логотип и информация */
.footer__block-1 {
  min-width: 300px;
}

.footer__logo {
  margin-top: 26px;
  margin-bottom: 12px;
}

.footer__logo a {
  /* стили */
}

.footer__logo img {
  /* стили */
}

/* Контакты в футере */
.footer__contacts {
  display: flex;
  flex-direction: column;
  align-content: flex-start;
  gap: 15px;
}

.footer__contact-elem {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
}

.footer__contact-elem img {
  width: 20px;
  height: 20px;
}

.footer__phone {
  font-size: 16px;
  color: #ffffff;
  display: block;
  text-decoration: none;
}

/* Адреса */
.footer__adress,
.footer__worktime,
.footer__mail {
  font-size: 13px;
  color: #ffffff;
}

/* Социальные сети */
.footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 6px; /* Отступ между иконками */
  margin-top: 16px;
}

.footer__socials__vk,
.footer__socials__youtube {
  display: inline-block;
}

.footer__socials img {
  display: block;
  width: 24px;
  height: 24px;
}

.footer__button {
  width: 160px;
  height: 34px;
  border-radius: 7px;
  color: #ffffff;
  background-color: #9e1d22;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin-top: 12px;
}

/* Платежные системы */
.footer__payments {
  margin-top: 12px;
}

.footer__payments img {
  max-width: 100%;
  height: auto;
}

/* Блоки меню */
.footer__block-2,
.footer__block-3,
.footer__block-4,
.footer__block-5 {
  display: inline-block;
  vertical-align: top;
  margin-left: 20px;
}

.footer__block-2,
.footer__block-3,
.footer__block-4 {
  width: 212px;
}
.footer__block-6 {
  display: none;
}

/* Заголовки блоков */
.footer__block-head {
  margin-top: 27px;
  font-size: 16px;
  text-transform: uppercase;
  color: #ffffff;
  padding-bottom: 15px;
  border-bottom: 1px solid #474747;
  margin-bottom: 15px;
}

.footer__block-head a {
  color: #fff;
  text-decoration: none;
}

.footer__block-head a:hover {
  /* стили */
}

/* Меню в блоках - заменяем динамические ID на классы */
.footer__menu {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  gap: 16px;
}

.footer__menu a {
  color: #fff;
  text-decoration: none;
}

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

.footer__undermenu {
  display: none;
}

.subfooter {
  height: 40px;
  background: #474747;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subfooter__copyright {
  font-size: 13px;
  color: #ffffff;
  text-align: center;
  width: calc(100% - 20px);
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Экраны меньше 1350px */
@media (max-width: 1350px) {
  .footer {
    height: auto;
  }

  .footer__blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    width: calc(100% - 40px);
    justify-items: center;
  }

  .footer__block-2,
  .footer__block-3,
  .footer__block-4,
  .footer__block-6 {
    margin-left: 0;
    width: 212px;
  }

  /* Скрываем 1 и 5 блоки */
  .footer__block-1,
  .footer__block-5 {
    display: none;
  }

  /* Показываем блок 6 (дополнительный) */
  .footer__block-6 {
    display: block;
  }
  .footer__undermenu {
    display: flex;
    flex-direction: row;
    align-content: center;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 20px;
    margin: 12px 0;
  }

  /* Первая колонка: 2 и 4 */
  .footer__block-2 {
    grid-column: 1;
    grid-row: 1;
  }

  .footer__block-4 {
    grid-column: 1;
    grid-row: 2;
  }

  /* Вторая колонка: 3 и 6 */
  .footer__block-3 {
    grid-column: 2;
    grid-row: 1;
  }

  .footer__block-6 {
    grid-column: 2;
    grid-row: 2;
  }

  .footer__button {
    margin-top: 0;
  }

  .footer__socials {
    margin-top: 0;
  }
}

@media (max-width: 475px) {
  .footer {
    margin-top: 0;
  }
  
  .footer__blocks {
    width: calc(100% - 20px);
  }

  .footer__block-2,
  .footer__block-3,
  .footer__block-4,
  .footer__block-6 {
    margin-left: 0;
    width: 140px;
  }

  .footer__block-head {
    font-size: 10px;
  }

  /* Меню в блоках - адаптив для класса */
  .footer__menu {
    font-size: 9px;
  }

  .footer__adress,
  .footer__worktime,
  .footer__mail {
    font-size: 9px;
  }

  .footer__contact-elem img {
    width: 16px;
    height: 16px;
  }

  .footer__socials {
    gap: 4px;
  }

  .footer__socials img {
    width: 20px;
    height: 20px;
  }

  .footer__phone {
    font-size: 10px;
  }

  .footer__undermenu {
    gap: 10px;
    margin: 12px 10px;
  }

  .subfooter {
    height: 60px;
  }
}