.main-content-wrapper {
    display: flex;
    gap: 25px;
    max-width: 1300px;
    margin: 0 auto;
    flex-direction: row-reverse;
}

.filter-sidebar {
    width: 320px;
    background: #1e1e1e;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    border: 1px solid #333;
    align-self: flex-start;
}

.sidebar-widget {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-widget h3 {
    color: #fff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    color: #b0b0b0;
    font-weight: 500;
}

.filter-group select {
    width: 100%;
    padding: 10px;
    background: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 6px;
    font-family: YekanBakh;
}

.filter-group select:focus {
    outline: none;
    border-color: #6c63ff;
}

.filter-btn {
    width: 100%;
    padding: 12px;
    background: #6c63ff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: YekanBakh;
    font-weight: 500;
    transition: background 0.3s;
}

.filter-btn:hover {
    background: #5a52d5;
}

.reset-btn {
    width: 100%;
    padding: 10px;
    background: #2d2d2d;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    font-family: YekanBakh;
    transition: background 0.3s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.reset-btn:hover {
    background: #3d3d3d;
    color: #fff;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 8px;
}

.category-link {
    display: block;
    padding: 8px 12px;
    color: #b0b0b0;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.category-link:hover {
    color: #fff;
    background: rgba(108, 99, 255, 0.1);
    border-color: #6c63ff;
}

.category-link.active {
    color: #6c63ff;
    background: rgba(108, 99, 255, 0.2);
    border-color: #6c63ff;
}

/* استایل‌های درخت دسته‌بندی */
.category-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-tree-item {
    margin-bottom: 2px;
}

.category-tree-node {
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.box-btn-side-filter {
    display: flex;
    gap: 10px;
}

.category-toggle {
    cursor: pointer;
    color: #6c63ff;
    margin-left: 5px;
    font-size: 10px;
    transition: transform 0.3s;
    user-select: none;
    width: 12px;
    text-align: center;
}

.category-toggle.expanded {
    transform: rotate(90deg);
}

.category-spacer {
    width: 12px;
    margin-left: 5px;
}

.category-tree-link {
    flex: 1;
    padding: 6px 8px;
    color: #b0b0b0;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    border: 1px solid transparent;
    font-size: 13px;
    background: #2d2d2d !important;
}

a.category-tree-link {
    display: flex !important;
    justify-content: right;
    gap: 5px;
    padding: 10px;
}

.category-tree-link:hover {
    color: #fff;
    background: rgba(108, 99, 255, 0.1);
    border-color: #6c63ff;
}

.category-tree-link.active {
    background: rgba(108, 99, 255, 0.2);
    border-color: #6c63ff;
    font-weight: 500;
}

.category-children {
    margin-right: 15px;
    border-right: 1px solid #333;
}

.course-category {
    display: inline-block;
    background: rgb(218 216 255);
    color: #6c63ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-top: 10px;
    position: absolute;
    top: 0px;
    left: 10px;
    font-weight: bold;
}

.filter-info {
    background: rgb(24 24 24 / 10%);
    border: 1px solid #4b4b4b;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
}

.filter-info h4 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 14px;
}

.filter-info p {
    margin: 4px 0;
    color: #b0b0b0;
    font-size: 13px;
}

.apply-filter-btn {
    width: 100%;
    padding: 12px;
    background: #6c63ff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: YekanBakh;
    font-weight: 500;
    transition: background 0.3s;
}

.apply-filter-btn:hover {
    background: #5a52d5;
}

.category-tree-link[href="#"] {
    cursor: pointer;
}

.container {
    flex: 1;
    max-width: 1000px;
    margin: 0;
    background: #1e1e1e;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
    border: 1px solid #333;
}

/* رسپانسیو */
@media (max-width: 992px) {
    .main-content-wrapper {
        flex-direction: column;
    }
    
    .filter-sidebar {
        width: 100%;
        margin-top: 20px;
    }
    
    .container {
        margin-top: 0;
    }
}