.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--azul-oscuro);
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  }

  .navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.4rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  

  .logo-header img {
    height: 60px; /* o el alto que prefieras */
    display: block;
    margin: 0;
    transform: scale(1.1);
    color: var(--celeste);
  }

  .navbar-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    
  }

  .navbar-links a {
    text-decoration: none;
    color: var(--blanco);
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.3rem 0;
    position: relative;
  }

  .navbar-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--celeste);
    transition: width 0.3s ease;
  }

  .navbar-links a:hover::after {
    width: 100%;
  }

  .dropdown {
    position: relative;
  }

  .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--azul-oscuro);
    padding: 0.5rem 0;
    border-radius: 0 0 0.5rem 0.5rem;
    min-width: 200px;
    z-index: 1001;
  }

  .dropdown.open .dropdown-content {
    display: block;
  }

  .dropdown-content a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--blanco);
    transition: background 0.3s ease;
    text-decoration: none;
  }

  .dropdown-content a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--blanco);
  }

  .menu-toggle .close-icon {
    display: none;
  }
  
  .menu-toggle.active .menu-icon {
    display: none;
  }
  
  .menu-toggle.active .close-icon {
    display: inline;
  }
  

  .menu-footer {
    display: none;
  }

  .logo img {
    height: 80px;
    display: block;
    clip-path: inset(30% 0 30% 0); /* recorta 10% arriba y abajo */
  }
  
  

  @media (max-width: 768px) {
    
    .menu-toggle {
      display: block; /* Esto asegura que se vea */
    }

    .navbar-links {
      flex-direction: column;
      background-color: var(--azul-oscuro);
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      text-align: left;
      z-index: 999;
      overflow: hidden;
    
      max-height: 0;
      transform: translateY(-20px);
      opacity: 0;
      transition: max-height 0.4s ease, transform 0.4s ease, opacity 0.3s ease;
      padding: 0 1.5rem;
    }

    /* Scrollbar para WebKit (Chrome, Safari, Edge) */
    .navbar-links::-webkit-scrollbar {
      width: 6px;
    }

    .navbar-links::-webkit-scrollbar-track {
      background: transparent;
    }

    .navbar-links::-webkit-scrollbar-thumb {
      background-color: #ffffff;
      border-radius: 3px;
    }

    .navbar-links:hover::-webkit-scrollbar-thumb {
      background-color: rgba(255, 255, 255, 0.4);
    }

    
    
    
    /* Firefox (más limitado) */
    @supports (scrollbar-width: thin) {
      .navbar-links {
        scrollbar-width: thin;
        background-color: #ffffff;
      }
    }

    .navbar-links.active {
      max-height: 90vh;
      transform: translateY(0);
      opacity: 1;
      padding-top: 1rem;
      padding-bottom: 1rem;
      background-color: #2641d6;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch; 
    }
    
    

    .navbar-links li {
      opacity: 0;
      transform: translateY(-10px);
      transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .navbar-links.active li {
      opacity: 1;
      transform: translateY(0);
    }
    
    

    .navbar-links li {
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      padding-bottom: 0.5rem;
    }

    .dropdown-content {
      position: relative;
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.4s ease;
      background-color: var(--azul-oscuro);
      padding-top: 0;  /* fijamos en 0 por defecto */
      padding-bottom: 0;
    }

    

    .dropdown-toggle {
      display: block;
      width: 100%;
      padding: 0.75rem 1.5rem;
      font-size: 1rem;
      color: var(--blanco);
      text-align: left;
    }
 
  
    .dropdown.open .dropdown-content {
      max-height: 70vh;
      overflow-y: auto;
    }
  
    .dropdown-content a {
      opacity: 0;
      transform: translateY(-10px);
      transition: opacity 0.3s ease, transform 0.3s ease;
      padding: 0.75rem 1.5rem;
      padding-left: 2.5rem; /* 🎯 Sangría clara del submenu */
      border-left: 3px solid transparent; /* opcional: línea decorativa */
    }
    
  
    .dropdown.open .dropdown-content a {
      opacity: 1;
      transform: translateY(0);
    }
  
    .dropdown-content a:last-child {
      border-bottom: none;
    }


    .menu-footer {
      padding-top: 0;
      padding-bottom: 0.5rem; /* antes: 2rem */
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      text-align: center;
      color: var(--blanco);
      display: block;

    }
    
    
    .menu-footer .footer-logo img {
      max-width: 150px;
      margin-top: 0px;
      margin-bottom: 0px;
    }
    
    .menu-footer .footer-logo p {
      font-size: 0.9rem;
      color: var(--blanco);
      margin-bottom: 5px;
    }

    .footer-logo p:first-of-type {
      margin-top: 0.2rem;
      margin-bottom: 0.2rem;
    }
    
    
    
    
    .footer-divider {
      border: none;
      height: 1px;
      background-color: rgba(255, 255, 255, 0.1);
      margin: 1.2rem 0;
    }
    
    .footer-social-intro {
      font-size: 0.85rem;
      line-height: 1.4;
      color: var(--blanco);
      margin-bottom: 0.3rem;
    }
    
    .menu-footer .social-icons {
      display: flex;
      justify-content: center;
      gap: 1rem;
      margin-top: 0.5rem;
    }

    
    .social-icons img {
      width: 24px;
      height: 24px;
      transition: transform 0.2s ease;
    }
    
    .social-icons a:hover img {
      transform: scale(1.15);
    }
    
    
    
  }

  @media (min-width: 769px) {
    .dropdown:hover .dropdown-content {
      display: block;
    }
  }


  /* Nuevo */

  /* Overlay */
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  
  body.menu-open .overlay {
    opacity: 1;
    pointer-events: all;
  }
  
  
  
  

/* Mostrar overlay cuando el menú está activo */
.navbar-links.active ~ .overlay {
  display: block;
}

/* Flecha giratoria */
.arrow {
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.dropdown.open .arrow {
  transform: rotate(180deg);
}

.dropdown-ver-todos {
  width: 88%;
  margin: 0.5rem auto 0.2rem auto;
  display: block;
  padding: 0.55rem 1rem;
  background: linear-gradient(90deg, var(--azul-acento, #2563ea) 60%, #1741a6 100%);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(44,82,130,0.08);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.dropdown-ver-todos:hover, .dropdown-ver-todos:focus {
  background: linear-gradient(90deg, #1741a6 0%, var(--azul-acento, #2563ea) 100%);
  box-shadow: 0 4px 14px rgba(44,82,130,0.13);
  transform: translateY(-1px) scale(1.025);
  outline: none;
}


