/* =================================================
   HEADER.CSS
   Header + Logo + Menu + CTA + Mobile + Compact Scroll
   ================================================= */


/* =================================================
   HEADER BASE (estado grande)
   ================================================= */

.header {
  position: fixed;
  top: 0;
  width: 100%;

  height: 95px;

  background: #1E1E20;

  z-index: 1000;

  display: flex;
  align-items: center;

  transition:
    height .35s ease,
    box-shadow .3s ease,
    background .3s ease;

  position: fixed;
  overflow: hidden;
}


/* =================================================
   ✨ LÍNEA METÁLICA INFERIOR (NUEVO)
   No afecta layout ni animaciones
   ================================================= */

.header::after {
  content: "";

  position: absolute;
  bottom: 0;
  left: 0;

  width: 100%;
  height: 3px;

  /* brillo tipo metal */
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.7) 25%,
    rgba(255,255,255,0.95) 50%,
    rgba(255,255,255,0.7) 75%,
    rgba(255,255,255,0) 100%
  );

  opacity: .35;

  pointer-events: none;
}

/* =================================================
   ✨ BRILLO ANIMADO (pasa 1 vez a los 7s)
   ================================================= */

.header::before {
  content: "";

  position: absolute;
  bottom: 0;
  left: -40%;

  width: 40%;
  height: 4px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.95),
    transparent
  );

  pointer-events: none;

  opacity: 0;

  /* 🔥 SIN DELAY */
  animation: metalSweep 5s linear infinite;
}
.header.compact .menu-link {
  font-size: 0.9rem;
}




/* animación del barrido */

@keyframes metalSweep {

  /* inicia barrido */
  0% {
    left: -40%;
    opacity: 0;
  }

  6% {
    opacity: 1;
  }

  40% {
    left: 120%;
    opacity: 0;
  }

  /* resto del tiempo quieto */
  100% {
    left: 120%;
    opacity: 0;
  }
}





/* =================================================
   CONTENIDO
   ================================================= */

.header__content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 40px;
}


/* =================================================
   LOGO
   ================================================= */

.logo {
  margin-right: 40px;
  display: flex;
  align-items: center;
}

.logo img {
  height: 52px;
  width: auto;

  transition: height .3s ease;
}


/* =================================================
   CTA WHATSAPP
   ================================================= */

.cta-btn {
  background: var(--primary);
  color: white;

  display: inline-flex;
  align-items: center;
  gap: 12px;

  padding: 14px 28px;

  border-radius: 8px;

  font-family: 'bebas_regular', sans-serif;

  font-size: 20px;
  letter-spacing: 1.5px;
  text-transform: uppercase;

  box-shadow: 0 4px 12px rgba(227, 6, 19, 0.25);

  transition: all .25s ease;
}


.cta-btn:hover {
  background: #b8000f;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(227, 6, 19, 0.45);
}


.cta-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
}


/* =================================================
   HAMBURGER
   ================================================= */

.hamburger {
  display: none;

  flex-direction: column;
  justify-content: center;
  gap: 5px;

  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;

  transition: .3s;
}



/* =================================================
   ✨ HEADER COMPACTO AL HACER SCROLL
   ================================================= */

.header.compact {
  height: 65px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}


.header.compact .logo img {
  height: 40px;
}

.header.compact .cta-btn {
  padding: 10px 22px;
  font-size: 18px;
}



/* =================================================
   RESPONSIVE
   ================================================= */

@media (max-width: 900px) {

  .cta-btn {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .header {
    height: 80px;
  }

  .header.compact {
    height: 60px;
  }
}
