/* =========================
  ESTILOS GENERALES
========================= */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
}

/* Evitar desbordamiento en el header */
.header, 
.header * {
  box-sizing: border-box;
}

/* Asegurar que el header ocupe el 100% real */
.header {
  width: 100%;
}

.nav-top-inner,
.nav-bottom-inner {
  width: 100%;
}

/* =========================
  BLOQUE SUPERIOR
========================= */
.nav-top {
  border-bottom: 1px solid rgba(0,0,0,0.04);
  background-color: #ffffff;
  font-size: 0.95rem;
}

.nav-top-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-socials {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-socials a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #777777;
  font-weight: 600;
  transition: color 0.2s ease;
  height: 30px;
  -webkit-tap-highlight-color: transparent;
}

.nav-socials i {
  font-size: 1.2rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.nav-socials a:hover {
  color: #3984C6;
}

.nav-phone {
  color: #777777;
  text-decoration: none;
  font-weight: normal;
  display: inline-flex;
  align-items: center;
  height: 30px;
  margin-left: 10px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-lang {
  color: #777777;
  cursor: pointer;
  font-weight: 500;
}

.btn-contact {
  padding: 8px 20px;
  border-radius: 25px;
  background: #3984C6;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-contact:hover {
  background: #2a6495;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(57, 132, 198, 0.3);
}

/* =========================
   BLOQUE INFERIOR (MENÚ)
========================= */
.nav-bottom {
  background: #ffffff;
}

.nav-bottom-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
}

.nav-logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 48px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.nav-logo-link:hover .nav-logo img {
  transform: scale(1.02);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: #777777; /* Gris suave, sin negrita */
  font-weight: 400;
  text-decoration: none;
  position: relative;
  padding: 8px 6px;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Subrayado animado (ahora con color azul fijo) */
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 3px;
  background: #3984C6; /* Azul fijo */
  transition: width .25s ease;
  border-radius: 3px;
}

/* Efecto Hover: cambio a azul y subrayado al 100% */
.nav-menu a:hover,
.nav-menu a.active {
  color: #3984C6; /* Azul fijo */
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

/* =========================
   HAMBURGUESA (Oculto en PC)
========================= */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: #3984C6;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Animación X */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Ocultar WhatsApp del menú en PC */
.nav-wsp-mobile {
  display: none;
}

/* =========================
   RESPONSIVE (MÓVIL)
========================= */
@media (max-width: 1024px) {
  .nav-menu { gap: 15px; }
  .nav-bottom-inner { gap: 30px; }
}

@media (max-width: 992px) {
  
  .nav-top-inner {
    justify-content: flex-start;
    padding: 12px 15px;
  }

  .nav-actions {
    display: none;
  }

  .nav-phone {
    font-size: 0.95rem;
  }

  .nav-bottom-inner {
    flex-wrap: wrap;
    justify-content: space-between; 
    padding: 8px 15px;
    gap: 0;
  }

  .nav-logo img {
    height: 40px;
    flex-shrink: 0;
  }

  .nav-toggle {
    display: flex;
    flex-shrink: 0;
  }

  /* Menú desplegable móvil */
  .nav-menu {
    order: 3;
    flex-basis: 100%;
    display: none;
    flex-direction: column;
    gap: 0;
    margin-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.04);
    padding-top: 10px;
  }

  .nav-bottom.open .nav-menu {
    display: flex;
  }

  .nav-menu li {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.03);
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 400;
  }

  /* Ocultar el subrayado animado en móvil */
  .nav-menu a::after {
    display: none; 
  }

  /* WhatsApp en móvil */
  .nav-wsp-mobile {
    display: block;
    margin-top: 15px;
    border-bottom: none !important;
  }

  .nav-wsp-mobile a {
    background: #25D366;
    color: #ffffff !important;
    border-radius: 30px;
    font-weight: 600;
    padding: 12px !important;
    margin: 0 15px;
  }
  
  .nav-wsp-mobile a:hover {
    background: #1ebe5d;
  }
}