/* =========================================================
   CONTACTO (/contacto/) — contenido real de jicalab.com/contacto/
   Solo estilos propios de esta página (prefijo ct-). Se enlaza después de jicalab.css
   y reutiliza sus tokens y componentes: cat-hero, section-head, faq, btn, pill, link-inline.
   La banda del análisis facial es la común (JICA.bandaAnalisis, app.js): aquí no lleva estilos propios.
   ========================================================= */

/* ---------- Cabecera: sin teselas debajo, así que cierra con su propio aire ---------- */
.ct-hero .cat-hero__head { padding-bottom: clamp(36px, 4.4vw, 60px); }
.ct-hero__side { display: grid; gap: 22px; justify-items: start; }
.ct-hero__side .lead { margin: 0; }
.ct-wa-ico { width: 18px; height: 18px; flex: none; fill: currentColor; }

/* ---------- Canales + formulario ---------- */
.ct-main { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 4.6vw, 80px); align-items: stretch; }
/* Las dos columnas acaban a la misma altura: las redes bajan al pie de la columna y el formulario se estira */
.ct-side { display: flex; flex-direction: column; gap: clamp(26px, 3vw, 38px); min-width: 0; }
.ct-side > .ct-social { margin-top: auto; }
.ct-side .section-head__text .lead { max-width: 46ch; }

/* Tarjetas de contacto: las cuatro idénticas (misma altura por fila), con la acción siempre abajo */
.ct-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: clamp(8px, 1vw, 12px); }
.ct-cards > li { display: flex; min-width: 0; }
.ct-card { flex: 1; min-width: 0; display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 14px; row-gap: 6px; padding: clamp(18px, 1.8vw, 24px); border-radius: var(--r-card); background: var(--card); border: 1px solid transparent; color: var(--ink);
  transition: background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease); }
.ct-card:hover { background: var(--green-tint); border-color: var(--green-soft); box-shadow: 0 14px 34px rgb(30 34 22 / .08); }
@media (hover: hover) { .ct-card:hover { transform: translateY(-3px); } }
.ct-card:focus-visible, .ct-more__link:focus-visible { outline-offset: -2px; border-radius: var(--r-card); } /* foco en su propio borde, sin segundo aro */
.ct-card__ico { grid-column: 1; grid-row: 1; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--green-dark); transition: background .25s var(--ease), color .25s var(--ease); }
.ct-card__ico .icon { width: 20px; height: 20px; }
.ct-card__ico .ct-wa-ico { width: 21px; height: 21px; }
.ct-card:hover .ct-card__ico { background: var(--green); color: var(--white); }
.ct-card__label { grid-column: 2; grid-row: 1; align-self: center; font: 600 11px/1.3 var(--font-alt); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ct-card__value { grid-column: 1 / -1; margin-top: 12px; font: 500 18px/1.3 var(--font); letter-spacing: -.01em; color: var(--ink); overflow-wrap: anywhere; }
.ct-card__detail { grid-column: 1 / -1; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ct-nowrap { white-space: nowrap; }
.ct-card__go { grid-column: 1 / -1; align-self: end; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 600 11.5px/1.2 var(--font-alt); letter-spacing: .09em; text-transform: uppercase; color: var(--ink); }
.ct-card__go .icon-arrow { width: 34px; height: 34px; }
.ct-card:hover .ct-card__go .icon-arrow { background: var(--green); border-color: var(--green); color: var(--white); }

/* Redes: una línea discreta bajo las tarjetas */
.ct-social { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding-top: clamp(20px, 2.4vw, 28px); border-top: 1px solid var(--line); }
.ct-social__txt { display: grid; gap: 4px; }
.ct-social__txt b { font: 600 11.5px/1.2 var(--font-alt); letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.ct-social__txt span { font-size: 15px; color: var(--ink); }
.ct-social__links { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-social__links .pill { min-height: 44px; padding-inline: 16px 18px; gap: 8px; }
.ct-social__links .icon { width: 17px; height: 17px; }

/* ---------- Formulario ---------- */
.ct-form-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); padding: clamp(22px, 3vw, 44px); border-radius: var(--r-card); background: var(--cream); border: 1px solid var(--line); }
.ct-form { display: grid; gap: 22px; align-self: start; }
.ct-form[hidden] { display: none; }
.ct-form__head { display: grid; gap: 8px; }
.ct-form__title { font-size: clamp(24px, 2.2vw, 30px); font-weight: 450; letter-spacing: -.02em; line-height: 1.1; }
.ct-form__req { font-size: 14px; color: var(--muted); }
.ct-req { color: var(--green-dark); font-weight: 700; }
.ct-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
.ct-field { display: grid; gap: 8px; align-content: start; min-width: 0; }
.ct-field > label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 22px; font: 600 11.5px/1.25 var(--font-alt); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.ct-opt { display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border-radius: var(--pill); background: var(--white); border: 1px solid var(--line-strong); font: 600 10px/1 var(--font-alt); letter-spacing: .08em; color: var(--muted); }
/* Borde visible (contraste ≥ 3:1 con el fondo) y 16 px de letra para que iOS no amplíe al escribir */
.ct-input { width: 100%; min-height: 54px; padding: 13px 18px; border: 1px solid var(--soft); border-radius: 16px; background: var(--white); font: 400 16px/1.4 var(--font); color: var(--ink);
  -webkit-appearance: none; appearance: none; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.ct-input::placeholder { color: var(--muted); opacity: 1; }
.ct-input:hover { border-color: var(--muted); }
.ct-input:focus { outline: none; border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); } /* foco en el propio borde, como el resto de la web */
.ct-input[aria-invalid="true"] { border-color: var(--sale); box-shadow: inset 0 0 0 1px var(--sale); }
.ct-input[aria-invalid="true"]:focus { border-color: var(--sale); box-shadow: inset 0 0 0 2px var(--sale); }
textarea.ct-input { min-height: 172px; resize: vertical; }
.ct-select { position: relative; }
.ct-select .ct-input { padding-right: 48px; cursor: pointer; }
.ct-select .icon { position: absolute; right: 18px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ct-error { display: flex; align-items: flex-start; gap: 7px; font-size: 14px; line-height: 1.4; color: var(--sale); }
.ct-error[hidden] { display: none; }
.ct-error .icon { width: 16px; height: 16px; margin-top: 1px; }
/* Consentimiento: toda la línea es pulsable */
.ct-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-block: 8px; font-size: 15px; line-height: 1.5; color: var(--text); cursor: pointer; }
.ct-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--green); cursor: pointer; }
.ct-check input:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.ct-check input[aria-invalid="true"] { outline: 2px solid var(--sale); outline-offset: 2px; border-radius: 4px; }
.ct-consent { display: grid; gap: 4px; }
/* Primera capa de protección de datos (RGPD) */
.ct-legal { padding: 14px 18px; border-radius: 16px; background: var(--white); border: 1px solid var(--line); font-size: 13px; line-height: 1.55; color: var(--muted); }
.ct-legal b { color: var(--ink); font-weight: 600; }
.ct-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.ct-form__foot .btn { min-width: 220px; }

/* Mensaje de envío (simulado en el prototipo) */
.ct-done { display: grid; gap: 16px; justify-items: start; align-self: center; }
.ct-done[hidden] { display: none; }
.ct-done__ico { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--white); }
.ct-done__ico .icon { width: 26px; height: 26px; stroke-width: 2; }
.ct-done__title { font-size: clamp(26px, 2.4vw, 34px); font-weight: 450; letter-spacing: -.02em; line-height: 1.1; text-wrap: balance; }
.ct-done__title:focus { outline: none; } /* destino de foco programático, no un control */
.ct-done p { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 52ch; }
.ct-done .todo-tag { position: static; justify-self: start; }
.ct-done.todo { padding: 4px; outline-offset: 8px; }

/* ---------- Preguntas rápidas + enlaces de ayuda ---------- */
.ct-more { width: 100%; max-width: 860px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; }
.ct-more > li { display: flex; min-width: 0; }
.ct-more__link { flex: 1; min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 76px; padding: 14px 16px; border-radius: var(--r-card); background: var(--white); border: 1px solid transparent;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.ct-more__link:hover { border-color: var(--green-soft); box-shadow: 0 10px 26px rgb(30 34 22 / .07); }
.ct-more__ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--green-tint); color: var(--green-dark); transition: background .2s var(--ease), color .2s var(--ease); }
.ct-more__link:hover .ct-more__ico { background: var(--green); color: var(--white); }
.ct-more__link b { display: block; font: 600 11.5px/1.25 var(--font-alt); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.ct-more__link small { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.ct-more__go { width: 14px; height: 14px; color: var(--muted); transition: transform .2s var(--ease), color .2s var(--ease); }
.ct-more__link:hover .ct-more__go { color: var(--green); transform: translateX(2px); }
.ct-faq .faq__item p a { white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .ct-main { grid-template-columns: minmax(0, 1fr); }
  .ct-side .section-head__text { max-width: 720px; }
  .ct-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .ct-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-more { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .ct-hero .cat-hero__head { padding-bottom: 32px; }
  .ct-form__foot .btn { width: 100%; min-width: 0; }
}
/* Móvil: tarjetas en fila (icono a la izquierda) para no alargar la página; siguen siendo idénticas */
@media (max-width: 560px) {
  .ct-cards { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ct-card { row-gap: 3px; padding: 16px; }
  .ct-card__ico { grid-row: 1 / span 4; }
  .ct-card__label { grid-column: 2; grid-row: 1; align-self: start; padding-top: 2px; }
  .ct-card__value { grid-column: 2; grid-row: 2; margin-top: 2px; }
  .ct-card__detail { grid-column: 2; grid-row: 3; }
  .ct-card__go { grid-column: 2; grid-row: 4; padding-top: 10px; justify-content: flex-start; }
  .ct-card__go .icon-arrow { width: 30px; height: 30px; }
  .ct-row { grid-template-columns: minmax(0, 1fr); }
  .ct-social { flex-direction: column; align-items: flex-start; }
  .ct-social__links { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-social__links .pill { justify-content: center; }
}
/* Móviles muy estrechos: el icono sube a la fila de la etiqueta y el texto gana todo el ancho (dirección y horario en una línea) */
@media (max-width: 359px) {
  .ct-card { grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 12px; padding: 14px; }
  .ct-card__ico { grid-row: 1; width: 40px; height: 40px; }
  .ct-card__label { grid-row: 1; align-self: center; padding-top: 0; }
  .ct-card__value, .ct-card__detail, .ct-card__go { grid-column: 1 / -1; }
  .ct-card__value { margin-top: 8px; font-size: 17px; }
  .ct-card__go { align-self: end; }
  .ct-form-wrap { padding: 18px 16px; }
  .ct-social__links .pill { padding-inline: 10px; }
}
