/* ==================================================
   NOXCODE — COURSE PAGE
================================================== */


/* ==================================================
   COURSE PAGE
================================================== */

.course-page {
    width: min(1000px, 100%);
    margin: 0 auto;

    padding: 70px 20px 100px;
}


/* ==================================================
   COURSE HEADER
================================================== */

.course-header {
    margin-bottom: 40px;

    text-align: center;
}

.course-label {
    margin: 0 0 10px;

    color: var(--blue);

    font-size: 14px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 2px;
}

.course-header h1 {
    margin: 0;

    font-size: clamp(36px, 6vw, 58px);

    line-height: 1.1;

    background: var(--gradient);

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}

.course-description {
    max-width: 650px;

    margin: 20px auto 0;

    color: var(--text-secondary);

    font-size: 18px;

    line-height: 1.7;
}


/* ==================================================
   COURSE PROGRESS
================================================== */

.course-progress {
    margin-bottom: 50px;

    padding: 25px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, 0.2);
}

.progress-top {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 15px;

    color: var(--text-secondary);

    font-size: 14px;
}

.progress-top div {
    display: flex;

    align-items: center;

    gap: 12px;
}

.progress-top strong {
    color: white;

    font-size: 18px;
}

#courseProgressText {
    color: var(--text-muted);
}

.progress-bar {
    width: 100%;
    height: 10px;

    overflow: hidden;

    background: var(--bg);

    border-radius: 20px;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;

    background: var(--gradient);

    border-radius: inherit;

    transition: width 0.6s ease;
}


/* ==================================================
   COURSE MODULES
================================================== */

.course-modules h2 {
    margin-bottom: 25px;

    font-size: 30px;
}


/* ==================================================
   MODULE
================================================== */

.course-module {
    margin-bottom: 25px;

    overflow: hidden;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.course-module:not(.locked-module):hover {
    border-color: var(--border-hover);

    box-shadow:
        0 15px 40px
        rgba(0, 0, 0, 0.2);
}


/* ==================================================
   MODULE HEADER
================================================== */

.module-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 25px;

    padding: 30px;
}

.module-number {
    display: inline-block;

    margin-bottom: 8px;

    color: var(--blue);

    font-size: 13px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.module-header h3 {
    margin: 0 0 8px;

    font-size: 24px;
}

.module-header p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 15px;
}

.module-progress {
    flex-shrink: 0;

    padding: 8px 12px;

    background: var(--bg-secondary);

    border: 1px solid var(--border);

    border-radius: 10px;

    color: var(--text-muted);

    font-size: 13px;
}


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

.lesson {
    display: flex;

    align-items: center;

    gap: 18px;

    margin: 0 20px 12px;
    padding: 18px;

    color: inherit;

    text-decoration: none;

    background: var(--bg-secondary);

    border: 1px solid transparent;

    border-radius: 12px;

    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition);
}

.lesson:last-child {
    margin-bottom: 20px;
}

.lesson:not(.locked):hover {
    transform: translateX(5px);

    background: #121A2C;

    border-color: var(--border-hover);
}


/* ==================================================
   LESSON NUMBER
================================================== */

.lesson-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 45px;
    height: 45px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: 12px;

    color: var(--text-secondary);

    font-size: 13px;
    font-weight: 700;
}


/* ==================================================
   LESSON INFO
================================================== */

.lesson-info {
    flex: 1;
}

.lesson-info h4 {
    margin: 0 0 4px;

    color: white;

    font-size: 16px;
}

.lesson-info p {
    margin: 0;

    color: var(--text-muted);

    font-size: 13px;
}


/* ==================================================
   LESSON STATUS
================================================== */

.lesson-status {
    flex-shrink: 0;

    color: var(--blue);

    font-size: 20px;
}

.lesson.locked {
    cursor: not-allowed;

    opacity: 0.45;
}


/* ==================================================
   LOCKED MODULE
================================================== */

.locked-module {
    opacity: 0.5;

    cursor: not-allowed;
}

.locked-module .module-number {
    color: var(--text-muted);
}


/* ==================================================
   ANIMATIONS
================================================== */

.course-header {
    animation: courseFade 0.7s ease;
}

.course-progress {
    animation: courseFade 0.8s ease;
}

.course-module {
    animation: courseSlide 0.6s ease both;
}

.course-module:nth-child(2) {
    animation-delay: 0.1s;
}

.course-module:nth-child(3) {
    animation-delay: 0.2s;
}

.course-module:nth-child(4) {
    animation-delay: 0.3s;
}

.course-module:nth-child(5) {
    animation-delay: 0.4s;
}


@keyframes courseFade {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


@keyframes courseSlide {

    from {
        opacity: 0;

        transform: translateY(20px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }

}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 768px) {

    .course-page {
        padding: 50px 15px 70px;
    }


    .course-description {
        font-size: 16px;
    }


    .course-progress {
        padding: 20px;
    }


    .progress-top {
        align-items: flex-start;

        flex-direction: column;

        gap: 8px;
    }


    .module-header {
        align-items: flex-start;

        flex-direction: column;

        padding: 25px 20px;
    }


    .module-progress {
        align-self: flex-start;
    }


    .lesson {
        margin-left: 12px;
        margin-right: 12px;

        padding: 15px;
    }


    .lesson-icon {
        width: 40px;
        height: 40px;
    }


    .lesson-info h4 {
        font-size: 15px;
    }


    .lesson-info p {
        display: none;
    }

}


/* ==================================================
   SMALL MOBILE
================================================== */

@media (max-width: 480px) {

    .course-header h1 {
        font-size: 36px;
    }


    .course-modules h2 {
        font-size: 26px;
    }


    .module-header h3 {
        font-size: 20px;
    }


    .lesson {
        gap: 12px;
    }


    .lesson-status {
        font-size: 17px;
    }

}

/* ==================================================
   COURSE PROGRESS STATES
================================================== */

.lesson.completed {
    border-color: rgba(36, 123, 255, 0.45);

    background:
        linear-gradient(
            145deg,
            rgba(36, 123, 255, 0.08),
            rgba(85, 72, 232, 0.04)
        );
}

.lesson.completed .lesson-icon {
    background: var(--gradient);

    color: white;
}

.lesson.completed .lesson-status {
    color: #247BFF;

    font-weight: 700;
}


.lesson.locked {
    cursor: not-allowed;

    opacity: 0.5;
}

.lesson.locked:hover {
    transform: none;

    border-color: var(--border);

    background: var(--card);

    box-shadow: none;
}


/* ==================================================
   PROGRESS BAR
================================================== */

.progress-bar {
    overflow: hidden;

    width: 100%;
    height: 8px;

    margin-top: 12px;

    background: #0F1422;

    border-radius: 20px;
}

.progress-bar-fill {
    width: 0;

    height: 100%;

    background: var(--gradient);

    border-radius: 20px;

    transition:
        width 0.5s ease;
}

/* ==================================================
   КАТАЛОГ КУРСОВ И ЧАСТИ КУРСА
================================================== */

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.catalog-card {
    display: flex;
    flex-direction: column;
    gap: 10px;

    padding: 28px;

    color: inherit;
    text-decoration: none;

    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    transition:
        transform var(--transition),
        border-color var(--transition),
        background var(--transition);
}

.catalog-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    border-color: var(--border-hover);
}

.catalog-card h3 { margin: 0; font-size: 24px; }
.catalog-card p { margin: 0; color: var(--text-secondary); line-height: 1.6; }
.catalog-card .progress-bar { margin-top: auto; }

.catalog-card-meta {
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.catalog-card-foot {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.course-part {
    margin: 50px 0 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.course-part:first-child { margin-top: 0; }
.course-part h3 { margin: 0 0 6px; font-size: 26px; }
.course-part p { margin: 0; color: var(--text-secondary); }

@media (max-width: 768px) {
    .catalog-grid { grid-template-columns: 1fr; }
}

.catalog-card .catalog-card-prev {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
