/* 🔹 Header Styles */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing);
}

/* 🔝 Header */
.header {
  padding-top: var(--spacing);
  position: relative;
}

.header__container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}

/* ✒️ Brand (Logo izquierda) */
.header__brand {
  text-decoration: none;
  justify-self: start; 
}

.header__logo {
  height: 80px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.header__logo:hover {
  transform: scale(1.05);
}

/* 🧭 Navegación (Centrada) */
.nav {
  justify-self: center; 
}

.nav__list {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__item {
  font-size: 1.2em;
}

.nav__link {
  text-decoration: none;
  color: var(--color-text-light);
  position: relative;
  transition: color 0.3s ease;
  font-weight: 500;
  padding: 0.5rem 0;
}

.nav__link::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s;
  width: 0%;
  margin-top: 4px;
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link.active {
  color: var(--color-primary);
}

/* 🔗 Iconos sociales (Derecha) */
.header__socials {
  display: flex;
  gap: 1rem;
  justify-self: end; 
  margin-top: 0; 
}

.header__socials .social__icon {
  width: 32px; 
  transition: transform 0.3s ease, filter 0.3s ease;
}

.header__socials .social__icon:hover {
  transform: scale(1.15);
  filter: brightness(1.2) drop-shadow(0 0 4px var(--color-primary));
}

/* 📱 Responsive */
@media (max-width: 968px) {
  .header__container {
    grid-template-columns: auto 1fr; 
    grid-template-rows: auto auto;
  }
  
  .nav {
    grid-column: 1 / -1; 
    grid-row: 2;
    justify-self: center;
    margin-top: 1rem;
  }
  
  .header__socials {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 768px) {
  .header__container {
    grid-template-columns: 1fr; 
    justify-items: center;
    gap: 1.5rem;
  }
  
  .nav {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }
  
  .nav__list {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .header__socials {
    grid-column: 1;
    grid-row: 3;
    justify-self: center;
  }
  
  .header__logo {
    height: 60px;
  }
}

@media (max-width: 480px) {
  .header__logo {
    height: 50px;
  }
  
  .header__socials .social__icon {
    width: 28px;
  }
  
  .nav__link {
    font-size: 1.1em;
  }
}