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

.page-header {
    padding: 150px 0 80px;
    text-align: center;
    position: relative;
}

.page-header h1 {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* ============================================
   Progress Tracker
   ============================================ */
.progress-tracker {
    max-width: 600px;
    margin: 0 auto;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-orange) 0%, var(--neon-blue) 100%);
    border-radius: 50px;
    transition: width 0.5s ease;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-gray);
    font-weight: 600;
}

#progressText {
    color: var(--primary-orange);
}

/* ============================================
   Learning Path Timeline
   ============================================ */
.learning-path {
    padding: 60px 0 100px;
}

.path-timeline {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.timeline-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item:last-child .marker-line {
    display: none;
}

/* ============================================
   Timeline Marker
   ============================================ */
.timeline-marker {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.marker-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.4);
    position: relative;
    z-index: 2;
    transition: all var(--transition-base);
}

.timeline-item:hover .marker-circle {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(255, 107, 53, 0.6);
}

.marker-circle::before {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px solid var(--primary-orange);
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
}

.marker-line {
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-orange) 0%, rgba(255, 107, 53, 0.2) 100%);
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

/* ============================================
   Timeline Content
   ============================================ */
.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    position: relative;
    transition: all var(--transition-base);
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 30px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 15px solid rgba(255, 107, 53, 0.2);
}

.timeline-item:hover .timeline-content {
    transform: translateX(10px);
    border-color: var(--primary-orange);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.module-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    color: var(--white);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.timeline-content h2 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.timeline-content > p {
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ============================================
   Module Topics
   ============================================ */
.module-topics {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.module-topics h4 {
    color: var(--primary-orange);
    font-size: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.module-topics ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.8rem;
}

.module-topics li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--white);
    font-size: 0.95rem;
    padding: 0.4rem 0;
}

.module-topics li i {
    color: var(--neon-green);
    font-size: 0.9rem;
}

/* ============================================
   Module Meta Information
   ============================================ */
.module-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.module-meta span {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 500;
}

.module-meta i {
    color: var(--primary-orange);
    font-size: 1.1rem;
}

/* ============================================
   Module Actions
   ============================================ */
.module-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.module-actions .btn {
    flex: 1;
    min-width: 180px;
    justify-content: center;
}

/* ============================================
   Completion Status
   ============================================ */
.timeline-item.completed .marker-circle {
    background: linear-gradient(135deg, var(--neon-green) 0%, #00CC70 100%);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
}

.timeline-item.completed .marker-circle::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    font-size: 1rem;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: var(--white);
    color: var(--neon-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.timeline-item.in-progress .marker-circle {
    background: linear-gradient(135deg, var(--neon-blue) 0%, #0099CC 100%);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.4);
    animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 217, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 50px rgba(0, 217, 255, 0.8);
    }
}

.timeline-item.locked .timeline-content {
    opacity: 0.6;
    pointer-events: none;
}

.timeline-item.locked .marker-circle {
    background: linear-gradient(135deg, #555 0%, #333 100%);
    box-shadow: none;
}

/* ============================================
   Responsive Design for Modules Page
   ============================================ */
@media (max-width: 768px) {
    .timeline-item {
        grid-template-columns: 60px 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    
    .marker-circle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .marker-line {
        top: 60px;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .timeline-content::before {
        left: -10px;
        border-right-width: 10px;
    }
    
    .timeline-content h2 {
        font-size: 1.4rem;
    }
    
    .module-topics ul {
        grid-template-columns: 1fr;
    }
    
    .module-meta {
        gap: 1rem;
    }
    
    .module-actions {
        flex-direction: column;
    }
    
    .module-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 120px 0 60px;
    }
    
    .timeline-item {
        grid-template-columns: 50px 1fr;
        gap: 1rem;
    }
    
    .marker-circle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .timeline-content {
        padding: 1.2rem;
    }
}

/* ============================================
   Module Details Expandable Section
   ============================================ */
.module-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.module-details.expanded {
    max-height: 1000px;
}

.module-details-content {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

.learning-objectives {
    background: rgba(0, 217, 255, 0.05);
    border-left: 4px solid var(--neon-blue);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.learning-objectives h4 {
    color: var(--neon-blue);
    margin-bottom: 1rem;
}

.learning-objectives ul {
    list-style: none;
}

.learning-objectives li {
    color: var(--white);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.learning-objectives li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--neon-blue);
    font-weight: bold;
}
