<?php get_header(); ?>

<main class="contact-page">
    <?php if (have_posts()):
        while (have_posts()):
            the_post(); ?>

            <article <?php post_class('contact-page__article'); ?>>

                <?php if (has_post_thumbnail()): ?>
                    <div class="contact-page__hero">
                        <?php the_post_thumbnail('full', array('class' => 'contact-page__hero-image')); ?>
                    </div>
                <?php endif; ?>

                <section class="contact-page__intro">
                    <h1 class="contact-page__title">
                        <?php the_title(); ?>
                    </h1>

                    <div class="contact-page__content">
                        <?php the_content(); ?>
                    </div>
                </section>

                <section class="contact-page__details">
                    <?php if (get_field('contact_details_heading')): ?>
                        <h2 class="contact-page__details-title">
                            <?php the_field('contact_details_heading'); ?>
                        </h2>
                    <?php endif; ?>

                    <?php if (get_field('contact_email')): ?>
                        <p><strong>Email:</strong>
                            <?php the_field('contact_email'); ?>
                        </p>
                    <?php endif; ?>

                    <?php if (get_field('contact_phone')): ?>
                        <p><strong>Phone:</strong>
                            <?php the_field('contact_phone'); ?>
                        </p>
                    <?php endif; ?>

                    <?php if (get_field('contact_location')): ?>
                        <p><strong>Location:</strong>
                            <?php the_field('contact_location'); ?>
                        </p>
                    <?php endif; ?>

                    <?php if (get_field('contact_note')): ?>
                        <p>
                            <?php the_field('contact_note'); ?>
                        </p>
                    <?php endif; ?>
                </section>

            </article>

        <?php endwhile; endif; ?>
</main>

<?php get_footer(); ?>