/* Reacciones químicas — estilo sobrio para secundaria.
   Fondo blanco, títulos #1F5C8B, Arial, mucho aire. */

:root {
  --azul: #1F5C8B;
  --azul-claro: #E8F0F6;
  --gris: #4A4A4A;
  --gris-suave: #767676;
  --linea: #D9E2EA;
  --ambar: #C77A0A;
  --rojo: #C0392B;
  --verde: #2E7D5B;
}

.reveal {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--gris);
  font-size: 34px;
}
.reveal .slides section {
  text-align: left;
  padding: 0 2.5rem;
}

.reveal h1 { font-size: 1.9em; color: var(--azul); font-weight: bold; letter-spacing: -0.5px; }
.reveal h2 { font-size: 1.25em; color: var(--azul); font-weight: bold; margin-bottom: 1.4rem; }
.reveal h3 { font-size: 0.95em; color: var(--azul); font-weight: bold; margin-bottom: 0.8rem; }
.reveal h1, .reveal h2, .reveal h3 { text-transform: none; text-shadow: none; }

.reveal p { line-height: 1.5; }
.reveal ul { list-style: none; margin-left: 0; }
.reveal ul li {
  margin: 0.75em 0;
  padding-left: 1.5em;
  position: relative;
  line-height: 1.35;
}
.reveal ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.52em;
  width: 0.42em; height: 0.42em;
  border-radius: 50%;
  background: var(--azul);
}

.reveal strong { color: var(--azul); }
.reveal em { font-style: normal; color: var(--ambar); font-weight: bold; }

/* --- Portada --- */
.portada { display: flex; flex-direction: column; justify-content: center; height: 100%; }
.portada .franja { width: 120px; height: 8px; background: var(--azul); margin-bottom: 2rem; }
.portada .bajada { color: var(--gris-suave); font-size: 0.8em; margin-top: 1.2rem; }

/* --- Rótulos y notas --- */
.rotulo {
  display: inline-block;
  font-size: 0.55em;
  letter-spacing: 1.5px;
  color: var(--gris-suave);
  border-bottom: 3px solid var(--linea);
  padding-bottom: 0.35rem;
  margin-bottom: 1.6rem;
}
.nota { font-size: 0.62em; color: var(--gris-suave); margin-top: 1.4rem; }
.destacado {
  background: var(--azul-claro);
  border-left: 6px solid var(--azul);
  padding: 1.1rem 1.5rem;
  font-size: 0.85em;
}

/* --- Grillas --- */
.grilla { display: grid; gap: 2rem; align-items: center; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); gap: 1.2rem; }

.tarjeta {
  border: 2px solid var(--linea);
  border-radius: 10px;
  padding: 1.3rem;
  text-align: center;
  font-size: 0.66em;
  line-height: 1.3;
}
.tarjeta .titulo { color: var(--azul); font-weight: bold; display: block; margin-bottom: 0.4rem; }
.tarjeta svg.icono { width: 74px; height: 74px; display: block; margin: 0 auto 0.7rem; }

/* --- Moléculas --- */
.ecuacion {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin: 1.6rem 0;
}
.mol { width: 130px; height: 130px; }
.mol.chica { width: 96px; height: 96px; }
.mol svg { width: 100%; height: 100%; }
.mol svg text { font-family: Arial, Helvetica, sans-serif; font-weight: bold; }

.op { font-size: 1.5em; color: var(--gris-suave); }
.op.flecha { color: var(--azul); }
.coef { font-size: 1.1em; color: var(--ambar); font-weight: bold; }

.pie-mol { text-align: center; font-size: 0.55em; color: var(--gris-suave); margin-top: -0.6rem; }

/* --- Fórmulas escritas --- */
.formula {
  font-size: 1.15em;
  letter-spacing: 1px;
  text-align: center;
  margin: 1.5rem 0;
}
.formula .c { color: var(--ambar); font-weight: bold; }
.formula .s { color: var(--rojo); font-weight: bold; }
.formula .fl { color: var(--azul); padding: 0 0.5rem; }

/* --- Tabla de conteo --- */
table.conteo {
  margin: 1.2rem auto;
  border-collapse: collapse;
  font-size: 0.68em;
}
table.conteo th, table.conteo td {
  border: 1px solid var(--linea);
  padding: 0.55rem 1.5rem;
  text-align: center;
}
table.conteo th { background: var(--azul-claro); color: var(--azul); }
table.conteo td.ok { color: var(--verde); font-weight: bold; }
table.conteo td.mal { color: var(--rojo); font-weight: bold; }

/* --- Detectá el error --- */
.error-caja {
  border: 2px dashed var(--rojo);
  border-radius: 10px;
  padding: 1.2rem 1.6rem;
  margin: 1.2rem 0;
  font-size: 0.85em;
}
.respuesta {
  border-left: 6px solid var(--verde);
  background: #F1F8F4;
  padding: 1.1rem 1.5rem;
  font-size: 0.75em;
  line-height: 1.4;
}
.respuesta .etiqueta { color: var(--verde); font-weight: bold; display: block; margin-bottom: 0.3rem; }

/* --- Tres niveles (Johnstone) --- */
.nivel { border-top: 5px solid var(--azul); padding-top: 1rem; font-size: 0.62em; line-height: 1.35; }
.nivel .titulo { color: var(--azul); font-weight: bold; display: block; margin-bottom: 0.5rem; font-size: 1.15em; }

/* --- Balanceador interactivo --- */
.balanceador { display: flex; align-items: center; justify-content: center; gap: 0.9rem; margin: 1.4rem 0; }
.balanceador .sustancia { display: flex; align-items: center; gap: 0.5rem; font-size: 1.15em; }

.paso {
  display: flex; flex-direction: column; align-items: center;
  border: 2px solid var(--linea); border-radius: 9px; overflow: hidden;
}
.paso button {
  font-family: Arial, sans-serif; font-size: 0.5em; font-weight: bold; line-height: 1;
  color: #fff; background: var(--azul); border: 0; width: 100%;
  padding: 0.28rem 0.7rem; cursor: pointer;
}
.paso button:hover { background: #17456a; }
.paso .n {
  font-size: 0.85em; font-weight: bold; color: var(--ambar);
  padding: 0.2rem 0.9rem; min-width: 2.2rem; text-align: center;
}

.veredicto {
  margin-top: 1.2rem; padding: 0.9rem 1.4rem; border-radius: 9px;
  font-size: 0.75em; font-weight: bold; text-align: center;
}
.veredicto.mal { background: #FBEFEE; color: var(--rojo); }
.veredicto.bien { background: #F1F8F4; color: var(--verde); }

/* --- Clasificador interactivo --- */
.opciones { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.7rem; margin: 1.5rem 0; }
.opciones button {
  font-family: Arial, sans-serif; font-size: 0.52em; font-weight: bold; line-height: 1.25;
  color: var(--azul); background: #fff; border: 2px solid var(--linea);
  border-radius: 9px; padding: 0.9rem 0.4rem; cursor: pointer;
}
.opciones button:hover:not(:disabled) { border-color: var(--azul); background: var(--azul-claro); }
.opciones button:disabled { cursor: default; }
.opciones button.acierto { border-color: var(--verde); background: #F1F8F4; color: var(--verde); }
.opciones button.fallo { border-color: var(--rojo); background: #FBEFEE; color: var(--rojo); }

.progreso { font-size: 0.55em; color: var(--gris-suave); letter-spacing: 1px; }
.siguiente {
  font-family: Arial, sans-serif; font-size: 0.6em; font-weight: bold;
  color: #fff; background: var(--azul); border: 0; border-radius: 8px;
  padding: 0.7rem 1.6rem; cursor: pointer; margin-top: 0.4rem;
}

/* ================= Framework de actividades ================= */

.consigna { font-size: 0.68em; color: var(--azul); font-weight: bold; margin-bottom: 0.9rem; }

.devolucion {
  font-size: 0.6em; line-height: 1.4; margin-top: 1rem;
  padding: 0.8rem 1.2rem; border-radius: 8px; display: none;
}
.devolucion.visible { display: block; }
.devolucion.bien { background: #F1F8F4; border-left: 5px solid var(--verde); }
.devolucion.mal  { background: #FBEFEE; border-left: 5px solid var(--rojo); }
.devolucion .etiqueta { font-weight: bold; display: block; margin-bottom: 0.2rem; }
.devolucion.bien .etiqueta { color: var(--verde); }
.devolucion.mal  .etiqueta { color: var(--rojo); }

/* --- Botonera de opciones (2 a 5 opciones) --- */
.actividad .opciones { display: grid; gap: 0.7rem; }
.actividad .opciones.dos    { grid-template-columns: 1fr 1fr; }
.actividad .opciones.tres   { grid-template-columns: repeat(3, 1fr); }
.actividad .opciones.cuatro { grid-template-columns: repeat(4, 1fr); }
.actividad .opciones.cinco  { grid-template-columns: repeat(5, 1fr); }

.actividad .opciones button {
  font-family: Arial, sans-serif; font-size: 0.55em; font-weight: bold; line-height: 1.3;
  color: var(--azul); background: #fff; border: 2px solid var(--linea);
  border-radius: 9px; padding: 1rem 0.8rem; cursor: pointer; text-align: center;
}
.actividad .opciones button:hover:not(:disabled) { border-color: var(--azul); background: var(--azul-claro); }
.actividad .opciones button:disabled { cursor: default; }
.actividad .opciones button.acierto { border-color: var(--verde); background: #F1F8F4; color: var(--verde); }
.actividad .opciones button.fallo   { border-color: var(--rojo);  background: #FBEFEE; color: var(--rojo); }

/* --- Clic para revelar --- */
.revelable {
  font-family: Arial, sans-serif; font-size: 1em; text-align: left;
  background: #fff; border: 2px dashed var(--linea); border-radius: 9px;
  padding: 0.9rem 1.2rem; cursor: pointer; width: 100%;
  color: var(--gris); line-height: 1.35;
}
.revelable:hover { border-color: var(--azul); }
.revelable.abierta { border-style: solid; border-color: var(--azul); background: var(--azul-claro); cursor: default; }
.revelable .rotulo-r { color: var(--azul); font-weight: bold; display: block; font-size: 0.62em; }
.revelable .contenido { display: none; font-size: 0.56em; margin-top: 0.5rem; }
.revelable.abierta .contenido { display: block; }
.revelable .pista-clic { font-size: 0.5em; color: var(--gris-suave); }
.revelable.abierta .pista-clic { display: none; }

.pila { display: grid; gap: 0.7rem; }
.pila.dos { grid-template-columns: 1fr 1fr; }
.pila.tres { grid-template-columns: repeat(3, 1fr); }
.pila.cinco { grid-template-columns: repeat(5, 1fr); }
.pila .revelable { text-align: center; }

/* Escenas de dos estados, para los interruptores */
.escena > .cuadro { display: none; }
.escena.uno > .cuadro.uno,
.escena.dos > .cuadro.dos { display: flex; }
.eco { font-size: 0.6em; color: var(--gris); margin-top: 0.9rem; line-height: 1.4; }
.eco b { color: var(--azul); }

/* --- Clasificar en dos grupos --- */
.fichas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-bottom: 1rem; }
.ficha {
  font-family: Arial, sans-serif; font-size: 0.55em; line-height: 1.3;
  border: 2px solid var(--linea); border-radius: 9px; background: #fff;
  padding: 0.8rem 0.6rem; cursor: pointer; color: var(--gris); text-align: center;
}
.ficha .grupo { display: block; font-weight: bold; color: var(--gris-suave); margin-top: 0.35rem; }
.ficha[data-estado="0"] .grupo { color: var(--azul); }
.ficha[data-estado="1"] .grupo { color: var(--ambar); }
.ficha.acierto { border-color: var(--verde); background: #F1F8F4; }
.ficha.fallo   { border-color: var(--rojo);  background: #FBEFEE; }

.comprobar {
  font-family: Arial, sans-serif; font-size: 0.6em; font-weight: bold;
  color: #fff; background: var(--azul); border: 0; border-radius: 8px;
  padding: 0.65rem 1.5rem; cursor: pointer;
}
.comprobar:disabled { background: #A9B7C2; cursor: default; }

/* --- Interruptor de dos estados --- */
.interruptor { display: inline-flex; border: 2px solid var(--azul); border-radius: 9px; overflow: hidden; }
.interruptor button {
  font-family: Arial, sans-serif; font-size: 0.55em; font-weight: bold;
  background: #fff; color: var(--azul); border: 0; padding: 0.6rem 1.4rem; cursor: pointer;
}
.interruptor button.activo { background: var(--azul); color: #fff; }

/* --- Panel de modo y marcador --- */
#barra-modo {
  position: fixed; top: 14px; right: 18px; z-index: 60;
  display: flex; align-items: center; gap: 0.8rem;
  font-family: Arial, sans-serif; font-size: 14px;
}
#barra-modo button {
  font-family: Arial, sans-serif; font-size: 13px; font-weight: bold;
  border: 2px solid var(--linea); background: #fff; color: var(--azul);
  border-radius: 20px; padding: 0.35rem 1rem; cursor: pointer;
}
#barra-modo button:hover { border-color: var(--azul); }
#marcador { color: var(--gris-suave); }
#marcador b { color: var(--verde); }
body.modo-clase #marcador { display: none; }

/* --- Resumen final --- */
.resumen-nota { font-size: 3.2em; font-weight: bold; color: var(--azul); }
.barra-progreso { height: 14px; background: var(--linea); border-radius: 7px; overflow: hidden; margin: 1.2rem 0; }
.barra-progreso div { height: 100%; background: var(--verde); width: 0; transition: width 0.4s; }

/* --- Numeración --- */
.reveal .slide-number { font-size: 15px; color: var(--gris-suave); background: none; }
