<?php
get_header();

?>
<section class="sub_banner container-fluid">
    <div class="row p_t_80 p_t_xs_0">
        <div class="container">
            <div class="row m_b_40 m_b_xs_20">
                <!--<a href="#" class="btn btn-banner"><i class="fa fa-phone"></i> (224) 386-1200</a>-->
                <div class="tablee">
                    <div class="col-md-6 tablee_cell title_text left_line  text-left  sub_text">
                        <h2><?php the_title(); ?></h2>
                        <div class="row title_position m_t_30">
                            <div class="tablee">
                                <?php
                                $cd_location = get_field('cd_location');
                                if (!empty($cd_location)) : ?>
                                    <div class="tablee_cell col-md-3">
                                        <p class="title_head">LOCATION</p>
                                        <p><?= $cd_location; ?></p>
                                    </div>
                                <?php endif; ?>
                                <?php
                                $cd_job_type = get_field('cd_job_type');
                                if (!empty($cd_job_type)) : ?>
                                    <div class="tablee_cell col-md-3">
                                        <p class="title_head">Job Type</p>
                                        <p><?= $cd_job_type; ?></p>
                                    </div>
                                <?php endif; ?>
                                <?php
                                $cd_salary = get_field('cd_salary');
                                if (!empty($cd_salary)) : ?>
                                    <div class="tablee_cell col-md-3">
                                        <p class="title_head">Salary</p>
                                        <p><?= $cd_salary; ?></p>
                                    </div>
                                <?php endif; ?>
                                <div class="tablee_cell col-md-2">
                                    <?php 
                                    $cd_button_name=get_field('cd_button_name');
                                    $cd_button_url=get_field('cd_button_url');
                                    if (!empty($cd_button_name)&&!empty($cd_button_url)):
                                        echo "<a href=\"$cd_button_url\" class=\"btn btn-rounded black_btn\">$cd_button_name</a>";
                                    endif; ?>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<section class="container-fluid gray_bg_plain">
    <div class="row">
        <div class="container  ">
            <div class="row m_t_50 m_b_30 about_text">
                <div class="col-md-12">
                    <?php
                    $job_description = get_field('job_description');
                    if (!empty($job_description)) : ?>
                        <div class="row p30">
                            <div class="col-md-4 job_title_side">
                                <h3>Job Description</h3>
                            </div>
                            <div class="col-md-8">
                                <?= $job_description ?>
                            </div>
                        </div>
                    <?php endif; ?>
                    <?php 
                    if( have_rows('cd_other_fields') ):
                        while ( have_rows('cd_other_fields') ) : the_row(); ?>
                            <div class="row p30">
                                <div class="col-md-4 job_title_side">
                                    <h3><?php the_sub_field('cdof_title'); ?></h3>
                                </div>
                                <div class="col-md-8">
                                    <ul>
                                        <?php 
                                        if( have_rows('cdof_listing') ):
                                            while ( have_rows('cdof_listing') ) : the_row(); ?>
                                                <li><?php the_sub_field('cdola_list'); ?></li>
                                            <?php endwhile;
                                        endif;
                                        wp_reset_postdata();
                                        ?>
                                    </ul>
                                </div>
                            </div>
                        <?php endwhile;
                    endif;
                    wp_reset_postdata();
                    ?>
                </div>
            </div>
        </div>
    </div>
</section>
<section class="container-fluid" id="con_form">
	 		<div class="row">
	 			<div class="container p_b_80">	
<div class="row m_t_80  m_b_80 about_text">
                    <div class="title_text text-center col-md-6 col-md-offset-3">
                        <h3><?php the_field('contact_from_title'); ?></h3>
                    </div>
                    <div class="col-md-8 col-md-offset-2 m_t_20">
                        <div class="banner_form">
                            <?php echo do_shortcode('[contact-form-7 id="281" title="Carrier"]'); ?>
                        </div>
                    </div>
                </div>
			</div>
    </div>
</section>
<?php get_footer();