<?php
/*
* Template Name: Career Page
*
* */

get_header();
?>
    <section class="sub_banner container-fluid">
        <div class="row p_t_50">
            <img src="<?= get_template_directory_uri(); ?>/images/Bitmap.png" class="img-responsive banner_img"/>
            <div class="container  ">
                <div class="row m_t_100 m_b_100">
                    <!--<a href="#" class="btn btn-banner"><i class="fa fa-phone"></i> (224) 386-1200</a>-->
                    <div class="tablee">
                        <div class="col-md-5 tablee_cell title_text left_line  text-left  sub_text">
                            <h2><?php the_field('cbh_title'); ?></h2>
                            <?php the_field('cbh_text'); ?>
                            <?php 
                            $cbh_btn_nm=get_field('cbh_btn_nm');
                            $cbh_btn_url=get_field('cbh_btn_url');
                            if (!empty($cbh_btn_nm)&&!empty($cbh_btn_url)):
                                echo "<a href=\"$cbh_btn_url\" class=\"banner_a\">$cbh_btn_nm</a>";
                            endif;
                            ?>
                        </div>
						<div class="col-md-1 tablee_cell"></div>
                        <div class="col-md-6 tablee_cell">
                            <?php
                            $teamList = 0;
                            if( have_rows('cbh_img_list') ):
                                while ( have_rows('cbh_img_list') ) : the_row(); $teamList++; ?>
                                <?php $cbhr_img_list = get_sub_field('cbhr_img_list'); ?>
                                    <img src="<?= $cbhr_img_list['url']; ?>" class="t1 team_image_<?= $teamList; ?>"/>
                                <?php endwhile;
                            endif;
                            wp_reset_postdata();
                            ?>
                            <a href="#" class="t1 team_image_5"><i class="fa fa-plus"></i></a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <section class="container-fluid">
        <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">
                        <?php $om_icon = get_field('om_icon'); ?>
                        <img src="<?= $om_icon['url']; ?>" class="center-block">
                        <h3><?php the_field('om_title'); ?></h3>
                        <?php the_field('om_text'); ?>
                    </div>
                    <div class="col-md-12">
                        <div class="row same_height_container">
                            <?php
                            if( have_rows('om_two_box') ):
                                while ( have_rows('om_two_box') ) : the_row(); ?>
                                    <div class="col-md-6">
                                        <div class="approch_box team_boxe same_height">
                                            <div class="tablee m_b_20">
                                                <div class="tablee_cell" style="width:90px;">
                                            <span class="round_img">
                                                <?php
                                                $om_tb_icon = get_sub_field('om_tb_icon');
                                                ?>
                                                <img src="<?= $om_tb_icon['url']; ?>">
                                            </span>
                                                </div>
                                                <div class="tablee_cell">
                                                    <h3><?php the_sub_field('om_tb_title'); ?></h3>
                                                </div>
                                            </div>
                                            <ul>
                                                <?php
                                                if( have_rows('om_tb_listing') ):
                                                    while ( have_rows('om_tb_listing') ) : the_row(); ?>
                                                        <li><?php the_sub_field('omtbr_list'); ?></li>
                                                    <?php endwhile;
                                                endif;
                                                wp_reset_postdata();
                                                ?>
                                            </ul>
                                        </div>
                                    </div>
                                <?php endwhile;
                            endif;
                            wp_reset_postdata();
                            ?>
                            <div class="col-md-12">
                                <div class="approch_box team_boxe same_height">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="tablee m_b_20">
                                                <div class="tablee_cell" style="width:90px;">
                                                    <span class="round_img">
                                                        <?php $wlb_icon = get_field('wlb_icon'); ?>
                                                        <img src="<?= $wlb_icon['url']; ?>">
                                                    </span>
                                                </div>
                                                <div class="tablee_cell">
                                                    <h3><?php the_field('wlb_title'); ?></h3>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-12">
                                            <div class="row">
                                                <?php
                                                if( have_rows('work_life_balance') ):
                                                    while ( have_rows('work_life_balance') ) : the_row(); ?>
                                                        <div class="col-md-4">
                                                            <h4><?php the_field('wlba_title'); ?></h4>
                                                            <ul>
                                                                <?php
                                                                if( have_rows('wlba_listing') ):
                                                                    while ( have_rows('wlba_listing') ) : the_row(); ?>
                                                                        <li><?php the_sub_field('wlbai_list'); ?></li>
                                                                    <?php endwhile;
                                                                endif;
                                                                wp_reset_postdata();
                                                                ?>
                                                            </ul>
                                                        </div>
                                                    <?php endwhile;
                                                endif;
                                                wp_reset_postdata();
                                                ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row   m_b_80   about_text">
                    <div class="title_text text-center col-md-6 col-md-offset-3">
                        <h3><?php the_field('jp_title'); ?></h3>
                    </div>
                    <?php
                        $args = array( 'post_type' => 'job_positions', 'posts_per_page' => -1 );
                        $loop = new WP_Query( $args );
                        if ($loop -> have_posts()) : ?>
                            <div class="col-md-12 m_t_30">
                                <div class="job_title row">
                                    <div class="col-md-4 ">
                                        Position
                                    </div>
                                    <div class="col-md-2">
                                        Domain
                                    </div>
                                    <div class="col-md-5">
                                        Location
                                    </div>
                                    <div class="col-md-2">

                                    </div>
                                </div>
                            </div>
                            <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
                                <div class="col-md-12">
                                    <div class="job_body_box row">
                                        <div class="tablee">
                                            <div class="col-md-4 tablee_cell text-primary">
                                                <?php the_field('cd_job_position'); ?>
                                            </div>
                                            <div class="col-md-2 tablee_cell">
                                                <?php the_field('cd_domain'); ?>
                                            </div>
                                            <div class="col-md-4 tablee_cell">
                                                <?php the_field('cd_location'); ?>
                                            </div>
                                            <div class="col-md-2 tablee_cell">
                                                <a href="<?= get_post_permalink(); ?>" class="btn btn-rounded">View Details</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            <?php endwhile; ?>
                        <?php endif; wp_reset_postdata(); ?>
                </div>
                <div class="row m_b_80   about_text" id="apply-now">
                    <div class="title_text text-center col-md-6 col-md-offset-3">
                        <h3><?php the_field('ah_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();
