
{% extends 'base.html' %}
{% load static %}
{% block content %}
{% include 'profile/header.html' %}
{% include 'profile/drawer.html' %}

<div class="custom-bg animate__animated animate__delay-0.1s animate__fadeIn">
    <div class="container py-5">
        <h2 class="text-center text-light fw-bold mb-4">📋 لیست سوابق کارنامه واحدها</h2>
        <br>
        <br>
        <div class="row justify-content-center">
            {% for category in categories %}
            <div class="col-lg-3 col-md-4 col-sm-6 mb-4">
                <a href="{% url 'reportcard_unit_by_category_history' category.0 %}" class="custom-card">
                    <div class="custom-card-body">
                        <h5 class="custom-card-title">{{ category.1 }}</h5>
                        <p class="custom-card-text">📌 مشاهده فعالیت‌های این واحد</p>
                    </div>
                </a>
            </div>
            {% empty %}
            <div class="col-12">
                <div class="alert alert-danger text-center fw-bold">
                    ⚠ هیچ رسته‌ای موجود نیست!
                </div>
            </div>
            {% endfor %}
        </div>
    </div>
</div>

<style>
    /* پس‌زمینه زیبا */
    .custom-bg {
        background: linear-gradient(135deg, #2b5876, #4e4376);
        min-height: 100vh;
        padding-top: 60px;
    }

    /* کارت‌های جذاب */
    .custom-card {
        display: block;
        text-decoration: none;
        background: white;
        border-radius: 15px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .custom-card:hover {
        transform: translateY(-7px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    }

    .custom-card-body {
        padding: 20px;
        text-align: center;
    }

    .custom-card-title {
        font-size: 1.2rem;
        font-weight: bold;
        color: #2b5876;
    }

    .custom-card-text {
        font-size: 0.9rem;
        color: #555;
        margin-top: 8px;
    }

</style>

{% endblock %}