<?php /* Template Name: About Page */ ?>
<?php get_header(); ?>

<!-- Start Breadcrumb 
    ============================================= -->
    <div class="breadcrumb-area text-center shadow dark bg-fixed text-light" style="background-image: url(<?php echo get_field('web_banner'); ?>);">
        <div class="container">
            <div class="row">
                <div class="col-lg-8 offset-lg-2">
                    <h1><?php echo get_field('banner_title'); ?></h1>
                    <ul class="breadcrumb">
                        <li><a href="<?php echo site_url() ?>"><i class="fas fa-home"></i> Home</a></li>
                        <li class="active">About Us</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <!-- End Breadcrumb -->

    <?php if( have_rows('content_section_with_image') ): ?>
    <?php while ( have_rows('content_section_with_image') ) : the_row(); ?>

        <?php if( get_row_layout() == 'content_section_01_with_image' ): ?>
    <!-- Start Contact 
    ============================================= -->
    <div class="about-content-area overflow-hidden inc-shape default-padding">
        <!-- Illustration -->
        <div class="illustration">
            <img src="<?php echo get_template_directory_uri() ?>/assets/img/shape/4.png" alt="Illustration">
        </div>
        <!-- Illustration -->
        <div class="container">
            <div class="row">
                
                <div class="col-lg-6 info">
                    <div class="content wow fadeInLeft" data-wow-delay="300ms">
                        <h5><?php echo get_sub_field('section_sub_title') ?></h5>
                        <?php if( have_rows('content_section') ): ?>
                                <?php while( have_rows('content_section') ): the_row(); ?>
                                <h4><?php echo get_sub_field('main_title') ?></h4>
                                <p><?php echo get_sub_field('description') ?></p>
                                <?php endwhile; ?>
                            <?php endif; ?>
                    </div>
                    <ul class="achivement">
                    <?php if( have_rows('stat') ): ?>
                            <?php while( have_rows('stat') ): the_row(); ?>
                        
                            <li>
                                <div class="fun-fact">
                                    <div class="counter">
                                        <div class="timer" data-to="<?php echo get_sub_field('stat_value'); ?>" data-speed="5000"><?php echo get_sub_field('stat_value'); ?></div>
                                        <div class="operator">+</div>
                                    </div>
                                    <span class="medium"><?php echo get_sub_field('stat_title'); ?></span>
                                </div>
                            </li>

                            <?php endwhile; ?>
                        <?php endif; ?>
                    </ul>
                </div>
                <div class="col-lg-6">
                    <div class="thumb">
                        <img class="wow fadeInRight" data-wow-delay="700ms" src="<?php echo get_template_directory_uri() ?>/assets/img/about/1.jpg" alt="Thumb">
                        <img class="wow fadeInUp" data-wow-delay="1000ms" src="<?php echo get_template_directory_uri() ?>/assets/img/about/4.jpg" alt="Thumb">
                    </div>
                </div>

            </div>
        </div>
    </div>
    <!-- End About Area -->
    <?php endif; ?>
    <?php endwhile; ?>
    <?php endif; ?>

<?php if( have_rows('section_description') ): ?>
    <?php while ( have_rows('section_description') ) : the_row(); ?>
     <?php if( get_row_layout() == 'section_image' ): ?>
    <!-- Start Faq 
    ============================================= -->
    <div class="faq-area bg-gray default-padding bottom-less">
        <div class="container">
            <div class="faq-items">
                <div class="row align-center">

                    <div class="col-lg-4 thumb wow fadeInUp" data-wow-delay="550ms">
                        <img src="<?php echo get_sub_field('section_image'); ?>" alt="Thumb">
                    </div>

                    <div class="col-lg-7 offset-lg-1 wow fadeInRight">
                        <div class="heading">
                            <h2 class="area-title"><?php echo get_sub_field('section_title'); ?></h2>
                            <?php echo get_sub_field('section_description'); ?>
                        </div>
                        
                    </div>

                </div>
            </div>
        </div>
    </div>
    <!-- End Faq Area -->
     <?php endif; ?>
     <?php endwhile; ?>
   <?php endif; ?>

    <!-- Start Partner 
    ============================================= -->
    <div class="partner-area text-center default-padding-top d-none">
        <div class="container">
            <div class="partner-items">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="partner-carousel owl-carousel owl-theme">
                            <img src="<?php echo get_template_directory_uri() ?>/assets/img/clients/1.png" alt="Partner">
                            <img src="<?php echo get_template_directory_uri() ?>/assets/img/clients/2.png" alt="Partner">
                            <img src="<?php echo get_template_directory_uri() ?>/assets/img/clients/3.png" alt="Partner">
                            <img src="<?php echo get_template_directory_uri() ?>/assets/img/clients/4.png" alt="Partner">
                            <img src="<?php echo get_template_directory_uri() ?>/assets/img/clients/5.png" alt="Partner">
                            <img src="<?php echo get_template_directory_uri() ?>/assets/img/clients/6.png" alt="Partner">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- End Partner Area -->

    <div class="team-area default-padding bottom-less d-none">
        <div class="container">
            <div class="team-items text-center">
                <div class="row">
                    <!-- Single Item -->
                    <?php if( have_rows('section_description') ): ?>
                        <?php while ( have_rows('section_description') ) : the_row(); ?>
                        <?php if( get_row_layout() == 'section_description_01' ): ?>

                        <div class="leadership-title">
                            <h1><?php echo get_sub_field('section_title'); ?></h1>
                            <p><?php echo get_sub_field('section_sub_title'); ?></p>
                        </div>
                           <?php endif; ?>
                        <?php endwhile; ?>
                    <?php endif; ?>
                    <?php
                    // Query to get posts
                    $args = array(
                        'post_type' => 'team', // Change this to your custom post type if needed
                        'posts_per_page' => -1, // Number of posts to display
                        'tax_query' => array(
                            array(
                                'taxonomy' => 'team-category', // Taxonomy name
                                'field' => 'slug', // Field to match the term ('slug' or 'term_id')
                                'terms' => 'leadership', // Term slug to filter by
                            ),
                        ),
                    );

                    $query = new WP_Query($args); 
                    ?>

                    <?php if ( $query->have_posts() ) : ?>
                        <?php while ( $query->have_posts() ) : $query->the_post(); ?>
                    <div class="single-item col-lg-4 col-md-6">
                        <div class="item">
                            <div class="thumb">
                                <img src="<?php the_post_thumbnail_url(); ?>" alt="Thumb">
                                <ul>
                                    <li class="facebook">
                                        <a href="#">
                                            <i class="fab fa-facebook-f"></i>
                                        </a>
                                    </li>
                                    <li class="twitter">
                                        <a href="#">
                                            <i class="fab fa-twitter"></i>
                                        </a>
                                    </li>
                                    <li class="pinterest">
                                        <a href="#">
                                            <i class="fab fa-pinterest"></i>
                                        </a>
                                    </li>
                                    <li class="linkedin">
                                        <a href="#">
                                            <i class="fab fa-linkedin-in"></i>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                            <div class="info">
                                <h4><?php the_title(); ?></h4>
                                <?php the_content() ?>
                            </div>
                        </div>
                    </div>
                    <!-- End Single Item -->
                    <?php endwhile; ?>
                    <?php else : ?>
                        <p>No posts found.</p>
                    <?php endif; ?>

                    <?php wp_reset_postdata(); ?>

                    
                </div>
            </div>
        </div>
    </div>
    <!-- End Team Area -->

    <div class="team-area default-padding bottom-less d-none">
        <div class="container">
            <div class="team-items text-center">
                <div class="row">
                    <!-- Single Item -->
                    <?php if( have_rows('section_description') ): ?>
                    <?php while ( have_rows('section_description') ) : the_row(); ?>
                    <?php if( get_row_layout() == 'section_description_03' ): ?>

                    <div class="leadership-title">
                        <h1><?php echo get_sub_field('section_title'); ?></h1>
                        <p><?php echo get_sub_field('section_sub_title'); ?></p>
                    </div>
                    <?php endif; ?>
                    <?php endwhile; ?>
                <?php endif; ?>

                <?php
                    // Query to get posts
                    $args = array(
                        'post_type' => 'team', // Change this to your custom post type if needed
                        'posts_per_page' => -1, // Number of posts to display
                        'tax_query' => array(
                            array(
                                'taxonomy' => 'team-category', // Taxonomy name
                                'field' => 'slug', // Field to match the term ('slug' or 'term_id')
                                'terms' => 'management', // Term slug to filter by
                            ),
                        ),
                    );

                    $query = new WP_Query($args); 
                    ?>

                    <?php if ( $query->have_posts() ) : ?>
                        <?php while ( $query->have_posts() ) : $query->the_post(); ?>
                    <div class="single-item col-lg-4 col-md-6">
                        <div class="item">
                            <div class="thumb">
                                <img src="<?php the_post_thumbnail_url(); ?>" alt="Thumb">
                                <ul>
                                    <li class="facebook">
                                        <a href="#">
                                            <i class="fab fa-facebook-f"></i>
                                        </a>
                                    </li>
                                    <li class="twitter">
                                        <a href="#">
                                            <i class="fab fa-twitter"></i>
                                        </a>
                                    </li>
                                    <li class="pinterest">
                                        <a href="#">
                                            <i class="fab fa-pinterest"></i>
                                        </a>
                                    </li>
                                    <li class="linkedin">
                                        <a href="#">
                                            <i class="fab fa-linkedin-in"></i>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                            <div class="info">
                                <span><?php echo get_field('designation') ?></span>
                                <h4><?php the_title(); ?></h4>
                                <?php the_content() ?>
                            </div>
                        </div>
                    </div>
                    <!-- End Single Item -->
                    <?php endwhile; ?>
                    <?php else : ?>
                        <p>No posts found.</p>
                    <?php endif; ?>

                    <?php wp_reset_postdata(); ?>
                   
                    
                </div>
            </div>
        </div>
    </div>
    <!-- End Team Area -->

<?php get_footer(); ?>