/* =========================================
   استایل صفحه لیست تمام دوره‌ها
   ========================================= */


.course-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
        margin-bottom: 16px;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: #0073aa;
}

.course-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    height: 100%;
}

/* تصویر شاخص */
.course-card-thumb {
    position: relative;
    background: #f0f0f0;
    overflow: hidden;
    width: 50%;
}

.course-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
    max-height: initial; 
    position: absolute;
    left: 0;
    top: 0;
}

.course-card:hover .course-card-thumb img {
    transform: scale(1.05); /* زوم ملایم هنگام هاور */
}

/* تصویر جایگزین (وقتی عکس ندارد) */
.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    color: #bbb;
}
.no-image-placeholder .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
}

/* بج تعداد جلسات */
.course-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    backdrop-filter: blur(2px);
}

/* محتوا */
.course-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 50%;
}

.course-card-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #333;
}

.course-card-desc {
    font-size: 14px;
    color: #666;
    line-height: 2.3;
    margin-bottom: 20px;
    flex-grow: 1; /* باعث می‌شود دکمه همیشه پایین بچسبد */
}

.read-more-btn {
    font-size: 14px;
    font-weight: bold;
    color: #0073aa;
    margin-top: auto;
}

.course-card:hover .read-more-btn {
    color: #005177;
}

/* هدر صفحه */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}
.page-title {
    font-size: 32px;
    font-weight: 900;
    color: #222;
}

@media screen and (max-width: 576px){
    .course-card-thumb img {
        position: relative;
    }
    
    .course-card-thumb {
        width: 100%;
    }
    .course-card-content {
        width: 100%;
    }
    .course-card-link {
        flex-direction: column;
    }   

}