/* Catálogo web del Instituto Mariano Moreno (marianomoreno.cloud).
   Estilo de pantalla de Flow de WhatsApp: fondo blanco, barra con cerrar/volver, opciones en
   lista con selección verde y botón verde ancho fijo abajo. Separado del panel. */
:root {
  --verde: #1daa61;
  --verde-oscuro: #008069;
  --verde-suave: #e7fce3;
  --texto: #111b21;
  --texto-2: #3b4a54;
  --texto-3: #667781;
  --linea: #e9edef;
  --gris: #8696a0;
  --fondo: #ffffff;
  --fuente: -apple-system, "Segoe UI", Helvetica, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: #f0f2f5; color: var(--texto); font-family: var(--fuente); -webkit-text-size-adjust: 100%; }
button { font-family: inherit; }

.app { max-width: 520px; height: 100%; margin: 0 auto; background: var(--fondo); display: flex; flex-direction: column; }
@media (min-width: 560px) { .app { box-shadow: 0 0 0 1px var(--linea); } }

.barra { height: 56px; flex-shrink: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center;
  border-bottom: 1px solid var(--linea); padding-top: env(safe-area-inset-top, 0px); box-sizing: content-box; }
.barra-btn { width: 48px; height: 48px; margin-left: 4px; border: none; background: transparent; color: #54656f; border-radius: 24px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.barra-btn:hover { background: #f5f6f6; }
.barra-btn:focus-visible, .opcion:focus-visible, .boton:focus-visible, .enlace:focus-visible { outline: 3px solid #a6e6c3; outline-offset: 2px; }
.barra-titulo { margin: 0; text-align: center; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.contenido { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 20px 12px; display: flex; flex-direction: column; gap: 18px; }
.contenido.sin-margen { padding: 0; gap: 0; }
.cargando, .vacio { color: var(--texto-3); text-align: center; margin: 40px 0; }
.titulo { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; }
.bajada { margin: 6px 0 0; font-size: 15px; color: var(--texto-3); line-height: 1.45; }

.lista { display: flex; flex-direction: column; }
.opcion { min-height: 60px; width: 100%; border: none; border-bottom: 1px solid var(--linea); background: transparent; display: flex;
  align-items: center; gap: 14px; padding: 12px 2px; text-align: left; cursor: pointer; color: var(--texto); }
.opcion:hover { background: #fafafa; }
.opcion-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.opcion-titulo { font-size: 16px; font-weight: 600; line-height: 1.25; }
.opcion-titulo.normal { font-weight: 400; }
.opcion-sub { font-size: 13.5px; color: var(--texto-3); line-height: 1.35; }
.opcion-desc { font-size: 13.5px; color: var(--texto-2); line-height: 1.35; }
.opcion-modalidad { font-size: 12.5px; color: var(--verde-oscuro); font-weight: 600; }
.icono { width: 44px; height: 44px; border-radius: 22px; background: var(--verde-suave); color: var(--verde-oscuro);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.radio { width: 22px; height: 22px; border-radius: 11px; border: 2px solid var(--gris); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.radio.on { border-color: var(--verde); }
.radio.on::after { content: ""; width: 12px; height: 12px; border-radius: 6px; background: var(--verde); }
.chevron { color: var(--gris); flex-shrink: 0; }
.miniatura { width: 64px; height: 64px; border-radius: 10px; flex-shrink: 0; object-fit: cover; background: #eef1f2; }

.foto-grande { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #eef1f2; display: block; }
.detalle { padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 14px; }
.detalle-tipo { font-size: 13px; color: var(--verde-oscuro); font-weight: 600; }
.detalle-nombre { margin: 4px 0 0; font-size: 23px; font-weight: 700; line-height: 1.2; }
.detalle-desc { font-size: 15.5px; line-height: 1.55; color: var(--texto-2); white-space: pre-line; margin: 0; }
.filas { border-top: 1px solid var(--linea); }
.fila { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--linea); font-size: 15px; }
.fila span:first-child { color: var(--texto-3); }
.fila span:last-child { font-weight: 600; text-align: right; }

.listo { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; padding: 24px 28px; text-align: center; }
.listo-icono { width: 72px; height: 72px; border-radius: 36px; background: var(--verde-suave); color: var(--verde-oscuro); display: flex; align-items: center; justify-content: center; }
.listo-icono.aviso { background: #fff3c4; color: #8a6d00; }
.listo p { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--texto-2); }

.pie { flex-shrink: 0; padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--linea);
  display: flex; flex-direction: column; gap: 10px; background: var(--fondo); }
#acciones { display: flex; flex-direction: column; gap: 8px; }
#acciones:empty { display: none; }
.boton { min-height: 48px; width: 100%; border: none; border-radius: 24px; background: var(--verde); color: #ffffff; font-size: 16px;
  font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.boton:hover { background: #179553; }
.boton:disabled { background: var(--linea); color: var(--gris); cursor: default; }
.enlace { border: none; background: transparent; color: var(--verde-oscuro); font-size: 15px; font-weight: 600; cursor: pointer; min-height: 44px; padding: 0 12px; }
.error { color: #b3261e; font-size: 14px; text-align: center; margin: 0; }
.pie-nota { margin: 0; font-size: 12px; color: var(--texto-3); text-align: center; }
