/* ============================================================
   DarijaAI — navbar.css
   Unified navbar — dark/light compatible
   ============================================================ */

/* ── Nav Shell ──────────────────────────────────────────────── */
#da-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: var(--bg-nav);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid var(--border-nav);
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Top glow line */
#da-nav::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(124,58,237,0.7) 30%,
    rgba(236,72,153,0.7) 70%,
    transparent 100%
  );
}

#da-nav.scrolled {
  background: var(--bg-nav-solid);
  border-bottom-color: rgba(167,139,250,0.18);
}

/* ── Logo ───────────────────────────────────────────────────── */
.nv-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex-shrink: 0;
}

.nv-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--grad-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex-shrink: 0;
  box-shadow: 0 2px 14px rgba(124,58,237,0.4);
}

.nv-da {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #fff;
  line-height: 1;
}

.nv-sep {
  width: 18px;
  height: 1px;
  background: rgba(255,255,255,0.5);
}

.nv-ai {
  font-size: 6px;
  font-weight: 700;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.75);
}

.nv-brand {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.nv-brand span {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Center pill links ──────────────────────────────────────── */
.nv-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1px;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 4px;
}

[data-theme="light"] .nv-links {
  background: rgba(0,0,0,0.04);
}

.nv-links a {
  color: var(--text-4);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 13px;
  border-radius: 9px;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.nv-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.07);
}

[data-theme="light"] .nv-links a:hover {
  background: rgba(0,0,0,0.05);
}

.nv-links a.active {
  color: var(--text);
  font-weight: 600;
  background: rgba(124,58,237,0.2);
  box-shadow: 0 0 0 1px rgba(167,139,250,0.3);
}

[data-theme="light"] .nv-links a.active {
  background: rgba(124,58,237,0.12);
  box-shadow: 0 0 0 1px rgba(124,58,237,0.25);
}

/* ── Right group ────────────────────────────────────────────── */
.nv-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Social icons */
.nv-social {
  display: flex;
  gap: 5px;
  align-items: center;
}

.nv-social a {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  text-decoration: none;
}

.nv-social a:hover {
  background: rgba(167,139,250,0.15);
  border-color: rgba(167,139,250,0.35);
}

.nv-social svg {
  width: 13px;
  height: 13px;
  fill: var(--text-4);
  transition: fill 0.18s ease;
}

.nv-social a:hover svg { fill: var(--c-purple-l); }

/* Theme toggle */
.nv-theme {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.nv-theme:hover {
  background: rgba(167,139,250,0.15);
  border-color: rgba(167,139,250,0.35);
}

/* Login */
.nv-login {
  color: var(--text-3);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 7px 15px;
  border-radius: 9px;
  border: 1px solid var(--border);
  transition: all 0.18s ease;
  white-space: nowrap;
}

.nv-login:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--bg-btn);
}

/* CTA */
.nv-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--grad-main);
  color: #fff !important;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-cta);
}

.nv-cta:hover {
  box-shadow: var(--shadow-cta-h);
  transform: translateY(-1px);
}

/* ── Hamburger ──────────────────────────────────────────────── */
.nv-ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
  margin-left: 4px;
  flex-shrink: 0;
}

.nv-ham span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  display: block;
  transition: all 0.25s ease;
}

.nv-ham.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nv-ham.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nv-ham.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Dropdown ────────────────────────────────────────── */
.nv-drop {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: var(--bg-drop);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-nav);
  z-index: 999;
  flex-direction: column;
  padding: 8px 0 16px;
}

.nv-drop.open { display: flex; }

.nv-drop a {
  color: var(--c-purple-l);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 20px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: all 0.15s ease;
}

[data-theme="light"] .nv-drop a { color: var(--c-purple); }

.nv-drop a:hover,
.nv-drop a.active {
  color: var(--text);
  background: rgba(124,58,237,0.1);
}

.nv-drop-social {
  display: flex;
  gap: 10px;
  padding: 14px 20px 6px;
}

.nv-drop-social a {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0;
}

.nv-drop-social a:hover {
  background: rgba(167,139,250,0.1);
  border-color: rgba(167,139,250,0.3);
}

.nv-drop-social svg {
  width: 16px;
  height: 16px;
  fill: var(--text-3);
}

.nv-drop-cta {
  margin: 10px 16px 0;
  padding: 14px;
  text-align: center;
  background: var(--grad-main);
  color: #fff !important;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  display: block;
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  #da-nav { padding: 0 16px; }
  .nv-links,
  .nv-social,
  .nv-login,
  .nv-cta { display: none !important; }
  .nv-ham { display: flex; }
}

@media (min-width: 901px) {
  .nv-drop { display: none !important; }
}