/* ------------------------------ */
/* Hamburger Icon (Improved)     */
/* ------------------------------ */
.hamburger-icon {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  width: 26px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 3000;
  -webkit-transition: -webkit-transform 0.25s ease;
  transition: -webkit-transform 0.25s ease;
  transition: transform 0.25s ease;
  transition: transform 0.25s ease, -webkit-transform 0.25s ease;
}

.hamburger-icon span {
  width: 100%;
  height: 2.5px;
  background: #beb3b3;
  border-radius: 100px;
  -webkit-transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Click feedback */
.hamburger-icon:active {
  -webkit-transform: scale(0.9);
          transform: scale(0.9);
}

/* Hover */
.hamburger-icon:hover span {
  background: #888;
}



/* ------------------------------ */
/* Mobile Menu (Improved Sidebar) */
/* ------------------------------ */
#mobile-menu {
  position: fixed;
  top: 0;
  right: -100%; /* Start off-screen to the right */
  height: 100vh; /* Full viewport height */
  width: min(85%, 320px); /* Sidebar width, responsive */
  background: #1e293b;
  -webkit-box-shadow: -6px 0 20px rgba(0, 0, 0, 0.25);
          box-shadow: -6px 0 20px rgba(0, 0, 0, 0.25);
  z-index: 4600;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  padding: 1.5rem 1rem;
  overflow: hidden; /* Prevent overflow */
  -webkit-transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transition: right 0.4s cubic-bezier(0.22, 1, 0.36, 1); /* Smooth slide-in */
}

/* ACTIVE STATE */
#mobile-menu.active {
  right: 0; /* Slide-in effect from the right */
}

/* ------------------------------ */
/* Close Button (Cleaner)        */
/* ------------------------------ */
.hamburger-close {
  -ms-flex-item-align: end;
      align-self: flex-end;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: #2d3748;
  color: #e2e8f0;
  font-size: 1.3rem;
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-transition: all 0.25s ease;
  transition: all 0.25s ease;
}

.hamburger-close:hover {
  background: #e2e8f0;
  color: #1e293b;
  -webkit-transform: rotate(90deg);
          transform: rotate(90deg);
}

.hamburger-close:active {
  -webkit-transform: scale(0.9);
          transform: scale(0.9);
}

/* ------------------------------ */
/* Links Section                 */
/* ------------------------------ */
.aside-links {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 0.8rem;
  margin-top: 2rem;
  overflow-y: auto;
}

/* Link style */
.aside-links a {
  text-decoration: none;
  color: #e2e8f0;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 0.6rem;
  -webkit-transition: all 0.25s ease;
  transition: all 0.25s ease;
}

/* Hover */
.aside-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  -webkit-transform: translateX(4px);
          transform: translateX(4px);
}

/* Click feedback */
.aside-links a:active {
  -webkit-transform: scale(0.96);
          transform: scale(0.96);
}

/* Icons */
.aside-links a i {
  font-size: 1.1rem;
  width: 22px;
}

/* ------------------------------ */
/* Overlay (Improved Fade)       */
/* ------------------------------ */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 0.3s ease;
  transition: opacity 0.3s ease;
  z-index: 2500;
}

#overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ------------------------------ */
/* Prevent Body Scroll           */
/* ------------------------------ */
body.menu-open {
  overflow: hidden;
}

/* ------------------------------ */
/* Responsive Improvements       */
/* ------------------------------ */
@media (min-width: 768px) {
  .hamburger-icon {
    display: none;
  }
}

/* Extra small devices */
@media (max-width: 400px) {
  #mobile-menu {
    width: 100%; /* Full width on extra small devices */
  }
}