/* ============================================================
   Shared site nav
   Mobile:  brand LEFT (logo in glass circle), hamburger RIGHT
   Desktop: brand LEFT, links + auth RIGHT
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 6.4rem;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.07);
}

.nav-container {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: 130rem;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Brand — always on the left ── */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  flex-shrink: 0;
}

/* Glassmorphism circle container for logo */
.nav-logo-circle {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(37, 99, 235, 0.22);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.14), 0 0 0 3px rgba(37, 99, 235, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: box-shadow 0.22s, transform 0.22s;
}

.nav-brand:hover .nav-logo-circle {
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.26), 0 0 0 5px rgba(37, 99, 235, 0.1);
  transform: scale(1.04);
}

.nav-logo {
  height: 2.8rem;
  width: auto;
}

.nav-brand-name {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 0.04em;
  font-family: 'Poppins', Arial, sans-serif;
}

/* ── Hamburger — mobile only, pushed to far right ── */
.nav-hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.8rem;
  display: flex;
  align-items: center;
  color: #374151;
  border-radius: 1rem;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  margin-left: auto;
}
.nav-hamburger:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-primary);
}

/* ── Mobile slide-down panel ── */
.nav-links-wrap {
  position: fixed;
  top: 6.4rem;
  left: 0; right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  padding: 0.8rem 2rem 2.4rem;
  gap: 0;
  z-index: 199;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.8rem);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links-wrap.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-link {
  text-decoration: none;
  color: #374151;
  font-size: 1.6rem;
  font-weight: 500;
  padding: 1.4rem 0.6rem;
  border-bottom: 1px solid #f3f4f6;
  transition: color 0.2s, padding-left 0.2s;
  font-family: 'Poppins', Arial, sans-serif;
}
.nav-link:last-of-type { border-bottom: none; }
.nav-link:hover { color: var(--color-primary); padding-left: 1.2rem; }
.nav-link:active,
.nav-link.pressed {
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-radius: 0.8rem;
}
.nav-link.active { color: var(--color-primary); font-weight: 600; }

/* ── Mobile auth — polished pill buttons inside slide-down ── */
.nav-mobile-auth {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #f3f4f6;
}

.nav-mobile-auth .nav-btn-login {
  display: block;
  text-align: center;
  padding: 1.1rem 2rem;
  font-size: 1.5rem;
  font-weight: 600;
  font-family: 'Poppins', Arial, sans-serif;
  border: 2px solid var(--color-primary);
  border-radius: 9999px;
  color: var(--color-primary);
  text-decoration: none;
  transition: background 0.18s;
}
.nav-mobile-auth .nav-btn-login:hover {
  background: rgba(37, 99, 235, 0.06);
  opacity: 1;
}

.nav-mobile-auth .nav-btn-signup {
  display: block;
  text-align: center;
  padding: 1.1rem 2rem;
  font-size: 1.5rem;
}

/* ── Auth buttons base styles ── */
.nav-btn-login {
  text-decoration: none;
  color: var(--color-primary);
  font-size: 1.4rem;
  font-weight: 600;
  font-family: 'Poppins', Arial, sans-serif;
  transition: opacity 0.15s;
}
.nav-btn-login:hover { opacity: 0.75; }

.nav-btn-signup {
  text-decoration: none;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-size: 1.4rem;
  font-weight: 600;
  font-family: 'Poppins', Arial, sans-serif;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
}
.nav-btn-signup:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.32);
}

/* Auth desktop — hidden on mobile */
.nav-auth-desktop { display: none; }

/* ── Dark overlay behind mobile menu ── */
.nav-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 198;
  backdrop-filter: blur(2px);
}
.nav-mobile-overlay.show { display: block; }

/* ── Desktop (≥768px) ── */
@media (min-width: 768px) {
  .nav-links-wrap {
    position: static;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    flex-direction: row;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    gap: 3.2rem;
    box-shadow: none;
    border: none;
    align-items: center;
    z-index: auto;
    margin-left: auto;
  }

  .nav-link {
    font-size: 1.45rem;
    padding: 0;
    border: none;
  }
  .nav-link:hover { padding-left: 0; }

  .nav-mobile-auth { display: none; }
  .nav-auth-desktop {
    display: flex;
    align-items: center;
    gap: 1.4rem;
  }
  .nav-hamburger { display: none; }

  .nav-brand-name { font-size: 2.4rem; }
  .nav-logo-circle {
    width: 4.8rem;
    height: 4.8rem;
  }
  .nav-logo { height: 3.2rem; }
}
