/* ============================================================
   ФУТЕР
   ============================================================ */

.site-footer {
  background: var(--c-navy-700, #001646);
  color: var(--c-white, #fff);
  padding: clamp(32px, 4vw, 56px) clamp(16px, 3vw, 40px) clamp(20px, 2.5vw, 32px);
}

.footer-container {
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
}

/* ===== Верхняя часть ===== */
.footer-top {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.6fr)
    minmax(120px, 1fr)
    minmax(120px, 1fr)
    minmax(120px, 1fr)
    minmax(200px, 1.6fr);
  gap: clamp(20px, 2.5vw, 40px);
  padding-bottom: clamp(28px, 3vw, 44px);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

/* ===== Логотип + подписка ===== */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.5vw, 22px);
  max-width: min(340px, 100%);
}

.footer-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.footer-logo img,
.footer-logo svg {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

/* ===== Форма подписки ===== */
.footer-subscribe {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.footer-subscribe__content h4 {
  font-size: clamp(13px, 1vw, 14px);
  font-weight: 400;
  color: rgba(255, 255, 255, .85);
  margin: 0;
}

.footer-subscribe__form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Строка «input + кнопка» — только тут позиционируем absolute */
.footer-subscribe__field {
  position: relative;
  width: 100%;
}

.footer-subscribe__form input {
  width: 100%;
  padding:
    clamp(10px, 1vw, 13px)
    clamp(46px, 4.5vw, 58px)
    clamp(10px, 1vw, 13px)
    clamp(12px, 1.2vw, 16px);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: var(--c-white, #fff);
  font-size: clamp(13px, 1vw, 14px);
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}

.footer-subscribe__form input::placeholder {
  color: rgba(255, 255, 255, .45);
}

.footer-subscribe__form input:focus {
  border-color: rgba(255, 255, 255, .6);
}

.footer-subscribe__form input.error {
  border-color: #f87171;
}

.footer-subscribe__form input.success {
  border-color: #4ade80;
}

/* Кнопка «→» — абсолютно внутри .footer-subscribe__field */
.footer-subscribe__btn {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  padding: 0 clamp(14px, 1.5vw, 22px);
  background: rgba(255, 255, 255, .7);
  color: var(--c-navy-700, #001646);
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-subscribe__btn:hover {
  background: #e8f0ff;
}

/* Сообщение о статусе подписки — под строкой ввода */
#subscribeMessage {
  margin-top: 8px;
  font-size: clamp(12px, .95vw, 13px);
  line-height: 1.4;
  min-height: 18px;
  display: none;
}

#subscribeMessage.success { color: #4ade80; }
#subscribeMessage.error   { color: #f87171; }
#subscribeMessage.loading { color: rgba(255, 255, 255, .7); }

/* ===== Колонки ===== */
.footer-col h4 {
  font-size: clamp(15px, 1.2vw, 17px);
  font-weight: 700;
  margin-bottom: clamp(12px, 1.2vw, 16px);
  color: var(--c-white, #fff);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, .8vw, 10px);
  padding: 0;
  margin: 0;
}

.footer-col a {
  font-size: clamp(13px, 1vw, 14px);
  color: var(--c-white, #fff);
  transition: opacity .2s;
  opacity: .85;
  text-decoration: none;
  line-height: 1.4;
}

.footer-col a:hover {
  opacity: 1;
}

/* ===== Контакты ===== */
.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.1vw, 14px);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: clamp(13px, 1vw, 14px);
  color: var(--c-white, #fff);
  transition: opacity .2s;
  opacity: .85;
  text-decoration: none;
  line-height: 1.4;
}

.footer-contact-item:hover {
  opacity: 1;
}

.footer-contact-item svg {
  width: clamp(16px, 1.3vw, 18px);
  height: clamp(16px, 1.3vw, 18px);
  flex-shrink: 0;
  margin-top: 2px;
  opacity: .85;
}

.footer-address span {
  line-height: 1.4;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, .8vw, 12px);
  margin-top: 8px;
}

.footer-social {
  width: clamp(38px, 3vw, 46px);
  height: clamp(38px, 3vw, 46px);
  border-radius: 10px;
  background: rgba(255, 255, 255, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-white, #fff);
  transition: background .2s;
  text-decoration: none;
  flex-shrink: 0;
}

.footer-social:hover {
  background: rgba(255, 255, 255, .22);
}

.footer-social svg {
  width: clamp(18px, 1.5vw, 22px);
  height: clamp(18px, 1.5vw, 22px);
}

/* ============================================================
   НИЖНЯЯ ПОЛОСА — копирайт по центру
   ============================================================ */

.footer-bottom {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 1.5vw, 24px);
  padding-top: clamp(18px, 2vw, 28px);
}

/* Ссылки — слева */
.footer-bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px, 1.5vw, 24px);
  justify-self: start;
}

.footer-bottom__links a {
  font-size: clamp(12px, .95vw, 13px);
  color: rgba(255, 255, 255, .55);
  transition: color .2s;
  text-decoration: none;
  white-space: nowrap;
}

.footer-bottom__links a:hover {
  color: var(--c-white, #fff);
}

/* Копирайт — строго по центру */
.footer-copy {
  justify-self: center;
  font-size: clamp(12px, .95vw, 13px);
  color: rgba(255, 255, 255, .55);
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

/* Пустая правая колонка, чтобы центр был геометрическим */
.footer-bottom::after {
  content: "";
  display: block;
  justify-self: end;
  width: 1px;
  height: 1px;
}

/* ============================================================
   АДАПТИВ — плавный, резиновый
   ============================================================ */

/* --- Планшет: 3 колонки, бренд во всю ширину --- */
@media (max-width: 1200px) {
  .footer-top {
    grid-template-columns:
      minmax(220px, 1.6fr)
      minmax(120px, 1fr)
      minmax(120px, 1fr);
    gap: clamp(24px, 3vw, 40px);
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: 100%;
  }

  .footer-contacts {
    grid-column: 1 / -1;
  }
}

/* --- Средний планшет: 2 колонки --- */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 3vw, 36px);
  }

  .footer-brand,
  .footer-contacts {
    grid-column: 1 / -1;
  }

  /* Нижняя полоса: ссылки и копирайт друг под другом, по центру */
  .footer-bottom {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 12px;
  }

  .footer-bottom__links {
    justify-self: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .footer-bottom::after {
    display: none;
  }

  .footer-copy {
    white-space: normal;
  }
}

/* --- Мобильный: 2 колонки для ссылок --- */
/*
  Желаемый порядок на мобиле:
    [ Бренд ...................... ]
    [ Продукция ] [ Партнёрам ]
    [ Компания  ] [ Контакты  ]
*/
@media (max-width: 600px) {
  .site-footer {
    padding: clamp(28px, 6vw, 40px) clamp(14px, 4vw, 20px) clamp(18px, 3vw, 24px);
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(22px, 5vw, 32px);
    padding-bottom: clamp(22px, 4vw, 30px);
  }

  /* 1) Бренд — во всю ширину, первым */
  .footer-brand {
    grid-column: 1 / -1;
    order: 1;
    max-width: 100%;
  }

  /* 2) Продукция — левая колонка 2-й строки */
  .footer-col--products {
    order: 2;
  }

  /* 3) Партнёрам — правая колонка 2-й строки */
  .footer-col--partners {
    order: 3;
  }

  /* 4) Компания — левая колонка 3-й строки */
  .footer-col--company {
    order: 4;
  }

  /* 5) Контакты — правая колонка 3-й строки */
  .footer-contacts {
    order: 5;
    grid-column: auto;
  }

  .footer-subscribe__form input {
    padding-right: clamp(46px, 12vw, 58px);
  }

  .footer-bottom__links {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .footer-bottom__links a {
    white-space: normal;
  }
}

/* --- Очень маленькие экраны --- */
@media (max-width: 360px) {
  .footer-social {
    width: 36px;
    height: 36px;
  }

  .footer-social svg {
    width: 16px;
    height: 16px;
  }
}