/* ==========================================================================
   Eusko Labs — Enhanced Button-Pill Navigation Menu
   Shared across all pages. Load after page-specific CSS.
   ========================================================================== */

.nav-container {
  max-width: 1440px !important;
  width: 95% !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
}

.nav-links {
  display: flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-wrap: nowrap !important;
}

/* ── Pill base ── */
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem !important;
  border-radius: 9999px;
  font-family: 'JetBrains Mono', monospace, sans-serif;
  font-size: 0.73rem !important;
  font-weight: 600;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.nav-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
  transition: all 0.25s ease;
}

.nav-pill .pill-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.25s ease;
}

/* ── Nivel 2: Pills minimalistas (sin color, sin badge) ── */
.nav-pill.pill-secondary {
  font-size: 0.74rem;
  padding: 0.38rem 0.7rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: #64748b;
}

.nav-pill.pill-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: none;
}

.nav-pill.pill-secondary.active {
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-pill.pill-secondary .pill-dot {
  width: 4px;
  height: 4px;
  opacity: 0.5;
}

/* ── Separador visual entre niveles ── */
.nav-separator {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 0.35rem;
  flex-shrink: 0;
}

/* ════════════════════════════════════════
   NIVEL 1 — Pills principales con color
   ════════════════════════════════════════ */

/* 1. Eusko Tech (Cian Neón #00f0ff) */
.nav-pill.pill-tech {
  border-color: rgba(0, 240, 255, 0.35);
  color: #00f0ff;
}
.nav-pill.pill-tech:hover, .nav-pill.pill-tech.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: #00f0ff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
  transform: translateY(-2px);
}
.nav-pill.pill-tech:hover .pill-dot, .nav-pill.pill-tech.active .pill-dot {
  background: #00f0ff; opacity: 1; box-shadow: 0 0 8px #00f0ff;
}
.nav-pill.pill-tech .pill-badge {
  background: rgba(0, 240, 255, 0.18);
  border-color: rgba(0, 240, 255, 0.45);
  color: #00f0ff;
}
/* Glow pulsante sutil en estado activo */
.nav-pill.pill-tech.active .pill-dot {
  animation: pillGlowTech 2.5s ease-in-out infinite;
}
@keyframes pillGlowTech {
  0%, 100% { box-shadow: 0 0 6px rgba(0, 240, 255, 0.6); }
  50% { box-shadow: 0 0 14px rgba(0, 240, 255, 1); }
}

/* 2. Diseño Web (Oro Editorial #fbbf24) */
.nav-pill.pill-art {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fbbf24;
}
.nav-pill.pill-art:hover, .nav-pill.pill-art.active {
  background: rgba(251, 191, 36, 0.15);
  border-color: #fbbf24;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.4);
  transform: translateY(-2px);
}
.nav-pill.pill-art:hover .pill-dot, .nav-pill.pill-art.active .pill-dot {
  background: #fbbf24; opacity: 1; box-shadow: 0 0 8px #fbbf24;
}
.nav-pill.pill-art .pill-badge {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fbbf24;
}
.nav-pill.pill-art.active .pill-dot {
  animation: pillGlowArt 2.5s ease-in-out infinite;
}
@keyframes pillGlowArt {
  0%, 100% { box-shadow: 0 0 6px rgba(251, 191, 36, 0.6); }
  50% { box-shadow: 0 0 14px rgba(251, 191, 36, 1); }
}

/* 3. IA para PyMEs (Verde Esmeralda #10b981) */
.nav-pill.pill-pymes {
  border-color: rgba(16, 185, 129, 0.35);
  color: #10b981;
}
.nav-pill.pill-pymes:hover, .nav-pill.pill-pymes.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}
.nav-pill.pill-pymes:hover .pill-dot, .nav-pill.pill-pymes.active .pill-dot {
  background: #10b981; opacity: 1; box-shadow: 0 0 8px #10b981;
}
.nav-pill.pill-pymes .pill-badge {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.45);
  color: #10b981;
}
.nav-pill.pill-pymes.active .pill-dot {
  animation: pillGlowPymes 2.5s ease-in-out infinite;
}
@keyframes pillGlowPymes {
  0%, 100% { box-shadow: 0 0 6px rgba(16, 185, 129, 0.6); }
  50% { box-shadow: 0 0 14px rgba(16, 185, 129, 1); }
}

/* 4. Global Work (Cian Global / Sky #38bdf8) */
.nav-pill.pill-global-work {
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.08);
  font-weight: 700;
  cursor: default;
}
.nav-pill.pill-global-work:hover {
  background: rgba(14, 165, 233, 0.18);
  border-color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}
.nav-pill.pill-global-work .pill-dot {
  background: #38bdf8;
  opacity: 1;
  box-shadow: 0 0 8px #38bdf8;
  animation: pillGlowGlobal 2.2s ease-in-out infinite;
}
.nav-pill.pill-global-work .pill-badge {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}
@keyframes pillGlowGlobal {
  0%, 100% { box-shadow: 0 0 6px rgba(56, 189, 248, 0.6); transform: scale(1); }
  50% { box-shadow: 0 0 16px rgba(56, 189, 248, 1); transform: scale(1.25); }
}

/* ════════════════════════════════════════
   Pills legacy (compatibilidad)
   ════════════════════════════════════════ */

/* 4. Servicios (Púrpura Eléctrico #a855f7) */
.nav-pill.pill-servicios {
  border-color: rgba(168, 85, 247, 0.3);
  color: #d8b4fe;
}
.nav-pill.pill-servicios:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: #a855f7;
  color: #f0abfc;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
}
.nav-pill.pill-servicios .pill-dot { background: #a855f7; opacity: 1; box-shadow: 0 0 8px #a855f7; }

/* 5. SaaS Lab (Fucsia Neón #ec4899) */
.nav-pill.pill-saas {
  border-color: rgba(236, 72, 153, 0.3);
  color: #f472b6;
}
.nav-pill.pill-saas:hover {
  background: rgba(236, 72, 153, 0.15);
  border-color: #ec4899;
  color: #f472b6;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.4);
  transform: translateY(-2px);
}
.nav-pill.pill-saas .pill-dot { background: #ec4899; opacity: 1; box-shadow: 0 0 8px #ec4899; }

/* ════════════════════════════════════════
   Header dinámico al hacer scroll
   ════════════════════════════════════════ */

.header, .site-header {
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
}

.header.scrolled, .site-header.scrolled {
  background: rgba(7, 8, 12, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.header.scrolled .nav-container {
  height: 64px;
}

.header.scrolled .logo {
  font-size: 1.15rem;
  transition: font-size 0.3s ease;
}

.header.scrolled .logo img {
  width: 32px;
  height: 32px;
  transition: width 0.3s ease, height 0.3s ease;
}

/* Header transparente al inicio (sin scroll) */
.header:not(.scrolled) {
  background: rgba(7, 8, 12, 0.4);
}

/* Variante site-header (diseno-web) */
.site-header.scrolled {
  background: rgba(245, 242, 235, 0.92);
}

[data-theme="dark"] .site-header.scrolled {
  background: rgba(17, 17, 19, 0.92);
}

.site-header:not(.scrolled) {
  background: linear-gradient(180deg, var(--bg-primary) 60%, rgba(245, 242, 235, 0) 100%);
}

[data-theme="dark"] .site-header:not(.scrolled) {
  background: linear-gradient(180deg, var(--bg-primary) 60%, rgba(17, 17, 19, 0) 100%);
}

/* ─── Global Pill Tag next to Logo (Global Header) ─── */
.global-pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 0.6rem;
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.25);
  animation: glowTag 3s ease-in-out infinite alternate;
  vertical-align: middle;
}

.global-pill-tag .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  animation: pulse 2s infinite;
}

@keyframes glowTag {
  from { box-shadow: 0 0 8px rgba(14, 165, 233, 0.2); }
  to { box-shadow: 0 0 16px rgba(56, 189, 248, 0.55); }
}

/* ─── Nav Dropdown Menu ─── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(11, 15, 25, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.5rem;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 500;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-width: 220px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 15px rgba(16, 185, 129, 0.15);
}

.nav-dropdown-menu.show {
  display: flex !important;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.82rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateX(3px);
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.35rem 0;
}

/* ════════════════════════════════════════
   Responsive
   ════════════════════════════════════════ */

@media (max-width: 1100px) {
  .nav-separator { display: none; }
  .nav-pill .pill-badge { display: none; }
}

.nav-mobile-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #38bdf8;
  font-size: 1.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  user-select: none;
}
.nav-mobile-toggle-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #ffffff;
}

@media (max-width: 900px) {
  .nav-container {
    position: relative !important;
  }
  .nav-mobile-toggle-btn {
    display: inline-flex !important;
  }
  .nav-links {
    display: none !important;
  }
  .nav-links.nav-mobile-open {
    display: flex !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(8, 12, 22, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(56, 189, 248, 0.25);
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    padding: 1.25rem 1.5rem !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9);
    z-index: 99999;
  }
  .nav-links.nav-mobile-open .nav-pill {
    width: 100%;
    justify-content: flex-start;
    padding: 0.65rem 1rem !important;
    font-size: 0.85rem !important;
  }
  .global-pill-tag { font-size: 0.62rem; padding: 0.15rem 0.45rem; margin-left: 0.35rem; }
}

/* ==========================================================================
   Language Segmented Control (ES | EN | EU)
   ========================================================================== */
.lang-segmented-control {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  border-radius: 999px !important;
  padding: 3px 8px !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.72rem !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 105 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  flex-shrink: 0 !important;
}
.lang-btn {
  background: none !important;
  border: none !important;
  color: #94a3b8 !important;
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  display: inline-block !important;
  line-height: 1.2 !important;
}
.lang-btn:hover {
  color: #fff !important;
}
.lang-btn.active {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.15) !important;
  font-weight: 800 !important;
}
.lang-divider {
  color: rgba(255, 255, 255, 0.15) !important;
  font-size: 0.65rem !important;
  user-select: none !important;
}