/* =================================================
   ASTRA + SP ACADEMY — Full-Width Layout Overrides
   ================================================= */

/* ── Single Course + Lesson: full-width Astra container ── */
body.single-sp_course #content.site-content > .ast-container,
body.single-sp_lesson #content.site-content > .ast-container,
body.single-sp_topic #content.site-content > .ast-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ── Course content area — full bleed ──
   Fixed: templates use .sp-course / .sp-lesson (not -single suffix) */
body.single-sp_course .sp-course,
body.single-sp_lesson .sp-lesson {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

/* ── PDF viewers inside lessons — full width ── */
body.single-sp_lesson [id^="sp-pdf-viewer"] {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ── Course description toggle (expand/collapse) ── */
.sp-course__description--expanded {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.sp-course__description--collapsed {
    height: 800px !important;
    max-height: 800px !important;
    overflow: hidden !important;
    position: relative;
    transition: height 0.4s ease-in-out;
}

.sp-course__description--collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 140px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(212, 180, 131, 0) 0%, rgba(212, 180, 131, 1) 100%);
}

.sp-course__show-more-btn {
    border-radius: 10px !important;
    font-weight: 500 !important;
    padding: 10px 18px !important;
}

/* ── Responsive: collapse description earlier on mobile ── */
@media (max-width: 768px) {
    .sp-course__description--collapsed {
        height: 400px !important;
        max-height: 400px !important;
    }

    .sp-course__description--collapsed::after {
        height: 80px;
    }
}
