/* ==========================
   MOBILE MENU SIDEBAR
   ========================== */

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.mobile-menu-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background-color: #fff;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    direction: rtl;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.mobile-menu-header {
    position: relative;
    padding: 15px 20px;
    width: 100%;
    text-align: right;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
    flex-shrink: 0;
}

.mobile-menu-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    
}
.mobile-menu-sidebar.open {
    transform: translateX(0);
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu-header {
    position: relative;
    padding: 15px 20px;
    width: 100%;
    text-align: right;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
    z-index: 2;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    margin-left: 10px;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    margin-left: 10px;
}

.mobile-main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-main-menu li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #eee;
}

.mobile-main-menu a {
    display: block;
    padding: 15px 20px 15px 50px; /* padding چپ افزایش یافت تا جای علامت + را بدهد */
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    position: relative;
}

.mobile-main-menu .submenu-toggle {
    position: absolute;
    left: 15px; /* کمی به چپ منتقل شد */
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #6a2d7a;
    transition: transform 0.3s ease;
    padding: 8px 10px; /* ناحیه کلیک بزرگ‌تر شد */
    cursor: pointer;
    border-radius: 4px;
    margin-right: 5px;
}

/* حالت هاور برای بهبود تجربه کاربری */
.mobile-main-menu .submenu-toggle:hover {
    background-color: rgba(106, 45, 122, 0.05);
}
.mobile-main-menu .mobile-sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-main-menu .mobile-sub-menu.open {
    max-height: 500px; /* کافی برای 10 آیتم */
}

.mobile-main-menu .mobile-sub-menu li {
    border-bottom: 1px solid #ddd;
}

.mobile-main-menu .mobile-sub-menu a {
    padding: 12px 40px;
    font-size: 14px;
    font-weight: normal;
}

/* Rotate + to - when submenu is open */
.mobile-main-menu li.has-submenu.open .submenu-toggle {
    transform: translateY(-50%) rotate(45deg);
}

/* ==========================
   MOBILE MENU TOGGLE (HAMBURGER)
   ========================== */

@media (max-width: 768px) {
    .header-right-content,
    .header-left-content {
        display: none !important;
    }

    .menu-toggle {
        display: flex !important;
    }
}