{% extends 'base.html' %}

{% block title %}{{ lesson.title }} - Python Lern App{% endblock %}

{% block content %}
<header class="py-4 border-bottom border-1 bw-border" style="background-color: var(--bw-grey-light);">
    <div class="container">
        <div class="d-flex justify-content-between align-items-center">
            <a href="{% url 'course_detail' lesson.module.course.pk %}" class="bw-text text-decoration-none font-mono small">&larr; BACK_TO_MODULE</a>
            <span class="font-mono small badge btn-bw px-3 py-2 rounded-0" style="border: none; cursor: default;">{{ lesson.module.title|upper }}</span>
        </div>
    </div>
</header>

<section class="py-5">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-9">
                <h1 class="mb-5 display-5">{{ lesson.title }}</h1>
                
                <div class="lesson-content mb-5">
                    {{ lesson.content|safe|linebreaks }}
                </div>

                <div class="card card-bw p-5 text-center mt-5">
                    <h3 class="mb-4">LESSON_COMPLETE?</h3>
                    <div class="d-flex justify-content-center gap-3">
                        <a href="{% url 'course_detail' lesson.module.course.pk %}" class="btn btn-bw">YES, NEXT LESSON</a>
                        <button class="btn btn-bw-outline" onclick="window.scrollTo({top: 0, behavior: 'smooth'})">REVIEW_AGAIN</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
{% endblock %}