/* ═══════════════════════════════════════════════════════════════
   nav.css — Bulivard Hub  unified navbar
   Load this after each page's own CSS on every page.
   Replaces nav-mobile.css — includes desktop + mobile styles.
   ═══════════════════════════════════════════════════════════════ */

/* ── Shell ──────────────────────────────────────────────────── */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  margin: 1.25rem auto;
  max-width: 1280px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 1rem;
  z-index: 999;
  transition: background 0.3s ease, border-color 0.3s ease;
}

body.light .navbar {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

/* ── Logo ───────────────────────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
  transition: filter 0.3s ease;
}

body.light .logo img { filter: none; }
body.dark  .logo img { filter: invert(1); }

/* ── Nav-left wrapper (home page) ───────────────────────────── */
.nav-left { display: flex; align-items: center; }

/* ── Pill row ───────────────────────────────────────────────── */
.nav-center {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  justify-content: center;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-pill {
  text-decoration: none;
  color: inherit;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.58;
  white-space: nowrap;
  transition: opacity 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav-pill:hover {
  opacity: 0.9;
  background: rgba(255, 255, 255, 0.09);
}

body.light .nav-pill:hover {
  background: rgba(0, 0, 0, 0.05);
  opacity: 0.9;
}

/* Active state — unmistakably shows the current page */
.nav-pill.active {
  opacity: 1;
  color: #ff3b3b;
  background: rgba(255, 59, 59, 0.12);
}

body.light .nav-pill.active {
  background: rgba(255, 59, 59, 0.1);
  color: #ff3b3b;
}

/* ── Right slot ─────────────────────────────────────────────── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* ── Sign-out button ────────────────────────────────────────── */
.sign-out-btn {
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

body.light .sign-out-btn {
  border-color: rgba(0, 0, 0, 0.12);
}

.sign-out-btn:hover {
  background: rgba(255, 59, 59, 0.1);
  border-color: rgba(255, 59, 59, 0.35);
  color: #ff3b3b;
}

/* ── Theme toggle ───────────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 50%;
  transition: background 0.18s ease;
}

.theme-toggle:hover         { background: rgba(255, 255, 255, 0.1); }
body.light .theme-toggle:hover { background: rgba(0, 0, 0, 0.06); }

.theme-toggle img {
  width: 22px;
  height: 22px;
  display: block;
  transition: filter 0.3s ease;
}

body.light .theme-toggle img { filter: brightness(0.25); }
body.dark  .theme-toggle img { filter: none; }

/* ── Utility ────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   MOBILE  (≤ 768px)
   Non-sticky so it scrolls away — more screen room for content.
   Pills become a single horizontally-scrollable row.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar {
    position: static;
    top: unset;
    margin: 0.5rem auto 0;
    padding: 0.6rem 0.85rem;
    border-radius: 16px;
    gap: 0.35rem;
    flex-wrap: nowrap;
  }

  .logo img { height: 32px; }

  .nav-center {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-center::-webkit-scrollbar { display: none; }

  .nav-pill {
    font-size: 0.78rem;
    padding: 0.38rem 0.65rem;
    flex-shrink: 0;
  }

  .nav-right { gap: 0.3rem; }

  .sign-out-btn {
    font-size: 0.72rem;
    padding: 0.33rem 0.58rem;
  }

  .theme-toggle img { width: 20px; height: 20px; }
}
