/* ========================================
   Modules Page Styles
   ======================================== */

/* Page Header */
.page-header {
    padding: 160px 0 80px;
    text-align: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--accent-primary);
}

.breadcrumb .separator {
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumb span:last-child {
    color: var(--text-secondary);
}

.page-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Global Progress */
.global-progress {
    max-width: 500px;
    margin: 2rem auto 0;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-label {
    font-size: 14px;
    color: var(--text-muted);
}

.progress-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-primary);
}

.global-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0;
}

.global-progress-bar .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), #10b981);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Modules Content */
.modules-content {
    padding: 0 0 120px;
}

/* Module Block */
.module-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 32px;
    transition: var(--transition-base);
}

.module-block:hover {
    border-color: var(--border-accent);
}

.module-block.coming-soon {
    position: relative;
    opacity: 0.7;
}

.module-header {
    padding: 40px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.03) 0%, rgba(123, 47, 255, 0.03) 100%);
}

.module-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--gradient-subtle);
    border: 1px solid var(--border-accent);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.module-badge.badge-soon {
    background: rgba(255, 45, 146, 0.1);
    border-color: rgba(255, 45, 146, 0.3);
    color: var(--accent-tertiary);
}

.module-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.module-description {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 20px;
}

.module-stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.stat-item svg {
    stroke: var(--accent-primary);
    opacity: 0.7;
}

/* Lessons List */
.lessons-list {
    padding: 8px;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 16px;
    transition: var(--transition-base);
    position: relative;
}

.lesson-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.lesson-item.completed {
    opacity: 0.6;
}

.lesson-item.completed::before {
    content: '✓';
    position: absolute;
    right: 70px;
    width: 24px;
    height: 24px;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--accent-primary);
}

.lesson-number {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 500;
    color: var(--accent-primary);
    min-width: 36px;
}

.lesson-info {
    flex: 1;
}

.lesson-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    transition: var(--transition-fast);
}

.lesson-item:hover .lesson-info h3 {
    color: var(--accent-primary);
}

.lesson-info p {
    font-size: 14px;
    color: var(--text-muted);
}

.lesson-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition-fast);
}

.lesson-arrow svg {
    stroke: var(--accent-primary);
}

.lesson-item:hover .lesson-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Coming Soon Overlay */
.coming-soon-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.coming-soon-content {
    text-align: center;
}

.coming-soon-content svg {
    stroke: var(--text-muted);
    margin-bottom: 16px;
}

.coming-soon-content p {
    font-size: 16px;
    color: var(--text-muted);
}

/* Progress Bar (for future use) */
.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 16px;
}

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

/* Progress Tracking Styles */
.module-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.module-progress .progress-bar {
    flex: 1;
    height: 6px;
    margin-top: 0;
}

.module-progress .progress-text {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Completed lesson indicator */
.lesson-item.completed {
    background: rgba(16, 185, 129, 0.05);
    border-left: 3px solid #10b981;
}

.lesson-item.completed .lesson-number {
    background: #10b981;
    color: white;
}

.completed-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #10b981;
    border-radius: 50%;
    margin-left: auto;
}

.completed-check svg {
    stroke: white;
}

/* Module completed state */
.module-block.module-completed {
    border-color: rgba(16, 185, 129, 0.3);
}

.module-block.module-completed .module-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: transparent;
    color: white;
}

.module-block.module-completed .module-badge::after {
    content: ' ✓';
}

/* Sidebar completed indicator */
.lesson-nav-item.completed {
    position: relative;
}

.lesson-nav-item.completed::after {
    content: '✓';
    position: absolute;
    right: 8px;
    color: #10b981;
    font-size: 12px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .module-header {
        padding: 28px;
    }
    
    .lesson-item {
        padding: 16px;
    }
    
    .lesson-info h3 {
        font-size: 15px;
    }
    
    .lesson-info p {
        font-size: 13px;
    }
    
    .module-stats {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .module-progress {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .module-progress .progress-text {
        text-align: center;
    }
}
