/**
 * Arshia course & lesson templates
 * ---------------------------------------------------------------------------
 * Styles for single-arshia_course.php and single-arshia_lesson.php.
 * Extracted from inline style="" attributes so the templates stay readable and
 * the rules can be cached (Constitution IV — no inline style blobs in PHP).
 *
 * Font: inherits Vazirmatn from the global form/body reset in main.css.
 * Never declare font-family on controls here (Constitution I.1).
 */

/* ─────────────────────────────────────────────────────────────
   Shared shell
   ───────────────────────────────────────────────────────────── */

.ar-course-hero,
.ar-course-body {
    background: linear-gradient(135deg, #352070, #1a1a2e);
    color: #fff;
}

.ar-course-hero {
    padding: 44px 0 48px;
}

.ar-course-body {
    padding: 48px 0;
}

.ar-course-hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
}

.ar-course-body .container {
    max-width: 1100px;
}

.ar-course-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 36px;
    align-items: start;
}

/* ─────────────────────────────────────────────────────────────
   Hero
   ───────────────────────────────────────────────────────────── */

.ar-course-title {
    margin: 0 0 12px;
    font-size: 30px;
    font-weight: 900;
    color: #fff;
    line-height: 1.5;
}

.ar-course-excerpt {
    font-size: 15px;
    color: rgba(255, 255, 255, .8);
    line-height: 2;
    margin: 0 0 18px;
}

.ar-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, .7);
}

.ar-course-meta > span {
    display: inline-flex;
    align-items: center;
}

.ar-course-badge {
    padding: 2px 12px;
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
}

.ar-course-badge--beginner     { background: #059669; }
.ar-course-badge--intermediate { background: #d97706; }
.ar-course-badge--advanced     { background: #dc2626; }

.ar-course-price-pill {
    padding: 2px 16px;
    border-radius: 20px;
    font-weight: 700;
    color: #1a1a2e;
    background: #EEBB66;   /* paid */
}

.ar-course-price-pill--free {
    background: #059669;
    color: #fff;
}

.ar-course-cover {
    border-radius: 14px;
    overflow: hidden;
}

.ar-course-cover img {
    width: 100%;
    display: block;
}

/* ─────────────────────────────────────────────────────────────
   Body: content + sidebar
   ───────────────────────────────────────────────────────────── */

.ar-course-content {
    background: rgba(255, 255, 255, .05);
    border-radius: 16px;
    padding: 28px;
    line-height: 2.1;
    font-size: 15px;
    color: #fff;
}

.ar-course-content a {
    color: #EEBB66;
}

.ar-course-side {
    background: rgba(255, 255, 255, .08);
    border-radius: 16px;
    padding: 24px;
    position: sticky;
    top: 20px;
}

.ar-course-side h3 {
    margin: 0 0 14px;
    font-size: 17px;
    color: #fff;
}

.ar-course-side-price {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
}

.ar-course-side-note {
    font-size: 14px;
    color: rgba(255, 255, 255, .8);
    line-height: 2;
}

.ar-course-side-foot {
    font-size: 13px;
    color: rgba(255, 255, 255, .7);
    line-height: 2;
}

.ar-course-side hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin: 20px 0;
}

/* Primary gold button (buy) */
.ar-course-buy {
    display: block;
    text-align: center;
    background: #EEBB66;
    color: #1a1a2e;
    border: none;
    border-radius: 30px;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, transform .2s;
}

.ar-course-buy:hover {
    background: #f5cc85;
    color: #1a1a2e;
    transform: translateY(-1px);
}

/* Secondary white button (enrol on free course) */
.ar-course-enrol {
    display: block;
    text-align: center;
    background: #fff;
    color: #352070;
    padding: 12px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}

.ar-course-enrol:hover {
    background: #f0ebfa;
    color: #352070;
}

/* ─────────────────────────────────────────────────────────────
   Progress block
   ───────────────────────────────────────────────────────────── */

.ar-course-progress {
    margin-bottom: 18px;
}

.ar-course-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.ar-course-progress-label {
    font-size: 13px;
    color: rgba(255, 255, 255, .9);
    font-weight: 600;
}

.ar-course-progress-caption {
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
}

.asprog-bar {
    height: 8px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .15);
    overflow: hidden;
}

.asprog-fill {
    height: 100%;
    border-radius: 99px;
    background: #EEBB66;
    transition: width .4s ease;
}

/* ─────────────────────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .ar-course-hero .container,
    .ar-course-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .ar-course-side {
        position: static;
    }
}

@media (max-width: 560px) {
    .ar-course-hero {
        padding: 32px 0 36px;
    }

    .ar-course-body {
        padding: 34px 0;
    }

    .ar-course-title {
        font-size: 23px;
    }

    .ar-course-content,
    .ar-course-side {
        padding: 20px;
    }
}

/* ═════════════════════════════════════════════════════════════
   SINGLE LESSON  (single-arshia_lesson.php)
   ═════════════════════════════════════════════════════════════ */

.ar-lesson-wrap {
    max-width: 900px;
}

.ar-lesson-back {
    margin-bottom: 16px;
}

.ar-lesson-back a {
    color: #352070;
    text-decoration: none;
    font-size: 14px;
}

.ar-lesson-back a:hover {
    text-decoration: underline;
}

/* Progress card (light variant — lesson pages sit on white) */
.ar-lesson-progress {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.ar-lesson-progress-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.ar-lesson-progress-label {
    font-size: 13px;
    color: #555;
    font-weight: 600;
}

.ar-lesson-progress-caption {
    font-size: 12px;
    color: #888;
}

/* Light-theme progress bar (overrides the dark course variant above) */
.ar-lesson-progress .asprog-bar {
    height: 8px;
    border-radius: 99px;
    background: #eee;
    overflow: hidden;
}

.ar-lesson-progress .asprog-fill {
    height: 100%;
    border-radius: 99px;
    background: #352070;
    transition: width .4s ease;
}

/* Main lesson card */
.ar-lesson-card {
    background: #fff;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
}

.ar-lesson-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.ar-lesson-num {
    background: #f0ebfa;
    color: #352070;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ar-lesson-duration {
    font-size: 13px;
    color: #888;
}

/* "Mark as watched" toggle — previously had NO styling at all */
.asprog-toggle {
    appearance: none;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.6;
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid #352070;
    background: #fff;
    color: #352070;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.asprog-toggle:hover {
    background: #f0ebfa;
}

.asprog-toggle:focus-visible {
    outline: 3px solid rgba(53, 32, 112, .35);
    outline-offset: 2px;
}

.asprog-toggle.is-done {
    background: #059669;
    border-color: #059669;
    color: #fff;
}

.asprog-toggle.is-done:hover {
    background: #047857;
}

.asprog-toggle[disabled] {
    opacity: .6;
    cursor: default;
}

.ar-lesson-title {
    margin: 0 0 20px;
    font-size: 26px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.5;
}

/* Responsive 16:9 video embed */
.ar-lesson-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 24px;
    background: #000;
}

.ar-lesson-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.ar-lesson-content {
    line-height: 2.1;
    font-size: 15px;
    color: #333;
}

/* Prev / next navigation */
.ar-lesson-nav {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.ar-lesson-nav a {
    flex: 1;
    border-radius: 12px;
    padding: 14px 18px;
    text-decoration: none;
    font-size: 14px;
    min-width: 200px;
    transition: background .2s, border-color .2s;
}

.ar-lesson-nav .ar-lesson-prev {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #352070;
}

.ar-lesson-nav .ar-lesson-prev:hover {
    background: #faf9fd;
    border-color: #d8d2ec;
}

.ar-lesson-nav .ar-lesson-next {
    background: #352070;
    color: #fff;
    text-align: left;
}

.ar-lesson-nav .ar-lesson-next:hover {
    background: #2a1a5a;
    color: #fff;
}

@media (max-width: 560px) {
    .ar-lesson-card {
        padding: 20px;
    }

    .ar-lesson-title {
        font-size: 21px;
    }

    .ar-lesson-nav a {
        min-width: 100%;
    }
}
