/* ==== RESET GENERAL ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==== FUENTE Y BODY ==== */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #052e55;
  color: #bfd3d3;
  line-height: 1.6;
}

/* ==== HEADER PRINCIPAL ==== */
header {
  background-color: #04152c;
  color: #7cd3f9;
  padding: 1rem 2rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(39, 38, 38, 0.1);
  position:  relative;
  top: 0;
  z-index: 10;
}

header input#busqueda {
  margin-top: 0.5rem;
  padding: 0.5rem;
  width: 50%;
  max-width: 300px;
  border: none;
  border-radius: 5px;
  background-color: #a4e1f0;
}

/* ==== CONTENEDOR PRINCIPAL ==== */
.container {
  display: flex;
  min-height: 100vh;
}

/* ==== SIDEBAR LATERAL ==== */
.sidebar {
  width: 350px;
  background-color: #052e55;
  color: #6cb1c3;
  padding: 1rem;
  position: sticky;
  top: 80px;
  height: calc(100vh - 80px);
  overflow-y: auto;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar a {
  display: block;
  padding: 0.5rem;
  color: #8ab8d6;
  text-decoration: none;
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
}

.sidebar a:hover,
.sidebar a.active {
  background-color: #34495e;
  color: #fff;
  border-left: 4px solid #1abc9c;
}

/* ==== SUBMENÚS ==== */
.has-submenu > .submenu {
  display: none;
  padding-left: 0.2rem;
}

.has-submenu.open > .submenu {
  display: block;
}

/* ==== CONTENIDO PRINCIPAL ==== */
.content {
  flex: 1;
  padding: 2rem;
  background-color: #19253d;
}

.content section {
  margin-bottom: 2rem;
}

.content h2 {
  color: #40b6e8;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid #241f1f;
  padding-bottom: 0.25rem;
}

.content h3 {
  color: #40b6e8;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  margin-left: 2rem;
}

p {
  text-align: justify;     /* Justifica el texto */
  line-height: 1.8;        /* Espaciado entre líneas */
  margin-bottom: 20px;     /* Espacio debajo de cada párrafo */
}

.espacio {
  margin-top: 3rem;
  margin-bottom: 0.5rem;
}

table {
  width: 90%;
  border-collapse: collapse;
  margin-top: 10px;
  margin-bottom: 10px;
}
th, td {
  text-align: left;
  padding: 12px 10px;
}
th {
  font-weight: bold;
}
tr {
  border-bottom: 1px solid #444;
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
}

/* Submenús cerrados por defecto */
.sidebar .submenu {
  display: none;
  margin-left: 1rem;
}

/* Submenú abierto */
.sidebar .has-submenu.open > .submenu {
  display: block;
}

/* Icono visual (no funcional, decorativo) */
.has-submenu > a::after {
  content: " ▼";
  font-size: 0.7em;
  float: right;
}

/* Estilo de imágenes */
.content img {
  max-width: 70%;
  margin: 2rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ✅ Botones flotantes estilo moderno (solo flechas) */
#botonesCapitulo {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  z-index: 1000;
}

#botonesCapitulo button {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 20px;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#botonesCapitulo button:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* separadores tipo linea para el texto */

hr {
  border: none;
  border-top: 1px solid #444;
  margin: 20px 0;
  padding: 10px 10px 10px 10px;
}

/* lista ordenada */
ol {
  list-style: decimal;
  margin-left: 20px;
}
li {
  margin-bottom: 15px;
}
ul {
  list-style: disc;
  margin-left: 25px;
  margin-top: 8px;
}