
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  position: relative;
}


/* Ocultar el checkbox real */
#menu-toggle {
  display: none;
}

/* Estilo del icono de hamburguesa (las 3 líneas) */
.hamburger-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger-icon span {
  display: block;
  width: 30px;
  height: 5px;
  background-color: #333;
  border-radius: 3px;
  transition: 0.3s;
}

/* Lista de enlaces en modo escritorio */
.nav-links {
  list-style: none;
  display: flex;
  gap: 0.5rem;
}

.nav-links a {
  color: #333;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--gold);
}

/* Diseño responsivo para celulares y tablets (pantallas menores a 768px) */
@media (max-width: 768px) {
  .hamburger-icon {
    display: flex; /* Muestra el icono de hamburguesa en móvil */
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-top: 5px;
    background-color: var(--main-color);
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    border-radius: 6px;
  }

  .nav-links li {
    padding: 0.1rem 0.1rem;
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
  }

  /* ACCIÓN: Al marcar el checkbox, se despliega el menú cambiando el max-height */
  #menu-toggle:checked ~ .nav-links {
    max-height: 600px; 
  }
}
