/* ═══════════════════════════════════════════
   lesson-detail.css — Ders Detay Sayfası
   site.css zaten nav/footer/lang/animations içerir.
   ═══════════════════════════════════════════ */

/* ── Lesson Hero ── */
.lesson-hero {
    background: #0f2248;
    padding: 3rem 5%;
    color: white;
}

.lesson-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.lesson-back {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 1.25rem;
}

    .lesson-back:hover {
        color: rgba(255,255,255,0.7);
    }

.lesson-cat {
    display: inline-block;
    background: rgba(201,168,76,0.15);
    color: #c9a84c;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.lesson-title {
    font-family: 'DM Serif Display', serif;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.25;
    color: white;
    margin-bottom: 1rem;
}

.lesson-meta {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ── Layout: Sidebar + Body ── */
.lesson-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 5%;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ── Table of Contents ── */
.lesson-toc {
    position: sticky;
    top: 90px;
    align-self: start;
    width: 180px;
    overflow: visible;
}

.toc-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.toc-item {
    display: block;
    font-size: 0.78rem;
    color: #666;
    padding: 5px 10px;
    border-left: 2px solid #e0e0e0;
    text-decoration: none;
    line-height: 1.4;
    transition: all 0.15s;
    word-break: break-word;
}

    .toc-item:hover {
        color: #0f2248;
        border-left-color: #c9a84c;
    }

    .toc-item.active {
        color: #0f2248;
        border-left-color: #c9a84c;
        font-weight: 500;
    }

/* ── Body ── */
.lesson-body {
    min-width: 0;
}

/* ── Scroll Anchor Fix ── */
.lesson-step,
.lesson-quiz {
    scroll-margin-top: 100px;
}

/* ── Steps ── */
.lesson-step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 2.5rem 0 1rem;
}

    .lesson-step:first-child {
        margin-top: 0;
    }

.step-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #c9a84c;
    color: #0f2248;
    font-size: 0.78rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #0f2248;
}

/* ── Prose ── */
.lesson-prose {
    font-size: 0.95rem;
    line-height: 1.85;
    color: #444;
    margin-bottom: 1.25rem;
}

    .lesson-prose p {
        margin-bottom: 0.85rem;
    }

    .lesson-prose strong {
        color: #0f2248;
    }

    .lesson-prose code {
        background: #f0ede8;
        padding: 2px 6px;
        border-radius: 4px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 0.85em;
        color: #0f2248;
    }

/* ── Code Blocks ── */
.lesson-code {
    background: #0f2248;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0;
}

.code-lang {
    font-size: 0.68rem;
    font-family: monospace;
    letter-spacing: 0.1em;
    color: rgba(201,168,76,0.6);
    margin-bottom: 0.6rem;
}

.lesson-code pre {
    margin: 0;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.83rem;
    color: #e8e3db;
    line-height: 1.75;
    white-space: pre;
    overflow-x: auto;
}

/* ── Tips ── */
.lesson-tip {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-left: 3px solid #c9a84c;
    padding: 1rem 1.25rem;
    background: rgba(201,168,76,0.07);
    border-radius: 0 8px 8px 0;
    margin: 1.25rem 0;
}

.tip-label {
    font-size: 1rem;
    flex-shrink: 0;
}

.tip-text {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.65;
}

/* ── Quiz ── */
.lesson-quiz {
    background: #f7f5f2;
    border: 1px solid #e8e3db;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.quiz-label {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #888;
    margin-bottom: 1rem;
}

.quiz-question {
    font-size: 0.95rem;
    font-weight: 500;
    color: #0f2248;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-opt {
    padding: 10px 14px;
    border: 1px solid #e0dbd3;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #555;
    cursor: pointer;
    background: white;
    transition: all 0.15s;
    line-height: 1.5;
}

    .quiz-opt:hover {
        border-color: #c9a84c;
        color: #0f2248;
    }

    .quiz-opt.correct {
        background: #edfaf3;
        border-color: #22c55e;
        color: #166534;
    }

    .quiz-opt.wrong {
        background: #fef2f2;
        border-color: #ef4444;
        color: #991b1b;
    }

.quiz-feedback {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    display: none;
}

    .quiz-feedback.correct {
        display: block;
        background: #edfaf3;
        border: 1px solid #22c55e;
        color: #166534;
    }

    .quiz-feedback.wrong {
        display: block;
        background: #fef2f2;
        border: 1px solid #ef4444;
        color: #991b1b;
    }

/* ── Footer Nav ── */
.lesson-footer-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e8e3db;
}

    .lesson-footer-nav .btn-secondary {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        border: 1px solid #0f2248;
        border-radius: 8px;
        color: #0f2248;
        text-decoration: none;
        font-size: 0.88rem;
        font-weight: 500;
        transition: all 0.2s;
    }

        .lesson-footer-nav .btn-secondary:hover {
            background: #0f2248;
            color: white;
        }

/* ── Mobile — 900px (diğer sayfalarla tutarlı) ── */
@media (max-width: 900px) {
    .lesson-wrap {
        grid-template-columns: 1fr;
    }

    .lesson-toc {
        position: static;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .toc-label {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .toc-item {
        border-left: none;
        border-bottom: 2px solid #e0e0e0;
        padding: 6px 10px;
        font-size: 0.75rem;
    }

        .toc-item:hover {
            border-left: none;
            border-bottom-color: #c9a84c;
        }

        .toc-item.active {
            border-left: none;
            border-bottom-color: #c9a84c;
            font-weight: 500;
        }

    .lesson-title {
        font-size: 1.5rem;
    }
}
