<div id="block-section-7" class="ui-container lazy ts">
        <div class="row-wide">
            <div class="block-content">
                <div class="row no-gutters">
                    <div class="col-sm-12 no-gutters">
                        <div class="content-module rte-inline col-sm-12 col-12  module">
                            <div class="section-container section-container-7b mobile-padding">
                                <div class="row new-row">
                                    <div class="col-sm-12 col-12 text-center mobile-padding shared-container">
                                        <?php /* if( get_field('main_title',  $post_id) ): ?>
                                            <h2 class="zulu-signup__headline"><?php the_field('main_title', $post_id); ?></h2>
                                        <?php endif; */?>
                                        <h3 class="sectionTitle"><?php the_field('bs7_section_title') ?></h3>
                                        <p class="sectionDescription"><?php the_field('bs7_section_description') ?></p>
                                    </div>
                                    <?php  /* Show Projects list Block */ ?>
                                    <?php 
                                        $companyProjects= get_term_by('slug', get_field('bs7_project_category_slug'), 'project-category'); 
                                        $args = array(
                                            'post_type' => 'projects',
                                            'posts_per_page' => 12,
                                            'tax_query' => array(
                                                array(
                                                    'taxonomy' => 'project-category',
                                                    'field' => 'slug',
                                                    'terms' => array( $companyProjects->slug ),
                                                    'operator' => 'IN'
                                                )
                                            )
                                        ); 
                                        $projects = new WP_Query($args);
                                        $count = 0;
                                    ?>
                                    
                                    <div class="col-sm-12 col-12 carousel ">
                                        <div class="zoom">
                                            <div class="container">
                                                <ul class="cards" style="transform: translateZ(672px);">
                                                    <?php if ( $projects->have_posts() ) : while ( $projects->have_posts() ) : $projects->the_post(); $count++;?>
                                                        <?php
                                                        // get post category 
                                                        $post_id = get_the_ID();
                                                        $proj_cats = [];
                                                        $terms = get_the_terms( $post_id, 'project-category' );
                                                        foreach ( $terms as $term ) {
                                                            $proj_cats[] = $term->name;
                                                        }
                                                        ?>
                                                        
                                                        <li class="img-container img-container-<?php echo $count; ?>" data-case="<?php echo $str = implode (", ", $proj_cats);?>"
                                                            data-sub-title-link="<?= esc_url( get_permalink() )?>"
                                                            data-sub-title="<?php the_title(); ?>"
                                                            data-description="<?php the_field('short_description'); ?>"
                                                            style="transform: rotateY(0deg) translateZ(-672px;" >
                                                            <div class="cta-btn cards-cta-btn cards-cta-btn-<?php echo $count; ?> onactive">
                                                                <span>explore</span>
                                                            </div>
                                                            <a href="<?= esc_url( get_permalink() )?>">
                                                                <div style="background-image: url(<?php if ( has_post_thumbnail() ) {the_post_thumbnail_url(); }?>); width: 310px; height: 300px;background-size: cover;background-repeat: no-repeat;"></div>
                                                                <?php /*<img src="<?php if ( has_post_thumbnail() ) {the_post_thumbnail_url(); }?>"
                                                                    class="carousel-img d-none" alt="<?php the_title(); ?>"
                                                                    title=""> */?>
                                                            </a>
                                                        </li>
                                                    <?php endwhile; endif; wp_reset_postdata();?>
                                                </ul>
                                            </div>
                                        </div>
                                        <div class="col-sm-12 offset-md-0 offset-lg-1 col-12 text-content">
                                            <div class="col-md-4 col-lg-3 col-12 text-content isactive">
                                                <div class="card-nav">
                                                    <div class="cta-more-box arrow slide-left" tabindex="0"
                                                        role="button">
                                                        <div class="cta-more-arrow">
                                                            <svg height="20" viewBox="0 0 30 13" fill="none"
                                                                class="img-arrow-left">
                                                                <path style="fill: var(--ts-primary-color)"
                                                                    d="M29.7204 7.07638C30.0456 6.75118 30.0456 6.22392 29.7204 5.89871L24.4208 0.599184C24.0956 0.273979 23.5684 0.273979 23.2432 0.599184C22.918 0.924389 22.918 1.45165 23.2432 1.77686L27.9539 6.48755L23.2432 11.1982C22.918 11.5234 22.918 12.0507 23.2432 12.3759C23.5684 12.7011 24.0956 12.7011 24.4208 12.3759L29.7204 7.07638ZM0.818359 7.32029L29.1315 7.32029L29.1315 5.65481L0.818359 5.65481L0.818359 7.32029Z">
                                                                </path>
                                                            </svg>
                                                        </div>
                                                    </div>
                                                    <div class="cta-more-box arrow slide-right" style="" tabindex="0"
                                                        role="button">
                                                        <div class="cta-more-arrow">
                                                            <svg height="20" viewBox="0 0 30 13" fill="none"
                                                                class="img-arrow-right">
                                                                <path style="fill: var(--ts-primary-color)"
                                                                    d="M29.7204 7.07638C30.0456 6.75118 30.0456 6.22392 29.7204 5.89871L24.4208 0.599184C24.0956 0.273979 23.5684 0.273979 23.2432 0.599184C22.918 0.924389 22.918 1.45165 23.2432 1.77686L27.9539 6.48755L23.2432 11.1982C22.918 11.5234 22.918 12.0507 23.2432 12.3759C23.5684 12.7011 24.0956 12.7011 24.4208 12.3759L29.7204 7.07638ZM0.818359 7.32029L29.1315 7.32029L29.1315 5.65481L0.818359 5.65481L0.818359 7.32029Z">
                                                                </path>
                                                            </svg>
                                                        </div>
                                                    </div>
                                                    <label class="progress-bar-label" style="">1/<?= count($projects->posts)?></label>
                                                </div>
                                            </div>
                                             <div class="col-md-6 col-12 col-lg-5 text-content carousel-text-content">
                                                <?php if ($projects->have_posts()) : ?>
                                                       <?php rewind_posts() ?>
                                                        <?php 
                                                        $companyProjects= get_term_by('slug', get_field('bs7_project_category_slug'), 'project-category'); 
                                                        $args2 = array(
                                                            'post_type' => 'projects',
                                                            'posts_per_page' => 1,
                                                            'tax_query' => array(
                                                                array(
                                                                    'taxonomy' => 'project-category',
                                                                    'field' => 'slug',
                                                                    'terms' => array( $companyProjects->slug ),
                                                                    'operator' => 'IN'
                                                                )
                                                            )
                                                        ); 
                                                        $the_query = new WP_Query($args2); ?>
                                                        <?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
                                                            <?php
                                                            // get post category 
                                                            $post_id = get_the_ID();
                                                            $proj_cats = [];
                                                            $terms = get_the_terms( $post_id, 'project-category' );
                                                            foreach ( $terms as $term ) {
                                                                $proj_cats[] = $term->name;
                                                            }
                                                            ?>
                                                            <h4 class="categoryTitle"><?php echo $str = implode (", ", $proj_cats);?></h4>
                                                            <a href="<?= esc_url( get_permalink() )?>"
                                                                class="SubsectionTitleTrigger" aria-label="">
                                                                <h3 class="SubsectionTitle"><?php the_title(); ?></h3>
                                                            </a>
                                                            <p class="Subsectiondescription"><?php the_field('short_description'); ?></p>
                                                        <?php endwhile; wp_reset_postdata() ?>
                                                <?php endif; ?>
                                                
                                                <?php if( get_field('bs7_enable_call_to_action') == 'yes' ): ?>
                                                <!-- load link -->
                                                    <?php 
                                                        $args = array( 'link_title' => get_field('bs7_call_to_action_label'),'link_url' => get_field('bs7_call_to_action_link'), 'class' =>'' );
                                                        set_query_var( 'args', $args );
                                                        get_template_part( 'template-parts/subsidiary-page/link', 'left', $args ); 
                                                    ?>
                                                <?php endif; ?>
                                                 
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div
                                class="read-it-container section-container-7b hidden-lg hidden-md hidden-sm mobile-padding">
                                <div class="row">
                                    <div class="readit-marquee">
                                        <h2 class="submarquee">
                                            <?php the_field('bs7_section_title') ?>
                                        </h2>
                                    </div>
                                    <div class="sub-container">
                                        <p class="read-it-subdesc">
                                            <?php the_field('bs7_section_description') ?>
                                        </p>
                                    </div>
                                    <div class="row">
                                        <?php if ( $projects->have_posts() ) : while ( $projects->have_posts() ) : $projects->the_post();?>
                                            <div class="text-content isactive">
                                                <p class="categoryTitle">O2</label>
                                                <h3 class="read-it-cardtitle"><?php the_title(); ?></h3>
                                                <p class="cardDescription"><?php the_field('short_description'); ?></p>
                                                <!-- load link -->
                                                <?php 
                                                    $args = array( 'link_title' => 'explore more', 'link_url' => esc_url( get_permalink() ), 'class' => '' );
                                                    set_query_var( 'args', $args );
                                                    get_template_part( 'template-parts/subsidiary-page/link', 'left', $args ); 
                                                ?>
                                                <br>
                                            </div>
                                        <?php endwhile; endif; wp_reset_postdata();?>

                                        <?php if( get_field('bs7_enable_call_to_action') == 'yes' ): ?>
                                        <!-- load link -->
                                            <?php 
                                                $args = array( 'link_title' => get_field('bs7_call_to_action_label'),'link_url' => get_field('bs7_call_to_action_link'), 'class' =>'' );
                                                set_query_var( 'args', $args );
                                                get_template_part( 'template-parts/subsidiary-page/link', 'left', $args ); 
                                            ?>
                                        <?php endif; ?>
                                        <hr>
                                    </div>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>

            </div>
        </div>
    </div>