/* ================================
   NAVBAR
================================ */

.header {
  position: fixed;
  top: 32px;
  left: 0;
  width: 100%;
  z-index: 3000;
  padding: 0 8%;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
/* ESTADOS DEL HEADER */

.header.hide {
  transform: translateY(-120%);
  opacity: 0;
}

.header.visible {
  transform: translateY(0);
  opacity: 1;
}
/* NAV */

.nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* ================================
   LINKS DESKTOP
================================ */

.nav-links {
  display: flex;
  gap: 56px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255,255,255,0.9);
  position: relative;
  padding-bottom: 6px;
  transition: opacity 0.3s ease;
}

.nav-links a:hover {
  opacity: 0.7;
}

/* Subrayado animado */

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.8);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ================================
   HAMBURGUESA
================================ */

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 28px;
  height: 24px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 3100;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background: white;
  transition: 0.3s ease;
}

/* Animación a X */

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ================================
   MOBILE
================================ */

@media (max-width: 900px) {

  .header {
    top:0; 
    left:0;
    width:100vw; 
    z-index: 3000;
  }

  /* Mostrar hamburguesa */
  .menu-toggle {
    display: flex;
    position: fixed;
    top: 24px;
    right: 6%;
    z-index: 3100; 
  }

  /* Menú mobile */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;            
    width: 100%;         
    height: 100vh;       
    background: rgba(0,0,0,0.85); 
    display: flex;
    flex-direction: column;
    justify-content: center;  
    align-items: center;      
    gap: 32px;
    padding: 0;    
    margin:0;   
    transition: opacity 0.4s ease, visibility 0.4s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 3050;
  }

  /* Cuando está activo */
  .nav-links.active {
    opacity: 1;
    visibility: visible;

  }

  /* Links centrados */
  .nav-links li {
    list-style: none;
  }

  .nav-links a {
    font-size: 22px;      
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    position: relative;
    padding-bottom: 4px;
    transition: opacity 0.3s ease;
  }
    .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
  }
    .nav-links a:hover::after {
    width: 100%;
  }
  .nav-links a:hover {
    opacity: 0.7;

}


}