header {
  background-color: var(--color-bg);
  border-bottom: 1px solid #eaeaea;
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 2rem;
  z-index: 999;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--color-nav-text);
  font-weight: bold;
  padding: 0.5rem 1rem; /* Keeping padding consistent to avoid layout shifts */
  border-radius: 8px; /* Rounded corners */
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

nav a:hover {
  background-color: #d7f1ff; /* Light grey background color for hover effect */
  color: var(--color-primary); /* Change text color on hover */
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.burger-menu-toggle {
  display: none;
  margin: 0.75m;
  position: relative; /* or absolute/fixed if needed */
  z-index: 1000; /* makes sure it stays on top */
}

.menu-icon {
  width: 30px;
  height: auto;
  cursor: pointer;
}

@media (max-width: 768px) {
  .burger-menu-toggle {
    display: block;
    position: relative; /* ensure it's isolated from nav */
  }

  nav {
    position: absolute; /* now it overlays content */
    top: 60px; /* adjust based on icon size and spacing */
    right: 10px;
    width: 50%;
    display: none;
    flex-direction: column;
    text-align: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    padding: 1rem;
    border-radius: 12px;
    z-index: 999;
  }

  nav a {
    margin: 1rem 0;
    text-decoration: none;
    width: 90%;
    display: block;
    text-align: center;
    border-radius: 8px;
    padding: 0.5rem 0.5rem;
    box-sizing: border-box;
  }

  nav a:hover {
    color: var(--color-primary);
  }

  nav.active {
    display: flex;
  }
}
