/* =====================
   HEADER BASE
===================== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #eef2f6;
  font-family: 'Poppins', sans-serif;
  position: relative;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: auto;
  padding: 25px 20px 20px;
}

/* =====================
   FILA PRINCIPAL DESKTOP
===================== */
.header-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

/* =====================
   HAMBURGUESA
===================== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 5px;
  z-index: 1001;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: #0a2540;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =====================
   REDES
===================== */
.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;
}

.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
===================== */
.header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.header-btn.primary {
  text-decoration: none;
  background-color: #1b5085;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(31,120,180,.35);
  transition: all .3s ease;
}

.header-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(31,120,180,.45);
}

/* =====================
   NAV DESKTOP
===================== */
.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 DESKTOP (CORREGIDO)
===================== */
.nav-menu .has-dropdown {
  position: relative;
}

.nav-menu .dropdown {
  position: absolute;
  top: 115%;
  left: 0; /* 🔥 alineado al padre */
  background-color: #ffffff;
  list-style: none;
  width: 170px;
  padding: 6px 0;
  border: 1px solid #eef2f6;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.25s ease;
  z-index: 999;
}

.nav-menu .has-dropdown.active .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu .dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: #0a2540;
}

.nav-menu .dropdown a:hover {
  background: #f1f5f9;
  color: #1f9bd1;
}
/* 🔥 FORZAR DROPDOWN A SER BLOQUE */
.nav-menu .dropdown {
  display: block;
}

.nav-menu .dropdown li {
  display: block;
}

/* =====================
   OVERLAY
===================== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 998;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* =====================
   MOBILE
===================== */
@media (max-width: 900px) {

  .header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .header-social {
    display: none;
  }

  .nav-toggle {
    display: flex;
    order: 1;
  }

  .header-logo {
    order: 2;
    justify-content: center;
  }

  .header-actions {
    display: none;
  }

  /* PANEL LATERAL */
  .nav-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    background: #ffffff;
    padding: 110px 25px 30px;
    box-shadow: 4px 0 25px rgba(0,0,0,0.08);
    transition: left 0.35s ease;
    z-index: 999;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .nav-menu a {
    font-size: 16px;
  }

  /* 🔥 Dropdown MOBILE fijo y estable */
  .nav-menu .dropdown {
    position: static;
    width: 100%;
    transform: none;
    box-shadow: none;
    border: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    padding-left: 15px;
  }

  .nav-menu .has-dropdown.active .dropdown {
    display: block;
  }
}
/* =====================
   OCULTAR CONTACTANOS MÓVIL EN DESKTOP
===================== */
.mobile-cta {
  display: none;
}

/* =====================
   MOSTRAR EN MÓVIL CON ESTILO DE BOTÓN
===================== */
@media (max-width: 900px) {
  .mobile-cta {
    display: block;
    width: 100%;
    margin-top: 16px;
  }

  .mobile-cta a {
    display: block;
    background-color: #1b5085;
    color: #ffffff;
    text-align: center;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.3s ease;
  }

  .mobile-cta a:hover {
    background-color: #0a3a6b;
  }
}