/* panel-toc.css: Estilo unificado para barra, botones TOC y navegación */

:root {
  --tceleste: #00112b;
  --fondo: #363636;
  --fondocaja: #ffffff;
  --borde: lightgray;
  --hover: #4fb4e8;
  --trceleste: #00112b;
  --tramarillo: #faee0e;
}



/* -------------------------- Barra superior (navbar) -------------------------- */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  color: black;
  padding: 10px 20px;
}

.logo-title {
  display: flex;
  align-items: center;
}

.logo {
  height: 68px;
  margin-right: 10px;
}

.navbar h1 {
  margin: 0;
  font-size: 1.5em;
  color: black;
}

.authors {
  margin: 0;
  color: black;
}


.pdf-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  color: #00112b;
  text-decoration: none;
  font-size: 0.9em;
}

.pdf-link a:hover {
  text-decoration: underline;
}


/* -------------------------- Barra de navegación/Botones -------------------------- */

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #414141;
  border-bottom: 1px solid #414141;
  background: #00112b;
  padding: 5px 20px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}

.menu {
  background: none;
  border: none;
  font-size: 1em;
  text-decoration: none;
  color: white;
  padding: 0.3em 0.5em;
  border: 1px solid transparent;
  border-radius: 4px;
}

.menu:hover {
  background-color: #ddd;
}

.nav-bar .toggle-container {
  display: flex;
  gap: 0.4rem;
  margin-left: auto;
}

.toc-btn {
  background: var(--fondo);
  border: 1px solid var(--fondo);
  padding: 6px 12px;
  font-size: 0.9em;
  border-radius: 4px;
  cursor: pointer;
  color: #f9f9f9;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
  position: relative;
}

.toc-btn:hover {
  background: var(--hover);
  border-color: #00112b;
}

.toc-btn::after {
  content: "";
  margin-left: 10px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--trceleste); /* ← color predeterminado: celeste */
  transition: transform 0.3s ease, border-top-color 0.3s ease;
  pointer-events: none;
}
.toc-btn:not(.collapsed)::after {
  border-top-color: var(--tramarillo); /* amarillo cuando está activo */
}

.toc-btn.collapsed::after {
  border-top-color: var(--trceleste);   /* inactivo = celeste */
  transform: rotate(180deg);            /* giro de 180 grados */
}
/* -------------------------- Contenedores TOC -------------------------- */

.toc-container {
  display: none;
  background: var(--fondocaja);
  padding: 1.2em;
  margin: 0.5em 0 1.5em;
  border: 1px solid var(--borde);
  border-radius: 4px;
}

.toc-container.visible {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.toc-container ul {
  list-style: none;
  padding-left: 0.8em;
  margin: 0;
}

.toc-container li {
  padding: 5px 0;
  position: relative;
}

.toc-container li::before {
  content: "•";
  color: #CCC;
  position: absolute;
  left: -0.8em;
  font-size: 0.9em;
}

.toc-container a {
  text-decoration: none;
  color: dda117f;
  font-size: 0.88em;
  transition: color 0.3s ease;
}

.toc-container a:hover {
  color: dda117f;
}

/* —— Tabla de contenidos —— */
.IndiceGeneraltoc{
  max-width:720px;
  margin:2rem auto;
}
.IndiceGeneraltoc h2{
  font-size:1.4rem;
  margin-bottom:1rem;
  color:#176B3B;
}

.IndiceGeneraltoc ol{
  list-style:decimal inside;
  margin-left:.5rem;
}
.IndiceGeneraltoc ul{
  list-style:disc inside;
  margin-left:1.5rem;
}
.IndiceGeneraltoc li{
  margin:.4rem 0;
}
/* Iframe para índice general */
.iframe-indice {
  width: 100%;
  min-height: 500px;   /* altura mínima razonable */
  border: none;
  display: block;
  overflow: visible;
}


