.navbar {
  justify-content: space-evenly;
  background-color: var(--nav);
  align-items: center;
  height: 40px;
  width: 100%;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  z-index: 99;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-shadow {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

a.nav-links {
  color: var(--nav-link);
  transition: all 0.2s ease;
}

a.nav-links:link,
a.nav-links:visited {
  text-decoration: none;
  color: var(--nav-link);
  position: relative;
  padding: 7px 16px 7px 16px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

a.nav-links:hover {
  color: #000000;
  background-color: rgba(255, 255, 255, 0.3);
}

a.nav-links::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: #096a2e;
  bottom: 0;
  left: 0;
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px 2px 0 0;
}

a.nav-links:hover::after {
  transform: scaleX(1);
}

a.nav-links.selected {
  color: #000000;
  background-color: rgba(255, 255, 255, 0.3);
  font-weight: 600;
}

a.nav-links.selected::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 3px;
  background: #096a2e;
  bottom: 0;
  left: 0;
  transform: scaleX(1);
  border-radius: 2px 2px 0 0;
}

/* Responsive styles for navbar */
@media (max-width: 1024px) {
  .navbar {
    top: 64px;
    height: 40px;
    justify-content: space-around;
  }

  a.nav-links:link,
  a.nav-links:visited {
    padding: 7px 12px;
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .navbar {
    top: 88px;
    height: 36px;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 16px;
    white-space: nowrap;
  }

  .navbar::-webkit-scrollbar {
    height: 4px;
  }

  .navbar::-webkit-scrollbar-track {
    background: transparent;
  }

  .navbar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
  }

  a.nav-links:link,
  a.nav-links:visited {
    padding: 6px 12px;
    font-size: 14px;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .navbar {
    height: 32px;
    padding: 0 12px;
    gap: 4px;
  }

  a.nav-links:link,
  a.nav-links:visited {
    padding: 5px 10px;
    font-size: 13px;
  }

  a.nav-links::after {
    height: 2px;
  }

  a.nav-links.selected::after {
    height: 2px;
  }
}