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

{% block content %}
<section class="py-5 bg-light">
    <div class="container py-5">
        <div class="row g-5">
            <!-- Contact Info -->
            <div class="col-lg-5">
                <div class="mb-5">
                    <h1 class="fw-bold mb-3">{% trans "Get in Touch" %}</h1>
                    <p class="text-muted lead">
                        {% trans "Have questions about our services or need assistance? Fill out the form and our team will get back to you shortly." %}
                    </p>
                </div>

                <div class="d-flex mb-4">
                    <div class="flex-shrink-0">
                        <div class="bg-primary text-white p-3 rounded-3" style="width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;">
                            <i class="fa-solid fa-phone"></i>
                        </div>
                    </div>
                    <div class="ms-4">
                        <h5 class="fw-bold">{% trans "Phone" %}</h5>
                        <p class="text-muted">{{ app_settings.contact_phone|default:"+966 XXX XXX XXX" }}</p>
                    </div>
                </div>

                <div class="d-flex mb-4">
                    <div class="flex-shrink-0">
                        <div class="bg-primary text-white p-3 rounded-3" style="width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;">
                            <i class="fa-solid fa-envelope"></i>
                        </div>
                    </div>
                    <div class="ms-4">
                        <h5 class="fw-bold">{% trans "Email" %}</h5>
                        <p class="text-muted">{{ app_settings.contact_email|default:"info@masarcargo.com" }}</p>
                    </div>
                </div>

                <div class="d-flex mb-4">
                    <div class="flex-shrink-0">
                        <div class="bg-primary text-white p-3 rounded-3" style="width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;">
                            <i class="fa-solid fa-location-dot"></i>
                        </div>
                    </div>
                    <div class="ms-4">
                        <h5 class="fw-bold">{% trans "Address" %}</h5>
                        <p class="text-muted">{{ app_settings.contact_address|default:"Muscat, Oman"|linebreaksbr }}</p>
                    </div>
                </div>
            </div>

            <!-- Contact Form -->
            <div class="col-lg-7">
                <div class="card border-0 shadow-sm rounded-4 p-4 p-md-5">
                    <h2 class="fw-bold mb-4">{% trans "Send us a Message" %}</h2>
                    <form method="post" novalidate>
                        {% csrf_token %}
                        <div class="row g-3">
                            <div class="col-md-6">
                                <label class="form-label fw-bold small text-uppercase">{% trans "Your Name" %}</label>
                                {{ form.name }}
                                {% if form.name.errors %}
                                    <div class="text-danger small mt-1">{{ form.name.errors }}</div>
                                {% endif %}
                            </div>
                            <div class="col-md-6">
                                <label class="form-label fw-bold small text-uppercase">{% trans "Email Address" %}</label>
                                {{ form.email }}
                                {% if form.email.errors %}
                                    <div class="text-danger small mt-1">{{ form.email.errors }}</div>
                                {% endif %}
                            </div>
                            <div class="col-12">
                                <label class="form-label fw-bold small text-uppercase">{% trans "Subject" %}</label>
                                {{ form.subject }}
                                {% if form.subject.errors %}
                                    <div class="text-danger small mt-1">{{ form.subject.errors }}</div>
                                {% endif %}
                            </div>
                            <div class="col-12">
                                <label class="form-label fw-bold small text-uppercase">{% trans "Message" %}</label>
                                {{ form.message }}
                                {% if form.message.errors %}
                                    <div class="text-danger small mt-1">{{ form.message.errors }}</div>
                                {% endif %}
                            </div>
                            <div class="col-12 mt-4">
                                <button type="submit" class="btn btn-primary btn-lg px-5 rounded-pill w-100">
                                    {% trans "Send Message" %}
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</section>
{% endblock %}
