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

{% block title %}Contact Us - PixelMinds{% endblock %}

{% block content %}
<div class="section">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-8 text-center">
                <h1 class="section-title">Get in Touch</h1>
                <p class="lead">We'd love to hear from you. Whether you have a question, feedback, or just want to say hello, please don't hesitate to reach out.</p>
            </div>
        </div>
    </div>
</div>

<div class="section pt-0">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-7">

                {% if messages %}
                    {% for message in messages %}
                        <div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
                            {{ message }}
                            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                        </div>
                    {% endfor %}
                {% endif %}

                <div class="card shadow-lg border-0">
                    <div class="card-body p-5">
                        <form method="post" novalidate>
                            {% csrf_token %}
                            <div class="mb-4">
                                {{ form.name.label_tag }}
                                {{ form.name }}
                                {% if form.name.errors %}<div class="invalid-feedback d-block">{{ form.name.errors|striptags }}</div>{% endif %}
                            </div>
                            <div class="mb-4">
                                {{ form.email.label_tag }}
                                {{ form.email }}
                                {% if form.email.errors %}<div class="invalid-feedback d-block">{{ form.email.errors|striptags }}</div>{% endif %}
                            </div>
                            <div class="mb-4">
                                {{ form.message.label_tag }}
                                {{ form.message }}
                                {% if form.message.errors %}<div class="invalid-feedback d-block">{{ form.message.errors|striptags }}</div>{% endif %}
                            </div>
                            <div class="d-grid">
                                <button type="submit" class="btn btn-primary btn-lg">Send Message</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}