/**
 * Single Course Page Styles
 *
 * @package LMSTheme
 * @since   1.0.0
 */

/* ── Course hero ────────────────────────────────────────────────────────── */
.lms-course-hero {
    background:    linear-gradient(135deg, #1B2A4A 0%, #2D6BE4 100%);
    color:         #fff;
    padding:       48px 0 60px;
    margin-bottom: -40px;
}
.lms-course-hero__inner {
    max-width:     1200px;
    margin:        0 auto;
    padding:       0 24px;
    display:       grid;
    grid-template-columns: 1fr 380px;
    gap:           48px;
    align-items:   start;
}
.lms-course-hero__title {
    font-size:   2.2rem;
    font-weight: 800;
    color:       #fff;
    margin:      0 0 16px;
    line-height: 1.2;
}
.lms-course-hero__excerpt {
    font-size:     1.05rem;
    color:         rgba(255,255,255,.85);
    margin-bottom: 20px;
    line-height:   1.6;
}
.lms-breadcrumb--light { color: rgba(255,255,255,.7); margin-bottom: 20px; }
.lms-breadcrumb--light a { color: rgba(255,255,255,.85); }
.lms-breadcrumb--light a:hover { color: #fff; }

/* ── Course meta row ────────────────────────────────────────────────────── */
.lms-course-meta {
    display:     flex;
    align-items: center;
    gap:         20px;
    flex-wrap:   wrap;
}
.lms-course-meta__item {
    display:     flex;
    align-items: center;
    gap:         6px;
    font-size:   14px;
    color:       rgba(255,255,255,.85);
}

/* ── CTA card ───────────────────────────────────────────────────────────── */
.lms-course-cta {
    background:    #fff;
    border-radius: 12px;
    box-shadow:    0 8px 32px rgba(0,0,0,.2);
    overflow:      hidden;
    position:      sticky;
    top:           20px;
}
.lms-course-cta__thumb { position: relative; }
.lms-course-cta__img {
    width:   100%;
    height:  200px;
    object-fit: cover;
    display: block;
}
.lms-course-cta__video-preview {
    width:       100%;
    height:      200px;
    background:  linear-gradient(135deg, #1B2A4A, #2D6BE4);
    display:     flex;
    align-items: center;
    justify-content: center;
    cursor:      pointer;
}
.lms-course-cta__price {
    padding:     20px 24px 0;
    font-size:   2rem;
    font-weight: 800;
    color:       #1B2A4A;
    display:     flex;
    align-items: baseline;
    gap:         10px;
}
.lms-course-cta__expiry {
    font-size:   13px;
    font-weight: 400;
    color:       #6C757D;
}
.lms-course-cta .lms-btn--full {
    display:  block;
    width:    calc(100% - 48px);
    margin:   16px 24px 0;
    text-align: center;
}
.lms-course-cta__progress {
    padding: 16px 24px 0;
}
.lms-course-cta__progress .lms-progress-bar {
    height:        8px;
    background:    #E9ECEF;
    border-radius: 4px;
    overflow:      hidden;
    margin-bottom: 6px;
}
.lms-course-cta__progress .lms-progress-fill {
    height:     100%;
    background: #1A7A3C;
    transition: width .4s ease;
}
.lms-course-cta__progress .lms-progress-label {
    font-size:   13px;
    color:       #6C757D;
    font-weight: 600;
}
.lms-course-cta__free-preview {
    text-align: center;
    font-size:  13px;
    color:      #6C757D;
    margin:     8px 24px 0;
}
.lms-course-cta__prereq-notice {
    display:     flex;
    align-items: center;
    gap:         8px;
    margin:      16px 24px 0;
    padding:     12px;
    background:  #FDE8CC;
    border-radius: 6px;
    font-size:   13px;
    color:       #B85C00;
}
.lms-course-cta__includes {
    list-style:  none;
    padding:     16px 24px 24px;
    margin:      0;
    border-top:  1px solid #E9ECEF;
    margin-top:  16px;
}
.lms-course-cta__includes li {
    display:       flex;
    align-items:   center;
    gap:           8px;
    font-size:     13px;
    color:         #495057;
    padding:       4px 0;
}
.lms-course-cta__includes svg { color: #1A7A3C; flex-shrink: 0; }

/* ── Course body ────────────────────────────────────────────────────────── */
.lms-course-body {
    background:  #fff;
    padding:     60px 0;
}
.lms-course-body__inner {
    max-width: 1200px;
    margin:    0 auto;
    padding:   0 24px;
}
.lms-course-body__main { max-width: 720px; }

/* ── Sections ───────────────────────────────────────────────────────────── */
.lms-course-section {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid #E9ECEF;
}
.lms-course-section:last-child { border-bottom: none; }
.lms-course-section__title {
    font-size:   1.3rem;
    font-weight: 700;
    color:       #1B2A4A;
    margin:      0 0 20px;
    display:     flex;
    align-items: center;
    gap:         12px;
}
.lms-course-section__count {
    font-size:   13px;
    font-weight: 400;
    color:       #6C757D;
    background:  #F8F9FA;
    padding:     2px 8px;
    border-radius: 20px;
}

/* ── Description ────────────────────────────────────────────────────────── */
.lms-course-description {
    font-size:   1rem;
    line-height: 1.7;
    color:       #343A40;
}
.lms-course-description p  { margin-bottom: 1em; }
.lms-course-description ul,
.lms-course-description ol { padding-left: 1.5em; margin-bottom: 1em; }

/* ── Prerequisites ──────────────────────────────────────────────────────── */
.lms-prereq-list { list-style: none; padding: 0; margin: 0; }
.lms-prereq-item {
    display:     flex;
    align-items: center;
    gap:         10px;
    padding:     10px 0;
    border-bottom: 1px solid #F8F9FA;
    font-size:   14px;
}
.lms-prereq-item a { color: #2D6BE4; text-decoration: none; }
.lms-prereq-item a:hover { text-decoration: underline; }

/* ── Curriculum list ────────────────────────────────────────────────────── */
.lms-curriculum-list { list-style: none; padding: 0; margin: 0; counter-reset: lesson; }
.lms-curriculum-item {
    display:       flex;
    align-items:   center;
    justify-content: space-between;
    padding:       12px 16px;
    border:        1px solid #E9ECEF;
    border-radius: 6px;
    margin-bottom: 6px;
    transition:    background .1s;
}
.lms-curriculum-item:hover { background: #F8F9FA; }
.lms-curriculum-item--complete { background: #F0FFF4; border-color: #D5F0E0; }
.lms-curriculum-item__left {
    display:     flex;
    align-items: center;
    gap:         12px;
    min-width:   0;
}
.lms-curriculum-item__icon { color: #6C757D; flex-shrink: 0; }
.lms-curriculum-item__title {
    font-size: 14px;
    color:     #343A40;
}
.lms-curriculum-item__title a {
    color:           #2D6BE4;
    text-decoration: none;
}
.lms-curriculum-item__title a:hover { text-decoration: underline; }
.lms-curriculum-item__right {
    display:     flex;
    align-items: center;
    gap:         8px;
    flex-shrink: 0;
}
.lms-curriculum-item__duration { font-size: 12px; color: #6C757D; }

/* ── Instructor card ────────────────────────────────────────────────────── */
.lms-instructor-card {
    display:     flex;
    align-items: flex-start;
    gap:         20px;
    padding:     24px;
    background:  #F8F9FA;
    border-radius: 10px;
}
.lms-instructor-card__avatar {
    width:         80px;
    height:        80px;
    border-radius: 50%;
    flex-shrink:   0;
    object-fit:    cover;
}
.lms-instructor-card__name {
    font-size:   1.1rem;
    font-weight: 700;
    color:       #1B2A4A;
    margin:      0 0 8px;
}
.lms-instructor-card__bio {
    font-size:   14px;
    color:       #495057;
    line-height: 1.6;
    margin:      0;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media ( max-width: 960px ) {
    .lms-course-hero__inner {
        grid-template-columns: 1fr;
    }
    .lms-course-cta {
        position: static;
        margin-top: 32px;
    }
    .lms-course-hero__title { font-size: 1.7rem; }
}
@media ( max-width: 600px ) {
    .lms-course-hero { padding: 32px 0 48px; }
    .lms-course-hero__title { font-size: 1.4rem; }
    .lms-instructor-card { flex-direction: column; }
}

/* GAP-22: button rules — keep in sync with quiz-player.css */
/* See GAP-26 for the Phase 2 plan to consolidate these into a shared file. */
.lms-btn {
    display:         inline-flex;
    align-items:     center;
    justify-content: center;
    gap:             6px;
    padding:         12px 24px;
    border-radius:   8px;
    font-size:       15px;
    font-weight:     600;
    cursor:          pointer;
    border:          2px solid transparent;
    transition:      background-color .15s, border-color .15s, color .15s;
    text-decoration: none;
    white-space:     nowrap;
    line-height:     1.2;
}
.lms-btn:disabled              { opacity: .5; cursor: not-allowed; }
.lms-btn--primary              { background: #2D6BE4; color: #fff; border-color: #2D6BE4; }
.lms-btn--primary:hover:not(:disabled),
.lms-btn--primary:focus:not(:disabled) {
    background:   #1B50B8;
    border-color: #1B50B8;
    color:        #fff;
    text-decoration: none;
}
.lms-btn--ghost                { background: transparent; color: #6C757D; border-color: #E9ECEF; }
.lms-btn--ghost:hover          { border-color: #ADB5BD; color: #343A40; text-decoration: none; }
.lms-btn--lg                   { padding: 14px 32px; font-size: 16px; }
/* .lms-btn--full is already defined as .lms-course-cta .lms-btn--full in this file —
   so its 100% width rule continues to work. */
