/* Formulario de contacto independiente del CMS original. */
.contact-form {
  box-sizing: border-box;
  width: min(100% - 24px, 720px);
  margin: 28px auto 18px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--hb-line, #d9e2ec);
  border-radius: var(--hb-radius, 14px);
  background: #fbfdff;
  box-shadow: var(--hb-shadow, 0 8px 28px rgba(19, 68, 126, .08));
  color: var(--hb-ink, #23364a);
}
.contact-form__field { margin: 0 0 16px; }
.contact-form__field > label {
  display: block;
  margin: 0 0 7px;
  color: var(--hb-ink, #23364a);
  font-weight: 650;
  line-height: 1.45;
}
.contact-form__field > label span { font-size: .88em; font-weight: 400; color: #5b6c7d; }
.contact-form__input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #cbd7e3;
  border-radius: 8px;
  background: #fff;
  color: var(--hb-ink, #23364a);
  font: inherit;
  box-shadow: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.contact-form__textarea { min-height: 140px; resize: vertical; }
.contact-form__input:focus-visible,
.contact-form__consent input:focus-visible,
.contact-form__submit:focus-visible {
  outline: 3px solid rgba(19, 68, 126, .2);
  outline-offset: 2px;
  border-color: #6f9bc8;
}
.contact-form__actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 20px; }
.contact-form__consent { display: flex; align-items: flex-start; gap: 9px; max-width: 100%; }
.contact-form__consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--hb-blue, #13447e); }
.contact-form__consent label { color: var(--hb-ink, #23364a); font-size: 14px; line-height: 1.6; }
.contact-form__consent a { color: var(--hb-blue, #13447e); text-decoration: underline; text-underline-offset: 2px; }
.contact-form__submit {
  appearance: none;
  border: 0;
  border-radius: 8px;
  padding: 12px 24px;
  background: var(--hb-blue, #13447e);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(19, 68, 126, .16);
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.contact-form__submit:hover { background: var(--hb-blue-deep, #0d315d); transform: translateY(-1px); }
.contact-form__submit:active { transform: translateY(0); }
.contact-form__message { box-sizing: border-box; width: min(100% - 24px, 720px); margin: 0 auto 28px; padding: 0; }
.contact-form__message:empty { display: none; }
.contact-form__message.form-success,
.contact-form__message.form-error { padding: 14px 16px; border-radius: 8px; line-height: 1.55; }
.contact-form__message.form-success { color: #185c36; background: #eaf7ef; border: 1px solid #b9e3c8; }
.contact-form__message.form-error { color: #8a2525; background: #fff0f0; border: 1px solid #efc1c1; }
.contact-form__honeypot { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
@media (max-width: 560px) {
  .contact-form { width: calc(100% - 20px); padding: 18px 15px; }
  .contact-form__actions { align-items: stretch; flex-direction: column; }
  .contact-form__submit { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-form__input, .contact-form__submit { transition: none; }
}


/* Fase 54: disposición equilibrada de contacto, mapa y formulario. */
.contact-details-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(20px, 3vw, 36px);
  width: min(100% - 32px, 1200px);
  margin: 24px auto 48px;
}
.contact-details-layout__left,
.contact-details-layout__right {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.contact-address {
  margin: 0 0 20px;
  color: #13447e;
  font-style: normal;
  line-height: 1.75;
  text-align: left;
}
.contact-address strong { font-size: 1.12rem; }
.contact-address a { color: #13447e; text-decoration: underline; text-underline-offset: 2px; }
.contact-map { flex: 1 1 auto; min-height: 260px; overflow: hidden; border-radius: 10px; }
.contact-map iframe { display: block; width: 100%; height: 100%; min-height: 260px; border: 0; }
.contact-form-heading { margin: 0 0 8px; color: #13447e; font-size: 1.25rem; line-height: 1.35; }
.contact-details-layout .contact-form {
  width: 100%; max-width: none; flex: 1 1 auto;
  margin: 0; display: flex; flex-direction: column;
}
.contact-details-layout .contact-form__actions { margin-top: auto; padding-top: 18px; }
/* Override legacy theme button colors and pseudo-state rules. */
.contact-details-layout .contact-form button.contact-form__submit,
.contact-details-layout .contact-form button.contact-form__submit:visited {
  background: #0877d5 !important;
  background-color: #0877d5 !important;
  color: #fff !important;
}
.contact-details-layout .contact-form button.contact-form__submit:hover,
.contact-details-layout .contact-form button.contact-form__submit:focus-visible {
  background: #075eaa !important;
  background-color: #075eaa !important;
  color: #fff !important;
}
.contact-details-layout .contact-form button.contact-form__submit:active { background: #064b87 !important; }
@media (max-width: 767px) {
  .contact-details-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; width: min(100% - 24px, 640px); }
  .contact-map { min-height: 280px; flex: none; }
  .contact-map iframe { height: 280px; min-height: 280px; }
  .contact-details-layout .contact-form { width: 100%; }
}


/* Cloudflare Turnstile */
.turnstile-container { margin: 1rem 0; min-height: 0; }
.turnstile-container:empty { margin: 0; }
.turnstile-error { color: #a21b1b; font-size: .95rem; margin: 1rem 0; }
.contact-form__submit:disabled { cursor: not-allowed; opacity: .6; }
