/* course-header.css - Modernized */
.course-header {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 260px; /* تغییر از ارتفاع ثابت به حداقل ارتفاع */
    background: var(--bg-card);
    border: var(--border-px) solid var(--border);
    margin-bottom: 24px;
    margin-top: 24px;
    display: flex;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

/* لایه‌های پس‌زمینه و تصویر */
.course-header-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.course-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-hover);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--border);
}

/* گرادیان تیره برای خوانایی بهتر متن روی هر عکسی */
.course-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.85) 100%);
}

/* دکمه بازگشت شناور روی هدر عکس */
.course-root-back-btn {
    position: absolute;
    top: 16px;
    left: 16px; /* سمت چپ هدر عکس */
    z-index: 10;
    width: 38px;
    height: 38px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3); /* پس‌زمینه تیره و شیشه‌ای */
    color: #ffffff;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
}

.course-root-back-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.05);
}

.course-root-back-btn svg {
    width: 20px;
    height: 20px;
}

/* محتوای روی هدر */
.course-header-content {
    position: relative;
    margin-top: 24px;
    z-index: 2;
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: flex-end; /* چسبیدن محتوا به پایین */
    padding: 32px;
    gap: 24px;
}

.course-info {
    flex: 1;
    color: #ffffff; /* متن‌ها اجباراً سفید چون بک‌گراند تیره شده */
}

.course-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #f8fafc;
}

.course-info h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px 0;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.course-info .course-desc {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0;
    max-width: 80%;
    /* جلوگیری از طولانی شدن بیش از حد متن */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* دکمه‌های مدیریت */
.course-manage {
    display: flex;
    gap: 10px;
    align-items: center;
}

.course-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.course-btn.btn-edit {
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
}
.course-btn.btn-edit:hover { background: #ffffff; transform: translateY(-2px); }

.course-btn.btn-tutor {
    background: rgba(139, 92, 246, 0.9);
    color: #ffffff;
}
.course-btn.btn-tutor:hover { background: #8b5cf6; transform: translateY(-2px); }

.course-btn.btn-delete {
    padding: 10px; /* دکمه حذف فقط آیکون باشه قشنگ تره */
    background: rgba(239, 68, 68, 0.8);
    color: #ffffff;
}
.course-btn.btn-delete:hover { background: #ef4444; transform: translateY(-2px); }
