{% extends 'base.html' %}
{% load static %}

{% block title %}{{ project_name }} - Home{% endblock %}

{% block content %}
<div class="hero-section">
    <div class="container text-center">
        <h1 class="display-4">Welcome to the Grade Management System</h1>
        <p class="lead">A modern solution for colleges and universities to manage courses, students, and grades efficiently.</p>
    </div>
</div>

<div class="container mt-5">
    <h2 class="text-center mb-4">Course Catalog</h2>
    <div class="row">
        {% if courses %}
            {% for course in courses %}
            <div class="col-md-4 mb-4">
                <div class="card course-card h-100">
                    <div class="card-body">
                        <h5 class="card-title">{{ course.name }}</h5>
                        <h6 class="card-subtitle mb-2 text-muted">{{ course.code }}</h6>
                        <p class="card-text"><strong>Department:</strong> {{ course.department }}</p>
                        <p class="card-text"><strong>Semester:</strong> {{ course.semester }} | <strong>Credits:</strong> {{ course.credits }}</p>
                    </div>
                </div>
            </div>
            {% endfor %}
        {% else %}
            <div class="col-12">
                <div class="alert alert-info text-center" role="alert">
                    No courses have been added yet. The administrator can add courses via the admin panel.
                </div>
            </div>
        {% endif %}
    </div>
</div>

<footer class="text-center py-4 mt-5">
    <p>&copy; {% now "Y" %} {{ project_name }}. All Rights Reserved.</p>
</footer>
{% endblock %}
