/* --- اصلاحیه فونت‌ها --- */
html[lang="fa-IR"] .msm-wrapper,
html[lang="fa-IR"] .msm-wrapper * {
    font-family: 'DoranFaNum', 'IRANSans', Tahoma, sans-serif !important;
}

html[lang="en-US"] .msm-wrapper,
html[lang="en-US"] .msm-wrapper * {
    font-family: Helvetica, Arial, sans-serif !important;
}

/* --- ساختار کلی --- */
.msm-wrapper {
    font-size: 15px;
    line-height: 1.4;
    color: #999;
    width: 240px;
    box-sizing: border-box;
    min-height: 300px;
}

.msm-list {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 10px;
}

.msm-section {
    margin-bottom: 30px;
    padding-bottom: 0;
}

.msm-list li {
    margin: 0 !important;
    padding: 0;
    margin-bottom: 8px !important;
}

.msm-list li a {
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0;
    color: #999;
    opacity: 1 !important;
    visibility: visible !important;
    font-weight: 400;
}

/* --- مدیریت حالت‌های فعال --- */

/* بخش استاتیک: فقط آیتم فعال مشکی، بقیه خاکستری */
.msm-static .msm-list li.current-menu-item > a,
.msm-static .msm-list li.current-menu-ancestor > a,
.msm-static .msm-list li.current-menu-parent > a,
.msm-static .msm-list li.current_page_parent > a,
.msm-static .msm-list li.current_page_ancestor > a,
.msm-static .msm-list li.active-static-item > a {
    color: #000 !important;
    font-weight: 500 !important;
}

/* بخش والدین و فرزندان (شامل Featured Items) */
.msm-parents .msm-list li.current_page_item > a,
.msm-parents .msm-list li.current_page_ancestor > a,
.msm-children .msm-list li.current_page_item > a,
.msm-children .msm-list li.current_page_ancestor > a,
.msm-list li.active-branch > a {
    color: #000 !important;
    font-weight: 500 !important; /* تغییر اصلی: اضافه کردن !important و افزایش وزن */
}

/* اگر در خود صفحه والد هستیم، فرزندان کم‌رنگ بمانند */
/* این قانون نباید روی آیتم فعال فعلی تاثیر بگذارد */
.msm-children .msm-list li.parent-view-child > a {
    color: #999 !important;
    font-weight: 400 !important;
}

/* --- هاور --- */
/* هاور باید با !important باشد تا بر همه قوانین دیگر غلبه کند */
.msm-list li a:hover {
    color: #000 !important;
}

/* حتی اگر parent-view-child باشد، باز هم هاور کار کند */
.msm-children .msm-list li.parent-view-child > a:hover {
    color: #000 !important;
}
