

/* ================================================
   COURSE DETAILS PAGE
================================================ */

.cd-hero {
    position: relative;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    padding: 70px 0 80px;
    overflow: hidden;
}
.cd-hero::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(142,45,226,0.22), transparent 65%);
    pointer-events: none;
}
.cd-hero::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 350px; height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74,0,224,0.15), transparent 65%);
    pointer-events: none;
}
.cd-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: rgba(255,255,255,0.55);
    margin-bottom: 20px; flex-wrap: wrap;
}
.cd-breadcrumb a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
.cd-breadcrumb a:hover { color: #c084fc; }
.cd-breadcrumb i { font-size: 12px; }
.cd-breadcrumb .active { color: rgba(255,255,255,0.85); }
.cd-hero h1 {
    font-size: 34px; font-weight: 900; color: #fff;
    line-height: 1.25; margin-bottom: 16px; max-width: 680px;
}
.cd-hero .cd-desc {
    font-size: 15.5px; color: rgba(255,255,255,0.72);
    line-height: 1.75; max-width: 640px; margin-bottom: 24px;
}
.cd-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.cd-meta-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.82);
    background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.14);
    border-radius: 50px; padding: 5px 14px;
}
.cd-meta-chip i { font-size: 13px; color: #c084fc; }
.cd-meta-chip .star { color: #f59e0b; font-size: 13px; }
.cd-level-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(192,132,252,0.2); border: 1px solid rgba(192,132,252,0.4);
    color: #e9d5ff; padding: 5px 14px; border-radius: 50px;
}
.cd-instructor-mini { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.cd-instructor-mini img {
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid rgba(192,132,252,0.4); object-fit: cover;
}
.cd-instructor-mini .info { font-size: 13.5px; color: rgba(255,255,255,0.75); }
.cd-instructor-mini .info a { color: #c084fc; text-decoration: none; font-weight: 600; }
.cd-hero-meta-bottom {
    display: flex; flex-wrap: wrap; gap: 18px;
    margin-top: 20px; padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.cd-hero-meta-bottom .item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: rgba(255,255,255,0.65); }
.cd-hero-meta-bottom .item i { color: #c084fc; font-size: 14px; }

.cd-body { background: #f8f5ff; padding: 50px 0 70px; }

.cd-sticky-nav {
    background: #fff; border-radius: 14px;
    border: 1px solid #f0e8ff; box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 6px 8px; display: flex; gap: 4px; flex-wrap: wrap;
    margin-bottom: 32px; position: sticky; top: 80px; z-index: 100;
}
.cd-sticky-nav a {
    padding: 9px 18px; font-size: 13.5px; font-weight: 600;
    color: #888; border-radius: 10px; text-decoration: none;
    transition: all 0.2s ease; white-space: nowrap;
}
.cd-sticky-nav a:hover, .cd-sticky-nav a.active {
    background: rgba(142,45,226,0.1); color: #8e2de2;
}

.cd-section-card {
    background: #fff; border-radius: 20px;
    border: 1px solid #f0e8ff; box-shadow: 0 6px 24px rgba(0,0,0,0.05);
    padding: 36px; margin-bottom: 24px;
}
.cd-section-card .cd-section-title {
    font-size: 20px; font-weight: 800; color: #1a1a2e;
    margin-bottom: 22px; padding-bottom: 16px;
    border-bottom: 2px solid #f0e8ff;
    display: flex; align-items: center; gap: 10px;
}
.cd-section-card .cd-section-title i { font-size: 18px; color: #8e2de2; }

.cd-thumbnail { border-radius: 16px; overflow: hidden; margin-bottom: 24px; }
.cd-thumbnail img { width: 100%; max-height: 380px; object-fit: cover; display: block; }

.cd-accordion .accordion-item { border: none; border-bottom: 1px solid #f5f0ff; background: transparent; }
.cd-accordion .accordion-item:last-child { border-bottom: none; }
.cd-accordion .accordion-button {
    background: transparent; font-size: 14.5px; font-weight: 700;
    color: #1a1a2e; padding: 16px 0; box-shadow: none;
    display: flex; align-items: center; gap: 10px;
}
.cd-accordion .accordion-button:not(.collapsed) { color: #8e2de2; background: transparent; }
.cd-accordion .accordion-button::after { flex-shrink: 0; margin-left: auto; }
.section-dur-badge {
    margin-left: auto; margin-right: 14px;
    background: rgba(142,45,226,0.1); color: #8e2de2;
    font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 50px;
}
.cd-lesson-list { list-style: none; padding: 4px 0 8px; margin: 0; }
.cd-lesson-list li a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid #faf6ff;
    text-decoration: none; color: #555; font-size: 13.5px; transition: color 0.2s;
}
.cd-lesson-list li:last-child a { border-bottom: none; }
.cd-lesson-list li a:hover { color: #8e2de2; }
.cd-lesson-left { display: flex; align-items: center; gap: 10px; }
.cd-lesson-left i { font-size: 15px; color: #8e2de2; }
.cd-lesson-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lesson-dur { font-size: 12px; color: #aaa; }
.preview-pill {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 50px;
    background: rgba(34,197,94,0.12); color: #16a34a;
}
.locked-pill {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 50px;
    background: rgba(142,45,226,0.08); color: #aaa;
}

.cd-instructor-card { display: flex; gap: 24px; align-items: flex-start; }
.cd-instructor-card .photo {
    width: 90px; height: 90px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0; border: 3px solid #f0e8ff;
}
.cd-instructor-card .name { font-size: 19px; font-weight: 800; color: #1a1a2e; margin-bottom: 3px; }
.cd-instructor-card .title-sub { font-size: 13.5px; color: #8e2de2; font-weight: 600; margin-bottom: 12px; }
.cd-instructor-stats { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; }
.cd-instructor-stats .stat { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #666; }
.cd-instructor-stats .stat i { color: #8e2de2; font-size: 14px; }
.cd-instructor-card .bio { font-size: 14px; color: #777; line-height: 1.75; margin: 0; }

.cd-rating-big {
    text-align: center; background: linear-gradient(135deg, #faf6ff, #f3eeff);
    border-radius: 16px; padding: 30px 20px;
}
.cd-rating-big .score { font-size: 56px; font-weight: 900; color: #8e2de2; line-height: 1; margin-bottom: 10px; }
.rating-stars-row { display: flex; justify-content: center; gap: 3px; margin-bottom: 6px; }
.rating-stars-row .s { font-size: 18px; color: #f59e0b; }
.rating-stars-row .s.off { color: #e5e7eb; }
.cd-rating-label { font-size: 12.5px; color: #aaa; font-weight: 600; }
.cd-progress-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cd-progress-bar .stars { display: flex; gap: 2px; flex-shrink: 0; }
.cd-progress-bar .stars .s { font-size: 12px; color: #f59e0b; }
.cd-progress-bar .stars .s.off { color: #e5e7eb; }
.cd-progress-bar .bar { flex: 1; height: 8px; background: #f0e8ff; border-radius: 50px; overflow: hidden; }
.cd-progress-bar .bar .fill {
    height: 100%; background: linear-gradient(90deg, #8e2de2, #4a00e0);
    border-radius: 50px; transition: width 0.5s ease;
}
.cd-progress-bar .pct { font-size: 12.5px; font-weight: 700; color: #8e2de2; width: 38px; text-align: right; flex-shrink: 0; }

.cd-related-header { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 32px; }
.cd-related-header .left .eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; color: #8e2de2; margin-bottom: 6px; }
.cd-related-header .left h4 { font-size: 24px; font-weight: 800; color: #1a1a2e; margin: 0; }

/* ── SIDEBAR ── */
.cd-sidebar-card {
    background: #fff; border-radius: 20px;
    border: 1px solid #f0e8ff; box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    overflow: hidden; position: sticky; top: 80px;
}
.cd-preview-wrap { position: relative; cursor: pointer; overflow: hidden; height: 210px; }
.cd-preview-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.cd-preview-wrap:hover img { transform: scale(1.04); }
.cd-preview-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(15,12,41,0.65), rgba(142,45,226,0.35));
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.cd-play-btn {
    width: 60px; height: 60px; border-radius: 50%;
    background: rgba(255,255,255,0.95); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(142,45,226,0.35); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cd-preview-wrap:hover .cd-play-btn { transform: scale(1.1); box-shadow: 0 12px 32px rgba(142,45,226,0.5); }
.cd-play-btn i { font-size: 22px; color: #8e2de2; margin-left: 3px; }
.cd-preview-label { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.9); letter-spacing: 0.5px; }

.cd-sidebar-body { padding: 28px; }
.cd-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 22px; }
.cd-price-amount {
    font-size: 36px; font-weight: 900;
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1;
}
.cd-price-currency { font-size: 18px; font-weight: 700; color: #8e2de2; align-self: flex-start; margin-top: 4px; }

.cd-sidebar-add-cart {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 15px 24px;
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
    color: #fff; font-size: 15px; font-weight: 700; border-radius: 12px;
    text-decoration: none; margin-bottom: 12px;
    position: relative; overflow: hidden; transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(142,45,226,0.32);
}
.cd-sidebar-add-cart::before {
    content: ''; position: absolute; top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.18), transparent);
    transform: skewX(-20deg); transition: left 0.5s ease;
}
.cd-sidebar-add-cart:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(142,45,226,0.48); color: #fff; text-decoration: none; }
.cd-sidebar-add-cart:hover::before { left: 130%; }
.cd-sidebar-add-cart span, .cd-sidebar-add-cart i { position: relative; z-index: 1; }
.cd-sidebar-add-cart i { font-size: 17px; transition: transform 0.25s ease; }
.cd-sidebar-add-cart:hover i.arrow { transform: translateX(4px); }

.cd-sidebar-buy-now {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 14px 24px; background: transparent;
    color: #8e2de2; font-size: 15px; font-weight: 700; border-radius: 12px;
    text-decoration: none; border: 2px solid #8e2de2; margin-bottom: 16px; transition: all 0.3s ease;
}
.cd-sidebar-buy-now:hover { background: #8e2de2; color: #fff; text-decoration: none; transform: translateY(-2px); }

.cd-money-back {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 12.5px; color: #16a34a; font-weight: 600; margin-bottom: 20px;
    padding: 10px; background: #f0fdf4; border-radius: 10px; border: 1px solid #bbf7d0;
}
.cd-money-back i { font-size: 14px; }

.cd-details-list { list-style: none; padding: 0; margin: 0 0 22px; border-top: 1px solid #f5f0ff; padding-top: 18px; }
.cd-details-list li { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #faf6ff; font-size: 13.5px; }
.cd-details-list li:last-child { border-bottom: none; }
.cd-details-list .label { color: #888; display: flex; align-items: center; gap: 7px; }
.cd-details-list .label i { font-size: 14px; color: #8e2de2; }
.cd-details-list .value { font-weight: 700; color: #1a1a2e; font-size: 13px; }

.cd-share-row { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 18px; border-top: 1px solid #f5f0ff; margin-bottom: 18px; }
.cd-share-btn {
    width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid #ede0ff;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; color: #8e2de2; font-size: 15px; transition: all 0.25s ease;
}
.cd-share-btn:hover { background: #8e2de2; border-color: #8e2de2; color: #fff; transform: translateY(-2px); }

.cd-contact-box { background: #faf6ff; border: 1px solid #ede0ff; border-radius: 12px; padding: 16px 18px; text-align: center; }
.cd-contact-box p { font-size: 13px; color: #888; margin-bottom: 8px; }
.cd-contact-box .phone { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 800; color: #8e2de2; text-decoration: none; }
.cd-contact-box .phone i { font-size: 16px; }

.cd-related-section { background: #fff; padding: 60px 0; border-top: 1px solid #f0e8ff; }

@media (max-width: 991px) {
    .cd-hero h1 { font-size: 26px; }
    .cd-hero { padding: 50px 0 60px; }
    .cd-instructor-card { flex-direction: column; }
    .cd-sticky-nav { top: 0; position: relative; }
    .cd-sidebar-card { position: relative; top: 0; margin-top: 32px; }
}
@media (max-width: 768px) {
    .cd-section-card { padding: 24px 20px; }
    .cd-sidebar-body { padding: 20px; }
}

/* ================================================
   VIDEO MODAL — FIXED (no blur, working controls)
================================================ */

/* Kill ALL blur/backdrop-filter from theme on modal */
.cd-video-modal,
.cd-video-modal *,
.cd-video-modal .modal-dialog,
.cd-video-modal .modal-content {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
}

/* Proper backdrop — dark dim only, no blur */
.cd-video-modal.show {
    background: rgba(0, 0, 0, 0.75) !important;
}

/* Hide Bootstrap's separate .modal-backdrop completely */
.modal-backdrop {
    display: none !important;
}

.cd-video-dialog {
    max-width: 700px;
    width: 95%;
    margin: 1.75rem auto;
}

.cd-video-content {
    background: #111827;
    border: 1px solid rgba(142, 45, 226, 0.35);
    border-radius: 18px;
    overflow: hidden;
    /* Clean sharp shadow — NO blur */
    box-shadow:
        0 4px 0 rgba(142,45,226,0.3),
        0 20px 60px rgba(0,0,0,0.7),
        0 0 0 1px rgba(255,255,255,0.04) inset;
}

/* Header */
.cd-video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(90deg, #0f0c29, #1e1b4b);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    user-select: none;
}

.cd-video-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: #e9d5ff;
    letter-spacing: 0.3px;
}

.cd-video-title i { font-size: 16px; color: #a78bfa; }

/* ✕ Close button — TOP RIGHT, always visible */
.cd-video-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(239,68,68,0.18);
    border: 1.5px solid rgba(239,68,68,0.45);
    color: #fca5a5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    outline: none;
    line-height: 1;
}

.cd-video-close i { font-size: 16px; pointer-events: none; }

.cd-video-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(239,68,68,0.45);
}

/* Video container */
.cd-video-body {
    background: #000;
    position: relative;
    line-height: 0;
    /* Ensure video controls are never blocked */
    z-index: 1;
}

.cd-video-player {
    width: 100%;
    height: 390px;
    display: block;
    background: #000;
    outline: none;
    /* Make sure native controls are fully clickable */
    position: relative;
    z-index: 2;
}

/* Footer */
.cd-video-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #0f0c29;
    border-top: 1px solid rgba(255,255,255,0.06);
    gap: 12px;
    flex-wrap: wrap;
}

.cd-video-course-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: rgba(255,255,255,0.55);
    flex: 1;
    min-width: 0;
}

.cd-video-course-info i { font-size: 14px; color: #a78bfa; flex-shrink: 0; }
.cd-video-course-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Stop & Close button */
.cd-video-stop-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    background: rgba(239,68,68,0.12);
    border: 1.5px solid rgba(239,68,68,0.35);
    border-radius: 50px;
    color: #fca5a5;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s ease;
    outline: none;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}

.cd-video-stop-btn i { font-size: 13px; pointer-events: none; }

.cd-video-stop-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(239,68,68,0.4);
}

@media (max-width: 576px) {
    .cd-video-player { height: 220px; }
    .cd-video-footer { flex-direction: column; align-items: flex-start; }
    .cd-video-course-info span { white-space: normal; }
    .cd-video-dialog { margin: 0.5rem auto; }
}

