<?php
/**
 * Template part for displaying Hero Content
 *
 * @package Stygian
 */

if ( ! stygian_gtm( 'stygian_contact_form_page' ) ) {
	return;
}

$stygian_args = array(
	'page_id'        => absint( stygian_gtm( 'stygian_contact_form_page' ) ),
	'posts_per_page' => 1,
	'post_type'      => 'page',
);

$stygian_loop = new WP_Query( $stygian_args );

while ( $stygian_loop->have_posts() ) :
	$stygian_loop->the_post();

	$subtitle = stygian_gtm( 'stygian_contact_form_custom_subtitle' );
	?>
	<div id="contact-form-section" class="section no-map">
		<div class="section-contact clear-fix">
			<div class="container">
				<div class="custom-contact-form row">
					<div class="ff-grid-6 contact-thumb">
					<?php stygian_post_thumbnail(); ?>
				</div>
				<div class="form-section ff-grid-6">
					<div class="section-title-wrap text-alignleft">
						<?php if ( $subtitle ) : ?>
							<p class="section-top-subtitle"><?php echo esc_html( $subtitle ); ?></p>
						<?php endif; ?>

							<?php the_title( '<h2 class="section-title">', '</h2>' ); ?>

							<span class="divider"></span>
					</div><!-- .section-title-wrap -->

					<?php the_content(); ?>
				</div>
			</div><!-- .custom-contact-form -->
			</div>
			<!-- .container -->
		</div><!-- .section-contact -->
	</div><!-- .section -->
<?php
endwhile;

wp_reset_postdata();
