.top-nav {
  position: fixed;         
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  z-index: 1000;
  backdrop-filter: blur(6px);
  padding: 0.55rem 0.55rem;
}

.nav-container {
  max-width: none;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: bold;
  font-size: 1.2rem;
  text-decoration: none;
  color: #fff;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #5096d3;          
}

.menu-toggle {
  display: none; /* Hidden by default on large screens */
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* --- Mobile Navigation Overrides --- */
@media (max-width: 768px) {
  /* Show the menu button and hide the links by default */
  .nav-container {
    padding: 0.75rem 1rem; 
  }

  .menu-toggle {
    display: block; 
  }

  .nav-links {
    /* Menu is initially hidden, covers the whole screen width below the logo */
    display: none; 
    flex-direction: column; 
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95); 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
  }
  
  /* Styles the links when they are visible */
  .nav-links.open {
    display: flex; 
  }

  .nav-links li {
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links a {
    display: block; 
    padding: 1rem;
    font-size: 1.1rem;
  }
  
  /* Prevent links from showing up next to logo on mobile */
  .nav-container .nav-links {
    gap: 0; 
  }
  
  .logo {
      font-size: 1.1rem;
  }
}

