/* Floating Cart Summary - قائمة عائمة للوحدات المضافة */
.floating-cart-summary {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 320px;
    max-width: 90vw;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 80vh;
    overflow-y: auto;
}

/* Main Section with Modern Background */
.untree_co-section {
    padding-top: 1rem;
    padding-bottom: 3.5rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-accent) 100%);
    min-height: auto;
}

/* ==========================================================================
   Course Header Hero Card - Compact & Modern
   ========================================================================== */
.course-header-wrapper {
    background: var(--bg-primary, #ffffff) !important;
    border-radius: var(--radius-lg, 16px) !important;
    padding: 1.25rem 1.5rem !important;
    margin-bottom: 1.5rem !important;
    box-shadow: var(--shadow-md, 0 4px 20px -2px rgba(0, 0, 0, 0.06)) !important;
    border: 1px solid var(--border-light, #e2e8f0) !important;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.course-header-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color, #136ad5), #0ea5e9, #10b981);
}

.course-status-badge-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 0.4rem;
}

.course-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
}

.course-status-badge.status-open {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.course-status-badge.status-closed {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.course-status-badge .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 6px currentColor;
}

.course-header-wrapper .section-title {
    font-size: 1.65rem !important;
    font-weight: 800 !important;
    color: var(--text-primary, #1e293b) !important;
    margin-bottom: 0.35rem !important;
    margin-top: 0.15rem !important;
    line-height: 1.35 !important;
    position: relative;
    z-index: 2;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

.course-header-wrapper .course-description {
    font-size: 0.92rem !important;
    line-height: 1.6 !important;
    color: var(--text-secondary, #64748b) !important;
    max-width: 850px;
    margin: 0 auto 0.85rem auto !important;
    font-weight: 500;
    padding: 0;
}

/* Compact Meta Strip */
.course-header-meta-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem 1.1rem;
    background: var(--bg-accent, #f8fafc);
    border: 1px solid var(--border-light, #edf2f7);
    border-radius: 12px;
    padding: 0.55rem 1.25rem;
    color: var(--text-secondary, #475569);
    font-size: 0.88rem;
    font-weight: 600;
}

.course-header-meta-strip .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.course-header-meta-strip .meta-icon {
    font-size: 1rem;
    color: var(--primary-color, #136ad5);
}

.course-header-meta-strip .meta-label {
    color: var(--text-muted, #94a3b8);
    font-size: 0.8rem;
    font-weight: 600;
}

.course-header-meta-strip .meta-val {
    color: var(--text-primary, #1e293b);
    font-weight: 700;
}

.course-header-meta-strip .meta-separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--border-color, #cbd5e1);
}

/* Dark Mode support for course header */
body.dark-mode .course-header-wrapper {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4) !important;
}

body.dark-mode .course-header-wrapper .section-title {
    color: #f8fafc !important;
}

body.dark-mode .course-header-wrapper .course-description {
    color: #cbd5e1 !important;
}

body.dark-mode .course-header-meta-strip {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

body.dark-mode .course-header-meta-strip .meta-val {
    color: #f8fafc !important;
}

body.dark-mode .course-header-meta-strip .meta-label {
    color: #94a3b8 !important;
}

body.dark-mode .course-header-meta-strip .meta-separator {
    background-color: #475569 !important;
}

@media (max-width: 768px) {
    .course-header-wrapper {
        padding: 1rem !important;
        margin-bottom: 1.25rem !important;
    }

    .course-header-wrapper .section-title {
        font-size: 1.35rem !important;
    }

    .course-header-wrapper .course-description {
        font-size: 0.86rem !important;
        margin-bottom: 0.75rem !important;
    }

    .course-header-meta-strip {
        gap: 0.45rem 0.75rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.82rem;
    }
}

.course-outline .section-title::before {
        content: "📚";
        font-size: 1.2em;}

.pricing-features li::before {
        content: '✓';
        position: absolute;
        right: 0;
        color: #10b981;
        font-weight: bold;
        font-size: 1.1rem;}

.modal-dialog.modal-lg {
        max-width: 800px;
        width: 100%;
        margin: 1.75rem auto;
        transition: all 0.3s ease;}

.modal-title::before {
        content: '▶';
        font-size: 1.2rem;
        opacity: 0.8;}

.modal-body {
            padding: 1rem;}

/* ==========================================================================
   Instructor Authority & Bio Card (UX Optimized for SEU Students)
   ========================================================================== */
.instructor-authority-card {
    background: var(--bg-primary, #ffffff);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-md, 0 10px 25px -5px rgba(0, 0, 0, 0.08));
    border: 1px solid var(--border-color, #e2e8f0);
    padding: 1.5rem;
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.instructor-authority-card:hover {
    box-shadow: var(--shadow-lg, 0 20px 25px -5px rgba(0, 0, 0, 0.12));
    border-color: rgba(19, 106, 213, 0.35);
    transform: translateY(-2px);
}

.instructor-authority-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.85rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid var(--border-light, #edf2f7);
}

.instructor-section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary, #1e293b);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instructor-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(19, 106, 213, 0.08);
    color: var(--primary-color, #136ad5);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    border: 1px solid rgba(19, 106, 213, 0.2);
}

.instructor-badge i {
    color: #10b981;
    font-size: 0.85rem;
}

.instructor-profile-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 1rem;
}

.instructor-avatar-wrap {
    position: relative;
    width: 62px;
    height: 62px;
    min-width: 62px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-color, #136ad5), #38bdf8);
    box-shadow: 0 4px 10px rgba(19, 106, 213, 0.2);
}

.instructor-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f1f5f9;
    border: 2px solid #fff;
    display: block;
}

.instructor-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #136ad5, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    border: 2px solid #fff;
}

.instructor-verify-check {
    position: absolute;
    bottom: -2px;
    left: -2px;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.instructor-info {
    flex: 1;
    text-align: right;
}

.instructor-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary, #1e293b);
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.instructor-title-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color, #136ad5);
    margin: 0;
    line-height: 1.35;
}

.instructor-bio-wrapper {
    margin-bottom: 1rem;
}

.instructor-bio-text {
    font-size: 0.92rem;
    line-height: 1.75;
    color: var(--text-secondary, #475569);
    text-align: justify;
    background: var(--bg-accent, #f8fafc);
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--border-light, #edf2f7);
    margin-bottom: 0.35rem;
    transition: all 0.3s ease;
}

.instructor-bio-text.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.instructor-bio-text.expanded {
    display: block;
}

.instructor-bio-toggle-btn {
    background: transparent;
    border: none;
    color: var(--primary-color, #136ad5);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 2px 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    outline: none;
}

.instructor-bio-toggle-btn:hover {
    color: #0d5bbd;
    text-decoration: underline;
}

.instructor-bio-toggle-btn .toggle-icon {
    font-size: 0.72rem;
    transition: transform 0.2s ease;
}

.instructor-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.instructor-highlight-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary, #475569);
    background: var(--bg-secondary, #f1f5f9);
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid var(--border-light, #e2e8f0);
}

.instructor-highlight-item i {
    color: var(--primary-color, #136ad5);
    font-size: 0.85rem;
}

/* Dark Mode Overrides */
body.dark-mode .instructor-authority-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}
body.dark-mode .instructor-authority-header {
    border-bottom-color: #334155;
}
body.dark-mode .instructor-section-title,
body.dark-mode .instructor-name {
    color: #f8fafc;
}
body.dark-mode .instructor-bio-text {
    background: #0f172a;
    border-color: #334155;
    color: #cbd5e1;
}
body.dark-mode .instructor-highlight-item {
    background: #0f172a;
    border-color: #334155;
    color: #94a3b8;
}
body.dark-mode .instructor-avatar-img,
body.dark-mode .instructor-avatar-placeholder,
body.dark-mode .instructor-verify-check {
    border-color: #1e293b;
}

/* ==========================================================================
   Intro Video & Placeholder Styles
   ========================================================================== */
.video-placeholder-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.video-placeholder-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.25rem;
    color: #fff;
    background: radial-gradient(circle at center, rgba(19, 106, 213, 0.25) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.video-placeholder-icon {
    font-size: 2.6rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.6rem;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.video-placeholder-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.2rem;
}

.video-placeholder-sub {
    font-size: 0.78rem;
    color: #94a3b8;
}

