/**
 * solin.css - Estilos modernos y elegantes para Revista Red Descartes
 * Autora: Consolación Ruiz (Matsolin)
 * Colección de cajas, tarjetas destacadas y elementos visuales
 */

/* ==========================================================================
   1. REDISEÑO MODERNO DE .caja3 (Drop-in replacement)
   Sustituye el estilo tosco antiguo por una tarjeta limpia y contemporánea
   ========================================================================== */
.caja3 {
  background: #ffffff;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  overflow: hidden;
  margin: 14px auto 12px auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.caja3 h5 {
  margin: 0;
  padding: 8px 16px;
  background: linear-gradient(135deg, #185a9d 0%, #2980b9 100%);
  color: #ffffff !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  text-align: left !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.caja3 h5.alt {
  background: linear-gradient(135deg, #16a085 0%, #1abc9c 100%);
}

.caja3 h5.oro {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.caja3 h5.morado {
  background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
}

.caja3 .content {
  padding: 12px 18px;
  color: #334155;
  font-size: 15px;
  line-height: 1.45;
}

.caja3 .content p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   CAJAS DE FÓRMULAS DESTACADAS (.caja-formula y .caja-ford)
   Separación generosa con los párrafos y margen holgado entre texto y borde
   ========================================================================== */
.caja-formula,
.caja-ford {
  background: #f4f8fc;
  border: 1px solid #dbeafe;
  border-left: 4px solid #0089cd;
  border-radius: 6px;
  padding: 10px 18px !important;
  margin: 14px 0 12px 0 !important;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.caja-ford {
  background: #f0f7fd;
  border-color: #dbeafe;
  border-left-color: #2363ad;
}

.caja-formula .simbolo,
.caja-ford .formula-destacada {
  font-size: 16.5px;
  color: #0b457b;
  margin-bottom: 4px;
  line-height: 1.25;
}

.caja-formula .katex-display,
.caja-ford .katex-display {
  margin: 4px 0 !important;
}

.caja-formula .glosa,
.caja-ford .glosa {
  font-size: 12.5px;
  color: #334e68;
  font-style: italic;
  margin-top: 3px;
  line-height: 1.3;
}

/* ==========================================================================
   BLOQUES DE TEOREMA Y PROPIEDADES (.num_block)
   ========================================================================== */
.num_block {
  margin: 14px 0 12px 0 !important;
  padding: 9px 18px !important;
  border-radius: 0 6px 6px 0;
  background: #f8fafc;
  border-left: 4px solid #16a085;
}

/* ==========================================================================
   2. NUEVAS CAJAS DESTACADAS MODERNAS
   ========================================================================== */

/* Caja estilo tarjeta elegante con borde lateral (Azul Descartes) */
.caja-solin,
.caja-solin-azul {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0089cd;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 10px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.caja-solin-azul .titulo,
.caja-solin .titulo {
  font-size: 14.5px;
  font-weight: bold;
  color: #0b457b;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Caja estilo Verde Esmeralda (Para propiedades, lemas o ideas clave) */
.caja-solin-verde {
  background: #f0fdf4;
  border: 1px solid #dcfce7;
  border-left: 4px solid #10b981;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 10px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.caja-solin-verde .titulo {
  font-size: 14.5px;
  font-weight: bold;
  color: #065f46;
  margin-bottom: 4px;
}

/* Caja estilo Ámbar / Dorado (Para teoremas, Fibonacci y proporciones áureas) */
.caja-solin-oro {
  background: #fffdf5;
  border: 1px solid #fef3c7;
  border-left: 4px solid #d97706;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 10px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.caja-solin-oro .titulo {
  font-size: 14.5px;
  font-weight: bold;
  color: #92400e;
  margin-bottom: 4px;
}

/* Caja estilo Morado / Violeta (Para reflexiones pedagógicas y citas) */
.caja-solin-morado {
  background: #faf5ff;
  border: 1px solid #f3e8ff;
  border-left: 4px solid #8b5cf6;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 10px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.caja-solin-morado .titulo {
  font-size: 14.5px;
  font-weight: bold;
  color: #5b21b6;
  margin-bottom: 4px;
}

/* ==========================================================================
   3. CAJA TIPO TARJETA FLOTANTE (Card minimalista)
   ========================================================================== */
.caja-tarjeta {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 10px 0;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.caja-tarjeta .cabecera {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 6px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   4. CAJA DE EJEMPLO MATEMÁTICO (Con badge pill)
   ========================================================================== */
.caja-ejemplo {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 10px 0;
  position: relative;
}

.caja-ejemplo .insignia {
  display: inline-block;
  background: #2563eb;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 12px;
  margin-bottom: 6px;
}

/* ==========================================================================
   5. COMPATIBILIDAD CON MODO OSCURO (Revista Descartes)
   ========================================================================== */
body.dark .caja3 {
  background: #252830;
  border-color: #3b4252;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark .caja3 .content {
  color: #e5e9f0;
}

body.dark .caja-solin,
body.dark .caja-solin-azul {
  background: #1e222b;
  border-color: #2e3440;
  border-left-color: #38bdf8;
  color: #e5e9f0;
}

body.dark .caja-solin-verde {
  background: #1c2724;
  border-color: #234237;
  border-left-color: #34d399;
  color: #e5e9f0;
}

body.dark .caja-solin-oro {
  background: #29241b;
  border-color: #4a3e20;
  border-left-color: #fbbf24;
  color: #e5e9f0;
}

body.dark .caja-solin-morado {
  background: #241e2e;
  border-color: #3f2f54;
  border-left-color: #c084fc;
  color: #e5e9f0;
}

body.dark .caja-tarjeta,
body.dark .caja-ejemplo {
  background: #252830;
  border-color: #3b4252;
  color: #e5e9f0;
}

/* ==========================================================================
   6. REDISEÑO LIMPIO DE LISTAS (.lista1, .lista2, .lista3)
   Elimina los iconos antiguos (libros.png, platano.png, dance.png) y los
   sustituye por viñetas vectoriales modernas, elegantes y proporcionadas.
   ========================================================================== */
ul.lista1,
ul.lista2,
ul.lista3,
ul.lista-solin {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 8px 0 !important;
}

ul.lista1 li,
ul.lista-solin li {
  position: relative !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  padding-left: 22px !important;
  margin-left: 0 !important;
  margin-bottom: 5px !important;
  background-image: none !important;
  line-height: 1.45;
}

/* Viñeta circular azul moderna con halo sutil (Sustituye libros.png) */
ul.lista1 li::before,
ul.lista-solin li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0089cd;
  box-shadow: 0 0 0 2px rgba(0, 137, 205, 0.25);
}

/* Viñeta verde de verificación ✓ (Sustituye platano.png) */
ul.lista2 li {
  position: relative !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  padding-left: 22px !important;
  margin-left: 0 !important;
  margin-bottom: 5px !important;
  background-image: none !important;
  line-height: 1.45;
}

ul.lista2 li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  top: 1px;
  color: #10b981;
  font-weight: bold;
  font-size: 13px;
}

/* Viñeta rombo geométrica azul oscuro (Sustituye dance.png) */
ul.lista3 li {
  position: relative !important;
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  padding-left: 22px !important;
  margin-left: 0 !important;
  margin-bottom: 5px !important;
  background-image: none !important;
  line-height: 1.45;
}

ul.lista3 li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 1.5px;
  background: #185a9d;
  transform: rotate(45deg);
}

body.dark ul.lista1 li::before,
body.dark ul.lista-solin li::before {
  background: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

body.dark ul.lista2 li::before {
  color: #34d399;
}

body.dark ul.lista3 li::before {
  background: #60a5fa;
}

/* ==========================================================================
   7. ESTILOS PROPIOS DEL ARTÍCULO FAREY A FIBONACCI (farey_indentado.html)
   ========================================================================== */

.destacado-autor {
  font-size: 16px;
  color: #2363ad;
  font-weight: bold;
  margin-bottom: 3px;
}

.subtitulo-art {
  font-size: 14px;
  color: #555;
  margin-top: -3px;
  margin-bottom: 12px;
  font-style: italic;
}

.tabla-farey {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border-radius: 5px;
  overflow: hidden;
}

.tabla-farey th,
.tabla-farey td {
  border: 1px solid #d8e2ec;
  padding: 6px 8px;
  text-align: center;
}

.tabla-farey th {
  background-color: #edf4fa;
  color: #174b8b;
  font-weight: bold;
}

.formula {
  background: #f0f5fd;
  padding: 8px 16px;
  border-left: 4px solid #3680d1;
  border-radius: 8px;
  overflow-x: auto;
  margin: 12px 0;
  text-align: center;
  line-height: 1;
}

.formula .katex-display {
  margin: 2px 0 !important;
  padding: 0 !important;
}

.formula .katex {
  line-height: 1.15;
}

.sequence {
  line-height: 2.5;
  overflow-wrap: anywhere;
  text-align: center;
  margin: 8px 0;
}

.sequence span,
.chip-fraccion {
  display: inline-block;
  background: #edf4fe;
  border: 1px solid #c9dbf2;
  border-radius: 6px;
  padding: 2px 7px;
  margin: 2px 3px;
  font-size: 13px;
  font-weight: 600;
  font-family: monospace;
  color: #154c88;
}

.chip {
  display: inline-block;
  background: #eaf2ff;
  border-radius: 20px;
  padding: 4px 12px;
  color: #154c88;
  margin: 3px;
  font-weight: 600;
  font-size: 12.5px;
}

.note {
  font-size: 13px;
  color: #53647b;
  margin-top: 6px;
  line-height: 1.4;
}

.stage {
  border: 1px solid #d4deed;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  margin: 8px 0;
}

.video-container {
  text-align: center;
  margin: 14px auto;
}

.video-container video {
  width: 100%;
  max-width: 530px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  background: #000000;
  display: block;
  margin: 0 auto;
}

figure {
  margin: 14px 0;
  text-align: center;
}

figure img {
  width: 100%;
  max-width: 520px;
  border: 1px solid #d7dfed;
  border-radius: 8px;
}

figcaption {
  font-size: 12.5px;
  color: #5c6a7e;
  margin-top: 6px;
  font-style: italic;
}

body.dark .formula {
  background: #1e2430;
  border-left-color: #38bdf8;
  color: #e5e9f0;
}

body.dark .sequence span,
body.dark .chip-fraccion {
  background: #252c3d;
  border-color: #3b4252;
  color: #93c5fd;
}

body.dark .chip {
  background: #1e293b;
  color: #60a5fa;
}

body.dark .note {
  color: #94a3b8;
}

body.dark .tabla-farey th {
  background-color: #242c3d;
  color: #60a5fa;
  border-color: #3b4252;
}

body.dark .tabla-farey td {
  border-color: #3b4252;
  color: #e5e9f0;
}

/* ==========================================================================
   8. ESTILOS PARA PIES DE LABORATORIOS E INTERACTIVOS (.pie-laboratorio)
   ========================================================================== */
.pie-laboratorio {
  text-align: center;
  font-size: 12.5px;
  color: #53647b;
  margin: 6px auto 8px auto;
  line-height: 1.35;
  font-style: italic;
  max-width: 560px;
}

.pie-laboratorio b,
.pie-laboratorio .lab-num {
  font-weight: bold;
  color: #174b8b;
  font-style: normal;
}

body.dark .pie-laboratorio {
  color: #94a3b8;
}

body.dark .pie-laboratorio b,
body.dark .pie-laboratorio .lab-num {
  color: #60a5fa;
}
