.menu-trigger {
  padding: 10px 15px;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.menu-trigger i {
  font-size: 1.2rem;
  margin-left: 8px; /* Space between icon and text for RTL */
}

.slide-menu {
  position: fixed;
  top: 0;
  left: -100%; /* Changed from right to left */
  width: 85%;
  height: 100vh;
  background: white;
  z-index: 4000;
  transition: left 0.3s ease-out; /* Changed from right to left */
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1); /* Changed shadow direction */
  overflow-y: auto;
  direction: rtl; /* Ensure RTL layout inside menu */
}

.slide-menu.active {
  left: 0; /* Changed from right to left */
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 3999;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.menu-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  padding: 0.5rem;
  cursor: pointer;
}

.menu-content {
  padding: 1rem 0;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s;
}

.menu-item i {
  margin-left: 1rem; /* Keep margin-left for RTL */
  width: 24px;
  text-align: center;
}

.menu-item:active {
  background-color: #f5f5f5;
}

.menu-item {
  opacity: 0;
  transform: translateX(20px); /* Changed direction for RTL */
  transition: opacity 0.3s, transform 0.3s;
}

.slide-menu.active .menu-item {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger the animation for each item */
.menu-item:nth-child(1) {
  transition-delay: 0.1s;
}
.menu-item:nth-child(2) {
  transition-delay: 0.15s;
}
.menu-item:nth-child(3) {
  transition-delay: 0.2s;
}

.menu-item:nth-child(4) {
  transition-delay: 0.3s;
}
.menu-item:nth-child(5) {
  transition-delay: 0.4s;
}
