/* ==========================================================================
   05-NAVIGATION.CSS — MASTER FLOATING NAVIGATION HEADER
   Lead Systems Architect Specification — Zero Magic Numbers.
   ========================================================================== */

.master-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  padding: var(--space-md) var(--space-lg);
  transition: all var(--duration-normal) var(--ease-expo);
}

.master-header.scrolled {
  padding: var(--space-xs) var(--space-lg);
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-full);
  background: var(--bg-surface-glass);
  backdrop-filter: blur(var(--glass-blur-md));
  -webkit-backdrop-filter: blur(var(--glass-blur-md));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all var(--duration-normal) var(--ease-expo);
}

.master-header.scrolled .nav-container {
  background: var(--bg-overlay);
  border-color: var(--glass-border-hover);
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.4);
}

/* Brand Logo */
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  color: var(--text-main);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-brand .brand-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--advisory-cyan);
  box-shadow: 0 0 10px var(--advisory-cyan);
  transition: background var(--duration-normal) var(--ease-expo);
}

[data-section="mitabela"] .nav-brand .brand-badge {
  background: var(--mitabela-rose);
  box-shadow: 0 0 10px var(--mitabela-rose);
}

/* Division Switcher (Dual World Pills) */
.nav-divisions {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.division-pill {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-expo);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  text-decoration: none;
}

.division-pill:hover {
  color: var(--text-main);
}

.division-pill.active[data-division="advisory"] {
  background: var(--advisory-blue);
  color: #FFFFFF;
  box-shadow: 0 2px 10px var(--advisory-blue-glow);
}

.division-pill.active[data-division="mitabela"] {
  background: var(--mitabela-crimson);
  color: #FFFFFF;
  box-shadow: 0 2px 10px var(--mitabela-rose-glow);
}

.division-pill.active[data-division="dual"] {
  background: var(--text-main);
  color: var(--bg-canvas);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Enlaces de Navegación */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-link {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
  white-space: nowrap !important;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-expo);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--text-main);
  transition: width var(--duration-normal) var(--ease-expo);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link:hover::after {
  width: 100%;
}

/* Controles de Utilidad (Theme, Lang, CTA) */
.nav-controls {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
}

.control-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--icon-capsule-bg);
  border: 1px solid var(--icon-capsule-border);
  color: var(--icon-stroke);
  transition: all var(--duration-fast) var(--ease-expo);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}

.control-btn:hover {
  border-color: var(--glass-border-hover);
  color: var(--icon-stroke-hover);
  transform: translateY(-1px);
}

.control-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.5;
  stroke: currentColor;
  fill: none;
}

/* Botón Hamburguesa Móvil (Oculto en desktop) */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  padding: var(--space-xs);
  cursor: pointer;
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
}

/* Menú Móvil Desplegable (Estrictamente oculto en desktop) */
.mobile-nav-drawer {
  display: none;
}
