/* =============================================
   SmartCourse LMS — Frontend v1.0.1
   Wellness / healing aesthetic
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --scl-cream:    #faf7f4;
    --scl-white:    #ffffff;
    --scl-dark:     #1a1a2e;
    --scl-purple:   #6c5ce7;
    --scl-purple-l: #a29bfe;
    --scl-warm:     #b8860b;
    --scl-green:    #00b894;
    --scl-red:      #e17055;
    --scl-text:     #2d2d3e;
    --scl-muted:    #6b7280;
    --scl-border:   #e5e0f0;
    --scl-radius:   12px;
    --scl-shadow:   0 4px 20px rgba(0,0,0,.08);
}

/* Base */
.scl-course-page,
.scl-lesson-page,
.scl-dashboard {
    font-family: 'Inter', sans-serif;
    color: var(--scl-text);
    line-height: 1.6;
}

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

/* Hero */
.scl-hero {
    background: var(--scl-dark);
    background-size: cover;
    background-position: center;
    border-radius: var(--scl-radius);
    margin-bottom: 32px;
    overflow: hidden;
}
.scl-hero-inner {
    padding: 48px 40px 44px;
    background: linear-gradient(160deg, rgba(26,26,46,.6) 0%, rgba(26,26,46,.95) 100%);
}
.scl-admin-notice {
    display: inline-block; margin-bottom: 16px;
    background: rgba(241,196,15,.2); color: #f1c40f;
    padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
}
.scl-hero-title {
    font-family: 'Lora', serif; font-size: 34px; font-weight: 700;
    color: #fff; margin: 0 0 12px; line-height: 1.25;
}
.scl-hero-desc { color: rgba(255,255,255,.75); margin: 0 0 20px; font-size: 16px; }
.scl-hero-meta { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.scl-hero-meta span { font-size: 14px; color: rgba(255,255,255,.7); }
.scl-hero-price { font-size: 22px !important; font-weight: 700; color: #fff !important; }
.scl-hero-price.free { color: var(--scl-purple-l) !important; }

/* Progress */
.scl-progress-block { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.scl-progress-track { flex: 1; max-width: 280px; height: 7px; background: rgba(255,255,255,.2); border-radius: 10px; overflow: hidden; }
.scl-progress-fill  { height: 100%; background: var(--scl-purple-l); border-radius: 10px; transition: width .5s ease; }
.scl-progress-label { font-size: 13px; color: rgba(255,255,255,.7); }

/* Mini progress (dashboard) */
.scl-dash-progress .scl-progress-track { max-width: 100%; height: 5px; background: #e5e0f0; }
.scl-dash-progress .scl-progress-fill  { background: var(--scl-purple); }
.scl-dash-progress-label { font-size: 12px; color: var(--scl-muted); margin-top: 5px; display: block; }

/* Enroll CTA box */
.scl-enroll-box {
    text-align: center; padding: 36px 24px;
    background: var(--scl-cream); border: 1px solid var(--scl-border);
    border-radius: var(--scl-radius); margin-bottom: 32px;
}
.scl-enroll-box p { color: var(--scl-muted); margin: 0 0 12px; font-size: 15px; }
.scl-enroll-price { font-family: 'Lora', serif; font-size: 40px; font-weight: 700; color: var(--scl-purple); margin-bottom: 16px; }

/* CTA Button */
.scl-cta-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--scl-purple); color: #fff;
    padding: 12px 28px; border-radius: 9px; border: none;
    font-size: 15px; font-weight: 600; cursor: pointer;
    text-decoration: none; font-family: 'Inter', sans-serif;
    transition: background .2s, transform .1s;
}
.scl-cta-btn:hover { background: #5849c5; color: #fff; transform: translateY(-1px); }
.scl-cta-btn:active { transform: translateY(0); }

/* Curriculum */
.scl-section-title {
    font-family: 'Lora', serif; font-size: 26px; font-weight: 700;
    margin: 0 0 20px; color: var(--scl-text);
}
.scl-empty-state { text-align: center; padding: 40px; color: var(--scl-muted); font-size: 15px; }

/* Module accordion */
.scl-module-accordion { border: 1px solid var(--scl-border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; background: var(--scl-white); box-shadow: 0 2px 6px rgba(0,0,0,.04); }
.scl-module-toggle {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; background: none; border: none; cursor: pointer;
    font-family: inherit; text-align: left; transition: background .15s;
}
.scl-module-toggle:hover { background: var(--scl-cream); }
.scl-toggle-left { display: flex; align-items: center; gap: 10px; }
.scl-toggle-left strong { font-size: 15px; font-weight: 600; color: var(--scl-text); }
.scl-toggle-arrow { font-size: 10px; color: var(--scl-muted); transition: transform .2s; }
.scl-module-accordion.is-open .scl-toggle-arrow { transform: rotate(90deg); }
.scl-toggle-meta { font-size: 13px; color: var(--scl-muted); }
.scl-module-body { border-top: 1px solid var(--scl-border); }
.scl-module-desc { font-size: 14px; color: var(--scl-muted); padding: 12px 20px 0; margin: 0; }

/* Lesson items */
.scl-lesson-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 20px; border-bottom: 1px solid #f0ecf8;
    transition: background .12s;
}
.scl-lesson-item:last-child { border-bottom: none; }
.scl-lesson-item:hover { background: #faf8ff; }
.scl-lesson-item.is-locked { opacity: .6; }
.scl-lesson-item.is-done   { background: #f0faf6; }
.scl-li-icon  { font-size: 17px; min-width: 26px; text-align: center; }
.scl-li-title { flex: 1; font-size: 14px; }
.scl-li-title a { color: var(--scl-purple); text-decoration: none; font-weight: 500; }
.scl-li-title a:hover { text-decoration: underline; }
.scl-li-right { display: flex; align-items: center; gap: 8px; }
.scl-tag-preview { background: #ede7f6; color: #5b50e8; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.scl-li-duration { font-size: 12px; color: var(--scl-muted); }
.scl-li-lock { opacity: .5; }

/* Notices */
.scl-notice { padding: 14px 18px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; background: #fff3cd; border: 1px solid #ffeaa7; color: #856404; }
.scl-notice a { color: var(--scl-purple); }
.scl-notice-error   { background: #fdf0f0; border-color: #f5c6cb; color: #721c24; }
.scl-notice-warning { background: #fff8e1; border-color: #ffe082; color: #7c5a00; }

/* ===================== LESSON PAGE ===================== */
.scl-lesson-page { max-width: 820px; margin: 0 auto; padding: 0 4px; }

.scl-no-access { text-align: center; padding: 80px 30px; }
.scl-no-access-icon { font-size: 64px; margin-bottom: 20px; }
.scl-no-access h2 { font-family: 'Lora', serif; font-size: 28px; margin: 0 0 12px; }
.scl-no-access p  { color: var(--scl-muted); margin-bottom: 24px; }

.scl-lesson-header { margin-bottom: 28px; }
.scl-lesson-type-tag { display: inline-block; background: #ede7f6; color: var(--scl-purple); padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.scl-lesson-title { font-family: 'Lora', serif; font-size: 30px; font-weight: 700; margin: 0 0 10px; color: var(--scl-text); }
.scl-lesson-duration { font-size: 14px; color: var(--scl-muted); }

.scl-lesson-body { margin-bottom: 40px; }

/* Video embed */
.scl-video-container { position: relative; padding-bottom: 56.25%; height: 0; margin-bottom: 28px; border-radius: 10px; overflow: hidden; background: #000; box-shadow: var(--scl-shadow); }
.scl-video-container iframe,
.scl-video-container video { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* Audio */
.scl-audio-player { margin-bottom: 28px; }
.scl-audio-card { display: flex; align-items: center; gap: 20px; padding: 20px 24px; background: var(--scl-cream); border: 1px solid var(--scl-border); border-radius: 10px; }
.scl-audio-icon { font-size: 40px; }
.scl-audio-info { flex: 1; }
.scl-audio-info strong { display: block; font-size: 16px; margin-bottom: 10px; }
.scl-audio-info audio { width: 100%; border-radius: 6px; }

/* Download */
.scl-download-block { display: flex; align-items: center; gap: 20px; padding: 24px; background: var(--scl-cream); border: 1px solid var(--scl-border); border-radius: 10px; margin-bottom: 28px; }
.scl-download-icon { font-size: 44px; }
.scl-download-info { flex: 1; }
.scl-download-info strong { display: block; font-size: 16px; margin-bottom: 4px; }
.scl-download-info p { color: var(--scl-muted); margin: 0; font-size: 14px; }

/* Lesson text content */
.scl-lesson-content { font-size: 16px; line-height: 1.85; color: var(--scl-text); }
.scl-lesson-content p { margin-bottom: 18px; }
.scl-lesson-content h2, .scl-lesson-content h3 { font-family: 'Lora', serif; margin-top: 28px; }

/* Footer */
.scl-lesson-footer { display: flex; align-items: center; gap: 16px; padding-top: 28px; border-top: 1px solid var(--scl-border); flex-wrap: wrap; }
.scl-done-badge { background: #e8f5e9; color: #2e7d32; padding: 10px 20px; border-radius: 8px; font-weight: 700; font-size: 15px; }
.scl-back-link { color: var(--scl-muted); text-decoration: none; font-size: 14px; }
.scl-back-link:hover { color: var(--scl-purple); }

/* ===================== DASHBOARD ===================== */
.scl-dashboard { max-width: 960px; }
.scl-dash-header { display: flex; align-items: center; gap: 18px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--scl-border); }
.scl-dash-avatar { width: 52px; height: 52px; background: var(--scl-purple); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; font-family: 'Lora', serif; text-transform: uppercase; flex-shrink: 0; }
.scl-dash-greeting { margin: 0 0 4px; font-family: 'Lora', serif; font-size: 22px; font-weight: 700; }
.scl-dash-sub { margin: 0; color: var(--scl-muted); font-size: 14px; }

.scl-dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.scl-dash-card { background: var(--scl-white); border: 1px solid var(--scl-border); border-radius: var(--scl-radius); overflow: hidden; box-shadow: var(--scl-shadow); transition: box-shadow .2s, transform .2s; }
.scl-dash-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,.12); transform: translateY(-2px); }

.scl-dash-card-thumb { height: 150px; background: var(--scl-dark); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; position: relative; }
.scl-dash-badge-complete { position: absolute; top: 12px; right: 12px; background: #2e7d32; color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }

.scl-dash-card-body { padding: 20px; }
.scl-dash-card-title { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: var(--scl-text); }
.scl-dash-progress { margin-bottom: 16px; }

.scl-dash-cta {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--scl-purple); color: #fff;
    padding: 9px 18px; border-radius: 7px; font-size: 14px; font-weight: 600;
    text-decoration: none; transition: background .2s;
}
.scl-dash-cta:hover { background: #5849c5; color: #fff; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 680px) {
    .scl-hero-inner { padding: 32px 20px; }
    .scl-hero-title { font-size: 24px; }
    .scl-hero-meta  { gap: 12px; }
    .scl-lesson-title { font-size: 22px; }
    .scl-audio-card, .scl-download-block { flex-direction: column; text-align: center; }
    .scl-dash-grid { grid-template-columns: 1fr; }
    .scl-lesson-footer { flex-direction: column; align-items: flex-start; }
    .scl-progress-track { max-width: 100%; }
    .scl-progress-block { flex-direction: column; align-items: flex-start; }
}

/* ===================== COURSE GRID ===================== */
.scl-course-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
}
.scl-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Card */
.scl-grid-card {
    background: var(--scl-white);
    border: 1px solid var(--scl-border);
    border-radius: var(--scl-radius);
    overflow: hidden;
    box-shadow: var(--scl-shadow);
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.scl-grid-card:hover {
    box-shadow: 0 10px 36px rgba(108,92,231,.13);
    transform: translateY(-3px);
}

/* Thumbnail */
.scl-grid-thumb-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--scl-dark);
    text-decoration: none;
}
.scl-grid-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.scl-grid-card:hover .scl-grid-thumb {
    transform: scale(1.04);
}
.scl-grid-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2b55 100%);
    font-size: 48px;
}

/* Price badge */
.scl-grid-price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--scl-purple);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: .01em;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    font-family: 'Inter', sans-serif;
}
.scl-grid-price-badge.is-free {
    background: var(--scl-green);
}

/* Card body */
.scl-grid-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.scl-grid-title {
    margin: 0 0 8px;
    font-family: 'Lora', serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}
.scl-grid-title a {
    color: var(--scl-text);
    text-decoration: none;
    transition: color .15s;
}
.scl-grid-title a:hover { color: var(--scl-purple); }

.scl-grid-desc {
    font-size: 13.5px;
    color: var(--scl-muted);
    line-height: 1.6;
    margin: 0 0 14px;
    flex: 1;
}

/* Meta row */
.scl-grid-meta {
    display: flex;
    gap: 16px;
    font-size: 12.5px;
    color: var(--scl-muted);
    margin-bottom: 18px;
    font-weight: 500;
}
.scl-grid-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}
.scl-grid-meta svg { flex-shrink: 0; opacity: .7; }

/* CTA button */
.scl-grid-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--scl-cream);
    border: 1.5px solid var(--scl-border);
    color: var(--scl-purple);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: background .15s, border-color .15s, color .15s;
    align-self: flex-start;
    margin-top: auto;
}
.scl-grid-btn:hover {
    background: var(--scl-purple);
    border-color: var(--scl-purple);
    color: #fff;
}
.scl-grid-btn svg { transition: transform .15s; }
.scl-grid-btn:hover svg { transform: translateX(3px); }

/* Empty state */
.scl-grid-empty {
    text-align: center;
    padding: 64px 24px;
    color: var(--scl-muted);
}
.scl-grid-empty-icon { font-size: 52px; margin-bottom: 14px; }
.scl-grid-empty p { font-size: 16px; margin: 0; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
    .scl-course-grid,
    .scl-grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 560px) {
    .scl-course-grid,
    .scl-grid-cols-2 {
        grid-template-columns: 1fr;
    }
}
