.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  font-family: var(--font-tertiary);
  background-color: #fff;
}

.header__top {
  background-color: var(--color-header);
  color: #fff;
  display: flex;
  justify-content: end;
  gap: 1rem;
  align-items: center;
  padding: 0.5rem 10%;
}

.header__links {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--header-text-sm);
}

.header__link a {
  color: inherit;
  text-decoration: none;
}

.header__social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.header__social-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header__social-link img {
  width: 15px;
  height: auto;
}

.header__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 10%;
  /* border-bottom: 1px solid #999; */
}

.header__branding {
  display: flex;
  align-items: center;
  width: auto;
}

.header__logo-nsp {
  width: 2.8rem;
  height: auto;
}

.header__logo-sscc {
  height: 2rem;
  width: auto;
}

.header__text {
  padding-inline-start: 0.5rem;
  line-height: 1.5;
}

.header__title {
  /* font-size: 1.25rem; */
  font-size: var(--header-title);
  color: var(--color-text-header);
  font-weight: 700;
  margin: 0;
}

.header__subtitle {
  color: #b2b2b2;
  font-family: var(--font-secondary);
  font-size: var(--header-subtitle);
  text-transform: uppercase;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.045rem;
}

.header__menu {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 0;
  padding: 0;
}

.header__menu-item a {
  color: #333;
  font-size: var(--header-text);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease-out;
}

.header__menu-item a:hover {
  color: var(--color-text-header);
}

.header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: 8rem;
  height: 2.2rem;
  border-radius: 0.25rem;
  padding: 0.25rem 1rem;
  border: 1px solid var(--color-text-header);
  color: var(--color-text-header) !important;
  text-transform: uppercase;
  font-size: var(--header-text-sm) !important;
  font-weight: 600;
  transition: all 0.3s ease-out;
}

.header__cta:hover {
  background-color: var(--color-text-header);
  color: #ffffff !important;
}

.header__hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  z-index: 100;
}

.header__hamburger-bar {
  width: 25px;
  height: 3px;
  background-color: #333;
  transition: all 0.3s ease;
}

/* Animación de hamburguesa a X */
.header__hamburger.active .header__hamburger-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.header__hamburger.active .header__hamburger-bar:nth-child(2) {
  opacity: 0;
}

.header__hamburger.active .header__hamburger-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.header__hamburger-bar {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.header__close {
  background: none;
  border: none;
  font-size: 2rem;
  align-self: flex-end;
  cursor: pointer;
}

@media screen and (max-width: 1440px) {
  .header__bottom {
    padding: 1rem 5%;
  }
}

/* Responsive breakpoint */
@media (max-width: 1200px) {
  .header__menu {
    flex-direction: column;
    position: fixed;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: #fff;
    transition: left 0.3s ease-out;
    z-index: 100;
    gap: 1.5rem;
    padding: 4rem 10%;
    align-items: start;
  }

  .header__menu.active {
    left: 0;
  }

  .header__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 99;
  }

  .header__overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .header__hamburger {
    display: flex;
  }

  .header__branding {
    width: 100%;
  }
}

@media screen and (max-width: 500px) {
  .header__social {
    gap: 0.25rem;
  }

  .header__top {
    justify-content: space-between;
  }

  .header__social-link img {
    width: 15px;
  }
}
/* animaciones nav */
.header__menu-item a {
  position: relative;
  display: inline-block;
  color: #333;
  text-decoration: none;
  padding: 0.5rem 0;
  font-weight: 500;
  transition: all 0.3s ease;
}

.header__menu-item a::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  bottom: 0;
  left: 0;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.9;
}

.header__menu-item a:hover::before {
  transform: scaleX(1);
  opacity: 1;
}

.header__menu-item a:hover {
  color: var(--color-primary);
}

.header__menu-item a.active {
  color: var(--color-primary);
}

.header__menu-item a.active::before {
  transform: scaleX(1);
  opacity: 1;
}

.header__menu-item a:hover {
  transform: translateY(-2px);
}

.header__menu {
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.header__menu.active {
  transform: translateX(0);
}

.header__menu-item {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 1200px) {
  .header__menu-item a {
    font-size: calc(var(--header-text) + 0.05rem);
  }
}