/* ======================================================
   Fuente global => Arial
   ====================================================== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* ======================================================
   MODO CLARO
   ====================================================== */
.docs-light-mode {
  background-color: #FFFFFF;
  color: #000000; 
}

.docs-light-mode .docs-title {
  color: #000000; /* Título principal en modo claro */
}

/* Título principal del índice => negro en modo claro */
.docs-light-mode .section-title-link {
  color: #000000;
}

/* Subtítulos del índice en modo claro => negro */
.docs-light-mode .subsection-item a {
  color: #000000;
}

/* Texto y títulos en modo claro => negro */
.docs-light-mode .content-text,
.docs-light-mode .content-title,
.docs-light-mode .content-subtitle {
  color: #000000;
}

/* Footer en modo claro => #fff + #000 */
.docs-light-mode #footer {
  background-color: #FFFFFF;
  color: #000000;
}

/* ======================================================
   MODO OSCURO
   ====================================================== */
.docs-dark-mode {
  background-color: #000000; /* fondo */
  color: #FEFF78;           /* texto base */
}

.docs-dark-mode .docs-title {
  color: #74FDFF; /* Título H1 en modo oscuro */
}

/* Título principal del índice => #74FDFF */
.docs-dark-mode .section-title-link {
  color: #74FDFF;
}

/* Subtítulos del índice => #FF6F61 */
.docs-dark-mode .subsection-item a {
  color: #FF6F61;
}

/* Flechas (►/▼) => magenta (#D92FE8) */
.docs-dark-mode .arrow-collapsed,
.docs-dark-mode .arrow-expanded {
  color: #D92FE8;
}

/* TÍTULO PRINCIPAL EN PÁGINA => .content-title => #74FDFF */
.docs-dark-mode .content-title {
  color: #74FDFF;
}

/* SUBTÍTULO EN PÁGINA => .content-subtitle => #FF6F61 */
.docs-dark-mode .content-subtitle {
  color: #FF6F61;
}

/* Texto del contenido => #FEFF78 */
.docs-dark-mode .content-text {
  color: #FEFF78;
}

/* Footer modo oscuro */
.docs-dark-mode #footer {
  background-color: #000000;
  color: #D92FE8;
}

/* ======================================================
   ESTRUCTURA GENERAL (común a ambos modos)
   ====================================================== */
.docs-title {
  text-align: center;
  margin: 10px 0;
}

#header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.toggle-container {
  margin-right: 10px;
}

/* Contenedor principal => índice + contenido */
#docs-container {
  display: flex;
  min-height: 80vh;
}

/* ÍNDICE => nuevo 10% extra => pasa de 418px a ~460px */
#docs-index {
  width: 460px; 
  padding: 20px;
  box-sizing: border-box; /* para que el padding se incluya en el ancho total */
  overflow-y: auto;
  border-right: 1px solid #ccc;
}

.index-list {
  list-style-type: none;
  margin: 0;
  padding-left: 0;
}

.section-item {
  margin-bottom: 1rem;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.3rem;
  cursor: pointer;
}

/* Flechas (►/▼) => definimos color en modo claro/oscuro */
.arrow-collapsed,
.arrow-expanded {
  display: none;
  width: 1rem;
  margin-right: 0.5rem;
  font-weight: bold;
  color: inherit; 
}

/* Título principal del índice => .section-title-link => en negrita */
.section-title-link {
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  font-weight: bold; /* negrita para secciones principales */
}

/* SubSección => ul */
.subsection-list {
  list-style-type: none;
  margin: 0.3rem 0 0 1rem;
  padding-left: 0;
}

.subsection-list.hidden {
  display: none;
}

/* SubSección => a */
.subsection-item a {
  text-decoration: none;
  color: #000000; /* modo claro por defecto */
  white-space: nowrap;
  display: inline-block;
}

.subsection-item a:hover {
  text-decoration: underline;
}

/* CONTENIDO PRINCIPAL */
#docs-content {
  flex: 1;
  padding: 20px;
  border-left: 2px solid rgba(0,0,0,0.2);
  overflow-y: auto;
}

/* Simular "página" estilo PDF => .page-like */
.page-like {
  width: 800px; 
  min-height: 100%;
  margin: 0 auto; 
  background-color: inherit; 
  color: inherit;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  padding: 40px; 
  box-sizing: border-box;
}

.content-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.content-subtitle {
  font-size: 1.2rem;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.content-text {
  line-height: 1.4;
}

/* FOOTER */
#footer {
  text-align: center;
  padding: 10px 0;
  margin-top: auto;
}

/* ======================================================
   PIXEL SWITCH (Dark/Light)
   ====================================================== */
.pixel-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  border: 2px solid #000;
  background: #222;
}

.pixel-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #999;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #ccc;
  transition: .3s;
  border: 2px solid #000;
}

.pixel-switch input:checked + .slider {
  background-color: #666;
}

.pixel-switch input:checked + .slider:before {
  transform: translateX(24px);
}

/* ======================================================
   RESPONSIVO
   ====================================================== */
@media (max-width: 768px) {
  #docs-container {
    flex-direction: column;
  }
  #docs-index {
    width: 100%;
    border-bottom: 2px solid rgba(0,0,0,0.2);
    border-right: none;
  }
  #docs-content {
    border-left: none;
    border-top: none;
  }
  .page-like {
    width: 100%;
    padding: 20px;
    box-shadow: none;
  }
}
