/* SleepHome — página de Contacto (template page-contacto.php).
   Requiere tokens.css + components.css. Fuente: SleepHome Final.dc.html (Contacto). */

/* Fondo crema de toda la página (hero teal y footer traen su propio fondo). */
body.shm-contact-page { background: var(--color-bg-alt); }

/* ============ Hero teal ============ */

.shm-contact-hero {
  background: var(--gradient-brand);
  color: var(--color-text-on-brand);
  padding: 66px 0;
  text-align: center;
}

.shm-contact-hero__eyebrow {
  font-size: var(--text-eyebrow);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #EBD9B8;
  font-weight: var(--fw-semibold);
  margin: 0 0 16px;
}

.shm-contact-hero__title {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: 46px;
  line-height: 1.08;
  margin: 0 0 16px;
  color: var(--color-text-on-brand);
}

.shm-contact-hero__lead {
  font-size: 18px;
  line-height: var(--lh-body);
  font-weight: var(--fw-light);
  color: rgba(255, 255, 255, .9);
  max-width: 600px;
  margin: 0 auto 26px;
}

.shm-contact-hero__pills {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.shm-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-size: 15px;
}

/* ============ Formulario + tarjeta directa ============ */

.shm-contact { padding-top: 52px; padding-bottom: 28px; }

.shm-contact__grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
  align-items: stretch;
}

.shm-contact__form-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 38px;
}

.shm-contact__h3 {
  font-family: var(--font-heading);
  font-size: 23px;
  margin: 0 0 22px;
  color: var(--color-text);
}

.shm-contact__notice {
  border-radius: var(--radius-input);
  padding: 12px 16px;
  font-size: 15px;
  margin: 0 0 18px;
}

.shm-contact__notice--ok { background: rgba(75, 170, 166, .12); color: var(--color-brand-stronger); }
.shm-contact__notice--err { background: rgba(181, 86, 47, .1); color: var(--color-sale); }

/* --- Campos --- */
.shm-form { display: flex; flex-direction: column; gap: 16px; }
.shm-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.shm-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.shm-field { display: flex; flex-direction: column; }

.shm-field label {
  font-size: 15px;
  color: #777;
  font-weight: var(--fw-medium);
  margin-bottom: 6px;
}

.shm-field input,
.shm-field select,
.shm-field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-input);
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  box-sizing: border-box;
}

.shm-field select { appearance: none; }
.shm-field textarea { resize: vertical; }

/* Placeholders más oscuros para leerlos mejor. */
.shm-field input::placeholder,
.shm-field textarea::placeholder {
  color: var(--color-text-secondary);
  opacity: 1; /* Firefox aclara los placeholders por defecto */
}

.shm-field input:focus,
.shm-field select:focus,
.shm-field textarea:focus {
  outline: 2px solid var(--color-brand);
  outline-offset: 1px;
  border-color: var(--color-brand);
}

.shm-form__submit {
  background: var(--btn-accent-bg);
  color: var(--btn-accent-text);
  font-size: 16px;
  font-weight: var(--fw-semibold);
  letter-spacing: .3px;
  padding: 15px 34px;
  border-radius: var(--radius-pill);
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  align-self: flex-start;
  transition: background .2s ease;
}

.shm-form__submit:hover { background: var(--btn-accent-bg-hover); color: var(--color-text-on-brand); }

/* --- Tarjeta oscura "hablar directo" --- */
.shm-contact__direct {
  background: var(--color-bg-inverse);
  border-radius: 18px;
  padding: 38px;
  color: var(--color-text-on-brand);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.shm-contact__h3--light { color: var(--color-text-on-brand); margin: 0; }

.shm-contact__direct-text {
  font-size: 16px;
  line-height: var(--lh-body);
  color: #c9c4ba;
  font-weight: var(--fw-light);
  margin: 0;
}

.shm-contact__wa {
  background: var(--color-brand);
  color: var(--color-text-on-brand);
  text-decoration: none;
  font-size: 16px;
  font-weight: var(--fw-semibold);
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}

.shm-contact__wa:hover { background: var(--color-brand-strong); color: var(--color-text-on-brand); }

.shm-contact__showroom-label {
  font-size: 15px;
  color: var(--color-accent-soft);
  font-family: var(--font-heading);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.shm-contact__showroom-addr {
  font-size: 15px;
  color: #e6e2da;
  line-height: 1.6;
  font-weight: var(--fw-light);
}

/* ============ Calendly ============ */

/* Mismo ancho que la sección de arriba (shm-inner = 1280). */
.shm-contact-cal { padding-top: 12px; padding-bottom: 64px; }

.shm-contact-cal__card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 28px;
}

.shm-contact-cal__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.shm-contact-cal__head .shm-contact__h3 { margin: 0; font-size: 24px; }
.shm-contact-cal__meta { font-size: 15px; color: var(--color-text-tertiary); }

/* El iframe interno lo maneja Calendly; nosotros controlamos alto y ancho.
   Alto generoso para que muestre el layout de 2 paneles sin scroll interno. */
/* Calendly no autoajusta: mantiene el alto que le damos y hace scroll si el
   contenido es más alto. Alto fijo generoso = el calendario completo sin scroll.
   Ajustar si el evento real necesita más/menos. */
.shm-contact-cal__widget {
  width: 100%;
  min-width: 320px;
  height: 700px; /* default de Calendly; el fino se ajusta con el evento real cargado */
}

.shm-contact-cal__placeholder {
  border: 1px dashed var(--color-border-input);
  border-radius: 14px;
  background: var(--color-bg-alt);
  padding: 60px 30px;
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: 15px;
}

/* ============ Responsive ============ */

@media (max-width: 860px) {
  .shm-contact__grid { grid-template-columns: 1fr; }
  .shm-contact-hero__title { font-size: 34px; }
}

@media (max-width: 560px) {
  .shm-form__row { grid-template-columns: 1fr; }
  .shm-contact__form-card,
  .shm-contact__direct,
  .shm-contact-cal__card { padding: 20px; }

  /* El min-width de 320px se desbordaba de la card en pantallas angostas. */
  .shm-contact-cal__widget {
    min-width: 0;
    height: 820px; /* en móvil Calendly apila el layout: necesita más alto */
  }
}
