.nav_div {
  max-width: 30px;
  padding-top: 12px;
  padding-bottom: 12px;
  margin-top: 3px;
  cursor: pointer;
}

/* Hamburger icon base styles */
.nav_div .cd-menu-icon {
  height: 3px;
  background-color: #212121;
  transition: background-color 0.3s;
  position: relative;
  border-radius: 50px;
  width: 30px;
}

/* Create the top and bottom lines using pseudo-elements */
.nav_div .cd-menu-icon::before,
.nav_div .cd-menu-icon::after {
  content: '';
  position: absolute;
  height: 3px;
  background-color: #212121;
  border-radius: 50px;
  transition: transform 0.3s, top 0.3s;
  width: 30px;
  left: 0;
}

.nav_div .cd-menu-icon::before {
  top: -8px;
}

.nav_div .cd-menu-icon::after {
  top: 8px; /* Changed from bottom to top for better control */
}

/* Animation when clicked - transforms into X */
.nav_div.is-clicked .cd-menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.nav_div.is-clicked .cd-menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav_div.is-clicked .cd-menu-icon {
  background: transparent !important;
}