#main.hide-links a {
  pointer-events: none !important;
  color: #000 !important; /* color chocolate o naranja */
  font-weight: 700 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 3px !important;
  cursor: default !important;
  user-select: text !important;
}
/* Base Navbar */
.navbar {
  background-color: #0059b3;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem; /* Espacio alrededor del contenido del navbar */
  margin: 20px 2rem; /* Espacio arriba y abajo 20px, y a los lados 3rem */
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* Sombra para darle el efecto de flotante */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
  position: relative; /* necesario para posicionar menú absoluto */
}

.navbar-brand {
  font-size: 1.75rem;
  font-weight: 800;
  text-decoration: none;
  color: white;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.high-contrast .navbar-brand{
    color: #000;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: #ffcc00;
  outline: none;
}

.navbar-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: transparent;
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
  background-color: #003366;
  color: white;
  outline: none;
}

.nav-link:hover::after,
.nav-link:focus::after {
  background-color: #ffcc00;
}

.nav-link.active {
  background-color: #ffcc00;
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 10px #ffcc00aa;
}

.high-contrast .nav-link.active{
  background-color: #ffcc00;
  color: #000 !important;
  font-weight: 700;
  box-shadow: 0 0 10px #ffcc00aa;
}

.dark-mode .nav-link.active{
  background-color: #ffcc00;
  color: #000 !important;
  font-weight: 700;
  box-shadow: 0 0 10px #ffcc00aa;
}
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
  z-index: 1200; /* prioridad visual */
}

.navbar-toggle:hover,
.navbar-toggle:focus {
  color: #ffcc00;
  outline: none;
}

.accessibility-button {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: white;
  cursor: pointer;
  margin-left: 1.25rem;
  user-select: none;
  transition: color 0.3s ease;
}

.accessibility-button:hover,
.accessibility-button:focus {
  color: #ffcc00;
  outline: none;
}

/* Menú accesibilidad */
.accessibility-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #004080;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  min-width: 300px;
  z-index: 1100;
  font-size: 1rem;
  opacity: 1;
  transition: opacity 0.4s ease;
  user-select: none;
}

.accessibility-menu.hidden {
  display: none;
}

.accessibility-control {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.accessibility-control label {
  min-width: 120px;
  font-weight: 600;
  user-select: none;
}

.accessibility-control button,
.accessibility-control select,
.accessibility-control input[type="checkbox"] {
  cursor: pointer;
  user-select: none;
  background-color: #0059b3;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.25s ease;
  box-shadow: inset 0 0 5px #003366aa;
}

.accessibility-control button:hover,
.accessibility-control button:focus,
.accessibility-control select:hover,
.accessibility-control select:focus,
.accessibility-control input[type="checkbox"]:hover,
.accessibility-control input[type="checkbox"]:focus {
  background-color: #004080;
  color: white;
  outline: none;
  box-shadow: 0 0 8px #ffcc00cc;
}

/* Checkbox custom */
.accessibility-control input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #ffcc00;
}

/* Modo oscuro */
.dark-mode {
  background-color: #121212 !important;
  color: #eee !important;
}

/* Navbar en modo oscuro */
.dark-mode .navbar {
  background-color: #121212 !important; /* Fondo oscuro en el navbar */
  color: white !important; /* Letras del navbar en blanco */
}

.dark-mode .navbar a,
.dark-mode .navbar .nav-link {
  color: black; /* Letras de los enlaces en blanco */
}

.dark-mode .navbar .nav-link:hover,
.dark-mode .navbar .nav-link:focus {
  background-color: #003366 !important; /* Fondo azul oscuro para los enlaces al pasar el ratón */
  color: white !important; /* Color de texto blanco al hacer hover */
}

.dark-mode .navbar .navbar-brand {
  color: white !important; /* Texto de la marca en blanco */
}

.high-contrast .navbar .navbar-brand {
  color: yellow !important; /* Texto de la marca en blanco */
}
.dark-mode .navbar .navbar-brand:hover,
.dark-mode .navbar .navbar-brand:focus {
  color: white !important; /* Al pasar el ratón, el texto de la marca también permanece blanco */
}

/* Alto contraste */
.high-contrast {
  background-color: black !important;
  color: yellow !important;
}

/* Quitar imágenes */
.hide-images img,
.hide-images picture {
  display: none !important;
}

#main.hide-links a,
.navbar.hide-links a,
#main.hide-links .navbar-brand,
.navbar.hide-links .navbar-brand {
  background: yellow;
  pointer-events: none !important;
  color: black !important; /* color chocolate o naranja */
  font-weight: 700 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 3px !important;
  cursor: default !important;
  user-select: text !important;
}


/* Filtros de daltonismo aplicados a todo el body */
body.protanopia {
  filter: url('#protanopia');
}
body.deuteranopia {
  filter: url('#deuteranopia');
}
body.tritanopia {
  filter: url('#tritanopia');
}
body.achromatopsia {
  filter: url('#achromatopsia');
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-menu {
    display: none;
    flex-direction: column;
    background-color: #0059b3;
    position: absolute;
    top: 100%;
    right: 0;
    width: 90vw; /* que ocupe el 90% del ancho de pantalla, más flexible */
    max-width: 300px; /* máximo ancho razonable */
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    padding: 0.75rem 0.5rem; /* menos padding para ajustar */
    font-size: 0.9rem; /* tamaño de fuente reducido por defecto */
    z-index: 1100;
    transition: opacity 0.3s ease;
  }

  .navbar-menu.show {
    display: flex;
  }

  .navbar-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
    z-index: 1200;
  }

  .nav-link {
    padding: 0.6rem 1rem; /* un poco menos padding para mejor ajuste */
    font-size: 1rem; /* fuente un poco más pequeña para que quepa */
    
  }
}
.dark-mode #accessibility-menu{
    background: #000;
    border: 5px solid white;
    border-radius: 10px;
}

.high-contrast #accessibility-menu{
    background: #000;
    border: 5px solid yellow;
    border-radius: 10px;
    color: yellow;
}

.dark-mode #font-increase{
    background: #000;
    border: 5px solid white;
    border-radius: 10px;
}

.dark-mode #font-decrease{
    background: #000;
    border: 5px solid white;
    border-radius: 10px;
}
.dark-mode #font-reset{
    background: #000;
    border: 5px solid white;
    border-radius: 10px;
}

.dark-mode #font-change{
    background: #000;
    border: 5px solid white;
    border-radius: 10px;
}

.dark-mode #cursor-select{
    background: #000;
    border: 5px solid white;
    border-radius: 10px;
    color: white !important;
}

.dark-mode #color-blindness-select{
    background: #000;
    border: 5px solid white;
    border-radius: 10px;
    color: white !important;
}

.high-contrast #font-increase{
    background: #000;
    border: 5px solid yellow;
    border-radius: 10px;
    color: yellow !important;
}

.high-contrast #font-decrease{
    background: #000;
    border: 5px solid yellow;
    border-radius: 10px;
    color: yellow !important;
}
.high-contrast #font-reset{
    background: #000;
    border: 5px solid yellow;
    border-radius: 10px;
    color: yellow !important;
}

.high-contrast #font-change{
    background: #000;
    border: 5px solid yellow;
    border-radius: 10px;
    color: yellow !important;
}

.high-contrast #cursor-select{
    background: #000;
    border: 5px solid yellow;
    border-radius: 10px;
    color: yellow !important;
}

.high-contrast #color-blindness-select{
    background: #000;
    border: 5px solid yellow;
    border-radius: 10px;
    color: yellow !important;
}
