/* Course details page — pairs with mg-page-hero.css and terms-legal.css */

.mg-course-details-page {
    --cd-ink: #1c1917;
    --cd-muted: #57534e;
    --cd-line: #e7e5e4;
    --cd-text: 1.5rem;
    --cd-heading-sm: 1.35rem;
    font-size: var(--cd-text);
    color: var(--cd-ink);
}

.mg-course-details-page .mg-terms-intro {
    margin-bottom: 2rem;
}

.mg-course-details-layout {
    align-items: flex-start;
}

/* Sidebar access card */
.mg-course-sidebar {
    position: sticky;
    top: 1.5rem;
    padding: 1.25rem;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--cd-line);
    box-shadow: 0 8px 24px rgba(28, 25, 23, 0.06);
}

.mg-course-sidebar-preview {
    margin-bottom: 1.15rem;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b, #4338ca);
}

.mg-course-sidebar-preview img {
    display: block;
    width: 100%;
    opacity: 0.92;
}

.mg-course-sidebar-preview-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 0.85rem;
    font-size: var(--cd-heading-sm);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.mg-course-sidebar-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--cd-line);
}

.mg-course-sidebar-price .current-price {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--cd-ink);
}

.mg-course-sidebar-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: var(--cd-heading-sm);
    font-weight: 700;
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.1);
}

.mg-course-sidebar-badge--success {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
}

.mg-course-sidebar .mg-page-hero-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.65rem;
}

.mg-course-sidebar .mg-page-hero-btn:last-child {
    margin-bottom: 0;
}

.mg-course-sidebar-subtitle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 1rem 0 0.75rem;
    font-size: var(--cd-heading-sm);
    font-weight: 700;
    color: #7c3aed;
}

.mg-course-sidebar-meta {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mg-course-sidebar-meta li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    background: #fafafa;
    font-size: var(--cd-text);
    color: var(--cd-muted);
}

.mg-course-sidebar-meta li span:last-child {
    font-weight: 700;
    color: var(--cd-ink);
}

/* Section body content from CMS */
.mg-course-details-page .mg-terms-section-body {
    font-size: var(--cd-text);
    line-height: 1.65;
    color: var(--cd-muted);
}

.mg-course-details-page .mg-terms-section-body p:last-child {
    margin-bottom: 0;
}

/* Video accordion inside sections */
.mg-course-videos .accordion-item {
    border: 1px solid var(--cd-line);
    border-radius: 14px !important;
    overflow: hidden;
    margin-bottom: 0.75rem;
    box-shadow: none;
}

.mg-course-videos .accordion-item:last-child {
    margin-bottom: 0;
}

.mg-course-videos .accordion-button {
    font-size: var(--cd-text);
    font-weight: 700;
    padding: 1rem 1.15rem;
    background: #fafafa;
}

.mg-course-videos .accordion-button:not(.collapsed) {
    color: #5b21b6;
    background: linear-gradient(135deg, #faf5ff, #fff7ed);
}

.mg-course-videos .rbt-course-main-content li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.mg-course-videos .rbt-course-main-content li a:hover:not(.text-muted) {
    background: rgba(124, 58, 237, 0.06);
}

.mg-course-videos .course-content-left {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.mg-course-videos .course-content-left .text {
    font-size: var(--cd-text);
    line-height: 1.45;
}

/* Presenter */
.mg-course-presenter {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-start;
}

.mg-course-presenter-photo {
    flex-shrink: 0;
}

.mg-course-presenter-photo img {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 18px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 8px 20px rgba(28, 25, 23, 0.12);
}

.mg-course-presenter-body h3 {
    margin: 0 0 0.15rem;
    font-size: 1.45rem;
    font-weight: 800;
}

.mg-course-presenter-body h3 a {
    color: var(--cd-ink);
    text-decoration: none;
}

.mg-course-presenter-body h3 a:hover {
    color: #5b21b6;
}

.mg-course-presenter-role {
    display: block;
    margin-bottom: 0.65rem;
    font-size: var(--cd-heading-sm);
    font-weight: 600;
    color: var(--cd-muted);
}

.mg-course-presenter-body p {
    margin-bottom: 0.85rem;
    font-size: var(--cd-text);
    line-height: 1.65;
    color: var(--cd-muted);
}

.mg-course-presenter-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mg-course-presenter-social a {
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.08);
    color: #7c3aed;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.mg-course-presenter-social a:hover {
    background: #7c3aed;
    color: #fff;
}

/* Reviews */
.mg-course-reviews {
    display: grid;
    gap: 1rem;
}

.mg-course-review {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.05rem;
    border-radius: 14px;
    background: #fafafa;
    border: 1px solid var(--cd-line);
}

.mg-course-review-avatar img {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 12px;
    object-fit: cover;
}

.mg-course-review-body h3 {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.35;
}

.mg-course-review-from {
    display: block;
    font-size: var(--cd-heading-sm);
    font-weight: 600;
    color: var(--cd-muted);
}

.mg-course-review-stars {
    display: flex;
    gap: 0.1rem;
    margin-bottom: 0.45rem;
    color: #f59e0b;
    font-size: 0.95rem;
}

.mg-course-review-body p {
    margin: 0;
    font-size: var(--cd-text);
    line-height: 1.6;
    color: var(--cd-muted);
}

@media (max-width: 991px) {
    .mg-course-sidebar {
        position: static;
    }
}
