.navbar {
  background-color: #ffffff;
  min-height: 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 2px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navlinks {
  display: flex;
  align-items: center;
}

.navlink {
  color: #333333;
  text-decoration: none;
  padding: 14px 20px;
}

.navlink:hover {
  background-color: #f0f0f0;
  border-radius: 4px;
}

.navlink:active {
  font-weight: bold;
}

.nav-icon {
  color: #fe424d;
  font-size: 2rem;
}

.nav-toggle {
  display: none;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: #333333;
  display: block;
}

@media (max-width: 768px) {
  .navbar {
    flex-wrap: nowrap;
    align-items: center;
    position: sticky;
    overflow: visible;
  }

  .menu-toggle {
    display: flex;
  }

  .navlinks {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px);
    overflow: hidden;
    pointer-events: none;
    padding: 0 20px;
    gap: 0.15rem;
    transition:
      max-height 0.3s ease,
      opacity 0.25s ease,
      transform 0.3s ease,
      padding 0.3s ease;
  }

  .nav-toggle:checked ~ .navlinks {
    max-height: 320px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    padding: 0.5rem 20px 0.75rem;
  }

  .navlink {
    width: 100%;
    padding: 10px 8px;
  }
}
