/* ==============================
   Estilo general de las slides
   ============================== */
.remark-slide-content {
  padding: 15px 30px;    /* menos margen exterior */
  font-size: 20px;       /* tamaño base del texto */
  line-height: 1.4;
}

/* ==============================
   Títulos
   ============================== */
.remark-slide-content h1 {
  font-size: 2.2em;
  color: #009900;
  margin-bottom: 20px;
}
.remark-slide-content h2 {
  font-size: 1.8em;
  color: #009900;
  margin-bottom: 15px;
}
.remark-slide-content h3 {
  font-size: 1.4em;
  margin-bottom: 10px;
}

/* ==============================
   Listas
   ============================== */
.remark-slide-content ul {
  font-size: 1em;
  margin-left: 10px;
}
.remark-slide-content li {
  margin-bottom: 6px;
}

/* ==============================
   Imágenes
   ============================== */
.remark-slide-content img {
  max-width: 100%;
  height: auto;
}

/* ==============================
   Numeración de diapositivas
   ============================== */
.remark-slide-number {
  font-size: 14px;
  color: #666;
  bottom: 10px;
  right: 20px;
  position: absolute;
}

/* ==============================
   Ajuste general de diapositivas
   ============================== */
.reveal .slides {
  font-size: 22px;
}
.reveal .slide {
  width: 1100px;
  height: 650px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ==============================
   Gráficos embebidos (iframes)
   ============================== */

/* Base: todos los gráficos */
.plot-iframe {
  border: none;
  display: block;
  margin: 0 auto;
}

/* Variante ancha → barras apiladas, líneas */
.plot-wide {
  width: 870px;
  height: 430px;
}

/* Variante media → treemaps, gráficos con texto denso */
.plot-med {
  width: 800px;
  height: 450px;
}

.plot-tall {
  width: 800px;
  height: 540px;
}

/* Variante alta → treemaps, gráficos con texto denso */
.plot-small {
  width: 700px;
  height: 500px;
}

/* Variante grande → heatmaps, treemaps muy cargados */
.plot-large {
  width: 1000px;
  height: 600px;
}

/* Variante pies en fila → 3 tortas juntas */
.plot-pies {
  width: 840px;
  height: 570px;
}

/* Leyendas debajo de gráficos */
.plot-legend {
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
}

/* Fix para que los textos de Plotly se vean bien */
.plot-iframe text, 
.plot-iframe tspan {
  line-height: normal !important;
  font-size: inherit !important; /* evita que remark achique */
  overflow: visible !important;
}

.plot-iframe svg {
  max-width: none !important;
  height: auto !important;
}

/* Solo aplica a los iframes con gráficos Plotly */
.plot-iframe svg text {
  font-family: "Arial", "Helvetica", sans-serif !important;
  font-size: 12px !important;
  fill: currentColor; /* hereda color correcto de Plotly */
}
/* ===========================
   Textos en gráficos (excepto treemap)
   =========================== */
.plot-iframe svg text {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 12px !important;
  fill: black !important;
  stroke: none !important;
  paint-order: normal !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Refuerzo específico para barras y tortas */
.plot-iframe .bar text,
.plot-iframe .slice text {
  fill: black !important;
  font-weight: 500 !important;
  overflow: visible !important;
}

/* ===========================
   Treemaps y sunbursts
   =========================== */
.plot-iframe .treemap text,
.plot-iframe .sunburst text {
  font-size: 11px !important;   /* un poco más chico */
  font-family: Arial, sans-serif !important;
  fill: black !important;
  shape-rendering: crispEdges !important; /* evita desenfoque */
  text-rendering: optimizeLegibility !important;
}
