/* Bloque de contacto compartido por el home y los artículos del blog (12-sep-2026):
   cabecera, conmutador, widget de Consu (.as-*) y formulario clásico. Usa los tokens :root de cada página. */
.contacto-head { margin-bottom: clamp(28px, 4vw, 48px); }
.contacto-head h2 {
  font-family: var(--sans);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.026em;
  max-width: 26ch;
}
.contacto-head h2 em {
  color: var(--green-deep);
  font-style: normal;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}
/* ¿Cómo parte? — tres pasos entre el lede y el CTA */
.contacto-grid {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.contacto-grid > * { min-width: 0; }
@media (max-width: 1024px) { .contacto-grid { grid-template-columns: 1fr; gap: 40px; } }

.form-wrap {
  background: var(--paper-2);
  padding: clamp(28px, 4vw, 40px);
  border-top: 3px solid var(--green);
}
.form-wrap h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(20px, 1.8vw, 24px);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
form.contact { display: grid; gap: 18px; position: relative; }
form.contact[hidden] { display: none; } /* hidden debe ganarle al display:grid */
form.contact .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 560px) { form.contact .row { grid-template-columns: 1fr; } }
form.contact .citas {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  display: grid;
  gap: 12px;
}
form.contact .citas-t {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
form.contact .citas-t .opt {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 400;
  color: var(--ink-3);
}
form.contact .citas-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
form.contact .citas-row > * { min-width: 0; }
form.contact .cita {
  display: grid;
  gap: 6px;
  align-content: start;
}
form.contact .cita > span {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
@media (max-width: 720px) { form.contact .citas-row { grid-template-columns: 1fr; } }
form.contact .citas-note {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-3);
  margin: 0;
}
form.contact label {
  display: grid;
  gap: 6px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
form.contact label .opt {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 400;
  color: var(--ink-3);
  font-size: 12px;
  margin-left: 6px;
}
form.contact input,
form.contact select,
form.contact textarea {
  width: 100%;
  min-width: 0;
  font-family: var(--sans);
  font-size: 16px; /* >=16px evita el auto-zoom de iOS al enfocar */
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 11px 13px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
  font-weight: 400;
}
form.contact textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
form.contact input:focus,
form.contact select:focus,
form.contact textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-tint);
}
/* honeypot anti-spam — oculto fuera de pantalla */
form.contact .hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
form.contact button {
  justify-self: start;
  background: var(--green-deep);
  color: #fff;
  border: 0;
  padding: 13px 24px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background .15s;
  margin-top: 6px;
  border-radius: 2px;
}
form.contact button:hover { background: var(--green-darker); }
form.contact button[disabled] { opacity: .7; cursor: default; }
.form-status {
  margin: 2px 0 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  max-width: 52ch;
}
.form-status.err { color: #b3261e; }
.form-status.ok { color: var(--green-deep); }

.form-alt {
  margin: 12px 0 0;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 64ch;
}
.form-alt button {
  font-family: var(--sans);
  font-size: inherit;
  color: var(--green-darker);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .as-escribiendo::after { animation: none; }
}

.as-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 680px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--sans);
}
@media (max-width: 600px) { .as-panel { height: min(680px, 75vh); height: min(680px, 75dvh); } }
.as-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  flex: 0 0 auto;
}
.as-head .mark { height: 22px; width: auto; flex: 0 0 auto; }
.as-head .t { font-weight: 600; font-size: 15px; line-height: 1.2; }
.as-head .s { font-size: 11.5px; opacity: .65; }
.as-msgs {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--paper-2);
}
.as-m {
  max-width: 86%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.as-m.bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--rule); border-bottom-left-radius: 4px; }
.as-m.yo  { align-self: flex-end; background: var(--green-deep); color: #fff; border-bottom-right-radius: 4px; }
.as-m.nota { align-self: center; background: none; font-size: 12.5px; color: var(--ink-3); padding: 0; }
.as-m a { color: inherit; text-decoration: underline; }
.as-escribiendo::after { content: '·\00a0·\00a0·'; animation: as-puls 1.1s infinite; }
@keyframes as-puls { 0%,100% { opacity: .25; } 50% { opacity: .9; } }
.as-ts { display: flex; justify-content: center; background: var(--paper); }
.as-ts:not(:empty) { padding: 10px 0 4px; border-top: 1px solid var(--rule); }
.as-form {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--rule);
  background: var(--paper);
}
.as-form textarea {
  flex: 1;
  resize: none;
  height: 44px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  outline: none;
  min-width: 0;
}
.as-form textarea:focus { border-color: var(--green-deep); }
.as-form button {
  width: 44px; height: 44px;
  flex: 0 0 auto;
  border: 0; border-radius: 6px;
  background: var(--green-deep); color: #fff;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.as-form button:disabled { opacity: .45; cursor: default; }
.as-form button svg { width: 20px; height: 20px; }
.as-pie {
  flex: 0 0 auto;
  padding: 7px 12px 9px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-3);
  background: var(--paper);
  text-align: center;
}
.as-pie a { color: var(--ink-2); }
