/* ===========================
   Architect Exam - Course & Lessons
   Modern LMS Layout
   =========================== */

/* ===========================
   Course Overview
   =========================== */
.architect-course {
    max-width: 860px;
    margin: 0 auto;
    padding: var(--ae-space-xl) var(--ae-space-md);
}

/* Course Header */
.architect-course__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--ae-space-lg);
    margin-bottom: var(--ae-space-xl);
    padding: var(--ae-space-xl);
    background: linear-gradient(135deg, var(--ae-primary) 0%, var(--ae-primary-800) 100%);
    border-radius: var(--ae-radius-xl);
    color: #fff;
    box-shadow: 0 8px 30px rgba(31, 95, 98, 0.2);
    animation: ae-fade-up 0.5s ease;
}

.architect-course__header h1 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
}

.architect-course__header p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.9;
}

.architect-course__meta {
    display: flex;
    gap: var(--ae-space-lg);
    margin-top: var(--ae-space-md);
}

.architect-course__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.85;
}

.architect-course__header-actions {
    flex-shrink: 0;
}

.architect-course__header-actions .architect-btn--primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--ae-primary);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.architect-course__header-actions .architect-btn--primary:hover {
    background: #fff;
}

/* Progress Bar */
.architect-course__progress {
    margin-bottom: var(--ae-space-xl);
    padding: var(--ae-space-lg);
    background: var(--ae-card);
    border: 1px solid var(--ae-border);
    border-radius: var(--ae-radius);
    box-shadow: var(--ae-shadow);
    animation: ae-fade-up 0.5s 0.1s ease both;
}

.architect-course__progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.architect-course__progress-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ae-text);
}

.architect-course__progress-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--ae-primary);
}

.architect-course__progress-bar {
    height: 10px;
    background: var(--ae-border-light);
    border-radius: var(--ae-radius-full);
    overflow: hidden;
}

.architect-course__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ae-primary-400), var(--ae-primary));
    border-radius: var(--ae-radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Continue button */
.architect-course__continue {
    margin-bottom: var(--ae-space-xl);
    animation: ae-fade-up 0.5s 0.15s ease both;
}

.architect-course__continue-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ae-space-md) var(--ae-space-lg);
    background: var(--ae-primary-50);
    border: 1px solid var(--ae-primary-200);
    border-radius: var(--ae-radius);
    gap: var(--ae-space-md);
}

.architect-course__continue-info {
    display: flex;
    align-items: center;
    gap: var(--ae-space-md);
    min-width: 0;
}

.architect-course__continue-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--ae-primary);
    color: #fff;
    flex-shrink: 0;
}

.architect-course__continue-text {
    font-size: 13px;
    color: var(--ae-text-secondary);
    font-weight: 500;
}

.architect-course__continue-text strong {
    display: block;
    font-size: 14px;
    color: var(--ae-text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Empty State */
.architect-course__empty {
    text-align: center;
    padding: var(--ae-space-3xl);
    color: var(--ae-text-secondary);
    font-size: 15px;
}

/* Module */
.architect-course__module {
    margin-bottom: var(--ae-space-lg);
    background: var(--ae-card);
    border: 1px solid var(--ae-border);
    border-radius: var(--ae-radius);
    box-shadow: var(--ae-shadow);
    overflow: hidden;
    animation: ae-fade-up 0.4s cubic-bezier(0.21, 1.02, 0.73, 1) both;
}

.architect-course__module:nth-child(1) { animation-delay: 0.2s; }
.architect-course__module:nth-child(2) { animation-delay: 0.26s; }
.architect-course__module:nth-child(3) { animation-delay: 0.32s; }
.architect-course__module:nth-child(4) { animation-delay: 0.38s; }

.architect-course__module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ae-space-md) var(--ae-space-lg);
    background: var(--ae-bg);
    border-bottom: 1px solid var(--ae-border);
}

.architect-course__module-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--ae-text);
    letter-spacing: -0.01em;
}

.architect-course__module-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--ae-text-muted);
    background: var(--ae-card);
    padding: 4px 12px;
    border-radius: var(--ae-radius-full);
    border: 1px solid var(--ae-border);
}

/* Lesson Row */
.architect-course__lesson {
    display: flex;
    align-items: center;
    gap: var(--ae-space-md);
    padding: var(--ae-space-md) var(--ae-space-lg);
    border-bottom: 1px solid var(--ae-border-light);
    text-decoration: none;
    color: var(--ae-text);
    transition: background var(--ae-transition);
}

.architect-course__lesson:last-child {
    border-bottom: none;
}

.architect-course__lesson:hover {
    background: var(--ae-bg);
}

.architect-course__lesson-status {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--ae-border);
    color: var(--ae-text-muted);
    font-size: 13px;
    font-weight: 700;
    transition: all var(--ae-transition);
}

.architect-course__lesson--complete .architect-course__lesson-status {
    background: var(--ae-success);
    border-color: var(--ae-success);
    color: #fff;
}

.architect-course__lesson-number {
    font-size: 13px;
}

.architect-course__lesson-info {
    flex: 1;
    min-width: 0;
}

.architect-course__lesson-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ae-text);
    transition: color var(--ae-transition);
}

.architect-course__lesson--complete .architect-course__lesson-title {
    color: var(--ae-text-secondary);
}

.architect-course__lesson-excerpt {
    display: block;
    font-size: 13px;
    color: var(--ae-text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.architect-course__lesson-meta {
    display: flex;
    align-items: center;
    gap: var(--ae-space-sm);
    flex-shrink: 0;
}

.architect-course__lesson-duration {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--ae-text-muted);
}

.architect-course__lesson-arrow {
    color: var(--ae-text-muted);
    transition: color var(--ae-transition);
}

.architect-course__lesson:hover .architect-course__lesson-arrow {
    color: var(--ae-primary);
}

/* Locked Lessons */
.architect-course__lesson--locked {
    opacity: 0.7;
    cursor: default;
    background: var(--ae-gray-50, #f9fafb);
}

.architect-course__lesson--locked:hover {
    border-color: var(--ae-border);
    transform: none;
    box-shadow: none;
}

.architect-course__lesson--locked .architect-course__lesson-title {
    color: var(--ae-text-muted);
}

/* Lesson Badges */
.architect-course__lesson-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.architect-course__lesson-badge--free {
    background: #dbeafe;
    color: #1d4ed8;
}

.architect-course__lesson-badge--locked {
    background: #f3f4f6;
    color: #6b7280;
}

.architect-course__lesson-badge--unlock {
    background: var(--ae-primary, #2563eb);
    color: #fff;
    transition: background var(--ae-transition);
}

.architect-course__lesson-badge--unlock:hover {
    background: var(--ae-primary-dark, #1d4ed8);
    color: #fff;
    text-decoration: none;
}

/* ===========================
   Single Lesson Page
   =========================== */
.architect-lesson-page {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.architect-lesson-sidebar {
    background: var(--ae-card);
    border-right: 1px solid var(--ae-border);
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
    padding-bottom: var(--ae-space-xl);
}

.architect-lesson-sidebar__header {
    padding: var(--ae-space-md) var(--ae-space-lg);
    border-bottom: 1px solid var(--ae-border);
}

.architect-lesson-sidebar__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ae-primary);
    text-decoration: none;
    transition: color var(--ae-transition);
}

.architect-lesson-sidebar__back:hover {
    color: var(--ae-primary-dark);
}

/* Sidebar Progress */
.architect-lesson-sidebar__progress {
    padding: var(--ae-space-md) var(--ae-space-lg);
    border-bottom: 1px solid var(--ae-border-light);
}

.architect-lesson-sidebar__progress-bar {
    height: 6px;
    background: var(--ae-border-light);
    border-radius: var(--ae-radius-full);
    overflow: hidden;
    margin-bottom: 6px;
}

.architect-lesson-sidebar__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ae-primary-400), var(--ae-primary));
    border-radius: var(--ae-radius-full);
    transition: width 0.5s ease;
}

.architect-lesson-sidebar__progress-text {
    font-size: 11px;
    color: var(--ae-text-muted);
    font-weight: 600;
}

/* Sidebar Navigation */
.architect-lesson-sidebar__module {
    padding-top: var(--ae-space-sm);
}

.architect-lesson-sidebar__module-title {
    padding: var(--ae-space-sm) var(--ae-space-lg);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ae-text-muted);
}

.architect-lesson-sidebar__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px var(--ae-space-lg);
    font-size: 13px;
    color: var(--ae-text);
    text-decoration: none;
    transition: all var(--ae-transition);
    border-left: 3px solid transparent;
}

.architect-lesson-sidebar__item:hover {
    background: var(--ae-bg);
}

.architect-lesson-sidebar__item--active {
    background: var(--ae-primary-50);
    border-left-color: var(--ae-primary);
    font-weight: 600;
}

.architect-lesson-sidebar__item--done .architect-lesson-sidebar__item-title {
    color: var(--ae-text-muted);
}

.architect-lesson-sidebar__item-status {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    background: var(--ae-border-light);
    color: var(--ae-text-muted);
    transition: all var(--ae-transition);
}

.architect-lesson-sidebar__item--active .architect-lesson-sidebar__item-status {
    background: var(--ae-primary);
    color: #fff;
}

.architect-lesson-sidebar__item--done .architect-lesson-sidebar__item-status {
    background: var(--ae-success);
    color: #fff;
}

.architect-lesson-sidebar__item-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile sidebar toggle */
.architect-lesson-sidebar-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px var(--ae-space-md);
    margin-bottom: var(--ae-space-md);
    background: var(--ae-primary-50);
    border: 1px solid var(--ae-primary-200);
    border-radius: var(--ae-radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--ae-primary);
    cursor: pointer;
    width: 100%;
    font-family: var(--ae-font);
    transition: all var(--ae-transition);
}

.architect-lesson-sidebar-toggle:hover {
    background: var(--ae-primary-100);
}

/* Main Content */
.architect-lesson-content {
    padding: var(--ae-space-xl) var(--ae-space-2xl);
    max-width: 800px;
}

/* Breadcrumb */
.architect-lesson-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ae-text-muted);
    margin-bottom: var(--ae-space-lg);
}

.architect-lesson-breadcrumb a {
    color: var(--ae-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--ae-transition);
}

.architect-lesson-breadcrumb a:hover {
    color: var(--ae-primary-dark);
    text-decoration: underline;
}

.architect-lesson-breadcrumb span {
    color: var(--ae-text-secondary);
    font-weight: 600;
}

/* Lesson Header */
.architect-lesson-header {
    margin-bottom: var(--ae-space-xl);
}

.architect-lesson-header__number {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--ae-primary);
    margin-bottom: 6px;
}

.architect-lesson-header__title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
    color: var(--ae-text);
    line-height: 1.3;
    letter-spacing: -0.03em;
}

.architect-lesson-header__duration {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--ae-text-muted);
    font-weight: 500;
}

/* Video Embed */
.architect-lesson-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--ae-radius-lg);
    margin-bottom: var(--ae-space-xl);
    background: #000;
    box-shadow: var(--ae-shadow-lg);
}

.architect-lesson-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Lesson Body (content from editor) */
.architect-lesson-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--ae-text);
}

.architect-lesson-body h2,
.architect-lesson-body h3,
.architect-lesson-body h4 {
    margin: var(--ae-space-xl) 0 var(--ae-space-md);
    color: var(--ae-text);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.architect-lesson-body h2 { font-size: 22px; }
.architect-lesson-body h3 { font-size: 18px; }

.architect-lesson-body p {
    margin-bottom: var(--ae-space-md);
}

.architect-lesson-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ae-radius);
    margin: var(--ae-space-md) 0;
}

.architect-lesson-body ul,
.architect-lesson-body ol {
    margin-bottom: var(--ae-space-md);
    padding-left: var(--ae-space-xl);
}

.architect-lesson-body li {
    margin-bottom: 6px;
}

.architect-lesson-body blockquote {
    margin: var(--ae-space-lg) 0;
    padding: var(--ae-space-md) var(--ae-space-lg);
    border-left: 4px solid var(--ae-primary);
    background: var(--ae-primary-50);
    border-radius: 0 var(--ae-radius-sm) var(--ae-radius-sm) 0;
    font-style: italic;
    color: var(--ae-text-secondary);
}

.architect-lesson-body table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--ae-space-md) 0;
    font-size: 14px;
}

.architect-lesson-body th,
.architect-lesson-body td {
    padding: 10px 14px;
    border: 1px solid var(--ae-border);
    text-align: left;
}

.architect-lesson-body th {
    background: var(--ae-bg);
    font-weight: 700;
}

/* Resources */
.architect-lesson-resources {
    margin-top: var(--ae-space-xl);
    padding: var(--ae-space-lg);
    background: var(--ae-primary-50);
    border: 1px solid var(--ae-primary-200);
    border-radius: var(--ae-radius);
}

.architect-lesson-resources h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 var(--ae-space-md);
    font-size: 15px;
    font-weight: 700;
    color: var(--ae-primary-700);
}

.architect-lesson-resources ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.architect-lesson-resources li {
    margin-bottom: 8px;
}

.architect-lesson-resources a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ae-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--ae-transition);
}

.architect-lesson-resources a:hover {
    color: var(--ae-primary-dark);
    text-decoration: underline;
}

/* Footer: Mark Complete + Nav */
.architect-lesson-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--ae-space-2xl);
    padding-top: var(--ae-space-xl);
    border-top: 1px solid var(--ae-border);
    flex-wrap: wrap;
    gap: var(--ae-space-md);
}

.architect-lesson-footer__nav {
    display: flex;
    gap: var(--ae-space-sm);
}

/* Completed state */
.architect-lesson-completed {
    color: var(--ae-success) !important;
    border-color: var(--ae-success) !important;
}

.architect-lesson-completed:hover {
    background: var(--ae-success-light) !important;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
    .architect-course__header {
        flex-direction: column;
    }

    .architect-course__header-actions {
        width: 100%;
    }

    .architect-course__header-actions .architect-btn {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .architect-lesson-page {
        grid-template-columns: 1fr;
    }

    .architect-lesson-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 300px;
        height: 100vh;
        z-index: 1000;
        box-shadow: var(--ae-shadow-xl);
    }

    .architect-lesson-sidebar.architect-lesson-sidebar--open {
        display: block;
    }

    .architect-lesson-sidebar-toggle {
        display: flex;
    }

    .architect-lesson-content {
        padding: var(--ae-space-lg) var(--ae-space-md);
    }

    .architect-lesson-header__title {
        font-size: 22px;
    }

    .architect-lesson-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .architect-lesson-footer__nav {
        justify-content: space-between;
    }

    .architect-lesson-footer__complete .architect-btn {
        width: 100%;
    }

    .architect-course__meta {
        flex-direction: column;
        gap: var(--ae-space-sm);
    }

    .architect-course__lesson {
        padding: var(--ae-space-sm) var(--ae-space-md);
    }

    .architect-course__continue-card {
        flex-direction: column;
        text-align: center;
    }

    .architect-course__continue-info {
        flex-direction: column;
    }
}

/* Sidebar overlay backdrop */
.architect-lesson-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
}

.architect-lesson-sidebar-overlay--visible {
    display: block;
}
