/* ================================================================
   Navbar Styles
   ================================================================ */
nav {
  width: auto;
}
/* Navbar container */
.navbar {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
  background: none;
  box-shadow: none;
  -webkit-box-shdow: none;
  height: auto;
}

/* Navbar List Styling */
.navbar-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Navbar item link styling */
.navbar-list li a {
  text-decoration: none;
  color: black;
  font-size: 0.8rem;
  font-weight: 300;
  text-transform: uppercase;
  font-family: "Lexend Zetta", sans-serif;
  padding: 5px;
  display: block;
  position: relative;
  transition: none;
}

.navbar-list li {
  line-height: normal;
}

.navbar-list li a:hover {
  background: none;
}

/* Change text color for items in a specific page (main-id-50) */
.dark .navbar-list li a {
  color: #f5e813;
}

/* Add underline effect on hover for non-current items */
.navbar-list li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 1px;
  background-color: black;
  transform: scaleX(1);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out, width 0.3s ease-out;
}

.navbar-list li a:not(.current)::after {
  transform: scaleX(0);
}

.navbar-list li a.current::after {
  width: 100%; /* Full width underline for the active link */
  transform: scaleX(1); /* Make the underline visible */
  transform-origin: bottom left; /* Make the underline grow from left to right */
  background-color: black; /* Underline color for the active item */
}
/* Add underline effect for the active (current) item */
.dark .navbar-list li a.current::after {
  width: 100%; /* Full width underline for the active link */
  transform: scaleX(1); /* Make the underline visible */
  transform-origin: bottom left; /* Make the underline grow from left to right */
  background-color: #f5e813; /* Underline color for the active item */
}

/* Hover effect for any link */
.navbar-list li a:hover::after {
  width: 100%;
  transform: scaleX(1);
  transform-origin: bottom left;
  background-color: black;
}

.dark .navbar-list li a:hover::after {
  background-color: #f5e813;
}

/* Hamburger Icon Styling */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  justify-content: center;
  align-items: center;
  z-index: 20;
}

.hamburger .bar {
  width: 30px;
  height: 4px;
  background-color: black;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.dark nav .hamburger .bar {
  background-color: #f5e813;
}

.hamburger.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Show hamburger icon on mobile */
@media (max-width: 930px) {
  .navbar {
    width: 100%; /* Make navbar full-width */
    padding: 0 20px; /* Add padding to the sides */
    display: flex;
    justify-content: space-between; /* Space between hamburger and navbar-list */
    align-items: center;
    right: 0;
  }

  .hamburger {
    display: flex; /* Show hamburger icon */
    margin-left: auto; /* Align it to the right */
  }

  .navbar-list {
    display: none; /* Hide menu items by default */
    flex-direction: column;
    align-items: center; /* Center items horizontally */
    position: absolute;
    top: 100px; /* Space below navbar */
    left: 0; /* Align to the left for full-width */
    width: 100%; /* Full-width menu */
    background-color: black;
    padding: 20px 20px; /* Add padding to center content */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center; /* Center align menu items */
  }

  .navbar-list.active {
    display: flex; /* Show menu when active */
  }

  .navbar-list li {
    margin: 15px 0;
  }

  .navbar-list li a {
    color: white;
    padding: 10px 20px; /* Add padding around text to push it inward */
  }
}

/* Navbar container (large screens) */
@media (min-width: 931px) {
  .navbar-list {
    display: flex;
  }

  .navbar-list li {
    margin: 0 10px;
  }

  .navbar-list li a {
    color: black;
  }
}
