/* LabAncestral · inscripcion.css
   Estilos del formulario público de inscripción a actividades y de su índice. */

.ins-page {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  background: #f6efe1;
  color: #152514;
  font-family: 'IBM Plex Sans', sans-serif;
}

.ins-page *,
.ins-page *::before,
.ins-page *::after {
  min-width: 0;
  box-sizing: border-box;
}

.ins-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

/* ── HERO ───────────────────────────────────────── */

.ins-hero {
  position: relative;
  padding: 62px 44px 54px;
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.ins-breadcrumb {
  margin-bottom: 22px;
  color: #9a8f74;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: .16em;
}

.ins-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.ins-breadcrumb a:hover {
  color: #18713A;
}

.ins-eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #18713A;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ins-eyebrow--cerrada { background: #8a7f66; }

.ins-hero h1 {
  margin: 0 0 18px;
  max-width: 20ch;
  color: #152514;
  font-family: 'Spectral', serif;
  font-weight: 300;
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.06;
  animation: ins-rise .7s ease both;
}

.ins-hero h1 em {
  color: #18713A;
  font-style: italic;
  font-weight: 500;
}

.ins-hero p {
  margin: 0;
  max-width: 60ch;
  color: #54503f;
  font-size: 16.5px;
  line-height: 1.65;
}

@keyframes ins-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ── DATOS DE LA ACTIVIDAD ──────────────────────── */

.ins-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 22px;
}

.ins-meta__item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14.5px;
  color: #54503f;
}

.ins-meta__label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9a8f74;
}

/* ── CUERPO ─────────────────────────────────────── */

.ins-section {
  padding: 54px 44px 76px;
}

.ins-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  align-items: start;
  gap: 40px;
}

.ins-card {
  padding: 34px 36px;
  border: 1px solid #ddd0b4;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .07);
}

.ins-card h2 {
  margin: 0 0 6px;
  color: #152514;
  font-family: 'Spectral', serif;
  font-weight: 400;
  font-size: 27px;
  line-height: 1.15;
}

.ins-card__intro {
  margin: 0 0 26px;
  color: #7a745f;
  font-size: 14.5px;
  line-height: 1.6;
}

/* ── FORMULARIO ─────────────────────────────────── */

.ins-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.ins-field--full { grid-column: 1 / -1; }

.ins-field label {
  display: block;
  margin-bottom: 7px;
  color: #3c4a3d;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ins-field label .ins-req { color: #C77A33; }

.ins-input,
.ins-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd0b4;
  border-radius: 7px;
  background: #fdfaf3;
  color: #152514;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.ins-input::placeholder { color: #b4ab93; }

.ins-input:focus,
.ins-select:focus {
  outline: none;
  border-color: #18713A;
  box-shadow: 0 0 0 3px rgba(24, 113, 58, .13);
}

/* Campo apagado a la espera de otro (la comuna, mientras no haya región). */
.ins-select:disabled {
  border-style: dashed;
  background: #f4f0e6;
  color: #9a8f74;
  cursor: not-allowed;
}

.ins-help {
  display: block;
  margin-top: 6px;
  color: #9a8f74;
  font-size: 12.5px;
  line-height: 1.45;
}

.ins-error {
  margin-top: 6px;
  color: #b23c17;
  font-size: 12.5px;
}

.ins-field--error .ins-input,
.ins-field--error .ins-select {
  border-color: #b23c17;
  background: #fdf3ef;
}

.ins-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid #eee2cb;
  border-radius: 8px;
  background: #f9f4e8;
  color: #54503f;
  font-size: 13.5px;
  line-height: 1.55;
}

.ins-consent input {
  flex: 0 0 auto;
  margin-top: 2px;
  width: 17px;
  height: 17px;
  accent-color: #18713A;
}

.ins-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 26px;
}

.ins-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 30px;
  border: none;
  border-radius: 999px;
  background: #18713A;
  color: #fff;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.ins-btn:hover { background: #12592d; transform: translateY(-1px); }

.ins-btn--ghost {
  border: 1px solid #d8c9a8;
  background: transparent;
  color: #54503f;
  text-decoration: none;
}

.ins-btn--ghost:hover { background: #efe6d3; }

.ins-nota {
  color: #9a8f74;
  font-size: 12.5px;
}

.ins-alert {
  margin-bottom: 22px;
  padding: 14px 17px;
  border-left: 3px solid #b23c17;
  border-radius: 6px;
  background: #fdf3ef;
  color: #8a3315;
  font-size: 14px;
}

/* ── PANEL LATERAL ──────────────────────────────── */

.ins-aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 24px;
}

.ins-aside__box {
  padding: 26px 26px 28px;
  border: 1px solid #ddd0b4;
  border-radius: 10px;
  background: #fff;
}

.ins-aside__box--dark {
  border-color: #24512f;
  background: #17331f;
  color: #d7e3da;
}

.ins-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
  color: #9a8f74;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.ins-kicker span {
  display: block;
  width: 24px;
  height: 1px;
  background: #c2b48f;
}

.ins-aside__box--dark .ins-kicker { color: #7fa389; }
.ins-aside__box--dark .ins-kicker span { background: #3a6b4b; }

.ins-aside h3 {
  margin: 0 0 10px;
  font-family: 'Spectral', serif;
  font-weight: 400;
  font-size: 21px;
  line-height: 1.2;
}

.ins-aside p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #7a745f;
}

.ins-aside__box--dark p { color: #cfe0d2; }

.ins-dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.ins-dl dt {
  color: #9a8f74;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.ins-dl dd {
  margin: 3px 0 0;
  color: #152514;
  font-size: 15px;
  line-height: 1.45;
}

/* ── ESTADO: INSCRIPCIÓN CONFIRMADA ─────────────── */

.ins-ok {
  padding: 44px 40px;
  border: 1px solid #bcd9c4;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .07);
}

.ins-ok__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: #e4f1e6;
  color: #18713A;
  font-size: 26px;
}

.ins-ok h2 {
  margin: 0 0 12px;
  font-family: 'Spectral', serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
}

.ins-ok p {
  margin: 0 0 10px;
  max-width: 58ch;
  color: #54503f;
  font-size: 15.5px;
  line-height: 1.65;
}

/* ── ACTIVIDAD DESTACADA (la más próxima) ───────── */

.ins-hero--compacto { padding: 52px 44px 40px; }

.ins-destacada-wrap {
  padding: 0 44px;
  margin-top: -14px;
}

.ins-kicker--claro { margin-bottom: 16px; }

.ins-destacada {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  border: 1px solid #cbbf9f;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(21, 37, 20, .13);
}

/* Si es hoy, el borde y el acento se vuelven naranjos: se ve a un metro. */
.ins-destacada--hoy {
  border-color: #EE9A1C;
  box-shadow: 0 14px 44px rgba(238, 154, 28, .26);
}

.ins-destacada__cuerpo {
  padding: 44px 46px 40px;
}

.ins-destacada__flags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 20px;
}

.ins-flag {
  display: inline-block;
  padding: 7px 15px;
  border-radius: 999px;
  background: #18713A;
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.ins-flag--hoy {
  background: #EE9A1C;
  color: #2b1c00;
  animation: ins-latido 2.4s ease-in-out infinite;
}

@keyframes ins-latido {
  0%, 100% { box-shadow: 0 0 0 0 rgba(238, 154, 28, .55); }
  55%      { box-shadow: 0 0 0 9px rgba(238, 154, 28, 0); }
}

.ins-flag--suave {
  background: #f1e8d5;
  color: #7a6c4c;
}

.ins-destacada__titulo {
  margin: 0 0 18px;
  max-width: 17ch;
  color: #152514;
  font-family: 'Spectral', serif;
  font-weight: 300;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.03;
  letter-spacing: -.01em;
}

.ins-destacada__desc {
  margin: 0 0 28px;
  max-width: 58ch;
  color: #54503f;
  font-size: 16.5px;
  line-height: 1.68;
}

.ins-destacada__datos {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 44px;
  padding: 22px 0;
  border-top: 1px solid #eee2cb;
  border-bottom: 1px solid #eee2cb;
}

.ins-destacada__datos .ins-meta__label { display: block; margin-bottom: 5px; }

.ins-destacada__datos strong {
  color: #152514;
  font-size: 16px;
  font-weight: 500;
}

.ins-destacada__acciones {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
}

.ins-btn--grande {
  padding: 17px 38px;
  font-size: 16.5px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(24, 113, 58, .28);
}

.ins-destacada--hoy .ins-btn--grande {
  background: #EE9A1C;
  color: #2b1c00;
  box-shadow: 0 6px 18px rgba(238, 154, 28, .35);
}

.ins-destacada--hoy .ins-btn--grande:hover { background: #d98812; }

.ins-copiar--destacada { margin-top: 22px; max-width: 520px; }

/* Columna derecha: foto de la actividad o el día en grande */
.ins-destacada__lado {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  background: #17331f;
  overflow: hidden;
}

.ins-destacada__lado img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ins-destacada__fecha {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  text-align: center;
  line-height: 1;
}

.ins-destacada__fecha--sobre {
  position: absolute;
  right: 20px;
  bottom: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(23, 51, 31, .88);
  backdrop-filter: blur(3px);
}

.ins-destacada__diasem {
  color: #9fd0ae;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.ins-destacada__dia {
  font-family: 'Spectral', serif;
  font-weight: 300;
  font-size: clamp(62px, 8vw, 104px);
  line-height: .95;
}

.ins-destacada--hoy .ins-destacada__dia { color: #FFC46B; }

.ins-destacada__mes {
  color: #cfe0d2;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  letter-spacing: .2em;
}

/* ── ÍNDICE DE PRÓXIMAS ACTIVIDADES ─────────────── */

.ins-subtitulo {
  margin: 0;
  color: #152514;
  font-family: 'Spectral', serif;
  font-weight: 300;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

.ins-item__falta {
  margin-left: 9px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1e8d5;
  color: #7a6c4c;
  font-size: 10px;
  letter-spacing: .1em;
}

.ins-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 30px;
}

.ins-item {
  display: flex;
  flex-direction: column;
  padding: 26px 27px 24px;
  border: 1px solid #ddd0b4;
  border-radius: 10px;
  background: #fff;
  transition: transform .18s ease, box-shadow .18s ease;
}

.ins-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(21, 37, 20, .09);
}

.ins-item__fecha {
  margin-bottom: 12px;
  color: #C77A33;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ins-item h3 {
  margin: 0 0 10px;
  font-family: 'Spectral', serif;
  font-weight: 400;
  font-size: 21px;
  line-height: 1.22;
  color: #152514;
}

.ins-item p {
  margin: 0 0 18px;
  color: #7a745f;
  font-size: 14px;
  line-height: 1.55;
}

.ins-item__pie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #eee2cb;
}

.ins-item__lugar {
  color: #9a8f74;
  font-size: 13px;
}

.ins-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #18713A;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.ins-link:hover { text-decoration: underline; }

.ins-copiar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ins-copiar input {
  flex: 1;
  padding: 8px 11px;
  border: 1px solid #e3d8bf;
  border-radius: 6px;
  background: #f9f4e8;
  color: #7a745f;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
}

.ins-copiar button {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid #d8c9a8;
  border-radius: 6px;
  background: #fff;
  color: #54503f;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12.5px;
  cursor: pointer;
}

.ins-copiar button:hover { background: #efe6d3; }

.ins-vacio {
  margin-top: 26px;
  padding: 40px 34px;
  border: 1px dashed #d8c9a8;
  border-radius: 10px;
  text-align: center;
  color: #7a745f;
  font-size: 15px;
}

/* ── RESPONSIVE ─────────────────────────────────── */

@media (max-width: 980px) {
  .ins-grid { grid-template-columns: minmax(0, 1fr); }
  .ins-aside { position: static; }
  .ins-destacada { grid-template-columns: minmax(0, 1fr); }
  .ins-destacada__lado { order: -1; min-height: 200px; }
  .ins-destacada__lado img { max-height: 260px; }
}

@media (max-width: 720px) {
  .ins-hero { padding: 44px 20px 38px; }
  .ins-hero--compacto { padding: 38px 20px 30px; }
  .ins-destacada-wrap { padding: 0 20px; }
  .ins-destacada__cuerpo { padding: 28px 22px 30px; }
  .ins-destacada__datos { gap: 16px 28px; }
  .ins-destacada__acciones { flex-direction: column; align-items: stretch; }
  .ins-section { padding: 34px 20px 56px; }
  .ins-card { padding: 26px 20px; }
  .ins-fields { grid-template-columns: minmax(0, 1fr); }
  .ins-ok { padding: 32px 22px; }
  .ins-actions { flex-direction: column; align-items: stretch; }
  .ins-btn { justify-content: center; }
}

/* ── ¿Desde dónde participas? ────────────────────
   Bloque con dos caras: región/comuna/localidad para Chile y país/ciudad para
   quien participa desde fuera. El botón de arriba cambia de una a otra y sólo
   se ve la que está activa. */
.ins-origen {
  margin-top: 26px;
  padding: 16px 18px 18px;
  border: 1px solid #e4e0d3;
  border-radius: 10px;
  background: #fcfaf5;
}

.ins-origen__campos { margin-top: 16px; }

/* `.ins-fields` es un grid, y `display:grid` le ganaba al `hidden` del
   navegador: por eso se veían los dos bloques a la vez. */
.ins-origen__campos[hidden] { display: none; }

.ins-origen legend {
  padding: 0 8px;
  color: #18713A;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ins-origen__toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 2px;
  padding: 9px 16px;
  border: 1px dashed #c8bfa6;
  border-radius: 999px;
  background: #fff;
  color: #54503f;
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}

.ins-origen__toggle:hover {
  border-color: #18713A;
  color: #18713A;
}

.ins-origen__toggle input {
  width: 16px;
  height: 16px;
  accent-color: #18713A;
  cursor: pointer;
}

/* Cuando está activo el modo extranjero se marca el botón, para que quede
   claro que los campos de abajo cambiaron. */
.ins-origen__toggle:has(input:checked) {
  border-style: solid;
  border-color: #18713A;
  background: #eef6f0;
  color: #18713A;
  font-weight: 600;
}
