/* Navbar Styles */
:root {
  --navbar-height: 64px;
  --navbar-bg: rgba(255, 255, 255, 0.85);
  --navbar-backdrop-blur: 12px;
  --navbar-border: 1px solid rgba(226, 232, 240, 0.8);
  --navbar-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--navbar-height);
  background-color: var(--navbar-bg);
  backdrop-filter: blur(var(--navbar-backdrop-blur));
  -webkit-backdrop-filter: blur(var(--navbar-backdrop-blur));
  border-bottom: var(--navbar-border);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 100%; /* Extended to edges */
  margin: 0 auto;
  padding: 0 2rem; /* Increased padding for better edge spacing */
  height: 100%;
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Changed from space-between */
  gap: 3rem; /* Add space between logo and links */
  height: 100%;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  text-decoration: none;
  transition: opacity 0.2s;
  margin-right: auto; /* Pushes everything else to the right if needed, but we want links left */
  margin-right: 0; /* Reset */
}

.logo:hover {
  opacity: 0.8;
  text-decoration: none;
}

.logo img {
  height: 32px;
  width: auto;
}

/* Navigation Links */
.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1; /* Take remaining space */
  justify-content: space-between; /* Push auth buttons to end */
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--primary-color);
  background-color: rgba(37, 99, 235, 0.05);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--primary-color);
  background-color: rgba(37, 99, 235, 0.1);
  font-weight: 600;
}

/* Auth Buttons in Nav */
.nav-auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border-color);
}

.nav-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
}

.nav-btn-login {
  color: var(--text-main);
  background-color: transparent;
}

.nav-btn-login:hover {
  background-color: rgba(0, 0, 0, 0.05);
  text-decoration: none;
  color: var(--text-main);
}

.nav-btn-register {
  background-color: var(--primary-color);
  color: white;
}

.nav-btn-register:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background-color: var(--card-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 1.5rem 2rem;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 1.5rem;
  }

  .nav-wrapper.open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.5rem;
  }

  .nav-links a {
    width: 100%;
    padding: 0.75rem;
  }

  .nav-auth-buttons {
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 1rem 0 0;
    border-left: none;
    border-top: 1px solid var(--border-color);
    gap: 0.75rem;
  }

  .nav-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  
  /* Hamburger animation */
  .menu-toggle.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}
