/* --- COURSE EXTENSIONS FOR VOLTRONIQ --- */

.course-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5% 8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

/* Curriculum Grid */
.volumes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    width: 100%;
    justify-content: center;
}

.volume-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 3rem;
    border-radius: 12px;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.volume-card:hover {
    transform: translateY(-4px);
}

.free-tier:hover {
    border-color: rgba(139, 92, 246, 0.4);
}

.premium-tier:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.vol-badge {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.vol-badge.locked {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
}

.vol-desc {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.chapter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.chapter-list li {
    font-size: 0.95rem;
    color: var(--text-dim);
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.chapter-list li span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    opacity: 0.8;
    white-space: nowrap;
    min-width: 35px;
}

.chapter-list a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.chapter-list a:hover {
    color: var(--accent);
}

/* --- TUTORIAL READER INTERFACE --- */
.tutorial-body {
    background-color: var(--bg);
}

.course-nav-title {
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 1px;
    opacity: 0.6;
}

.tutorial-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}

.tutorial-sidebar {
    background: #0d0d0d;
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    padding: 3rem 2rem;
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow-y: auto;
}

.tutorial-sidebar h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.tutorial-sidebar a, .locked-link {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.tutorial-sidebar a:hover, .tutorial-sidebar a.active {
    color: var(--text-main);
}

.tutorial-sidebar a.active {
    font-weight: 600;
    color: var(--accent);
}

.locked-link {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-divider {
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin: 1rem 0;
}

/* Code Stream Layout */
.tutorial-content {
    padding: 4rem 5% 8rem 5%;
    width: 100%;
    display: flex;
    justify-content: center;
}

.prose {
    max-width: 850px;
    width: 100%;
}

.chapter-meta {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 3rem;
}

.story-text {
    border-left: 2px solid var(--accent);
    padding-left: 1.5rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 2rem;
}

.prose h2 {
    font-size: 1.6rem;
    margin-top: 3.5rem;
    margin-bottom: 1.2rem;
}

.prose p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.code-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.code-step p {
    margin: 0;
}

.step-num {
    background: var(--accent);
    color: #fff;
    min-width: 28px;
    height: 28px;
    border-radius: 9999px;
    padding: 0 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

pre {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 2rem;
}

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #e4e4e7;
}

p code {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.action-footer {
    margin-top: 5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
}

.back-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* Intelligent Piracy Protection Layer */
.protected-content {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Re-allow selections for actionable workspace elements */
.protected-content pre, 
.protected-content code, 
.protected-content .step-num {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Responsive Extensions */
@media (max-width: 1024px) {
    .tutorial-layout {
        grid-template-columns: 1fr;
    }
    .tutorial-sidebar {
        display: none;
    }
    .volumes-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .tutorial-content {
        padding: 2rem 5% 6rem;
    }
}