@extends('frontend.layouts.app')

@section('title', 'Contact Us')

@section('content')

{{-- ================= PAGE HEADER ================= --}}
<section class="py-5 bg-dark text-white">
    <div class="container">
        <div class="row">
            <div class="col-md-8">
                <h1 class="fw-bold">Contact HASA Constructions</h1>
                <p class="lead mb-0">
                    Get in touch with us for construction, engineering, and infrastructure solutions.
                </p>
            </div>
        </div>
    </div>
</section>

{{-- ================= CONTACT SECTION ================= --}}
<section class="py-5 bg-light">
    <div class="container">

        {{-- SUCCESS MESSAGE --}}
        @if(session('success'))
        <div class="alert alert-success alert-dismissible fade show mb-4" role="alert">
            {{ session('success') }}
            <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
        </div>
        @endif

        <div class="row g-5">

            {{-- CONTACT INFO --}}
            <div class="col-md-5">
                <h4 class="fw-bold mb-4">Our Office</h4>

                <div class="mb-3">
                    <strong>Company Name:</strong><br>
                    HASA Constructions Limited
                </div>

                <div class="mb-3">
                    <strong>Location:</strong><br>
                    Tanzania Mainland
                </div>

                <div class="mb-3">
                    <strong>Email:</strong><br>
                    <a href="mailto:info@hasaconstructions.co.tz" class="text-decoration-none">
                        info@hasaconstructions.co.tz
                    </a>
                </div>

                <div class="mb-3">
                    <strong>Phone:</strong><br>
                    <a href="tel:+255700000000" class="text-decoration-none">
                        +255 700 000 000
                    </a>
                </div>

                <div class="mt-4">
                    <p class="text-muted">
                        Our team is ready to discuss your project requirements and provide
                        professional guidance for successful execution.
                    </p>
                </div>
            </div>

            {{-- CONTACT FORM --}}
            <div class="col-md-7">
                <div class="card shadow-sm border-0">
                    <div class="card-body p-4">

                        <h4 class="fw-bold mb-4">Send Us a Message</h4>

                        <form action="{{ route('frontend.contact.submit') }}" method="POST">
                            @csrf

                            <div class="row g-3">

                                <div class="col-md-6">
                                    <label class="form-label fw-bold">Full Name</label>
                                    <input type="text" name="name"
                                           class="form-control @error('name') is-invalid @enderror"
                                           value="{{ old('name') }}" placeholder="Your name">
                                    @error('name') <div class="invalid-feedback">{{ $message }}</div> @enderror
                                </div>

                                <div class="col-md-6">
                                    <label class="form-label fw-bold">Email Address</label>
                                    <input type="email" name="email"
                                           class="form-control @error('email') is-invalid @enderror"
                                           value="{{ old('email') }}" placeholder="you@example.com">
                                    @error('email') <div class="invalid-feedback">{{ $message }}</div> @enderror
                                </div>

                                <div class="col-12">
                                    <label class="form-label fw-bold">Subject</label>
                                    <input type="text" name="subject"
                                           class="form-control @error('subject') is-invalid @enderror"
                                           value="{{ old('subject') }}" placeholder="Subject">
                                    @error('subject') <div class="invalid-feedback">{{ $message }}</div> @enderror
                                </div>

                                <div class="col-12">
                                    <label class="form-label fw-bold">Message</label>
                                    <textarea name="message" rows="5"
                                              class="form-control @error('message') is-invalid @enderror"
                                              placeholder="Describe your project or inquiry">{{ old('message') }}</textarea>
                                    @error('message') <div class="invalid-feedback">{{ $message }}</div> @enderror
                                </div>

                                <div class="col-12">
                                    <button type="submit" class="btn btn-warning btn-lg w-100">
                                        Send Message
                                    </button>
                                </div>

                            </div>
                        </form>

                    </div>
                </div>
            </div>

        </div>
    </div>
</section>

@endsection
