/* ═══════════════════════════════════════════════════════════════════
   IntegraPro Solutions SAS — nav.css
   Menú global compartido por todas las páginas del sitio.
   Incluir en cada página:
     <link rel="stylesheet" href="/css/nav.css">
   Requiere: Google Fonts Barlow + Barlow Condensed (ya en el head de cada página)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Variables globales de color (sólo las del nav) ─────────────── */
/* Si la página ya las tiene en su propio :root, estas no sobreescriben */
:root {
  --ip-bg:        #04070f;
  --ip-bg2:       #080d18;
  --ip-text:      #eef2ff;
  --ip-text2:     #94a3b8;
  --ip-text3:     #475569;
  --ip-border:    rgba(255,255,255,.06);
  --ip-cons:      #1E3A8A;
  --ip-cons2:     #2563EB;
  --ip-cons3:     #60A5FA;
  --ip-mktg:      #7C3AED;
  --ip-mktg2:     #9333EA;
  --ip-mktg3:     #A78BFA;
  --ip-green:     #22c55e;
  --ip-gboth:     linear-gradient(135deg,#1E3A8A,#7C3AED,#EC4899);
}

/* ── NAV PRINCIPAL ───────────────────────────────────────────────── */
.ip-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(4,7,15,.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--ip-border);
  font-family: 'Barlow', sans-serif;
}

/* Logo */
.ip-nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.ip-nav-logo img {
  height: 34px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Links centrales */
.ip-nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.ip-nav-links a {
  color: var(--ip-text2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
  white-space: nowrap;
}
.ip-nav-links a:hover,
.ip-nav-links a.active {
  color: var(--ip-text);
}

/* Separador visual de sección activa */
.ip-nav-links a.active {
  position: relative;
}
.ip-nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 0; right: 0;
  height: 2px;
  background: var(--ip-gboth);
  border-radius: 2px;
}

/* CTA buttons */
.ip-nav-ctas {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}
.ip-nav-btn-o {
  color: var(--ip-text);
  border: 1px solid rgba(255,255,255,.12);
  padding: 8px 20px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s, color .2s;
  white-space: nowrap;
}
.ip-nav-btn-o:hover {
  border-color: rgba(255,255,255,.30);
  color: var(--ip-text);
}
.ip-nav-btn-p {
  background: var(--ip-gboth);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .2s, transform .2s;
  white-space: nowrap;
  display: inline-block;
}
.ip-nav-btn-p:hover {
  opacity: .85;
  transform: translateY(-1px);
}

/* ── DROPDOWN MEGAMENÚ (opcional) ────────────────────────────────── */
.ip-nav-dropdown {
  position: relative;
}
.ip-nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ip-nav-dropdown > a::after {
  content: '▾';
  font-size: 10px;
  opacity: .5;
  transition: transform .2s;
}
.ip-nav-dropdown:hover > a::after {
  transform: rotate(180deg);
}
.ip-nav-dd-panel {
  display: none;
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: rgba(8,13,24,.97);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.ip-nav-dropdown:hover .ip-nav-dd-panel {
  display: block;
  animation: navDDIn .15s ease;
}
@keyframes navDDIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.ip-nav-dd-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ip-text2) !important;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.ip-nav-dd-panel a:hover {
  background: rgba(255,255,255,.05);
  color: var(--ip-text) !important;
}
.ip-nav-dd-panel a .dd-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.ip-nav-dd-panel a .dd-label {
  font-weight: 600;
  color: var(--ip-text);
  display: block;
  font-size: 13px;
}
.ip-nav-dd-panel a .dd-sub {
  display: block;
  font-size: 11px;
  color: var(--ip-text3);
  margin-top: 1px;
}

/* ── BANNER SUPERIOR (opcional, para anuncios) ──────────────────── */
.ip-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 201;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ip-gboth);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .02em;
  gap: 10px;
}
.ip-topbar a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ip-topbar-close {
  position: absolute;
  right: 16px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  opacity: .7;
}
.ip-topbar-close:hover { opacity: 1; }
/* Cuando el topbar está activo, bajar el nav */
body.has-topbar .ip-nav { top: 36px; }
body.has-topbar { padding-top: 102px; } /* 36 topbar + 66 nav */

/* ── FOOTER GLOBAL ───────────────────────────────────────────────── */
.ip-footer {
  border-top: 1px solid var(--ip-border);
  padding: 40px 48px;
  max-width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  font-family: 'Barlow', sans-serif;
  background: var(--ip-bg);
}
.ip-foot-logo img {
  height: 28px;
  object-fit: contain;
}
.ip-foot-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}
.ip-foot-links a {
  color: var(--ip-text3);
  font-size: 13px;
  text-decoration: none;
  transition: color .2s;
}
.ip-foot-links a:hover {
  color: var(--ip-text);
}
.ip-foot-copy {
  font-size: 12px;
  color: var(--ip-text3);
  text-align: right;
}

/* ── WHATSAPP FAB ────────────────────────────────────────────────── */
.ip-wa {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 999;
  width: 58px; height: 58px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  text-decoration: none;
  transition: transform .3s;
}
.ip-wa:hover { transform: scale(1.1); }

/* Padding global del body para que el contenido no quede bajo el nav */
body { padding-top: 66px; }

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .ip-nav { padding: 0 24px; }
  .ip-nav-links { gap: 20px; }
}

@media (max-width: 768px) {
  .ip-nav { padding: 0 20px; }
  .ip-nav-links { display: none; }
  .ip-nav-btn-o { display: none; }
  .ip-footer {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px 24px;
    gap: 16px;
  }
  .ip-foot-copy { text-align: center; }
  .ip-wa { bottom: 18px; right: 18px; width: 52px; height: 52px; }
}

/* ── MOBILE MENU (hamburger) ─────────────────────────────────────── */
.ip-nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.ip-nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ip-text2);
  border-radius: 2px;
  transition: all .25s;
}
.ip-nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ip-nav-hamburger.open span:nth-child(2) { opacity: 0; }
.ip-nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .ip-nav-hamburger { display: flex; }
}

/* Mobile drawer */
.ip-nav-mobile {
  display: none;
  position: fixed;
  top: 66px; left: 0; right: 0;
  background: rgba(4,7,15,.97);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--ip-border);
  padding: 16px 20px 24px;
  z-index: 199;
  flex-direction: column;
  gap: 4px;
}
.ip-nav-mobile.open { display: flex; }
.ip-nav-mobile a {
  color: var(--ip-text2);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  padding: 12px 8px;
  border-bottom: 1px solid var(--ip-border);
  transition: color .15s;
  font-family: 'Barlow', sans-serif;
}
.ip-nav-mobile a:last-child { border-bottom: none; }
.ip-nav-mobile a:hover { color: var(--ip-text); }
.ip-nav-mobile .ip-nav-btn-p {
  margin-top: 12px;
  text-align: center;
  width: 100%;
  padding: 12px;
}
