<section>
    <h2>Contact Us</h2>
    <?php if (!empty($sent)): ?>
        <div style="color: green;">Your message has been sent. Thank you!</div>
    <?php endif; ?>
    <?php if (!empty($error)): ?>
        <div style="color: red;"><?= htmlspecialchars($error) ?></div>
    <?php endif; ?>
    <form method="post" action="">
        <div>
            <label>Name</label>
            <input type="text" name="name" required>
        </div>
        <div>
            <label>Email</label>
            <input type="email" name="email" required>
        </div>
        <div>
            <label>Subject</label>
            <input type="text" name="subject" required>
        </div>
        <div>
            <label>Message</label>
            <textarea name="message" rows="5" required></textarea>
        </div>
        <button type="submit">Send Message</button>
    </form>
</section>
