/* A57 — страницы услуг: форма заявки (CF7), картинки карточек, карточки «Услуг». Подключается только на страницах с меткой _a57_services. */
html { scroll-behavior: smooth; }
#zayavka { scroll-margin-top: 24px; }

/* форма заявки */
.a57-form, .a57-form * { box-sizing: border-box; }
.a57-form p { margin: 0; }
.a57-form br { display: none; }
.a57-form .a57f-field { display: flex; flex-direction: column; gap: 8px; margin: 0 0 24px; }
.a57-form .wpcf7-form-control-wrap { display: block; }
.wpcf7-form.a57-form input[type="text"], .wpcf7-form.a57-form input[type="tel"], .wpcf7-form.a57-form textarea {
  display: block; width: 100%; min-height: 52px; margin: 0; padding: 15px 16px;
  background: #fff; border: 1px solid #fff; border-radius: 8px; box-shadow: none; outline: none;
  font: 500 16px/1.22 Montserrat, sans-serif; color: #111116; transition: border-color .2s, box-shadow .2s;
}
.wpcf7-form.a57-form textarea { height: 199px; resize: vertical; }
.a57-form input::placeholder, .a57-form textarea::placeholder { color: #747474; opacity: 1; }
.wpcf7-form.a57-form input:focus, .wpcf7-form.a57-form textarea:focus { border-color: #3DA1A8; box-shadow: 0 0 0 3px rgba(61, 161, 168, .2); }
.a57-form .a57f-hint { font: 500 14px/1.22 Montserrat, sans-serif; color: #747474; }
.a57-form .a57f-consent { margin: 0 0 24px; font: 500 14px/1.22 Montserrat, sans-serif; color: #747474; }
.a57-form .a57f-consent .wpcf7-list-item { margin: 0; }
.a57-form .a57f-consent label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.a57-form .a57f-consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.a57-form .a57f-consent input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex: none; width: 14px; height: 14px; margin: 1px 0 0;
  background: #fff; border: 1px solid #c9d3d4; border-radius: 3px; cursor: pointer; position: relative;
}
.a57-form .a57f-consent input[type="checkbox"]:checked { background: #3DA1A8; border-color: #3DA1A8; }
.a57-form .a57f-consent input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.a57-form .a57f-consent input[type="checkbox"]:focus-visible { outline: 2px solid #3DA1A8; outline-offset: 2px; }
.a57-form .a57f-submit { position: relative; }
.wpcf7-form.a57-form input[type="submit"].wpcf7-submit {
  display: block; width: 100%; height: 44px; margin: 0; padding: 0 18px; border: 0; border-radius: 24px;
  background: #3DA1A8; color: #fff; font: 700 16px/20px Montserrat, sans-serif; text-transform: uppercase; cursor: pointer; transition: background .2s;
  -webkit-appearance: none; appearance: none;
}
.wpcf7-form.a57-form input[type="submit"].wpcf7-submit:hover, .wpcf7-form.a57-form input[type="submit"].wpcf7-submit:focus-visible { background: #338C92; }
.wpcf7-form.a57-form input[type="submit"].wpcf7-submit:disabled { background: #3DA1A8; opacity: .55; cursor: default; }
.a57-form .wpcf7-spinner { position: absolute; right: 12px; top: 10px; margin: 0; }
.a57-form .wpcf7-not-valid-tip { font: 500 13px/1.3 Montserrat, sans-serif; color: #c0392b; margin-top: 6px; }
.a57-form input.wpcf7-not-valid, .a57-form textarea.wpcf7-not-valid { border-color: #e2a39b; }
.a57-form .wpcf7-response-output { margin: 16px 0 0 !important; padding: 10px 14px !important; border-radius: 8px; font: 500 14px/1.35 Montserrat, sans-serif; }

/* картинка во второй карточке: на телефоне — квадрат */
@media (max-width: 767px) {
  .a57-card-img img { height: auto !important; aspect-ratio: 1 / 1; }
}

/* карточки страницы «Услуги»: вся карточка кликабельна, если есть «Подробнее» */
.a57-hub-card--link { position: relative; transition: box-shadow .25s, transform .25s; }
.a57-hub-card--link:hover { box-shadow: 0 12px 32px rgba(0, 47, 47, .12); transform: translateY(-2px); }
.a57-hub-card .a57-more a { color: #3DA1A8; }
.a57-hub-card--link .a57-more a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 16px; }
.a57-hub-card--link .a57-more a:focus-visible { outline: none; }
.a57-hub-card--link:has(.a57-more a:focus-visible) { outline: 2px solid #3DA1A8; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .a57-hub-card--link { transition: none; } .a57-hub-card--link:hover { transform: none; } }

/* первый экран: на средних ширинах фото уезжает под текст — затемнение слева (на 1920 левая часть и так тёмная, на телефоне фото снизу) */
@media (min-width: 768px) and (max-width: 1279px) {
  .e-con.a57-hero::before {
    content: ""; display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit;
    background: linear-gradient(90deg, rgba(3, 12, 14, .94) 0%, rgba(3, 12, 14, .86) 36%, rgba(3, 12, 14, .35) 58%, rgba(3, 12, 14, 0) 74%);
  }
  .e-con.a57-hero > .e-con-inner { position: relative; z-index: 1; }
}
