/* ========================================
   MSR ACADEMY — COURSE PLATFORM STYLES
   Extends: styles.css design system
   Colors: --primary-red:#DC2626, --dark-gray:#1F2937, --white:#FFFFFF
   ======================================== */

/* ========================================
   COURSE STATUS BADGES
   ======================================== */

.course-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.badge-free {
    background: #DCFCE7;
    color: #166534;
}

.badge-paid {
    background: #FEF9C3;
    color: #854D0E;
}

.badge-published {
    background: #DCFCE7;
    color: #166534;
}

.badge-draft {
    background: #F3F4F6;
    color: #6B7280;
}

.badge-coming-soon {
    background: #EFF6FF;
    color: #1D4ED8;
}

.badge-advanced {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-intermediate {
    background: #FEF3C7;
    color: #92400E;
}

.badge-beginner {
    background: #D1FAE5;
    color: #065F46;
}

.badge-locked {
    background: #F3F4F6;
    color: #9CA3AF;
}

/* ========================================
   COURSES LISTING PAGE
   ======================================== */

.courses-page {
    min-height: 100vh;
    background: var(--white);
}

.courses-hero {
    background: var(--dark-gray);
    padding: 80px 0 60px;
    text-align: center;
}

.courses-hero h1 {
    font-size: 48px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.1;
}

.courses-hero h1 span {
    color: var(--primary-red);
}

.courses-hero p {
    font-size: 18px;
    color: rgba(255,255,255,0.75);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.courses-section {
    padding: 80px 0;
}

.courses-section .section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 48px;
}

.courses-section .section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-gray);
}

.courses-count {
    font-size: 14px;
    color: var(--gray);
    font-weight: 500;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

/* ========================================
   COURSE CARD
   ======================================== */

.course-card-item {
    background: var(--white);
    border: 1.5px solid var(--border-gray);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.course-card-item:hover {
    border-color: var(--primary-red);
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.12);
    transform: translateY(-3px);
}

.course-card-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 52%;
    background: var(--dark-gray);
    overflow: hidden;
}

.course-card-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.course-card-item:hover .course-card-thumbnail img {
    transform: scale(1.04);
}

.course-card-thumbnail-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-card-thumbnail-placeholder svg {
    color: rgba(255,255,255,0.2);
}

.course-card-status-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
}

.course-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-card-category {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-red);
}

.course-card-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--dark-gray);
    line-height: 1.3;
    margin: 0;
}

.course-card-description {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.course-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-gray);
    margin-top: auto;
}

.course-card-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--gray);
    font-weight: 500;
}

.course-card-meta-item svg {
    color: var(--primary-red);
    flex-shrink: 0;
}

.course-card-footer {
    padding: 0 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.course-card-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark-gray);
}

.course-card-price.free {
    color: #166534;
}

.course-card-cta {
    font-size: 13px;
    font-weight: 700;
    padding: 9px 20px;
    border-radius: 6px;
    background: var(--primary-red);
    color: var(--white);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.course-card-cta:hover {
    background: var(--dark-red);
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}

/* ========================================
   COURSE DETAIL PAGE — LAYOUT
   ======================================== */

.course-detail-page {
    min-height: 100vh;
    background: var(--white);
}

/* Breadcrumb */
.course-breadcrumb {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-gray);
    background: var(--white);
}

.course-breadcrumb-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray);
}

.course-breadcrumb-inner a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.2s;
}

.course-breadcrumb-inner a:hover {
    color: var(--primary-red);
}

.course-breadcrumb-sep {
    color: var(--border-gray);
}

.course-breadcrumb-current {
    color: var(--dark-gray);
    font-weight: 500;
}

/* ========================================
   COURSE HERO
   ======================================== */

.course-hero {
    background: var(--dark-gray);
    padding: 64px 0;
}

.course-hero-inner {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 56px;
    align-items: start;
}

.course-hero-content {
    color: var(--white);
}

.course-hero-category {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-red);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.course-hero-title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 16px;
}

.course-hero-subtitle {
    font-size: 17px;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 560px;
}

.course-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.course-hero-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
}

.course-hero-badge svg {
    color: var(--primary-red);
}

.course-hero-instructor {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.course-hero-instructor-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-red);
}

.course-hero-instructor-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.course-hero-instructor-label {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.course-hero-instructor-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
}

/* Course Hero Card (right side) */
.course-hero-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    position: sticky;
    top: 90px;
}

.course-hero-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    background: #111;
}

.course-hero-card-body {
    padding: 28px;
}

.course-hero-card-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark-gray);
    margin-bottom: 4px;
}

.course-hero-card-price.free {
    color: #166534;
}

.course-hero-card-price-note {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 20px;
}

.course-enroll-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-family);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 16px;
}

.course-enroll-btn:hover {
    background: var(--dark-red);
    box-shadow: 0 6px 20px rgba(220,38,38,0.35);
}

.course-hero-card-includes {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.course-hero-card-includes li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--dark-gray);
}

.course-hero-card-includes li svg {
    color: var(--primary-red);
    flex-shrink: 0;
}

/* ========================================
   COURSE TABS / NAVIGATION
   ======================================== */

.course-tabs-bar {
    position: sticky;
    top: 72px;
    background: var(--white);
    border-bottom: 2px solid var(--border-gray);
    z-index: 100;
}

.course-tabs-inner {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.course-tabs-inner::-webkit-scrollbar {
    display: none;
}

.course-tab {
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font-family);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.course-tab:hover {
    color: var(--dark-gray);
}

.course-tab.active {
    color: var(--primary-red);
    border-bottom-color: var(--primary-red);
}

/* ========================================
   COURSE BODY LAYOUT
   ======================================== */

.course-body {
    padding: 64px 0;
}

.course-body-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 56px;
    align-items: start;
}

.course-body-main {
    min-width: 0;
}

.course-body-sidebar {
    position: sticky;
    top: 120px;
}

/* ========================================
   COURSE OVERVIEW TAB SECTIONS
   ======================================== */

.course-section {
    margin-bottom: 56px;
}

.course-section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--border-gray);
}

/* Learning Outcomes */
.learning-outcomes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.learning-outcome-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.5;
}

.learning-outcome-item::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23DC2626' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Prerequisites */
.prerequisites-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prerequisites-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.5;
}

.prerequisites-list li::before {
    content: '→';
    color: var(--primary-red);
    font-weight: 700;
    flex-shrink: 0;
}

/* Target Audience */
.target-audience-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.target-audience-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--dark-gray);
    padding: 12px 16px;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 3px solid var(--primary-red);
    line-height: 1.5;
}

/* Course Description */
.course-description-text {
    font-size: 15px;
    color: var(--dark-gray);
    line-height: 1.75;
}

.course-description-text p + p {
    margin-top: 16px;
}

/* ========================================
   INSTRUCTOR CARD
   ======================================== */

.instructor-card {
    display: flex;
    gap: 24px;
    padding: 28px;
    background: var(--light-gray);
    border-radius: 12px;
    border: 1px solid var(--border-gray);
}

.instructor-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-red);
    flex-shrink: 0;
}

.instructor-info {
    flex: 1;
}

.instructor-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 4px;
}

.instructor-title {
    font-size: 13px;
    color: var(--primary-red);
    font-weight: 600;
    margin-bottom: 12px;
}

.instructor-bio {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.65;
}

/* ========================================
   CURRICULUM (DAYS / MODULES)
   ======================================== */

.curriculum-section {
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    overflow: hidden;
}

.curriculum-stats {
    display: flex;
    gap: 24px;
    padding: 20px 24px;
    background: var(--light-gray);
    border-bottom: 1px solid var(--border-gray);
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
}

.curriculum-stats span {
    color: var(--dark-gray);
    font-weight: 700;
}

/* Day / Module accordion */
.curriculum-day {
    border-bottom: 1px solid var(--border-gray);
}

.curriculum-day:last-child {
    border-bottom: none;
}

.curriculum-day-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    cursor: pointer;
    background: var(--white);
    transition: background 0.15s;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-family);
}

.curriculum-day-header:hover {
    background: #FAFAFA;
}

.curriculum-day.open .curriculum-day-header {
    background: #FFF5F5;
    border-bottom: 1px solid #FEE2E2;
}

.day-number-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--dark-gray);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.curriculum-day.day-published .day-number-badge {
    background: var(--primary-red);
}

.curriculum-day.day-coming-soon .day-number-badge {
    background: var(--gray);
}

.curriculum-day-info {
    flex: 1;
    min-width: 0;
}

.curriculum-day-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 3px;
}

.curriculum-day-meta {
    font-size: 12px;
    color: var(--gray);
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.curriculum-day-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.curriculum-chevron {
    width: 20px;
    height: 20px;
    color: var(--gray);
    transition: transform 0.25s ease;
}

.curriculum-day.open .curriculum-chevron {
    transform: rotate(180deg);
}

/* Lesson list inside day */
.curriculum-lessons {
    display: none;
    background: var(--white);
}

.curriculum-day.open .curriculum-lessons {
    display: block;
}

.curriculum-lesson {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px 12px 76px;
    border-bottom: 1px solid var(--border-gray);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}

.curriculum-lesson:last-child {
    border-bottom: none;
}

.curriculum-lesson:hover {
    background: var(--light-gray);
}

.curriculum-lesson.lesson-locked {
    cursor: default;
    opacity: 0.65;
}

.lesson-type-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--gray);
}

.lesson-type-icon.type-article { background: #EFF6FF; color: #1D4ED8; }
.lesson-type-icon.type-video   { background: #FFF1F2; color: var(--primary-red); }
.lesson-type-icon.type-quiz    { background: #F0FDF4; color: #16A34A; }

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

.lesson-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-gray);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lesson-duration {
    font-size: 11px;
    color: var(--gray);
    margin-top: 2px;
}

.lesson-status-icon {
    flex-shrink: 0;
    color: var(--gray);
}

.lesson-preview-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-red);
    background: #FFF1F2;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid #FEE2E2;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

/* ========================================
   LESSON VIEWER
   ======================================== */

.lesson-viewer {
    display: none;
    min-height: 80vh;
}

.lesson-viewer.active {
    display: block;
}

.lesson-viewer-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    min-height: 80vh;
    border-top: 1px solid var(--border-gray);
}

/* Lesson sidebar */
.lesson-sidebar {
    background: var(--light-gray);
    border-right: 1px solid var(--border-gray);
    overflow-y: auto;
    max-height: calc(100vh - 160px);
    position: sticky;
    top: 100px;
}

.lesson-sidebar-day {
    border-bottom: 1px solid var(--border-gray);
}

.lesson-sidebar-day-header {
    padding: 14px 18px;
    font-size: 12px;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: none;
    width: 100%;
    font-family: var(--font-family);
    text-align: left;
}

.lesson-sidebar-day-header.active {
    color: var(--primary-red);
    background: #FFF5F5;
}

.lesson-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 12px;
    color: var(--gray);
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    width: 100%;
    background: none;
    text-align: left;
    font-family: var(--font-family);
}

.lesson-sidebar-item:hover {
    background: var(--border-gray);
    color: var(--dark-gray);
}

.lesson-sidebar-item.active {
    background: #FFF1F2;
    color: var(--primary-red);
    font-weight: 600;
    border-left: 3px solid var(--primary-red);
}

.lesson-sidebar-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Lesson content area */
.lesson-content-area {
    padding: 48px 56px;
    max-width: 860px;
}

.lesson-content-header {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-gray);
}

.lesson-content-day-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-red);
    margin-bottom: 10px;
}

.lesson-content-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--dark-gray);
    line-height: 1.2;
    margin-bottom: 14px;
}

.lesson-content-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--gray);
}

.lesson-content-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Lesson rich content styles */
.lesson-body h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-gray);
    margin: 36px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-gray);
}

.lesson-body h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-gray);
    margin: 28px 0 12px;
}

.lesson-body h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-red);
    margin: 20px 0 8px;
}

.lesson-body p {
    font-size: 15px;
    color: var(--dark-gray);
    line-height: 1.8;
    margin-bottom: 16px;
}

.lesson-body ul,
.lesson-body ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.lesson-body li {
    font-size: 15px;
    color: var(--dark-gray);
    line-height: 1.7;
    margin-bottom: 6px;
}

.lesson-body strong {
    color: var(--dark-gray);
    font-weight: 700;
}

.lesson-body em {
    font-style: italic;
    color: #374151;
}

.lesson-hero-image {
    margin: 0 0 32px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-gray);
}

.lesson-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    font-size: 12px;
    color: var(--gray);
    font-style: italic;
    padding: 10px 16px;
    background: var(--light-gray);
    margin: 0;
    line-height: 1.4;
}

/* Video placeholder */
.lesson-video-placeholder {
    margin: 24px 0;
}

.video-coming-soon {
    background: var(--dark-gray);
    border-radius: 12px;
    padding: 56px 32px;
    text-align: center;
    color: var(--white);
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.video-coming-soon svg {
    color: rgba(255,255,255,0.3);
}

.video-coming-soon h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.video-coming-soon p {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    max-width: 400px;
    line-height: 1.6;
    margin: 0;
}

.video-note {
    font-size: 12px !important;
    color: rgba(255,255,255,0.4) !important;
    font-style: italic;
}

/* ========================================
   QUIZ COMPONENT
   ======================================== */

.quiz-container {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid var(--border-gray);
}

.quiz-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-gray);
}

.quiz-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 6px;
}

.quiz-header p {
    font-size: 13px;
    color: var(--gray);
}

.quiz-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 13px;
    color: var(--gray);
    font-weight: 600;
}

.quiz-progress-bar {
    height: 4px;
    background: var(--border-gray);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--primary-red);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.quiz-question {
    margin-bottom: 24px;
}

.quiz-question-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 16px;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: var(--white);
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    font-size: 14px;
    color: var(--dark-gray);
    line-height: 1.5;
    text-align: left;
    font-family: var(--font-family);
    width: 100%;
}

.quiz-option:hover {
    border-color: var(--primary-red);
    background: #FFF5F5;
}

.quiz-option.selected {
    border-color: var(--primary-red);
    background: #FFF5F5;
    font-weight: 600;
}

.quiz-option.correct {
    border-color: #16A34A;
    background: #F0FDF4;
    color: #166534;
}

.quiz-option.incorrect {
    border-color: #DC2626;
    background: #FEF2F2;
    color: #991B1B;
}

.quiz-option-letter {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--light-gray);
    border: 1.5px solid var(--border-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.quiz-option.selected .quiz-option-letter {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: white;
}

.quiz-option.correct .quiz-option-letter {
    background: #16A34A;
    border-color: #16A34A;
    color: white;
}

.quiz-option.incorrect .quiz-option-letter {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: white;
}

.quiz-submit-btn {
    margin-top: 20px;
    padding: 12px 32px;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-family);
    transition: var(--transition);
}

.quiz-submit-btn:hover {
    background: var(--dark-red);
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}

.quiz-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.quiz-result {
    margin-top: 24px;
    padding: 20px 24px;
    border-radius: 8px;
    display: none;
}

.quiz-result.show { display: block; }

.quiz-result.pass {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #166534;
}

.quiz-result.fail {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
}

.quiz-result-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.quiz-result-score {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.quiz-retry-btn {
    margin-top: 14px;
    padding: 10px 24px;
    background: transparent;
    border: 2px solid currentColor;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family);
    color: inherit;
}

/* ========================================
   LESSON NAVIGATION (PREV / NEXT)
   ======================================== */

.lesson-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 0;
    margin-top: 40px;
    border-top: 1px solid var(--border-gray);
}

.lesson-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: 1.5px solid var(--border-gray);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-gray);
    text-decoration: none;
    cursor: pointer;
    background: var(--white);
    font-family: var(--font-family);
    transition: var(--transition);
}

.lesson-nav-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.lesson-nav-btn.primary {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: var(--white);
}

.lesson-nav-btn.primary:hover {
    background: var(--dark-red);
    border-color: var(--dark-red);
    color: var(--white);
}

/* ========================================
   ENROLLMENT CTA / PAYMENT PLACEHOLDER
   ======================================== */

.enrollment-cta {
    background: var(--dark-gray);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    color: var(--white);
    margin-bottom: 24px;
}

.enrollment-cta h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.enrollment-cta p {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Payment CTA placeholder */
.payment-cta {
    background: var(--light-gray);
    border: 2px dashed var(--border-gray);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: var(--gray);
    font-size: 13px;
}

.payment-cta code {
    background: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    border: 1px solid var(--border-gray);
    color: var(--dark-gray);
}

/* ========================================
   COMING SOON LESSON
   ======================================== */

.lesson-coming-soon {
    text-align: center;
    padding: 80px 40px;
}

.lesson-coming-soon svg {
    color: var(--border-gray);
    margin-bottom: 24px;
}

.lesson-coming-soon h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 12px;
}

.lesson-coming-soon p {
    font-size: 15px;
    color: var(--gray);
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .course-hero-inner {
        grid-template-columns: 1fr;
    }
    .course-hero-card {
        max-width: 480px;
        position: static;
    }
    .course-body-layout {
        grid-template-columns: 1fr;
    }
    .course-body-sidebar {
        position: static;
        order: -1;
    }
    .lesson-viewer-layout {
        grid-template-columns: 1fr;
    }
    .lesson-sidebar {
        position: static;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border-gray);
    }
    .lesson-content-area {
        padding: 32px 24px;
    }
    .learning-outcomes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .courses-hero h1 { font-size: 32px; }
    .course-hero { padding: 40px 0; }
    .course-hero-title { font-size: 28px; }
    .courses-grid { grid-template-columns: 1fr; }
    .curriculum-lesson { padding-left: 24px; }
    .lesson-content-area { padding: 24px 16px; }
    .lesson-content-title { font-size: 22px; }
}

/* ═══════════════════════════════════════════════════════════════
   FINAL CERTIFICATION EXAM — Environment
   ═══════════════════════════════════════════════════════════════ */

/* ── Print protection ── */
@media print {
    body * { visibility: hidden !important; }
    .exam-security-print-warning,
    .exam-security-print-warning * { visibility: visible !important; }
    .exam-security-print-warning {
        display: flex !important;
        position: fixed !important;
        inset: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 24px !important;
        text-align: center !important;
        padding: 40px !important;
        background: #0a0a0a !important;
        color: #fff !important;
        flex-direction: column !important;
    }
}

/* ── Exam sidebar item ── */
.lesson-sidebar-item.exam-item {
    border-left: 3px solid #DC2626;
    color: #DC2626;
    font-weight: 600;
}
.lesson-sidebar-item.exam-item.active {
    background: rgba(220,38,38,0.12);
    color: #DC2626;
}

/* ── Full-screen exam container ── */
#final-exam-env {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0a0a0a;
    color: #f0f0f0;
    font-family: inherit;
    overflow: hidden;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
#final-exam-env.active {
    display: flex;
}

/* ── Exam header bar ── */
.exam-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: #111;
    border-bottom: 2px solid #DC2626;
    flex-shrink: 0;
    gap: 16px;
    flex-wrap: wrap;
}
.exam-header-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}
.exam-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.exam-timer {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
    background: #1a1a1a;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #333;
    min-width: 100px;
    text-align: center;
}
.exam-timer.warning {
    color: #f59e0b;
    border-color: #f59e0b;
    animation: exam-blink 1s step-end infinite;
}
.exam-timer.critical {
    color: #DC2626;
    border-color: #DC2626;
    animation: exam-blink 0.5s step-end infinite;
}
@keyframes exam-blink { 50% { opacity: 0.4; } }

.exam-progress-label {
    font-size: 13px;
    color: #aaa;
    font-weight: 500;
}
.exam-warnings-label {
    font-size: 12px;
    color: #888;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #333;
}
.exam-warnings-label.has-warnings {
    color: #f59e0b;
    border-color: #f59e0b;
}

/* ── Scroll area ── */
.exam-body {
    flex: 1;
    overflow-y: auto;
    padding: 40px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Instructions screen ── */
.exam-instructions {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
}
.exam-instructions-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.exam-instructions-subtitle {
    font-size: 14px;
    color: #DC2626;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 28px;
}
.exam-instructions-card {
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 20px;
}
.exam-instructions-card h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #DC2626;
    margin-bottom: 12px;
}
.exam-instructions-card p {
    font-size: 15px;
    color: #ccc;
    line-height: 1.65;
    margin-bottom: 12px;
}
.exam-instructions-card p:last-child { margin-bottom: 0; }
.exam-rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.exam-rules-list li {
    font-size: 14px;
    color: #ccc;
    padding: 8px 12px;
    background: #1e1e1e;
    border-radius: 6px;
    border-left: 3px solid #DC2626;
    display: flex;
    align-items: center;
    gap: 8px;
}
.exam-security-warning {
    background: #1a0e0e;
    border: 1px solid #7f1d1d;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #fca5a5;
    line-height: 1.6;
}
.exam-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    cursor: pointer;
}
.exam-checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #DC2626;
    cursor: pointer;
}
.exam-checkbox-row label {
    font-size: 14px;
    color: #ccc;
    cursor: pointer;
    user-select: none;
}
.exam-start-btn {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: #DC2626;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.1s, opacity 0.2s;
}
.exam-start-btn:hover:not(:disabled) { background: #b91c1c; }
.exam-start-btn:active:not(:disabled) { transform: scale(0.98); }
.exam-start-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Question screen ── */
.exam-question-screen {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
}
.exam-progress-bar-outer {
    height: 4px;
    background: #222;
    border-radius: 2px;
    margin-bottom: 32px;
    overflow: hidden;
}
.exam-progress-bar-fill {
    height: 100%;
    background: #DC2626;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.exam-question-number {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #DC2626;
    margin-bottom: 12px;
}
.exam-question-text {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    line-height: 1.6;
    margin-bottom: 28px;
}
.exam-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 32px;
}
.exam-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: #151515;
    border: 2px solid #2a2a2a;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    text-align: left;
    width: 100%;
    color: #ddd;
    font-size: 15px;
    line-height: 1.5;
}
.exam-option:hover {
    border-color: #555;
    background: #1a1a1a;
}
.exam-option.selected {
    border-color: #DC2626;
    background: #1a0808;
    color: #fff;
}
.exam-option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 6px;
    background: #222;
    border: 1px solid #333;
    font-size: 13px;
    font-weight: 700;
    color: #888;
    flex-shrink: 0;
}
.exam-option.selected .exam-option-letter {
    background: #DC2626;
    border-color: #DC2626;
    color: #fff;
}
.exam-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.exam-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 22px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ccc;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.exam-nav-btn:hover { background: #2a2a2a; border-color: #555; }
.exam-nav-btn.primary {
    background: #DC2626;
    border-color: #DC2626;
    color: #fff;
}
.exam-nav-btn.primary:hover { background: #b91c1c; }
.exam-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.exam-submit-btn {
    padding: 12px 22px;
    background: transparent;
    border: 1px solid #DC2626;
    border-radius: 8px;
    color: #DC2626;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.exam-submit-btn:hover { background: rgba(220,38,38,0.1); }

.exam-unanswered-note {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin-top: 8px;
}
.exam-unanswered-note span { color: #f59e0b; font-weight: 600; }

/* ── Result screen ── */
.exam-result-screen {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}
.exam-result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
}
.exam-result-icon.pass { background: rgba(22,163,74,0.15); border: 2px solid #16a34a; }
.exam-result-icon.fail { background: rgba(220,38,38,0.12); border: 2px solid #DC2626; }
.exam-result-title {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}
.exam-result-status {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 28px;
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
}
.exam-result-status.pass { background: rgba(22,163,74,0.15); color: #4ade80; border: 1px solid #16a34a; }
.exam-result-status.fail { background: rgba(220,38,38,0.12); color: #f87171; border: 1px solid #DC2626; }
.exam-result-flagged {
    background: rgba(245,158,11,0.1);
    border: 1px solid #d97706;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #fbbf24;
    margin-bottom: 20px;
}
.exam-score-card {
    background: #151515;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
}
.exam-score-number {
    font-size: 56px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 4px;
}
.exam-score-label {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}
.exam-score-details {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}
.exam-score-detail {
    text-align: center;
}
.exam-score-detail-value {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}
.exam-score-detail-label {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}
.exam-result-message {
    font-size: 15px;
    color: #bbb;
    line-height: 1.65;
    margin-bottom: 28px;
}
.exam-result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.exam-cert-btn {
    padding: 14px 28px;
    background: #DC2626;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.exam-cert-btn:hover { background: #b91c1c; }
.exam-retry-btn {
    padding: 14px 28px;
    background: transparent;
    color: #ccc;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid #333;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.exam-retry-btn:hover { border-color: #555; color: #fff; }
.exam-close-btn {
    padding: 14px 28px;
    background: transparent;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.exam-close-btn:hover { border-color: #444; color: #ccc; }

/* ── Security overlay ── */
.exam-security-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 10000;
    background: rgba(5,5,5,0.97);
    backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}
.exam-security-overlay.active { display: flex; }
.exam-security-overlay-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(220,38,38,0.15);
    border: 2px solid #DC2626;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
}
.exam-security-overlay h2 {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}
.exam-security-overlay p {
    font-size: 14px;
    color: #aaa;
    line-height: 1.65;
    max-width: 480px;
    margin-bottom: 28px;
}
.exam-return-btn {
    padding: 14px 32px;
    background: #DC2626;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.exam-return-btn:hover { background: #b91c1c; }

/* ── Curriculum exam-type item ── */
.lesson-type-icon.type-exam {
    background: rgba(220,38,38,0.15);
    color: #DC2626;
}

/* ── Print warning element (hidden normally, shown on print) ── */
.exam-security-print-warning {
    display: none;
    background: #0a0a0a;
    color: #fff;
}

/* ── Mobile tweaks ── */
@media (max-width: 640px) {
    .exam-header { padding: 10px 16px; }
    .exam-body { padding: 24px 16px; }
    .exam-rules-list { grid-template-columns: 1fr; }
    .exam-question-text { font-size: 16px; }
    .exam-option { font-size: 14px; padding: 13px 14px; }
    .exam-score-number { font-size: 40px; }
    .exam-header-title { font-size: 13px; }
    .exam-timer { font-size: 15px; }
}
