.contact-hero { position: relative; height: clamp(300px, 36vw, 550px); overflow: hidden; background: var(--navy); }
.contact-hero > img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* El cuestionario conserva controles HTML reales sobre el fondo original de Figma. */
.contact-stage { min-height: 887px; padding: 47px 24px 69px; background: #d4d5ce url('/assets/optimized/contact-cuestionario.webp') center / cover no-repeat; }
.contact-stage__inner { width: min(100%, 966px); margin: 0 auto; }
.contact-stage h2 { max-width: 920px; margin: 0 auto 47px; color: var(--navy); font-size: max(13px, calc(clamp(30px, 2.75vw, 42px) * var(--content-text-scale, 1))); font-style: italic; font-weight: 400; line-height: 1.15; text-align: center; }
.contact-stage h2 strong { font-weight: inherit; }
.contact-card__form { display: grid; gap: 19px; }
.contact-card__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.contact-card__field { display: grid; min-width: 0; gap: 7px; }
.contact-card__field label { padding-left: 16px; color: #111; font-size: max(13px, calc(20px * var(--content-text-scale, 1))); font-weight: 400; line-height: 1.2; }
.contact-card__field input, .contact-card__field select, .contact-card__field textarea { width: 100%; min-width: 0; min-height: 48px; padding: 10px 22px; border: 2px solid transparent; border-radius: 999px; outline: none; background: #fff; color: var(--navy); font: inherit; font-size: max(13px, calc(17px * var(--content-text-scale, 1))); }
.contact-card__field textarea { min-height: 134px; border-radius: 17px; resize: vertical; }
.contact-card__field input:focus-visible, .contact-card__field select:focus-visible, .contact-card__field textarea:focus-visible { border-color: var(--navy); box-shadow: 0 0 0 3px #fff; }
.contact-card__field input::placeholder, .contact-card__field textarea::placeholder { color: #666; }
.contact-card__actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.contact-card__actions button { min-width: 224px; min-height: 64px; padding: 8px 30px; border: 0; border-radius: 999px; background: #fff; color: var(--navy); font-size: max(13px, calc(35px * var(--content-text-scale, 1))); font-style: italic; line-height: 1; }
.contact-card__actions button:hover { background: #e9efec; }
.contact-card__actions button:disabled { opacity: .6; cursor: wait; }
.contact-card__form .contact-form__status { justify-self: end; max-width: 430px; }
.appointment-page .contact-stage { background-image: linear-gradient(#07132a55, #07132a55), url('/assets/contact/patio-contacto.jpg'); }
.appointment-page .contact-stage h2, .appointment-page .contact-card__field label { color: #fff; }

.contact-visit { position: relative; min-height: 660px; padding: 36px 24px 72px; background: linear-gradient(to bottom, var(--navy) 0 379px, var(--paper) 379px 100%); color: #fff; }
.contact-visit__inner { display: grid; grid-template-columns: minmax(0, 718px) minmax(0, 390px); align-items: start; gap: clamp(40px, 6vw, 88px); width: min(100%, 1212px); margin: auto; }
.contact-visit__map-frame { width: 100%; aspect-ratio: 718 / 580; overflow: hidden; background: #dbe7ec; }
.contact-visit__map { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.contact-visit__details { padding-top: 24px; }
.contact-visit h2 { margin-bottom: 48px; font-size: max(13px, calc(clamp(34px, 3vw, 46px) * var(--content-text-scale, 1))); font-style: italic; font-weight: 400; }
.contact-visit__details address { display: grid; gap: 28px; font-style: italic; }
.contact-visit__line { display: grid; grid-template-columns: 35px minmax(0, 1fr); align-items: start; gap: 18px; color: #fff; font-size: max(13px, calc(20px * var(--content-text-scale, 1))); line-height: 1.3; }
.contact-visit__icon { width: 35px; height: 35px; object-fit: contain; }
.contact-visit__line a { color: inherit; overflow-wrap: anywhere; }
.contact-visit__line a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-visit__social { display: flex; gap: 17px; margin-top: 80px; color: var(--navy); }
.contact-visit__social :is(a, .social-icon) { display: grid; width: 42px; height: 42px; place-items: center; border: 2px solid currentColor; border-radius: 50%; font-size: 24px; }
.contact-visit__social a:focus-visible { outline: 3px solid currentColor; outline-offset: 5px; }

/* Las fichas de proyecto reutilizan la composición del cuestionario. */
.tiber-contact { min-height: 887px; padding: 47px 24px 69px; background: linear-gradient(#ffffff22, #ffffff22), url('/assets/optimized/tiber-contacto.webp') center / cover no-repeat; }
.tiber-contact::before, .tiber-contact::after { display: none; }
.tiber-contact__card { width: min(100%, 966px); margin: 0 auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.tiber-contact h2 { max-width: 920px; margin: 0 auto 47px; color: var(--navy); font-size: max(13px, calc(clamp(30px, 2.75vw, 42px) * var(--content-text-scale, 1))); line-height: 1.15; }
.tiber-contact__form { display: grid; gap: 19px; }
.tiber-contact__row { gap: 24px; }
.tiber-contact__field { gap: 7px; }
.tiber-contact__field label { padding-left: 16px; color: var(--navy); font-size: max(13px, calc(20px * var(--content-text-scale, 1))); font-weight: 400; line-height: 1.2; }
.tiber-contact__field input, .tiber-contact__field select, .tiber-contact__field textarea { width: 100%; min-width: 0; min-height: 48px; padding: 10px 22px; border: 2px solid transparent; border-radius: 999px; outline: none; background: #fff; color: var(--navy); font: inherit; font-size: max(13px, calc(17px * var(--content-text-scale, 1))); box-shadow: none; }
.tiber-contact__field select:invalid { color: var(--navy); }
.tiber-contact__field textarea { min-height: 134px; border-radius: 17px; resize: vertical; }
.tiber-contact__field input:focus-visible, .tiber-contact__field select:focus-visible, .tiber-contact__field textarea:focus-visible { border-color: var(--navy); box-shadow: 0 0 0 3px #fff; }
.tiber-contact__actions { justify-content: flex-end; margin-top: 22px; }
.tiber-contact__actions button { min-width: 224px; min-height: 64px; padding: 8px 30px; border: 0; border-radius: 999px; background: #fff; color: var(--navy); font-size: max(13px, calc(35px * var(--content-text-scale, 1))); font-style: italic; font-weight: 400; line-height: 1; }
.tiber-contact__actions button:hover { background: #e9efec; }
.tiber-contact__actions button:disabled { opacity: .6; background: #fff; cursor: wait; }
.ganges-page .tiber-contact { background: url('/assets/optimized/ganges-contacto.webp') center / cover no-repeat; }
.ganges-page .tiber-contact h2, .ganges-page .tiber-contact__field label { color: #fff; }

@media (max-width: 900px) {
  .contact-visit { min-height: 0; background: var(--navy); }
  .contact-visit__inner { grid-template-columns: 1fr; gap: 24px; max-width: 718px; }
  .contact-visit__details { display: contents; }
  .contact-visit h2 { grid-row: 1; margin: 0; text-align: center; }
  .contact-visit__map-frame { grid-row: 2; border-radius: 12px; }
  .contact-visit__details address { grid-row: 3; gap: 14px; }
  .contact-visit__social { grid-row: 4; margin-top: 8px; justify-content: center; color: #fff; }
}
@media (max-width: 600px) {
  .contact-hero { height: 140px; }
  .contact-stage, .appointment-page .contact-stage { min-height: 0; padding: 40px 20px 50px; background: var(--navy); }
  .contact-stage h2 { margin-bottom: 28px; color: #fff; font-size: max(13px, calc(22px * var(--content-text-scale, 1))); }
  .contact-stage h2 strong { color: #faab2f; font-style: normal; font-weight: 700; }
  .contact-card__form { gap: 16px; }
  .contact-card__row { grid-template-columns: 1fr; gap: 16px; }
  .contact-card__field label, .appointment-page .contact-card__field label { padding-left: 0; color: #fff; font-size: max(13px, calc(16px * var(--content-text-scale, 1))); font-weight: 700; }
  .contact-card__field input, .contact-card__field select, .contact-card__field textarea { min-height: 44px; border-radius: 12px; font-size: max(13px, calc(16px * var(--content-text-scale, 1))); }
  .contact-card__field textarea { min-height: 92px; }
  .contact-card__actions { margin-top: 12px; }
  .contact-card__actions button { min-width: 110px; min-height: 44px; font-size: max(13px, calc(18px * var(--content-text-scale, 1))); }
  .contact-visit { padding: 40px 17px 60px; }
  .contact-visit__line { font-size: max(13px, calc(17px * var(--content-text-scale, 1))); }
  .tiber-contact { min-height: 0; padding: 24px 16px 32px; background-image: linear-gradient(#122147d9, #122147d9), url('/assets/optimized/tiber-contacto.webp'); }
  .ganges-page .tiber-contact { background-image: url('/assets/optimized/ganges-contacto.webp'); }
  .tiber-contact__card { padding: 0; border-radius: 0; }
  .tiber-contact h2, .ganges-page .tiber-contact h2 { margin-bottom: 20px; color: #fff; font-size: max(13px, calc(24px * var(--content-text-scale, 1))); }
  .tiber-contact__form, .tiber-contact__row { gap: 16px; }
  .tiber-contact__field label, .ganges-page .tiber-contact__field label { padding-left: 0; color: #fff; font-size: max(13px, calc(14px * var(--content-text-scale, 1))); font-weight: 700; }
  .tiber-contact__field input, .tiber-contact__field select, .tiber-contact__field textarea { min-height: 44px; font-size: max(13px, calc(16px * var(--content-text-scale, 1))); }
  .tiber-contact__field textarea { min-height: 112px; border-radius: 12px; }
  .tiber-contact__actions { align-items: flex-end; flex-direction: row; margin-top: 12px; }
  .tiber-contact__actions button { width: auto; min-width: 125px; min-height: 44px; font-size: max(13px, calc(18px * var(--content-text-scale, 1))); }
}

/* Ajustes de Ganges observados en el prototipo; los otros formularios conservan sus estilos. */
.ganges-page .tiber-contact h2 { max-width: 1020px; font-size: max(13px, calc(clamp(30px, 3.3vw, 50px) * var(--content-text-scale, 1))); font-weight: 400; line-height: 1.2; }
.ganges-page .tiber-contact__field label { font-weight: 400; }
@media (max-width: 600px) {
  .ganges-page .tiber-contact h2 { font-size: max(13px, calc(24px * var(--content-text-scale, 1))); }
  .ganges-page .tiber-contact__field textarea { min-height: 100px; }
}
