/* ── Navbar — AI Velocity shared styles ─────────────────────────────────────
   Used by pages that load /components/navigation.html dynamically.
   --------------------------------------------------------------------------- */

.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(4, 9, 17, 0.96);
  border-bottom: 1px solid var(--border, rgba(42, 92, 179, 0.2));
  backdrop-filter: blur(8px);
}
.navbar-signal-line {
  height: 3px;
  background: var(--theme-color, var(--accent, #2A5CB3));
}
.nav-container {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.nav-brand-lockup { display: flex; align-items: baseline; gap: 4px; text-decoration: none; }
.nav-brand-name { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 1rem; color: #fff; letter-spacing: 1px; }
.nav-brand-fund { font-family: 'Inter', sans-serif; font-size: 0.7rem; color: var(--text-secondary, #A0ABBE); letter-spacing: 2px; text-transform: uppercase; }

/* ── Desktop dropdowns ── */
.nav-menu { display: flex; align-items: center; gap: 0.25rem; }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; font-family: 'Inter', sans-serif; font-size: 0.875rem; font-weight: 500; color: #A0ABBE; background: none; border: none; cursor: pointer; letter-spacing: 0.02em; transition: color 0.15s; }
.nav-dropdown-toggle:hover { color: #ffffff; }
.nav-dropdown-icon { transition: transform 0.15s; opacity: 0.5; }
.nav-dropdown-menu { position: absolute; top: calc(100% + 0.5rem); left: 0; min-width: 210px; background-color: #0D1525; border: 1px solid rgba(42, 92, 179, 0.25); border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,0.4); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.15s, visibility 0.15s, transform 0.15s; z-index: 200; }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown:hover .nav-dropdown-icon { transform: rotate(180deg); opacity: 1; }
.nav-dropdown-link { display: block; padding: 0.65rem 1rem; font-family: 'Inter', sans-serif; font-size: 0.875rem; color: #A0ABBE; text-decoration: none; transition: background 0.12s, color 0.12s; }
.nav-dropdown-link:hover { color: #ffffff; background-color: rgba(42, 92, 179, 0.1); }
.nav-dropdown-link:first-child { border-radius: 8px 8px 0 0; }
.nav-dropdown-link:last-child  { border-radius: 0 0 8px 8px; }

/* ── Auth button ── */
.nav-auth-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.38rem 0.85rem; border-radius: 7px; font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.2px; text-decoration: none; transition: background 0.2s, color 0.2s, border-color 0.2s; white-space: nowrap; margin-left: 0.5rem; flex-shrink: 0; }
.nav-auth-login { border: 1px solid rgba(42, 92, 179, 0.5); color: #A0ABBE; background: transparent; }
.nav-auth-login:hover { border-color: #2A5CB3; color: #fff; background: rgba(42, 92, 179, 0.12); }
.nav-auth-logout { border: 1px solid rgba(239, 68, 68, 0.35); color: #fca5a5; background: transparent; }
.nav-auth-logout:hover { border-color: rgba(239, 68, 68, 0.7); color: #fff; background: rgba(239, 68, 68, 0.1); }

/* ── Hamburger toggle ── */
.nav-toggle { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; padding: 0; }
.nav-toggle-line { display: block; width: 22px; height: 2px; background-color: #ffffff; border-radius: 2px; transition: all 0.25s; }

/* ── Mobile nav ── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-auth-btn { display: none; }
  .nav-menu {
    position: fixed; top: 0; right: -100%;
    width: min(300px, 85vw); height: 100vh;
    background-color: #0D1525;
    border-left: 1px solid rgba(42, 92, 179, 0.25);
    flex-direction: column; align-items: stretch; gap: 0;
    padding-bottom: 1.5rem;
    transition: right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto; z-index: 190;
  }
  .nav-menu.active { right: 0; box-shadow: -8px 0 32px rgba(0,0,0,0.5); }
  .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 1rem 1.5rem; font-size: 1rem; border-bottom: 1px solid rgba(42, 92, 179, 0.12); min-height: 48px; }
  .nav-dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; border-radius: 0; background-color: rgba(0,0,0,0.2); max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
  .nav-dropdown:hover .nav-dropdown-menu { max-height: 0; }
  .nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown-menu { max-height: 1000px; }
  .nav-dropdown-toggle[aria-expanded="true"] .nav-dropdown-icon { transform: rotate(180deg); }
  .nav-dropdown-link { padding: 0.7rem 1.5rem 0.7rem 2.5rem; font-size: 0.875rem; border-bottom: 1px solid rgba(255,255,255,0.04); min-height: 44px; display: flex; align-items: center; }
  .nav-dropdown-link:last-child { border-bottom: 1px solid rgba(42,92,179,0.12); }
}
