/* Course-specific styles extracted from courses.html */

.courses-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    text-align: center;
    padding: 5rem 1rem 3.5rem;
}

.courses-hero h1 {
    margin-bottom: 0.8rem;
    font-size: clamp(2.1rem, 5vw, 2.9rem);
}

.courses-hero p {
    color: #94a3b8;
    max-width: 580px;
    margin: 0 auto;
}

.dashboard {
    padding: 2.5rem 5% 5rem;
}

.dashboard-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard h2 {
    margin-bottom: 1.8rem;
    font-size: 1.8rem;
    color: #1e293b;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.6rem;
}

.course-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}

.course-image {
    height: 160px;
    background: #1e293b;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-body {
    padding: 1.4rem 1.5rem 1.8rem;
}

.course-body h3 {
    margin-bottom: 0.6rem;
    font-size: 1.28rem;
    color: #1e293b;
}

.course-meta {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0.4rem 0 1rem;
}

.course-excerpt {
    font-size: 0.96rem;
    color: #334155;
    opacity: 0.92;
}

.player {
    display: none;
    min-height: 50vh;
    flex-direction: column;
}

.player.active {
    display: flex;
}

.progress-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 14px 5%;
    background: #f8f9fa;
    border-bottom: 1px solid #1e293b;
}

.step {
    min-width: 110px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #e5e7eb;
    text-align: center;
    font-size: 0.87rem;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
    transition: all 0.2s;
}

.step.active,
.step.completed {
    opacity: 1;
    cursor: pointer;
}

.step.active {
    background: #667eea;
    color: white;
}

.step.completed {
    background: #10b981;
    color: white;
}

.content-area {
    flex: 1;
    padding: clamp(2rem, 6vw, 4.5rem) 5% 5rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.lesson-title {
    font-size: clamp(1.9rem, 5vw, 2.6rem);
    margin-bottom: 1.2rem;
    color: #1e293b;
}

.lesson-duration {
    color: #94a3b8;
    font-size: 0.98rem;
    margin-bottom: 2rem;
}

.lesson-content {
    font-size: 1.07rem;
    line-height: 1.78;
    color: #334155;
}

.lesson-content img {
    max-width: 80%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.lesson-content ul,
.lesson-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.lesson-content li {
    margin: 0.5rem 0;
}

.lesson-content p {
    margin: 1rem 0;
}

.lesson-content strong,
.lesson-content b {
    font-weight: 600;
    color: #1e293b;
}

.lesson-content em,
.lesson-content i {
    font-style: italic;
}

.lesson-content a {
    color: #3b82f6;
    text-decoration: none;
}

.lesson-content a:hover {
    text-decoration: underline;
}

.lesson-content h2,
.lesson-content h3 {
    color: #1e293b;
    margin: 2.2rem 0 1rem;
}

/* ── Course Reader Styles ── */

.lesson-navigation {
    margin: 2rem 0 3rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.progress-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.step {
    min-width: 100px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #e5e7eb;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.step.active {
    background: #667eea;
    color: white;
}

.step.completed {
    background: #10b981;
    color: white;
}

.step:hover:not(.active):not(.completed) {
    background: #d1d5db;
    color: #6b7280;
}

.lesson-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3rem 0 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.lesson-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.lesson-action-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
}

.lesson-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #d1d5db;
    color: #9ca3af;
}

.lesson-action-btn.primary {
    background: #667eea;
    color: white;
}

.lesson-action-btn.primary:hover:not(:disabled) {
    background: #5a67d8;
}

.lesson-progress-text {
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.reader-progress-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: #f5f5f5;
    border: none;
    border-radius: 20px;
    padding: 0.38rem 0.8rem;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.reader-progress-btn:hover {
    background: #fff0f3;
    color: #10b981;
}

.sidebar-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    width: 100%;
    padding: 1rem 0.5rem;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #6b7280;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-action-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
}

.sidebar-action-btn small {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Mobile responsive */
@media (max-width: 780px) {
    .content-area {
        padding-left: 6%;
        padding-right: 6%;
    }

    .lesson-navigation {
        margin: 1.5rem 0 2rem;
        padding: 1rem;
    }

    .lesson-actions {
        flex-direction: column;
        gap: 1rem;
        margin: 2rem 0 1.5rem;
        padding: 1rem;
    }

    .lesson-action-btn {
        width: 100%;
        justify-content: center;
    }

    .progress-track {
        gap: 6px;
    }

    .step {
        min-width: 80px;
        padding: 6px 8px;
        font-size: 0.8rem;
    }
}

.lesson-navigation {
    display: flex;
    gap: 1.2rem;
    margin-top: 3.5rem;
    flex-wrap: wrap;
}

.btn-nav {
    padding: 0.9rem 1.8rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    color: white;
}

.btn-prev {
    background: #334155;
}

.btn-next {
    background: #667eea;
}

.btn-nav:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 780px) {
    .content-area {
        padding-left: 6%;
        padding-right: 6%;
    }
    .lesson-navigation {
        display: flex;
        flex-direction: row;
        gap: 0.8rem;
        align-items: stretch;
    }
    .courses-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Course Card Action Button ── */
.course-actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.8rem;
}

.course-action-btn {
    flex: 1;
    padding: 0.9rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.course-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.course-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}