/* ═══════════════════════════════════════
   Quanta Navbar — includes/navbar.css
   ═══════════════════════════════════════ */

/* ── Top navbar (all screens) ── */
.quanta-navbar {
  width: 100%;
  position: fixed;
  top: 0; left: 0; right: 0;
  background: transparent;
  font-family: var(--q-font, "Poppins", sans-serif);
  z-index: 1000;
  transition: background 0.32s ease, box-shadow 0.32s ease, backdrop-filter 0.32s ease;
  border-bottom: 1px solid transparent;
}

.quanta-navbar.scrolled {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(20,27,79,.08);
  border-bottom: 1px solid rgba(20,27,79,.06);
}

body.home-page .quanta-navbar.scrolled {
  background: rgba(255,255,255,.92);
}

.quanta-navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Logo */
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  margin-right: auto;
}

.nav-logo-badge {
  display: inline-block;
  background: linear-gradient(115deg, var(--q-royal, #3528d9) 0%, #5b4aed 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 10px;
  font-size: 1.05rem;
  box-shadow: 0 6px 18px rgba(53,40,217,.28);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.nav-logo-img {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--q-navy, #141b4f);
  line-height: 1;
}

.nav-logo:hover .nav-logo-img {
  transform: translateY(-1px);
  opacity: 0.9;
}

.nav-logo:hover .nav-logo-badge {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(53,40,217,.36);
}

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 28px);
}

.nav-links a {
  text-decoration: none;
  color: var(--q-navy, #141b4f);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.2s ease;
  padding: 4px 0;
}

.quanta-navbar:not(.scrolled) .nav-links a {
  color: var(--q-navy, #141b4f);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--q-accent, #e45b7c), var(--q-royal, #3528d9));
  border-radius: 2px;
  transition: width 0.24s ease;
}

.nav-links a:hover,
.nav-links a.active { color: var(--q-royal, #3528d9); }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Desktop CTA button */
.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: linear-gradient(105deg, var(--q-accent, #e45b7c), #c73d5f);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .04em;
  box-shadow: 0 4px 14px rgba(228,91,124,.32);
  transition: transform .2s ease, box-shadow .2s ease;
  white-space: nowrap;
  margin-left: 8px;
}

.nav-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(228,91,124,.44);
}

/* Hamburger — completely removed, bottom nav handles mobile menu */
.nav-toggle { display: none !important; }

/* Mobile animated enquire pill */
.nav-mobile-pill {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 10px;
  background: linear-gradient(105deg, var(--q-accent, #e45b7c), #c73d5f);
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .03em;
  box-shadow: 0 4px 14px rgba(228,91,124,.38);
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.nav-mobile-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(228,91,124,.5);
}

/* Animated pulse dot */
.nav-pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  position: relative;
}

.nav-pill-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  animation: pill-pulse 1.6s ease-out infinite;
}

@keyframes pill-pulse {
  0%   { transform: scale(1);   opacity: .7; }
  70%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ── Mobile bottom nav ── */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(20,27,79,.08);
  box-shadow: 0 -4px 24px rgba(20,27,79,.1);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
  align-items: stretch;
}

.mbn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--q-soft, #64748b);
  border-radius: 12px;
  transition: color 0.18s ease, background 0.18s ease;
  min-width: 0;
  position: relative;
}

.mbn-item.active,
.mbn-item:hover { color: var(--q-royal, #3528d9); }

.mbn-item.active { background: rgba(53,40,217,.07); }

.mbn-item--cta {
  color: var(--q-accent, #e45b7c);
}

.mbn-item--cta.active,
.mbn-item--cta:hover { color: #c73d5f; background: rgba(228,91,124,.08); }

.mbn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  position: relative;
}

.mbn-item.active .mbn-icon::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 10px;
  background: rgba(53,40,217,.1);
}

.mbn-item--cta.active .mbn-icon::before {
  background: rgba(228,91,124,.12);
}

.mbn-label {
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  /* Hide desktop links and CTA */
  .nav-links { display: none; }
  .nav-cta-btn { display: none; }

  /* Show animated pill */
  .nav-mobile-pill { display: flex; }

  /* Show bottom nav */
  .mobile-bottom-nav { display: flex; }

  /* Bottom padding so content isn't hidden behind bottom nav */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }

  .quanta-navbar-inner { padding: 10px 16px; }
}

/* Desktop: show links, hide bottom nav and pill */
@media (min-width: 769px) {
  .mobile-bottom-nav { display: none !important; }
  .nav-mobile-pill { display: none !important; }
  body { padding-bottom: 0; }
}

/* ── User dropdown (logged in) ── */
.nav-user-wrap {
  position: relative;
}

.nav-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 5px;
  background: rgba(255,255,255,.9);
  border: 1.5px solid rgba(20,27,79,.1);
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--q-font, "Poppins", sans-serif);
  font-size: .82rem;
  font-weight: 600;
  color: var(--q-navy, #141b4f);
  transition: border-color .2s ease, box-shadow .2s ease;
  box-shadow: 0 2px 8px rgba(20,27,79,.06);
}

.nav-user-btn:hover,
.nav-user-btn[aria-expanded="true"] {
  border-color: rgba(53,40,217,.3);
  box-shadow: 0 4px 14px rgba(20,27,79,.1);
}

.nav-user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-user-initial {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--q-navy-l, #1e2766), var(--q-royal, #3528d9));
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-user-name {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-chevron {
  color: var(--q-muted, #64748b);
  transition: transform .22s ease;
  flex-shrink: 0;
}

.nav-user-btn[aria-expanded="true"] .nav-user-chevron {
  transform: rotate(180deg);
}

/* Dropdown menu */
.nav-user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid rgba(20,27,79,.08);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(20,27,79,.14);
  overflow: hidden;
  z-index: 2000;
  animation: dropdown-in .18s ease;
}

.nav-user-dropdown.open { display: block; }

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-user-dropdown-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(20,27,79,.06);
}

.nav-dropdown-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--q-navy, #141b4f);
}

.nav-dropdown-email {
  font-size: .76rem;
  color: var(--q-muted, #64748b);
  margin-top: 2px;
  word-break: break-all;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--q-ink, #0f172a);
  text-decoration: none;
  transition: background .15s ease;
}

.nav-dropdown-item:hover { background: #f8fafc; }

.nav-dropdown-item--danger { color: #dc2626; }
.nav-dropdown-item--danger:hover { background: #fee2e2; }

.nav-dropdown-divider {
  height: 1px;
  background: rgba(20,27,79,.06);
  margin: 4px 0;
}
