/* ==================== COLORED PENCILS CRASH COURSE STYLES ==================== */

/* Course Container */
.course-container {
    min-height: 100vh;
    padding-bottom: 4rem;
}

/* Course Header */
.course-header {
    background: linear-gradient(180deg, rgba(167, 139, 250, 0.08) 0%, transparent 100%);
    border-bottom: 1px solid var(--dark-border);
    padding: 2rem 0 3rem;
}

.course-header-content {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.875rem;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

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

.course-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.course-category {
    background: rgba(167, 139, 250, 0.15);
    color: var(--accent);
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.course-duration {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.course-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 0.75rem;
    line-height: 1.1;
}

@media (min-width: 640px) {
    .course-title {
        font-size: 3rem;
    }
}

.course-subtitle {
    font-size: 1.125rem;
    color: var(--muted);
    max-width: 40rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.course-features {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.course-features .feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.course-features .feature svg {
    color: var(--accent);
    opacity: 0.8;
}

/* Course Navigation */
.course-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(13, 13, 15, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--dark-border);
}

.course-nav-inner {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.course-nav-inner::-webkit-scrollbar {
    display: none;
}

.nav-section {
    padding: 1rem 1rem;
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.nav-section:hover {
    color: var(--light);
}

.nav-section.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Course Content */
.course-content {
    max-width: 56rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Section Styles */
.course-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--dark-border);
}

.course-section:last-child {
    border-bottom: none;
}

.course-intro {
    padding-top: 3rem;
}

.course-intro .lead {
    font-size: 1.25rem;
    color: var(--light);
    line-height: 1.6;
}

.section-header {
    margin-bottom: 3rem;
}

.section-number {
    display: inline-block;
    background: rgba(167, 139, 250, 0.15);
    color: var(--accent);
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 0.75rem;
}

.section-description {
    font-size: 1.0625rem;
    color: var(--muted);
    max-width: 36rem;
    line-height: 1.6;
}

/* Prose Content */
.prose-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--muted);
}

.prose-content p {
    margin-bottom: 1.25rem;
}

.prose-content h3 {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--light);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.prose-content h4 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--light);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose-content h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--light);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.prose-content strong {
    color: var(--light);
    font-weight: 600;
}

.prose-content em {
    font-style: italic;
}

.prose-content ul,
.prose-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.prose-content li {
    margin-bottom: 0.5rem;
}

.prose-content ul li {
    list-style-type: disc;
}

.prose-content ol li {
    list-style-type: decimal;
}

/* Exercise Box */
.exercise-box {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
}

.exercise-box h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #22c55e;
    margin-top: 0;
    margin-bottom: 1rem;
}

.exercise-box p {
    margin-bottom: 0.75rem;
}

.exercise-box p:last-child {
    margin-bottom: 0;
}

.exercise-box ul {
    margin-bottom: 0.75rem;
}

/* Media Figures */
.media-figure {
    margin: 2rem 0;
}

.media-figure.hero-image {
    margin: 3rem 0;
}

.media-figure.hero-image .media-placeholder {
    min-height: 300px;
}

.media-figure figcaption {
    font-size: 0.875rem;
    color: var(--muted);
    margin-top: 0.75rem;
    text-align: center;
}

.media-placeholder {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 3rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.placeholder-label {
    color: var(--muted);
    font-size: 0.875rem;
    text-align: center;
    line-height: 1.6;
}

/* Download Box */
.download-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
}

.download-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(167, 139, 250, 0.15);
    border-radius: 0.5rem;
    color: var(--accent);
}

.download-info {
    flex: 1;
}

.download-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--light);
    margin: 0 0 0.25rem 0;
}

.download-info p {
    font-size: 0.875rem;
    color: var(--muted);
    margin: 0;
}

.download-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.download-btn:hover {
    background: rgba(167, 139, 250, 0.25);
    border-color: var(--accent);
}

@media (max-width: 640px) {
    .download-box {
        flex-direction: column;
        text-align: center;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Lesson Summary */
.lesson-summary {
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 3rem;
}

.lesson-summary h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 0.75rem 0;
}

.lesson-summary p {
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

/* Course CTA */
.course-cta {
    text-align: center;
    border-bottom: none;
}

.cta-content {
    max-width: 28rem;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 0.75rem;
}

.cta-content p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.cta-form {
    display: flex;
    gap: 0.75rem;
}

.cta-form input[type="email"] {
    flex: 1;
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--light);
    font-size: 1rem;
}

.cta-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
}

.cta-form button {
    background: var(--accent);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: #000;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.cta-form button:hover {
    opacity: 0.9;
}

@media (max-width: 480px) {
    .cta-form {
        flex-direction: column;
    }
}

/* Image handling when assets are present */
.media-figure img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    display: block;
}

/* Hide placeholder when image loads */
.media-placeholder:has(img) {
    padding: 0;
    border: none;
    background: transparent;
    min-height: auto;
}
