/* Estilos generales del navbar */
.navbar {
  position: fixed; /* Fija el navbar en la parte superior */
  top: 0; /* Alinea el navbar con la parte superior */
  left: 0; /* Alinea el navbar con el lado izquierdo */
  width: 100%; /* Asegura que ocupe todo el ancho de la pantalla */
  z-index: 1000; /* Asegura que esté encima de otros elementos */
  background: linear-gradient(
    90deg,
    rgba(53, 67, 147, 0.92) 26%,
    rgba(74, 172, 196, 0.92) 69%
  );
  padding: 0;
  height: 70px;
  display: flex;
  align-items: center;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3); /* Añade una sombra para separarlo visualmente del contenido */
}

/* Contenedor del navbar */
.navbar-container {
  width: 90%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar-container a {
  display: flex;
  align-items: center;
  height: 100%;
  flex: 0 0;
}

/* Estilo del logo */
.navbar-logo {
  max-height: 50px;
  display: block;
  width: auto;
}

/* Estilo de los enlaces del navbar */
.navbar-links {
  list-style: none;
  margin: 0;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex: 1;
  gap: 0px;
  padding: 0;
}

.navbar-links li {
  position: relative;
}

/* Estilo base del enlace */
.navbar-links a {
  color: #fff;
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Efecto de transición */
.navbar-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: #fff;
  transition: width 0.3s ease-in-out;
}

/* Efecto hover */
.navbar-links a:hover::after {
  width: 100%;
}

/* Main dropdown menu */
.dropdown-menu {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  top: 90%;
  left: 0;
  background-color: #333;
  padding: 15px 20px;
  border-radius: 5px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  min-width: 800px;
  z-index: 10;
  gap: 30px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  pointer-events: none; /* Prevent interaction when hidden */
}

/* Style each category section */
.dropdown-category {
  flex: 1;
  min-width: 200px;
  padding: 0 10px;
  position: relative;
}

/* Adjust submenu to push down content */
.dropdown-category .submenu {
  display: none;
  position: absolute;
  left: 0;
  width: 100%;
  padding: 12px;
  background-color: #444;
  border-radius: 5px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
  border-left: 3px solid rgba(74, 172, 196, 1);
  margin-top: 8px;
  z-index: 11;
}

/* Show submenu when hovering */
.dropdown-category:hover > .submenu {
  display: block;
}

/* Add padding to create a hover area */
.dropdown-category > a {
  padding: 5px 0;
  display: block;
}

/* Make sure the submenu stays visible when hovering over it */
.submenu {
  padding-top: 8px;
}

/* Add a transparent area to make it easier to move mouse to submenu */
.submenu::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  width: 100%;
  height: 8px;
  background: transparent;
}

/* Keep submenu visible when hovering over it */
.submenu:hover {
  display: block;
}

/* Change the hover state */
.navbar-links li.dropdown:hover .dropdown-menu {
  opacity: 1;
  max-height: 2000px;
  overflow: visible;
  display: flex;
  justify-content: space-around;
  padding: 15px;
  max-height: 70vh;
  pointer-events: auto; /* Enable interaction when visible */
}

/* Make sure the dropdown stays open when hovering */
.dropdown-menu:hover {
  opacity: 1;
  max-height: 2000px;
  overflow: visible;
  display: flex;
  padding: 15px;
  pointer-events: auto;
}

/* Add this to ensure the dropdown link has a proper hover area */
.navbar-links li.dropdown > a {
  padding: 0 10px;
  position: relative;
  z-index: 12;
}

/* Add a transparent area to prevent accidental hover */
.navbar-links li.dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 10px;
  background: transparent;
  z-index: 9;
}

.column-menu {
  display: flex;
  top: 95%;
  flex-direction: column;
  min-width: 200px;
}

.column-menu a {
  font-size: 16px;
}

.column-menu a:hover {
  color: #00bcd4;
}

@media (min-width: 966px) {
  .dropdown-category {
    padding-right: 7px;
    padding-left: 7px;
    position: relative;
    width: 100%;
    padding: 5px 0;
  }

  .dropdown-category::after {
    content: "";
    position: absolute;
    right: 0;
    top: 10%;
    width: 1px;
    height: 90%;
    background-color: gray;
    display: none;
  }
}
.dropdown-category h4 {
  margin: 0 0 15px 0;
  text-align: center;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(74, 172, 196, 1);
  width: 100%;
  margin-left: 0;
}

.dropdown-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ul-none::after {
  background-color: transparent;
}

.dropdown-category li a {
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  padding: 5px 0;
  display: block;
  transition: color 0.3s ease;
}

.dropdown-category li a:hover {
  color: #00bcd4;
}

/* Mobile styles */
@media (max-width: 965px) {
  .dropdown-category .submenu {
    position: static;
    left: auto;
    padding-left: 20px;
    box-shadow: none;
    min-width: auto;
  }
}

/* Estilos para el botón del menú hamburguesa */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  height: 25px;
  width: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 20;
}

.menu-toggle .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #fff;
  transition: all 0.3s ease-in-out;
}

/* Media queries para dispositivos móviles */
@media (max-width: 965px) {
  .menu-toggle {
    display: flex;
  }

  .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #333;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    min-width: 220%;
    max-width: 100%;
    z-index: 10;
    gap: 20px;
    overflow-y: auto;
  }

  .dropdown:hover .dropdown-menu {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .dropdown-category h4 {
    margin: 0 0 10px 0;
    text-align: center;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(74, 172, 196, 1);
    width: 100%;
  }

  .dropdown-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .dropdown-category li a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    padding: 5px 0;
    display: block;
    transition: color 0.3s ease;
  }

  .dropdown-category li a:hover {
    color: #00bcd4;
  }

  .dropdown-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    min-width: 0 !important;
    width: 100% !important;
    border-radius: 0 0 10px 10px !important;
    margin: 0 !important;
    box-shadow: 0px 4px 15px rgba(255, 255, 255, 0.15) !important;
    z-index: auto !important;
    border: 2px solid #008ea7;
    border-top: none !important;
  }

  .navbar-links li.dropdown:hover .dropdown-menu {
    overflow: scroll;
    pointer-events: auto; /* Enable interaction when visible */
  }

  .navbar-links {
    display: none;
    flex-direction: column;
    background-color: #333;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 10px 0;
    z-index: 10;
  }

  .navbar-links.active {
    display: flex;
  }

  .navbar-links li {
    margin: 10px 0;
    text-align: center;
  }
}
/* Estilo para cambiar el botón al estado activo */
.menu-toggle.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-40deg);
}

/* Add a subtle hover effect to submenu items */
.dropdown-category .submenu li a:hover {
  background-color: #555;
  padding-left: 5px;
  transition: all 0.2s ease;
}
