<div class="page-banner">
    <div class="container">
        <h2>Contact Us</h2>
        <p>Get in touch with our team</p>
        <div class="breadcrumb">
            <a href="/">Home</a>
            <span class="separator"><i class="fas fa-chevron-right"></i></span>
            <span>Contact Us</span>
        </div>
    </div>
</div>

<div class="page-content">
    <div class="container">
        <div class="contact-grid">
            <div class="contact-form fade-in-left">
                <h3 style="margin-bottom: 25px; color: var(--gray-900);">Send us a Message</h3>
                <?php if (isset($_GET['sent'])): ?>
                <div class="alert alert-success">
                    <i class="fas fa-check-circle"></i> Thank you for your message! We will get back to you soon.
                </div>
                <?php endif; ?>
                <form method="post" action="/contact">
                    <?= csrfField() ?>
                    <div class="form-group">
                        <label for="name">Full Name</label>
                        <input type="text" id="name" name="name" required placeholder="Your full name" maxlength="200">
                    </div>
                    <div class="form-group">
                        <label for="email">Email Address</label>
                        <input type="email" id="email" name="email" required placeholder="your@email.com">
                    </div>
                    <div class="form-group">
                        <label for="subject">Subject</label>
                        <input type="text" id="subject" name="subject" required placeholder="Message subject">
                    </div>
                    <div class="form-group">
                        <label for="message">Message</label>
                        <textarea id="message" name="message" rows="6" required placeholder="Your message"></textarea>
                    </div>
                    <div class="form-group">
                        <label for="captcha">Security Check: <?= generateCaptcha() ?></label>
                        <input type="number" id="captcha" name="captcha" required placeholder="Enter the answer">
                    </div>
                    <button type="submit" class="btn btn-primary"><i class="fas fa-paper-plane"></i> Send Message</button>
                </form>
            </div>
            <div class="contact-info-card fade-in-right">
                <h3>Contact Information</h3>
                <div class="contact-info-item">
                    <div class="icon"><i class="fas fa-map-marker-alt"></i></div>
                    <div>
                        <h4>Address</h4>
                        <p><?= htmlspecialchars($settings['address'] ?? '') ?></p>
                    </div>
                </div>
                <div class="contact-info-item">
                    <div class="icon"><i class="fas fa-envelope"></i></div>
                    <div>
                        <h4>Email</h4>
                        <p><?= htmlspecialchars($settings['email'] ?? '') ?></p>
                    </div>
                </div>
                <div class="contact-info-item">
                    <div class="icon"><i class="fas fa-phone"></i></div>
                    <div>
                        <h4>Phone</h4>
                        <p><?= htmlspecialchars($settings['phone'] ?? '') ?></p>
                    </div>
                </div>
                <div class="contact-info-item">
                    <div class="icon"><i class="fab fa-youtube"></i></div>
                    <div>
                        <h4>YouTube</h4>
                        <p><a href="<?= htmlspecialchars($settings['youtube_channel'] ?? '#') ?>" style="color: rgba(255,255,255,0.8);">Alpha Genomics Channel</a></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
