/* ============================
   Course Page Styles
   ============================ */

/* Course Hero */
.course-hero {
    position: relative;
    padding: 120px 0 60px;
    overflow: hidden;
}

.course-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.course-hero-bg .hero-gradient {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(108, 92, 231, 0.1) 40%, transparent 70%);
    filter: blur(60px);
}

.course-hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--text-primary);
}

.course-hero-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.course-hero-icon {
    font-size: clamp(40px, 5vw, 56px);
}

.course-hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.course-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 50px;
}

.meta-item svg {
    color: var(--accent-3);
    flex-shrink: 0;
}

/* Course Layout */
.course-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

.course-main {
    order: 1;
}

.course-sidebar {
    order: 2;
    position: sticky;
    top: 90px;
}

/* Sidebar Card */
.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
}

.sidebar-price {
    text-align: center;
    margin-bottom: 24px;
}

.price-current {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-bottom: 28px;
}

.sidebar-includes h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.sidebar-includes ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-includes li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.sidebar-includes li svg {
    color: var(--accent-3);
    flex-shrink: 0;
}

.sidebar-guarantee {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.sidebar-guarantee svg {
    color: var(--accent-3);
    flex-shrink: 0;
}

/* Content Blocks */
.content-block {
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
}

.content-block:last-child {
    border-bottom: none;
}

.content-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.content-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Learn Grid */
.learn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.learn-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.learn-item svg {
    color: var(--accent-3);
    flex-shrink: 0;
    margin-top: 2px;
}

.learn-item span {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Modules */
.module {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

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

.module.active {
    border-color: rgba(108, 92, 231, 0.25);
    box-shadow: var(--shadow-glow);
}

.module-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    background: var(--bg-card);
    border: none;
    cursor: pointer;
    font-family: var(--font);
    text-align: left;
    color: var(--text-primary);
    transition: var(--transition);
}

.module-header:hover {
    background: var(--bg-card-hover);
}

.module-info {
    flex: 1;
}

.module-num {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-2);
    margin-bottom: 6px;
}

.module-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}

.module-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.module-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: var(--transition);
}

.module.active .module-chevron {
    transform: rotate(180deg);
    color: var(--accent-2);
}

.module-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary);
}

.module.active .module-content {
    max-height: 600px;
}

/* Lessons */
.lesson {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    transition: var(--transition);
}

.lesson:hover {
    background: rgba(255, 255, 255, 0.02);
}

.lesson-number {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 24px;
}

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

.lesson-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.lesson-info p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lesson-duration {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.lesson-badge {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    white-space: nowrap;
}

.lesson-badge.free {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-3);
}

.lesson-badge.project {
    background: rgba(168, 85, 247, 0.12);
    color: var(--accent-2);
}

/* For Whom */
.for-whom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.for-whom-card {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.for-whom-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.for-whom-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.for-whom-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.for-whom-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Author Block */
.author-block {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-top: 20px;
}

.author-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card-hover));
    border: 2px solid var(--border-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

.author-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.author-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.author-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.author-stats span {
    padding: 4px 12px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.15);
    border-radius: 50px;
    font-size: 12px;
    color: var(--accent-2);
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .course-layout {
        grid-template-columns: 1fr;
    }

    .course-sidebar {
        order: -1;
        position: static;
    }

    .sidebar-card {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        align-items: center;
    }

    .sidebar-price {
        margin-bottom: 0;
    }

    .btn-block {
        margin-bottom: 0;
        width: auto;
        flex: 1;
    }

    .sidebar-includes {
        display: none;
    }

    .sidebar-guarantee {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}

@media (max-width: 768px) {
    .course-hero {
        padding: 100px 0 40px;
    }

    .course-hero-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .course-hero-meta {
        gap: 10px;
    }

    .meta-item {
        padding: 6px 12px;
        font-size: 13px;
    }

    .learn-grid {
        grid-template-columns: 1fr;
    }

    .for-whom-grid {
        grid-template-columns: 1fr;
    }

    .lesson-info p {
        display: none;
    }

    .author-block {
        flex-direction: column;
        text-align: center;
    }

    .author-stats {
        justify-content: center;
    }

    .sidebar-card {
        flex-direction: column;
    }

    .btn-block {
        width: 100%;
    }
}
