/* ════════════════════════════════════════════════════════════════
   DIGITAL STRINGS · GLOBAL NAVIGATION
   Top-bar sticky con dropdown de productos y selector ES/EN.
   ════════════════════════════════════════════════════════════════ */

:root {
  --gn-bg:        rgba(10, 14, 40, 0.86);
  --gn-bg-solid:  #0a0e28;
  --gn-border:    rgba(255, 255, 255, 0.10);
  --gn-text:      rgba(232, 238, 255, 0.92);
  --gn-text-mute: rgba(232, 238, 255, 0.62);
  --gn-accent:    #00BFA6;
  --gn-active:    #FFBB00;
  --gn-radius:    14px;
  --gn-height:    62px;
}

.global-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--gn-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--gn-border);
  font-family: 'Space Grotesk', 'Oxanium', sans-serif;
}

.global-nav-shell {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
  height: var(--gn-height);
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
}

.global-nav-brand {
  display: inline-flex;
  align-items: center;
  color: var(--gn-text);
  text-decoration: none;
  flex-shrink: 0;
}
.global-nav-brand img {
  height: 36px;
  width: auto;
  display: block;
}

.global-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 1.2vw, 0.8rem);
  margin: 0 0 0 auto;
  list-style: none;
  padding: 0;
}

.global-nav-link {
  position: relative;
  color: var(--gn-text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.global-nav-link:hover,
.global-nav-link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
}
.global-nav-link.is-active {
  color: var(--gn-active);
}
.global-nav-link.is-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0.8rem;
  right: 0.8rem;
  height: 2px;
  border-radius: 2px;
  background: var(--gn-active);
}

.global-nav-caret {
  display: inline-block;
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
  margin-left: 2px;
}
.global-nav-item--has-menu.is-open .global-nav-caret {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.global-nav-item {
  position: relative;
}
.global-nav-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 280px;
  background: var(--gn-bg-solid);
  border: 1px solid var(--gn-border);
  border-radius: var(--gn-radius);
  padding: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  list-style: none;
  margin: 0;
}
.global-nav-item--has-menu.is-open .global-nav-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.global-nav-menu li { display: block; }
.global-nav-menu a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--gn-text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
  transition: background 0.16s ease, color 0.16s ease;
}
.global-nav-menu a small {
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--gn-text-mute);
  letter-spacing: 0.01em;
}
.global-nav-menu a:hover,
.global-nav-menu a:focus-visible {
  background: rgba(0, 191, 166, 0.12);
  color: #fff;
  outline: none;
}

.global-nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--gn-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  margin-left: 0.6rem;
}
.global-nav-lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--gn-text-mute);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: background 0.18s ease, color 0.18s ease;
}
.global-nav-lang a.is-active {
  background: var(--gn-accent);
  color: #06121b;
}
.global-nav-lang a:hover:not(.is-active) {
  color: #fff;
}

/* Hamburger */
.global-nav-burger {
  display: none;
  width: 38px; height: 38px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  position: relative;
}
.global-nav-burger span,
.global-nav-burger::before,
.global-nav-burger::after {
  content: '';
  position: absolute;
  left: 9px; right: 9px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.global-nav-burger::before { top: 12px; }
.global-nav-burger span    { top: 18px; }
.global-nav-burger::after  { top: 24px; }
.global-nav-burger[aria-expanded="true"]::before { top: 18px; transform: rotate(45deg); }
.global-nav-burger[aria-expanded="true"] span    { opacity: 0; }
.global-nav-burger[aria-expanded="true"]::after  { top: 18px; transform: rotate(-45deg); }

/* Mobile */
@media (max-width: 920px) {
  .global-nav-burger { display: inline-flex; }
  .global-nav { position: sticky; border-bottom: 0; }
  .global-nav-links {
    position: absolute;
    top: var(--gn-height);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--gn-bg-solid);
    border-top: 1px solid var(--gn-border);
    border-bottom: 1px solid var(--gn-border);
    padding: 14px clamp(1rem, 3vw, 2rem) 20px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
    max-height: calc(100vh - var(--gn-height));
    overflow-y: auto;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  }
  .global-nav.is-open .global-nav-links {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.2s ease, visibility 0s linear 0s;
  }
  .global-nav-link {
    padding: 0.72rem 0.85rem;
    border-radius: 12px;
    font-size: 0.98rem;
    justify-content: space-between;
    width: 100%;
  }
  .global-nav-link.is-active::after { display: none; }
  .global-nav-link.is-active { background: rgba(255, 187, 0, 0.15); }
  .global-nav-menu {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 4px 0 4px 14px;
    margin-top: 2px;
    display: none;
    min-width: 0;
  }
  .global-nav-item--has-menu.is-open .global-nav-menu {
    display: block;
    transform: none;
  }
  .global-nav-lang {
    margin: 8px 0 0;
    align-self: flex-start;
  }
}

/* Si la página tiene un sub-nav sticky propio (ej. catálogo zonas), bajar su top */
.has-global-nav .anatomy-nav { top: var(--gn-height); }
