{% extends 'base.html' %}

{% block title %}Apply for Membership | {{ block.super }}{% endblock %}

{% block content %}
<div class="container page-container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="form-card">
                <h1 class="text-center mb-4">Join the Network</h1>
                <p class="text-center mb-5">Complete the form below to apply for membership. Applications are reviewed by the assembly administrators. We welcome sovereign individuals dedicated to mutual aid and community resilience.</p>
                <form method="post" novalidate>
                    {% csrf_token %}
                    {% for field in form %}
                        <div class="mb-3">
                            <label for="{{ field.id_for_label }}" class="form-label">{{ field.label }}</label>
                            {{ field }}
                            {% if field.help_text %}
                                <small class="form-text text-muted">{{ field.help_text }}</small>
                            {% endif %}
                            {% for error in field.errors %}
                                <div class="invalid-feedback d-block">{{ error }}</div>
                            {% endfor %}
                        </div>
                    {% endfor %}
                    <div class="d-grid">
                        <button type="submit" class="btn btn-primary btn-lg">Submit Application</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}
