/* ═══════════════════════════════════════════════════════════
   RepublicMC — Navigation Component
   ═══════════════════════════════════════════════════════════ */

/* ── Nav Links ──────────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.nav-links a {
  position: relative;
  padding: 8px 12px;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 150ms var(--ease), background 150ms var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--bg-soft);
}

.nav-links a[aria-current="page"] {
  font-weight: 600;
}

/* ── Nav Call to Action ─────────────────────────────────── */
.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Online Status Badge ────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: var(--glass-border);
  box-shadow: var(--glass-highlight);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

/* ── Mobile Hamburger Toggle ────────────────────────────── */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  transition: background 150ms var(--ease), border-color 150ms var(--ease);
}

.nav-toggle:hover {
  background: var(--bg-soft);
  border-color: var(--border-strong);
}

/* ── Responsive Navigation ──────────────────────────────── */
@media (max-width: 820px) {
  body.nav-open {
    overflow: hidden;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    margin-left: auto;
    background: #ffffff;
    border: 1px solid #d0dce7;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible {
    background: #f1f5f9;
    border-color: #cbd5e1;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    width: auto;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid #d0dce7;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.06);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: grid;
    gap: 6px;
    max-height: min(70svh, 560px);
    overflow: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
    transition: opacity 160ms var(--ease), transform 160ms var(--ease), visibility 0s linear 160ms;
    z-index: 1200;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
  }

  .nav-links a {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 500;
    transition: background 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease);
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--accent-dark);
  }

  .nav-links a[aria-current="page"] {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(14, 165, 201, 0.25);
  }

  .nav-cta {
    display: none;
  }
}

