@import './variables.css';

header {
  width: 100%;
  background-color: var(--color-blur);
  position: fixed;
  top: 0;
  transition: var(--transition-blur), top 0.3s;
  height: 70px;
  display: flex;
  align-items: center;  /*Asegura que todo esté centrado*/
  flex-wrap: wrap;
  color: #fff; /* Texto negro cuando hace scroll*/
  border-bottom: 2px solid hsla(0, 0%, 0%, 0.2);
  backdrop-filter: blur(15px);
  box-shadow: 0 4px 15px 0 rgba(104, 104, 104, 0.5);
  z-index: 100;
}
header:hover {
  background-color: var(--color-blur-hover);
}

#logo-inicio {
  font-weight: 800;
  font-size: 2em;
  letter-spacing: 1px;
}

header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

header nav ul {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

header nav li {
  display: inline;
}

header nav a {
  width: 100%;
  text-decoration: none;
  color: inherit; /* Hereda el color del padre, que es el header */
  padding: 0px 20px;
}

nav a:hover {
  color: #d6d6d6; /* Cambio de color al pasar el mouse para mejor UX */
}


/* HAMBRGUER MENU */

/* Estilos para el ícono de hamburguesa */
.menu-icon {
  display: none;
  flex-direction: row;
  justify-content: space-between;
  width: 17px; /* Ajusta el tamaño según prefieras */
  height: 20px; /* Ajusta la altura según el espacio entre líneas */
  cursor: pointer;
  z-index: 1000;
  background: none; /* Elimina cualquier color de fondo */
  border: none;
  margin-right: 30px;
}

.menu-icon .line {
  width: 3px; /* Grosor de cada línea */
  height: 100%; /* Define el grosor de cada línea */
  background-color: var(--color-principal-claro); /* Cambia al color deseado */
  transition: all 0.3s ease-in-out;
}

.menu-icon.open .line:nth-child(1) {
  transform: rotate(45deg) translate(5px, -5px);
}

.menu-icon.open .line:nth-child(2) {
  transform: rotate(-45deg) translate(5px, 5px);
}


/* Menu oculto en pantallas pequeñas */
@media (max-width: 768px) {
  .menu-ham {
    width: 100%;
    display: flex;
    justify-content: space-between; /* Asegura que los elementos estén en los extremos */
    align-items: center;
  }

  header nav ul {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    font-size: 1.5em;
  }

  header nav li {
    padding: 5px;
  }

  .menu-elements {
    position: absolute;
    top: 70px; /* Justo debajo del header */
    left: 0;
    width: 100%;
    display: none;
    background-color: var(--color-blur);
    color: var(--color-principal-claro);
    backdrop-filter: blur(15px);
    padding: 20px;
    z-index: 999;
    transition: all 0.3s ease-in-out;
  }

  .menu-elements.open {
    display: flex;
  }

  .menu-icon {
    display: flex;
  }
}

