/* =====================
   HEADER BASE
===================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #eef2f6;
  font-family: 'Poppins', sans-serif;
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  padding: 25px 20px 20px;
}

/* =====================
   FILA PRINCIPAL
===================== */
.header-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

/* IZQUIERDA: REDES + WHATSAPP */
.header-social {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-social a {
  font-size: 13px;
  font-weight: 600;
  color: #0a2540;
  text-decoration: none;
  transition: opacity .3s ease;
}

.header-social a:hover {
  opacity: .7;
}

/* WhatsApp */
.header-wsp {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(10,37,64,.25);

  font-size: 13px;
  font-weight: 500;
  color: #0a2540;
  white-space: nowrap;

  display: flex;
  align-items: center;
  gap: 6px;

  transition: color .3s ease;
}

.header-wsp:hover {
  color: #1f78b4;
}

/* =====================
   LOGO
===================== */
.header-logo {
  display: flex;
  justify-content: center;
}

.header-logo img {
  height: 45px;
}

/* =====================
   CTA DERECHA
===================== */
.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* Botón */
.header-btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(10,37,64,.2);
  background: transparent;
  cursor: pointer;
  transition: all .3s ease;
}

.header-btn:hover {
  background: rgba(10,37,64,.05);
}

/* CTA principal */
.header-btn.primary {
  text-decoration: none;
  background-color: #1b5085;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  font-weight: 600;
  letter-spacing: .2px;
  box-shadow: 0 8px 24px rgba(31,120,180,.35);
}

.header-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(31,120,180,.45);
}

/* =====================
   NAV
===================== */
.nav-menu {
  margin-top: 18px;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 35px;
  padding: 0;
  margin: 0;
}

.nav-menu a {
  position: relative;
  text-decoration: none;
  color: #0a2540;
  font-size: 15px;
  font-weight: 500;
  padding-bottom: 6px;
}

/* Subrayado */
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #1f9bd1;
  transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-menu a.active {
  color: #1f9bd1;
  font-weight: 600;
}
/*===================== DROPDOWN (FINAL CORREGIDO) ===================== */
 .nav-menu .has-dropdown { position: relative; } /* contenedor dropdown */ .nav-menu .dropdown { position: absolute; top: 120%; left: 50%; transform: translateX(-50%) translateY(8px); background-color: #ffffff; list-style: none; width: 170px; min-width: 160px; margin: 0; padding: 6px 0; border: 1px solid #eef2f6; box-shadow: 0 12px 30px rgba(0,0,0,0.12); /* 🔥 CLAVE: rompe el flex del nav */ display: block; /* estado oculto */ opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; z-index: 999; } /* estado activo (JS) */ .nav-menu .has-dropdown.active .dropdown { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); } /* items uno debajo del otro */ .nav-menu .dropdown li { display: block; width: 100%; margin: 0; padding: 0; } /* links */ .nav-menu .dropdown a { display: block; width: 100%; padding: 10px 16px; font-size: 14px; font-weight: 500; color: #0a2540; text-decoration: none; box-sizing: border-box; white-space: nowrap; } /* hover */ .nav-menu .dropdown a:hover { background: #f1f5f9; color: #1f9bd1; }

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 900px) {
  .header-main {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .header-social,
  .header-actions {
    justify-content: center;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 18px;
  }
}
/* =====================
   STICKY HEADER (ANIMACIÓN SUAVE)
===================== */
.site-header.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;

  animation: headerSlideDown 0.55s cubic-bezier(.22,1,.36,1) forwards;
}

.site-header.animate-out {
  animation: headerSlideUp 0.45s cubic-bezier(.4,0,.6,1) forwards;
}

@keyframes headerSlideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes headerSlideUp {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-100%);
  }
}
