/* ══════════════════════════════════════════════════════════
   nav.css — Unified navbar styles (landing + portal + demos)
   ══════════════════════════════════════════════════════════ */

/* ── Navbar shell ── */
.nav-bar {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(226,232,240,0.6);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.nav-bar.scrolled {
  background: rgba(255,255,255,0.95);
  box-shadow: 0 4px 30px rgba(0,0,0,0.08);
}

/* ── Container ── */
.nav-container {
  max-width: 1200px;
  margin: auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
}

/* ── Brand ── */
.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}
.brand-group img {
  display: block;
  height: 48px;
  width: auto;
  transition: transform 0.2s ease;
}
.brand-group:hover img {
  transform: scale(1.03);
}
.brand-text {
  font-weight: 700;
  color: var(--brand);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

/* ── Right panel (menu + actions) ── */
.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}

/* ── Menu links ── */
.nav-menu {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}
.nav-link {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}
.nav-link:hover {
  color: var(--brand);
  text-decoration: none;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2, #8b5cf6));
  transition: width 0.3s ease;
  border-radius: 2px;
}
.nav-link:hover::after {
  width: 100%;
}

/* ── Actions (CTA + lang) ── */
.nav-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-nav-account-slot {
  display: inline-flex;
  align-items: center;
}

/* ── CTA button ── */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius) !important;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  border: none;
  box-shadow: 0 4px 15px rgba(59,130,246,0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59,130,246,0.4);
  text-decoration: none;
}
.cta:hover::after {
  transform: translateX(100%);
}
.cta.nav {
  padding: 8px 14px;
}

/* ── Language switcher ── */
.nav-lang-switcher {
  display: inline-flex;
  align-items: center !important;
  gap: 0;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  cursor: pointer;
  transition: color 0.2s ease;
}
.nav-lang-switcher:hover {
  color: var(--accent, #3b82f6);
}
.nav-lang-select {
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  outline: none;
  cursor: pointer;
  padding: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none;
}
.nav-lang-select:focus {
  outline: none;
  box-shadow: none;
}

/* ── Version badge ── */
.version-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(59,130,246,0.08);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(59,130,246,0.2);
  white-space: nowrap;
}

/* ── Hamburger button (hidden on desktop) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 110;
  margin-left: auto;
}
.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brand, #0f172a);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.is-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile responsive ── */
@media (max-width: 920px) {
  .nav-hamburger {
    display: flex;
  }
  .nav-right {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    order: 3;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(226,232,240,0.6);
    padding: 16px 24px 20px;
    animation: navSlideDown 0.25s ease-out;
  }
  .nav-right.is-open {
    display: flex;
  }
  .nav-container {
    flex-wrap: wrap;
    align-items: center;
  }
  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }
  .nav-link {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(226,232,240,0.6);
    font-size: 0.95rem;
  }
  .nav-link::after {
    display: none;
  }
  .nav-actions {
    margin-top: 12px;
    width: 100%;
    justify-content: flex-start;
    gap: 14px;
  }
  .brand-group img {
    height: 36px;
  }
  .cta.nav {
    width: 100%;
    text-align: center;
    padding: 12px 14px;
  }
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
