
/* 1. باکس اصلی */
.course-section {
    background-color: #f8f9fa !important;
    border-radius: 16px !important;
    padding: 15px !important;
    border: 1px solid #f1f1f1 !important;
}

/* 2. هدر - دقیقاً کپی کد اصلی */
.course-section-title-elementory {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 0 4px 20px !important; 
    margin-bottom: 0 !important;
    border-bottom: none !important; 
    background: transparent !important;
    width: 100% !important;
    cursor: pointer;
    position: relative;
    min-height: 50px;
}

.header-right-content {
    display: flex;
    align-items: center; 
    flex-grow: 1;
    min-width: 0;
}

.course-section-title-elementory img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    margin-left: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    display: block; 
    flex-shrink: 0;
}

.course-section-title-elementory .gheadlinel {
    display: flex;
    flex-direction: column;
    justify-content: center; 
    height: 100%;
    flex: 1;
    min-width: 0;
}

.course-section-title-elementory .gheadlinel h5 {
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2 !important;
    color: #333;
}

.course-section-title-elementory .gheadlinel .subtitle-lesson {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px;
    line-height: 1.2 !important;
    color: #777;
}

/* 3. استایل دکمه بازشو (Toggle) */
.toggle-icon-box {
    width: 34px !important;
    height: 34px !important;
    background-color: #ffffff !important;
    color: #333 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 5px !important;
    flex-shrink: 0;
    align-self: center !important;
    padding: 0 !important;
}

/* فیکس کردن آیکون فلش */
.toggle-icon-box i {
    font-size: 22px !important;
    font-weight: normal !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #222 !important;
    height: 100% !important;
    width: 100% !important;
}

.course-section-title-elementory:hover .toggle-icon-box {
    background-color: #f9f9f9 !important;
    border-color: #ccc !important;
}

/* 4. خط جداکننده */
.content-divider-hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
    margin: 5px 0 15px 0;
}

/* 5. لیست درس ها */
.panel-group {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.course-panel-heading {
    background-color: #ffffff !important;
    border-radius: 10px !important;
    margin-bottom: 8px !important; 
    padding: 10px 15px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02) !important;
    border: 1px solid #fff !important;
    display: flex;
    align-items: center; 
    justify-content: space-between;
}

.course-panel-heading:hover {
    transform: none !important;
}

.panel-heading-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px; 
    min-width: 0; 
}

.course-lesson-icon {
    margin: 0 !important;
    color: #b0b0b0;
    font-size: 16px;
    flex-shrink: 0; 
}

.course-panel-heading .title {
    flex: 1; 
    min-width: 0; 
}

.panel-heading-right {
    display: flex;
    align-items: center; 
    justify-content: flex-end;
    margin-left: 10px; 
}

/* --- دکمه‌های دانلود --- */
.download-button,
.download-button-locked {
    border-radius: 50%;
    width: 34px; 
    height: 34px;
    line-height: 34px;
    text-align: center;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0 !important;
    transition: all 0.3s ease;
}

/* دکمه سبز (آزاد) */
.download-button {
    background-color: #4ece3d !important;
    color: #ffffff !important;
    border: 1px solid #4ece3d !important;
}

.download-button:hover,
.download-button.clicked {
    background-color: #ffffff !important;
    color: #4ece3d !important;
}

/* دکمه نارنجی (قفل) */
.download-button-locked {
    background-color: #f39c12 !important;
    color: #ffffff !important;
    border: 1px solid #f39c12 !important;
}

.download-button-locked:hover {
    background-color: #ffffff !important;
    color: #f39c12 !important;
}

/* =========================================
   استایل‌های موبایل
   ========================================= */
@media screen and (max-width: 768px) {
    .course-section {
        padding: 12px !important;
    }
    
    .badge-item {
        display: none !important;
    }

    .course-panel-heading .title span,
    .course-panel-heading .title a {
        font-size: 13px !important;
        line-height: 1.6 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block;
        width: 100%;
    }

    .course-panel-heading .title .subtitle {
        font-size: 11px !important;
        margin-top: 2px;
        color: #888;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .course-section-title-elementory {
        padding: 8px 0 4px 15px !important; 
        align-items: center !important; 
    }

    .course-panel-heading {
        padding: 12px 10px !important;
        min-height: 55px;
    }
    
    .course-section-title-elementory img {
        width: 42px;
        height: 42px;
    }
    
    .download-button, .download-button-locked {
        width: 30px !important;
        height: 30px !important;
        margin: 0 !important;
    }
    
    .toggle-icon-box {
        width: 30px !important;
        height: 30px !important;
        margin-left: 0 !important;
        align-self: center !important; 
    }
    
    .toggle-icon-box i {
        font-size: 18px !important; 
    }
    
    .panel-heading-left {
        gap: 7px !important; 
    }
    
    .panel-heading-right {
        margin-left: 2px !important; 
    }
}
