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

<style>
    body {
        background: linear-gradient(135deg, #efefef, #46a072);
        color: #f1f1f1;
    }

    .container {
        max-width: 850px;
        margin: 50px auto;
        padding: 20px;
        animation: fadeInUp 1s ease-out;
    }

    h1 {
        font-size: 2.5rem;
        text-align: center;
        margin-bottom: 20px;
        background: linear-gradient(90deg, #ff8a00, #e52e71);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .card {
        backdrop-filter: blur(15px);
        background: rgba(255, 255, 255, 0.15);
        border-radius: 20px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        padding: 25px;
        animation: zoomIn 0.8s ease-in-out;
        border: 1px solid rgba(255, 255, 255, 0.2);
        margin-bottom: 25px;
    }

    .card-title {
        font-size: 1.6rem;
        margin-bottom: 15px;
        color: #555555;
    }

    .details p strong {
        color: #ffcc00;
    }

    ul {
        list-style: none;
        padding: 0;
    }

    ul li {
        background: rgba(255, 255, 255, 0.1);
        padding: 10px 15px;
        border-radius: 10px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        gap: 10px;
        transition: background 0.3s ease;
    }

    ul li:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    ul li::before {
        content: '';
        font-size: 1.2rem;
    }

    .description-card {
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(10px);
        border-radius: 15px;
        padding: 20px;
        margin-top: 20px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        animation: fadeIn 1s ease-in-out;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .description-card h4 {
        font-size: 1.4rem;
        margin-bottom: 15px;
        color: #202020;
    }

    .description-content {
        max-height: 200px;
        overflow-y: auto;
        padding: 10px;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 10px;
        color: #f0f0f0;
        line-height: 1.8;
    }

    .btn-primary {
        display: inline-block;
        margin-top: 20px;
        padding: 12px 25px;
        font-size: 1rem;
        font-weight: bold;
        color: #fff;
        background: linear-gradient(90deg, #ff7e5f, #feb47b);
        border: none;
        border-radius: 50px;
        text-decoration: none;
        transition: all 0.3s ease;
        text-align: center;
    }

    .btn-primary:hover {
        background: linear-gradient(90deg, #feb47b, #ff7e5f);
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes zoomIn {
        from {
            opacity: 0;
            transform: scale(0.8);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }
</style>

<div class="container">
    <h1>توضبحات جلسه{{ council.name }}</h1>

    <div class="card details">
        <div class="card-body">
            <h4 class="card-title">📅 جزئیات جلسه</h4>
            <p><strong>مکان جلسه:</strong> {{ council.meeting_place }}</p>
            <p><strong>تاریخ جلسه:</strong> {{ council.date_run }}</p>
            <p><strong>افراد حاضر در جلسه:</strong></p>
            <ul>
                {% for person in council.persons.all %}
                    <li>{{ person.user.first_name }} {{ person.user.last_name }}</li>
                {% endfor %}
            </ul>
        </div>
    </div>

    {% if council.description %}
    <div class="description-card">
        <h4>📝 توضیحات جلسه</h4>
        <div class="description-content">
            {{ council.description|safe }}
        </div>
    </div>
    {% endif %}

    <a href="{% url 'council_list' %}" class="btn btn-primary">⬅️ بازگشت به لیست جلسات</a>
</div>
{% endblock %}
