/* Compatibilidad y visibilidad universal para todas las secciones */
main > section .section-head,
main > section[data-source-section-code] .section-head {
  display: block;
  align-items: initial;
  max-width: 720px;
}

main > section .section-head > *,
main > section .grid-2 > *,
main > section .grid-3 > *,
main > section .grid-4 > *,
main > section .two-col > *,
main > section .hero-grid > * {
  min-width: 0;
}

main > section .diagram-figure {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Garantiza que ningún elemento .reveal permanezca invisible o en blanco */
.reveal,
main > section .reveal,
main > section[data-source-section-code] .reveal {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.reveal [data-draw],
main > section .reveal [data-draw],
main > section[data-source-section-code] .reveal [data-draw] {
  stroke-dashoffset: 0 !important;
}

.reveal [data-pop],
main > section .reveal [data-pop],
main > section[data-source-section-code] .reveal [data-pop] {
  opacity: 1 !important;
  transform: none !important;
}

.reveal .bar-fill,
main > section .reveal .bar-fill,
main > section[data-source-section-code] .reveal .bar-fill {
  width: var(--w) !important;
}

/* Colores y estilos de botones para todo el sitio */
.btn.btn-primary,
main > section .btn.btn-primary {
  background: var(--zi-red);
  border-color: var(--zi-red);
  color: #fff;
}

.btn.btn-primary .arrow,
main > section .btn.btn-primary .arrow {
  color: #fff;
}

.btn.btn-primary:hover,
main > section .btn.btn-primary:hover {
  background: var(--zi-red-dark);
  border-color: var(--zi-red-dark);
  color: #fff;
}

.btn.btn-ghost,
main > section .btn.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn.btn-ghost:hover,
main > section .btn.btn-ghost:hover {
  border-color: var(--zi-red);
  color: var(--zi-red);
}

@media (max-width: 520px) {
  main > section h1,
  main > section h2,
  main > section h3,
  main > section h4,
  main > section p {
    overflow-wrap: anywhere;
  }
}

