.contacts__heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  margin-top: 100px;
  margin-bottom: 100px;
  text-align: center;
}

.contacts__title {
  color: #171717;
  text-align: center;
  font-family: "SegoeUIWeb";
  font-size: 36px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  text-transform: uppercase;
  align-self: stretch;
}

.contacts__desk {
  color: rgba(23, 23, 23, 0.7);
  text-align: center;
  font-family: "SegoeUIWeb";
  font-size: 24px;
  font-style: normal;
  font-weight: 350;
  line-height: normal;
}

.contacts {
  padding: 40px;
  border-radius: 25px;
  background: #f9f9f9;
  margin-top: 100px;
  margin-bottom: 100px;
}

.contacts__card {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 50px;
  align-self: stretch;
}

.contacts__form-container {
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
}

.contacts__info {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  flex: 1 0 0;
}

.contacts__form-heading {
  color: #171717;
  font-family: "SegoeUIWeb";
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.contacts__form-desk {
  color: rgba(23, 23, 23, 0.7);
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.contacts__form {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.contacts__field > input,
.contacts__field > textarea {
  display: flex;
  width: 100% !important;
  padding: 10px 20px;
  align-items: center;
  gap: 10px;
  color: rgba(23, 23, 23, 0.4);
  font-family: "SegoeUIWeb";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  border: none;
  background-color: transparent;
  border-bottom: 1px solid #17171740;
}

.contacts__consent .contacts__checkbox-label {
  display: flex;
  max-width: 340px;
  align-items: center;
  gap: 15px;
}

.contacts__checkbox-label > span {
  color: rgba(23, 23, 23, 0.8);
  font-family: "SegoeUIWeb";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

input[type="checkbox" i] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 2px;
  border: 1px solid #171717;
}

.contacts__submit {
  display: flex;
  width: 148px;
  padding: 15px 30px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 15px;
  background: #171717;
  color: #fff;
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.contacts__content-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
}

.contacts__content-subheading {
  color: rgba(23, 23, 23, 0.8);
  font-family: "SegoeUIWeb";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.contacts__content-text {
  color: #171717;
  font-family: "SegoeUIWeb";
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

.contacts__map {
  margin-top: 100px;
  margin-bottom: 100px;
}

.contacts__map-container {
  max-width: 100%;
  width: 100%;
  max-height: 540px;
  height: 100%;
}

iframe {
  width: 100%;
  height: 540px;
  border-radius: 25px;
  overflow: hidden;
}

/* ====== 1366px ====== */
@media (max-width: 1366px) {
  .contacts__heading {
    margin-top: 80px;
    margin-bottom: 80px;
  }

  .contacts__title {
    font-size: 32px;
  }

  .contacts__desk {
    font-size: 20px;
    max-width: 900px;
    margin: 0 auto;
  }

  .contacts {
    padding: 30px;
    margin-top: 80px;
    margin-bottom: 80px;
  }

  .contacts__card {
    gap: 40px;
  }

  .contacts__form-container {
    max-width: 440px;
    gap: 25px;
  }

  .contacts__info {
    gap: 25px;
  }

  .contacts__form-heading {
    font-size: 22px;
  }

  .contacts__form-desk {
    font-size: 16px;
  }

  .contacts__content-subheading {
    font-size: 15px;
  }

  .contacts__content-text {
    font-size: 17px;
  }

  iframe {
    height: 460px;
  }
}

/* ====== 980px (планшеты) ====== */
@media (max-width: 980px) {
  .contacts__heading {
    margin-top: 60px;
    margin-bottom: 60px;
  }

  .contacts__title {
    font-size: 28px;
  }

  .contacts__desk {
    font-size: 18px;
    line-height: 1.4;
    max-width: 720px;
    margin: 0 auto;
  }

  .contacts {
    padding: 25px;
    margin-top: 60px;
    margin-bottom: 60px;
  }

  .contacts__card {
    flex-direction: column;
    align-items: stretch;
    gap: 40px;
  }

  .contacts__form-container,
  .contacts__info {
    max-width: 100%;
    width: 100%;
  }

  .contacts__form-heading {
    font-size: 20px;
  }

  .contacts__form-desk {
    font-size: 16px;
  }

  .contacts__submit {
    width: 100%;
    font-size: 16px;
    border-radius: 12px;
  }

  .contacts__form,
  .contacts__info {
    gap: 25px;
  }

  .contacts__content-item {
    gap: 8px;
  }

  iframe {
    height: 400px;
  }
}

@media (max-width: 480px) {
  .contacts__title {
    font-size: 24px;
    text-align: center;
    vertical-align: middle;
    text-transform: uppercase;
  }

  .contacts__desk {
    font-size: 18px;
    text-align: center;
    vertical-align: middle;
  }

  .contacts {
    padding: 0;
    border-radius: 0;
    background: none;
    margin-top: 0;
    margin-bottom: 0;
  }

  .contacts__card {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    align-self: stretch;
    flex-direction: column;
  }

  .contacts__form-heading,
  .contacts__form-desk {
    display: none;
  }

  .contacts__heading {
    margin-top: 30px;
    margin-bottom: 30px;
  }

  .contacts__form-container,
  .contacts__info {
    padding: 30px 15px;
    background: #f9f9f9;
    border-radius: 25px;
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
  }

  .contacts__submit {
    width: 100%;
  }

  .contacts__content-item {
    gap: 10px;
    padding: 10px 0;
  }

  .contacts__content-subheading {
    font-weight: 400;
    font-size: 14px;
  }

  .contacts__content-text {
    font-weight: 400;
    font-size: 18px;
  }

  .contacts__map {
    margin-top: 30px;
    margin-bottom: 30px;
  }
}

/* ===== CF7 PATCH: чтобы форма выглядела 1 в 1 как твоя ===== */

/* убираем стандартные отступы CF7 от p (если вдруг они остались) */
.wpcf7 form p { margin: 0; }

/* делаем обертку span прозрачной для верстки */
.contacts__field > .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

/* переносим твои стили с .contacts__field > input/textarea на CF7-структуру */
.contacts__field > .wpcf7-form-control-wrap > input,
.contacts__field > .wpcf7-form-control-wrap > textarea {
  display: flex;
  width: 100% !important;
  padding: 10px 20px;
  align-items: center;
  gap: 10px;
  color: rgba(23, 23, 23, 0.4);
  font-family: "SegoeUIWeb";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  border: none;
  background-color: transparent;
  border-bottom: 1px solid #17171740;
  box-sizing: border-box;
}

/* если CF7 добавил лишние блочные элементы внутри field - не даем им ломать ширину */
.contacts__field .wpcf7-form-control-wrap,
.contacts__field .wpcf7-form-control {
  width: 100%;
}

/* чекбокс: CF7 тоже в span'ах */
.contacts__consent .contacts__checkbox-label .wpcf7-form-control-wrap {
  display: inline-flex;
  width: auto;
}

.contacts__consent .contacts__checkbox-label .wpcf7-list-item {
  margin: 0;
}

.contacts__consent .contacts__checkbox-label input[type="checkbox" i] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 2px;
  border: 1px solid #171717;
}

/* Главное изображение */
body.page-template-studio .news-single__img {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  height: 557px;
  object-fit: cover;
  border-radius: 15px;
}
@media (max-width: 980px) {
  body.page-template-studio .news-single__img {
    width: calc(100% - 40px);
    margin-left: auto;
    margin-right: auto;
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
  }
}

@media (max-width: 480px) {
  body.page-template-studio .news-single__img {
    width: calc(100% - 24px);
    border-radius: 10px;
  }
}

/* ===== Плашка ответа CF7 на странице Ателье =====
   По дефолту .wpcf7-response-output последний ребёнок <form>,
   из-за чего «Спасибо за ваше сообщение» вылезает под кнопкой и часто
   не попадает в кадр. Кладём её в самый верх формы через flex order. */
.contacts__form-container .wpcf7-form {
  display: flex;
  flex-direction: column;
}
.contacts__form-container .wpcf7-form > .wpcf7-response-output {
  order: -1;
  margin: 0 0 24px;
  padding: 14px 18px;
  border-radius: 12px;
  text-align: center;
  font-family: "SegoeUIWeb", sans-serif;
  font-size: 15px;
  line-height: 1.4;
  border: 1px solid transparent;
  background: #f4f4f4;
  color: #171717;
}
.contacts__form-container .wpcf7-form.sent > .wpcf7-response-output {
  background: #eaf6ec;
  border-color: #b8e0c0;
  color: #1c5b2c;
}
.contacts__form-container .wpcf7-form.failed > .wpcf7-response-output,
.contacts__form-container .wpcf7-form.aborted > .wpcf7-response-output,
.contacts__form-container .wpcf7-form.spam > .wpcf7-response-output {
  background: #fdecec;
  border-color: #f3b8b8;
  color: #7a1a1a;
}
.contacts__form-container .wpcf7-form.invalid > .wpcf7-response-output,
.contacts__form-container .wpcf7-form.unaccepted > .wpcf7-response-output,
.contacts__form-container .wpcf7-form.payment-required > .wpcf7-response-output {
  background: #fff7e0;
  border-color: #f0d68a;
  color: #6b4a07;
}
.contacts__form-container .wpcf7-form > .wpcf7-response-output:empty,
.contacts__form-container .wpcf7-form.init > .wpcf7-response-output {
  display: none;
}
