/* ════════════════════════════════════════
   NAVBAR
════════════════════════════════════════ */
.navbar {
  /* 3-column grid: logo | nav (centered) | buttons — equal side columns keep nav truly centered */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 48px;
  background: #000;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}

.navbar .logo {
  font-family: "Anton", sans-serif;
  font-size: 1.4rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: 2px;
  flex-shrink: 0;
}

.navbar nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.navbar nav a {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s;
  white-space: nowrap;
}

.navbar nav a:hover {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-self: end; /* push buttons to the right edge of the third column */
  flex-shrink: 0;
}

.btn-nav {
  padding: 8px 18px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
  white-space: nowrap;
}

.btn-nav-outline {
  background: transparent;
  border: 1.5px solid #fff;
  color: #fff;
}
.btn-nav-outline:hover {
  background: #fff;
  color: #000;
}
.btn-nav-primary {
  background: var(--primary);
  color: #fff;
}
.btn-nav-primary:hover {
  background: var(--primary-dark);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: #111;
  padding: 16px 24px 24px;
  /* fixed keeps the drawer locked below the navbar regardless of scroll position */
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 12px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s;
}

.mobile-nav a:hover {
  color: var(--primary);
}
.mobile-nav a:last-child {
  border-bottom: none;
}
.mobile-nav-logout {
  color: #ff6666;
}
.mobile-nav-register {
  color: var(--primary);
}

@media (max-width: 768px) {
  /* On mobile: 2-column grid — logo left, hamburger right */
  .navbar {
    padding: 14px 20px;
    grid-template-columns: 1fr auto;
  }
  .navbar nav {
    display: none;
  }
  .nav-actions {
    display: none;
  }
  .hamburger {
    display: flex;
    justify-self: end;
  }
}
