/* =========================================================
   FOOTER
   База — макет 1920. Размеры считаются от ширины экрана (vw),
   сверху ограничены размерами макета, снизу — минимальными.
   ========================================================= */

.site-footer {
  --ft-cream: #fdf3e9;
  --ft-muted: rgba(255, 255, 255, 0.6);
  --ft-line: rgba(255, 255, 255, 0.6);
  --ft-w: min(69.27vw, 1330px);

  --ft-title: clamp(56px, 6.67vw, 128px);
  --ft-form-title: clamp(26px, 2.92vw, 56px);
  --ft-h: clamp(16px, 1.25vw, 24px);
  --ft-text: clamp(14px, 0.94vw, 18px);
  --ft-link: clamp(15px, 1.04vw, 20px);
  --ft-small: clamp(12px, 0.83vw, 16px);
  --ft-label: clamp(12px, 1.04vw, 20px);
  --ft-input-h: clamp(44px, 2.81vw, 54px);
  --ft-input-font: clamp(15px, 1.04vw, 20px);
  --ft-btn-w: clamp(220px, 21.6vw, 415px);
  --ft-btn-h: clamp(44px, 3.33vw, 64px);
  --ft-btn-font: clamp(16px, 1.25vw, 24px);
  --ft-icon: clamp(40px, 3.33vw, 64px);

  position: relative;
  margin-top: 100px;
  padding-block: clamp(32px, 5.21vw, 100px);
  background: rgba(187, 31, 17, 1);
  color: #fff;
}

.site-footer__inner {
  width: var(--ft-w);
  margin-inline: auto;
}

/* ФОРМА «ОСТАЛИСЬ ВОПРОСЫ?» */

.site-footer__cta {
  position: relative;
  padding: clamp(20px, 1.56vw, 30px) clamp(16px, 4.58vw, 88px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.2);
}

.site-footer__cta-title {
  margin: 0 0 clamp(16px, 1.98vw, 38px);
  font-family: var(--font-main);
  font-size: var(--ft-form-title);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ft-cream);
  text-align: center;
}

.site-footer__cta .wpcf7-form > p {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(16px, 6.56vw, 126px);
  row-gap: clamp(14px, 1.25vw, 24px);
  margin: 0;
}

.site-footer__cta .wpcf7-form > p > br,
.site-footer__cta .wpcf7-form label > br {
  display: none;
}

.site-footer__cta .wpcf7-form > p > label {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.25vw, 24px);
  font-size: var(--ft-label);
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.4);
}

.site-footer__cta .wpcf7-form-control-wrap {
  display: block;
}

.site-footer__cta input[type="text"],
.site-footer__cta input[type="tel"],
.site-footer__cta input[type="email"] {
  width: 100%;
  height: var(--ft-input-h);
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: var(--ft-cream);
  color: #bb1f11;
  font-size: var(--ft-input-font);
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: box-shadow 0.2s ease;
}

.site-footer__cta input::placeholder {
  color: #bb1f11;
  opacity: 0.9;
}

.site-footer__cta input:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

/* Согласие */
.site-footer__cta .wpcf7-form > p > .wpcf7-form-control-wrap[data-name="privacy-policy"] {
  grid-column: 1 / -1;
}

.site-footer__cta .wpcf7-acceptance .wpcf7-list-item {
  margin: 0;
}

.site-footer__cta .wpcf7-acceptance label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--ft-small);
  line-height: 1.3;
  color: #fff;
  cursor: pointer;
}

.site-footer__cta .wpcf7-acceptance input[type="checkbox"] {
  flex: 0 0 auto;
  width: clamp(24px, 2.08vw, 40px);
  height: clamp(24px, 2.08vw, 40px);
  margin: 0;
  border: 2px solid var(--ft-cream);
  border-radius: 6px;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.site-footer__cta .wpcf7-acceptance input[type="checkbox"]:checked {
  background: var(--ft-cream);
  box-shadow: inset 0 0 0 clamp(4px, 0.36vw, 7px) #c84a3e;
}

.site-footer__cta .wpcf7-acceptance a {
  color: #fff;
  text-decoration: underline;
}

/* Кнопка */
.site-footer__cta .wpcf7-submit {
  grid-column: 1 / -1;
  justify-self: center;
  width: var(--ft-btn-w);
  height: var(--ft-btn-h);
  margin-top: clamp(8px, 0.52vw, 10px);
  border: 0;
  border-radius: 0;
  background: var(--ft-cream);
  color: #bb1f11;
  font-family: var(--font-main);
  font-size: var(--ft-btn-font);
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.site-footer__cta .wpcf7-submit:hover {
  background: #fff;
}

.site-footer__cta .wpcf7-spinner {
  position: absolute;
}

/* Ошибки */
.site-footer__cta input.is-invalid,
.site-footer__cta input.wpcf7-not-valid {
  box-shadow: 0 0 0 3px #ffd84d;
}

.site-footer__cta .wpcf7-acceptance input[type="checkbox"].is-invalid {
  border-color: #ffd84d;
  box-shadow: 0 0 0 3px rgba(255, 216, 77, 0.45);
}

.site-footer__cta .wpcf7-not-valid-tip {
  margin-top: 6px;
  font-size: 13px;
  color: #ffe9a8;
}

.site-footer__cta .wpcf7-response-output {
  margin: 16px 0 0;
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
  text-align: center;
}

/* ОСНОВНАЯ СЕТКА */

.site-footer__main {
  display: grid;
  grid-template-columns: 675fr 480fr 205fr;
  grid-template-areas:
    "left main info"
    "left map  map";
  row-gap: clamp(32px, 3.65vw, 70px);
  margin-top: clamp(40px, 4.79vw, 92px);
}

/* Без карты — без пустого ряда под неё */
.site-footer__main--no-map {
  grid-template-areas: "left main info";
}

.site-footer__left {
  grid-area: left;
  display: flex;
  flex-direction: column;
}

.site-footer__groups--main {
  grid-area: main;
}

.site-footer__info {
  grid-area: info;
}

.site-footer__map {
  grid-area: map;
  height: clamp(220px, 18.75vw, 360px);
  overflow: hidden;
}

.site-footer__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Заголовок «Контакты» */
.site-footer__title {
  margin: 0;
  font-family: var(--font-accent);
  font-weight: 400;
  font-size: var(--ft-title);
  line-height: 0.85;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #fff;
}

/* Группы контактов */
.site-footer__groups {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.13vw, 60px);
}

.site-footer__groups--left {
  margin-top: clamp(24px, 1.56vw, 30px);
}

.site-footer__group-title {
  margin: 0 0 clamp(10px, 1.25vw, 24px);
  font-size: var(--ft-h);
  line-height: 1.2;
  font-weight: 500;
  text-transform: uppercase;
  color: #fff;
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-footer__contact + .site-footer__contact {
  margin-top: clamp(12px, 1.56vw, 30px);
}

.site-footer__contact-name {
  font-size: var(--ft-text);
  line-height: 1.3;
  color: var(--ft-muted);
}

.site-footer__contact-value {
  font-size: var(--ft-text);
  line-height: 1.3;
  color: #fff;
}

a.site-footer__contact-value {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s ease;
}

a.site-footer__contact-value:hover {
  opacity: 0.8;
}

/* Соцсети */
.site-footer__socials {
  display: flex;
  align-items: center;
  gap: clamp(24px, 2.6vw, 50px);
  margin: auto 0 0;
  padding: 40px 0 0;
  list-style: none;
}

.site-footer__socials a {
  display: block;
  transition: opacity 0.2s ease;
}

.site-footer__socials a:hover {
  opacity: 0.8;
}

.site-footer__socials img {
  width: var(--ft-icon);
  height: var(--ft-icon);
  object-fit: contain;
}

/* Меню «Информация» */
.site-footer__info-title {
  margin: 0 0 clamp(16px, 1.98vw, 38px);
  font-size: var(--ft-h);
  line-height: 1.2;
  font-weight: 500;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer__info-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__info-list a {
  font-size: var(--ft-link);
  line-height: 1.35;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
}

.site-footer__info-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* «Наверх» — только на мобильных */
.site-footer__up {
  display: none;
}

/* НИЖНЯЯ СТРОКА */

/* Нижняя строка: копирайт слева, ссылки на документы справа (сколько угодно) */
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px clamp(16px, 2.08vw, 40px);
  margin-top: clamp(32px, 3.13vw, 60px);
}

.site-footer__bottom .site-footer__copy {
  margin-right: auto;
}

.site-footer__copy {
  margin: 0;
  max-width: none;
  font-size: var(--ft-small);
  line-height: 1.3;
  color: #fff;
}

.site-footer__bottom a {
  font-size: var(--ft-small);
  line-height: 1.3;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__bottom a:hover {
  opacity: 0.8;
}

/* Плавная прокрутка для «наверх» */
html {
  scroll-behavior: smooth;
}

/* =========================================================
   АДАПТИВ
   ========================================================= */

@media (max-width: 1024px) {
  .site-footer {
    --ft-w: 100%;
  }

  .site-footer__main {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "left main"
      "info map";
    column-gap: 32px;
  }

  .site-footer__main--no-map {
    grid-template-areas:
      "left main"
      "info info";
  }
}

@media (max-width: 768px) {
  .site-footer__cta .wpcf7-form > p {
    grid-template-columns: 1fr;
  }

  .site-footer__main {
    display: flex;
    flex-direction: column;
    row-gap: 0;
  }

  /* Раскладываем левую колонку, чтобы менять порядок блоков */
  .site-footer__left {
    display: contents;
  }

  .site-footer__title {
    order: 1;
    font-size: 72px;
  }

  .site-footer__socials {
    order: 2;
    justify-content: space-between;
    margin: 28px 0 0;
    padding: 0;
  }

  .site-footer__groups--main {
    order: 3;
    margin-top: 28px;
    border-top: 1px solid var(--ft-line);
  }

  .site-footer__groups--left {
    order: 4;
    margin-top: 0;
  }

  .site-footer__map {
    order: 5;
    margin-top: 60px;
  }

  .site-footer__info {
    display: none;
  }

  .site-footer__groups {
    gap: 0;
  }

  .site-footer__group {
    padding: 16px 0;
    border-bottom: 1px solid var(--ft-line);
  }

  .site-footer__contact + .site-footer__contact {
    margin-top: 12px;
  }

  .site-footer__up {
    display: block;
    width: fit-content;
    margin: 40px auto 0;
    font-size: 16px;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .site-footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .site-footer__bottom .site-footer__copy {
    margin-right: 0;
  }

  .site-footer__copy {
    margin-bottom: 12px;
  }

  .site-footer__bottom a {
    font-size: 12px;
  }
}