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

{% block title %}SIMAPRES - Sistem Informasi Prestasi Mahasiswa{% endblock %}

{% block content %}
<!-- Hero Section -->
<header class="hero-section">
    <div class="container text-center">
        <h1 class="hero-title">Sistem Informasi Prestasi Mahasiswa</h1>
        <p class="hero-subtitle">Wadah untuk mencatat, mengelola, dan mempublikasikan prestasi mahasiswa.</p>
        <a href="{% url 'submit_proposal' %}" class="btn btn-lg btn-accent">Ajukan Proposal <i class="fas fa-arrow-right ms-2"></i></a>
    </div>
</header>

<!-- Achievements Section -->
<section class="py-5">
    <div class="container">
        <h2 class="section-title text-center mb-5">Prestasi Terbaru</h2>
        {% if achievements %}
        <div class="row g-4">
            {% for achievement in achievements %}
            <div class="col-lg-4 col-md-6">
                <div class="card achievement-card h-100">
                    <div class="card-body">
                        <h5 class="card-title">{{ achievement.title }}</h5>
                        <h6 class="card-subtitle mb-2 text-muted">{{ achievement.event_name }}</h6>
                        <p class="card-text"><strong>{{ achievement.achievement_level }}</strong></p>
                        <p class="card-text"><small class="text-muted">Diraih oleh: {{ achievement.student_name }} pada {{ achievement.date|date:"d M Y" }}</small></p>
                    </div>
                </div>
            </div>
            {% endfor %}
        </div>
        {% else %}
        <div class="text-center">
            <p>Belum ada prestasi yang dicatat.</p>
        </div>
        {% endif %}
        <div class="text-center mt-5">
            <a href="#" class="btn btn-outline-primary">Lihat Semua Prestasi</a>
        </div>
    </div>
</section>
{% endblock %}
