<?php
/*
Template Name: Forecasting Software
*/

get_header('new');
?>
<section class="section banner warehouse-management-soft-banner forecasting-software-banner pb-0 no-lazy">
    <div class="container">
        <div class="row mt-xl-5 mt-lg-0">
            <div class="col-lg-12">
                <div class="text-cont text-center mt-0">
                    <h1 class="banner-heading mb-4">
                        <?php echo get_field('forecasting_banner_heading'); ?> <span><?php echo get_field('forecasting_banner_heading_highlight'); ?></span>
                    </h1>
                    <p class="banner-content">
                        <?php echo get_field('forecasting_banner_description'); ?>
                    </p>
                    <div class="banner-btns justify-content-center">
                        <a href="<?php echo get_field('forecasting_primary_cta_link'); ?>" class="primary animated-cta-btn">
                            <?php echo get_field('forecasting_primary_cta_text'); ?>
                        </a>
                        <a href="<?php echo get_field('forecasting_secondary_cta_link'); ?>" class="border-gradient-btn animated-btn">
                            <?php echo get_field('forecasting_secondary_cta_text'); ?>
                            <svg width="14" height="11" viewBox="0 0 14 11" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <path d="M5.35816 0.0996094H7.95016L13.3502 5.49961L7.95016 10.8996H5.35816L9.82216 6.43561H0.660156V4.56361H9.82216L5.35816 0.0996094Z" fill="black"/>
                            </svg>
                        </a>
                    </div>
                </div>
            </div>
        </div>

        <div class="analytics-feature-wrapper">
            <div class="row gy-4 align-items-end">
                <div class="col-lg-4 col-xl-3 pe-lg-0">
                    <div class="realtime-analytics-wrapper">
                        <div class="demand-supply">
                            <div class="text-content">
                                <div class="left">
                                    <h3><?php echo get_field('forecasting_demand_supply_percentage'); ?>%</h3>
                                    <p><?php echo get_field('forecasting_demand_supply_label'); ?></p>
                                </div>
                                <div class="right">
                                    <?php 
                                    $icon = get_field('forecasting_demand_supply_icon');
                                    if($icon): ?>
                                        <img src="<?php echo esc_url($icon['url']); ?>" alt="<?php echo esc_attr($icon['alt']); ?>" class="img-fluid" width="100" height="100">
                                    <?php endif; ?>
                                </div>
                            </div>
                        </div>

                        <div class="inventory-forecasting-wms">
                            <div class="text-content">
                                <h3><?php echo get_field('forecasting_wms_card_heading'); ?></h3>
                                <ul>
                                    <?php if(have_rows('forecasting_wms_features')): ?>
                                        <?php while(have_rows('forecasting_wms_features')): the_row(); ?>
                                            <li>
                                                <span><?php echo get_sub_field('feature_name'); ?></span>
                                                <span><?php echo get_sub_field('feature_percentage'); ?>%</span>
                                            </li>
                                        <?php endwhile; ?>
                                    <?php endif; ?>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-lg-4 col-xl-5">
                    <div class="img-wrapper">
						<?php
	$desktop_img_url = get_field('forecasting_banner_center_image');
	$mobile_img_url  = get_field('forecasting_banner_mobile_center_image');
?>
    <picture>
        <source class="no-lazy" media="(max-width: 767px)" srcset="<?php echo $mobile_img_url ? $mobile_img_url : $desktop_img_url['url'] ?>">
        <img src="<?php echo $desktop_img_url['url'];?>" loading="eager" fetchpriority="high" decoding="async" width="584" height="468" class="img-fluid no-lazy" alt="">
    </picture>
                        
                        
                    </div>
                </div>
                <div class="col-lg-4 col-xl-4">
                    <div class="trusted-by-startups">
                        <div class="avatar-group flex-column customer-reviews">
                            <div class="text-content">
                                <h3><?php echo get_field('forecasting_reviews_heading'); ?></h3>
                                <p><?php echo get_field('forecasting_reviews_subheading'); ?></p>
                                <div class="d-flex w-100 mb-2">
                                    <?php 
                                    $avatars = get_field('forecasting_customer_avatars');
                                    if($avatars): 
                                        foreach($avatars as $avatar): ?>
                                            <div class="avatar">
                                                <img src="<?php echo esc_url($avatar['url']); ?>" alt="<?php echo esc_attr($avatar['alt']); ?>" width="50" height="50">
                                            </div>
                                        <?php endforeach; 
                                    endif; ?>
                                    <a href="" class="more-avatars">
                                        <div class="others-avatars">
                                            <span class="others"><?php echo get_field('forecasting_total_customers'); ?></span>
                                        </div>
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="weekly-feature-wrapper">
                           <div class="text-content">
                               <h3><?php echo get_field('forecasting_benefits_heading'); ?></h3>
                               <ul>
                                   <?php if(have_rows('forecasting_benefits_list')): ?>
                                       <?php while(have_rows('forecasting_benefits_list')): the_row(); ?>
                                           <li><?php echo get_sub_field('benefit_text'); ?></li>
                                       <?php endwhile; ?>
                                   <?php endif; ?>
                               </ul>
                           </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- Certificates Section Start -->
<?php get_template_part('templates-parts/pages/certificates'); ?>
<!-- Certificates Section End -->

<section class="section accurate-forecasting bg-white">
    <div class="container">
        <div class="row">
            <div class="col-lg-6">
                <div class="text-cont">
                    <h2 class="section-title mb-4">
                        <?php echo get_field('accurate_section_title'); ?> <br> 
                        <span><?php echo get_field('accurate_section_title_highlight'); ?></span> 
                        <?php echo get_field('accurate_section_subtitle'); ?>
                    </h2>
                    <p class="section-content">
                        <?php echo get_field('accurate_section_description'); ?>
                    </p>
                    <ul>
                        <?php if(have_rows('accurate_benefits_list')): ?>
                            <?php while(have_rows('accurate_benefits_list')): the_row(); ?>
                                <li>
                                    <?php echo get_sub_field('benefit_icon_svg'); ?>
                                    <h3><?php echo get_sub_field('benefit_title'); ?></h3>
                                    <p><?php echo get_sub_field('benefit_description'); ?></p>
                                </li>
                            <?php endwhile; ?>
                        <?php endif; ?>
                    </ul>
                    <a href="<?php echo get_field('accurate_cta_link'); ?>" class="primary animated-cta-btn">
                        <?php echo get_field('accurate_cta_text'); ?>
                    </a>
                </div>
            </div>
            <div class="col-lg-6">
                <div class="img-cont">
                    <?php 
                    $main_image = get_field('accurate_main_image');
                    if($main_image): ?>
                        <img src="<?php echo esc_url($main_image['url']); ?>" 
                             alt="<?php echo esc_attr($main_image['alt']); ?>" 
                             class="img-fluid" 
                             loading="lazy" width="615" height="624">
                    <?php endif; ?>
                    <div class="box">
                        <h3><?php echo get_field('accurate_box_title'); ?></h3>
                        <p><?php echo get_field('accurate_box_description'); ?></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<section class="section how-warego-forecasting bg-white">
    <div class="container">
        <div class="text-cont text-center">
            <h2 class="section-title mb-4">
                <?php if(get_field('warego_section_title')): ?>
                    <?php echo get_field('warego_section_title'); ?> 
                <?php endif; ?>
                <span><?php echo get_field('warego_section_title_highlight'); ?></span> 
                <?php echo get_field('warego_section_title_after'); ?>
            </h2>
            <p class="section-content">
                <?php echo get_field('warego_section_description'); ?>
            </p>
        </div>

        <!-- Tabs Start Here -->
        <div class="responsive-tabs">
            <div class="row">
                <div class="col-lg-6">
                    <ul class="nav nav-tabs" role="tablist">
                        <?php if(have_rows('warego_tabs_list')): ?>
                            <?php $tab_index = 0; ?>
                            <?php while(have_rows('warego_tabs_list')): the_row(); ?>
                                <?php 
                                $tab_id = 'tab-' . chr(65 + $tab_index); // A, B, C, etc.
                                $pos_id = 'pos-' . chr(65 + $tab_index);
                                $active_class = ($tab_index == 0) ? 'active' : '';
                                ?>
                                <li class="nav-item">
                                    <a id="<?php echo $tab_id; ?>" 
                                       href="#<?php echo $pos_id; ?>" 
                                       class="nav-link <?php echo $active_class; ?>" 
                                       data-bs-toggle="tab" 
                                       role="tab">
                                        <label><?php echo get_sub_field('tab_label'); ?></label>
                                        <h3><?php echo get_sub_field('tab_title'); ?></h3>
                                        <p><?php echo get_sub_field('tab_description'); ?></p>
                                    </a>
                                </li>
                                <?php $tab_index++; ?>
                            <?php endwhile; ?>
                        <?php endif; ?>
                    </ul>
                </div>
                <div class="col-lg-6">
                    <div id="content" class="tab-content" role="tablist">
                        <?php if(have_rows('warego_tabs_list')): ?>
                            <?php $content_index = 0; ?>
                            <?php while(have_rows('warego_tabs_list')): the_row(); ?>
                                <?php 
                                $tab_id = 'tab-' . chr(65 + $content_index);
                                $pos_id = 'pos-' . chr(65 + $content_index);
                                $collapse_id = 'pos-collapse-' . chr(65 + $content_index);
                                $heading_id = 'heading-' . chr(65 + $content_index);
                                $active_show = ($content_index == 0) ? 'show active' : '';
                                $collapsed_class = ($content_index == 0) ? '' : 'collapsed';
                                $aria_expanded = ($content_index == 0) ? 'true' : 'false';
                                $tab_image = get_sub_field('tab_image');
                                ?>
                                <div id="<?php echo $pos_id; ?>" 
                                     class="card tab-pane fade <?php echo $active_show; ?>" 
                                     role="tabpanel" 
                                     aria-labelledby="<?php echo $tab_id; ?>">
                                    <div class="card-header" role="tab" id="<?php echo $heading_id; ?>">
                                        <h5 class="mb-0">
                                            <a class="<?php echo $collapsed_class; ?>" 
                                               data-bs-toggle="collapse" 
                                               href="#<?php echo $collapse_id; ?>" 
                                               aria-expanded="<?php echo $aria_expanded; ?>" 
                                               aria-controls="collapse-<?php echo chr(65 + $content_index); ?>">
                                                <label><?php echo get_sub_field('tab_label'); ?></label>
                                                <h3><?php echo get_sub_field('tab_title'); ?></h3>
                                                <p><?php echo get_sub_field('tab_description'); ?></p>
                                            </a>
                                        </h5>
                                    </div>
                                    <div id="<?php echo $collapse_id; ?>" 
                                         class="collapse <?php echo ($content_index == 0) ? 'show' : ''; ?>" 
                                         data-bs-parent="#content" 
                                         role="tabpanel"
                                         aria-labelledby="<?php echo $heading_id; ?>">
                                        <div class="card-body">
                                            <div class="img-cont">
                                                <?php if($tab_image): ?>
                                                    <img src="<?php echo esc_url($tab_image['url']); ?>" 
                                                         alt="<?php echo esc_attr($tab_image['alt']); ?>" 
                                                         class="img-fluid" 
                                                         loading="lazy">
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <?php $content_index++; ?>
                            <?php endwhile; ?>
                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
        <!-- Tabs END Here -->
        
        <div class="req-demo-btn-wrapper mt-3 mt-xl-5 text-center">
            <a href="<?php echo get_field('warego_bottom_cta_link'); ?>" class="primary animated-cta-btn">
                <?php echo get_field('warego_bottom_cta_text'); ?>
            </a>
        </div>
    </div>
</section>

<section class="section forecasting-features">
    <div class="container">
        <div class="text-cont text-center">
            <h2 class="section-title mb-4">
                <?php echo get_field('features_section_title'); ?> 
                <span><?php echo get_field('features_section_title_highlight'); ?></span>
            </h2>
            <p class="section-content">
                <?php echo get_field('features_section_description'); ?>
            </p>
        </div>
        <div class="row gy-xl-4 gy-lg-4 gx-3">
            <?php if(have_rows('features_cards_list')): ?>
                <?php while(have_rows('features_cards_list')): the_row(); ?>
                    <div class="col-lg-4 col-md-6">
                        <div class="card">
                            <h3><?php echo get_sub_field('card_number'); ?></h3>
                            <h4><?php echo get_sub_field('card_title'); ?></h4>
                            <p><?php echo get_sub_field('card_description'); ?></p>
                        </div>
                    </div>
                <?php endwhile; ?>
            <?php endif; ?>
        </div>
        <div class="req-demo-btn-wrapper mt-3 mt-xl-5 text-center">
            <a href="<?php echo get_field('features_cta_link'); ?>" class="primary animated-cta-btn">
                <?php echo get_field('features_cta_text'); ?>
            </a>
        </div>
    </div>
</section>

<!-- Netsuite integration table Section Start -->
<section class="section netsuite-integration-table-sec bg-white">
  <div class="container">
    <div class="text-cont text-center mb-5">
      <h2 class="section-title mb-4">
        <?php echo get_field('netsuite_integration_table_section_title'); ?>
      </h2>
      <p class="section-content">
        <?php echo get_field('netsuite_integration_table_section_text'); ?>
      </p>
    </div>

    <div class="table-responsive">
      <?php if (have_rows('netsuite_integration_section_table_repeater')) : ?>
        <table class="table table-borderless">
          <?php while (have_rows('netsuite_integration_section_table_repeater')) : the_row(); ?>
            <?php $index = get_row_index(); ?>

            <?php if ($index == 1) : ?>
              <!-- TABLE HEAD -->
              <?php if (have_rows('netsuite_integration_section_table_row')) : ?>
                <thead>
                  <tr>
                    <?php while (have_rows('netsuite_integration_section_table_row')) : the_row(); ?>
                      <th>
                        <?php echo get_sub_field('netsuite_integration_section_table_td'); ?>
                      </th>
                    <?php endwhile; ?>
                  </tr>
                </thead>
              <?php endif; ?>

            <?php else : ?>
              <!-- TABLE BODY -->
              <?php if (have_rows('netsuite_integration_section_table_row')) : ?>
                <tbody>
                  <tr>
                    <?php while (have_rows('netsuite_integration_section_table_row')) : the_row(); ?>
                      <td>
                        <?php echo get_sub_field('netsuite_integration_section_table_td'); ?>
                      </td>
                    <?php endwhile; ?>
                  </tr>
                </tbody>
              <?php endif; ?>
            <?php endif; ?>

          <?php endwhile; ?>
        </table>
      <?php endif; ?>
    </div>
	 <?php if ( get_field('warego_netsuite_button_text') ): ?>
        <div class="req-demo-btn-wrapper mt-3 mt-xl-5 text-center">
            <a href="<?php echo esc_url( get_field('warego_netsuite_button_url') ?: 'javascript:;' ); ?>"
               class="primary animated-cta-btn">
                <?php echo esc_html( get_field('warego_netsuite_button_text') ); ?>
            </a>
        </div>
        <?php endif; ?>
  </div>
</section>

<!-- Netsuite integration table Section End -->

<?php if ( get_field('warego_forecasting_enable') ): ?>
<section class="section forecasting-software-industries">
    <div class="container">
        <div class="row">
            <div class="col-lg-5">
                <div class="text-cont">

                    <h2 class="section-title mb-4">
                        <?php echo esc_html(get_field('warego_forecasting_title')); ?>
                        <span><?php echo esc_html(get_field('warego_forecasting_title_highlight')); ?></span>
                    </h2>

                    <p class="section-content">
                        <?php echo esc_html(get_field('warego_forecasting_description')); ?>
                    </p>

                    <ul>
                        <?php if( have_rows('warego_forecasting_tabs') ): ?>
                            <?php while( have_rows('warego_forecasting_tabs') ): the_row(); ?>
                                <li>
                                    <a href="#<?php echo get_sub_field('warego_forecasting_tab_id'); ?>"
                                        class="industry-tab <?php echo get_sub_field('warego_forecasting_tab_active') ? 'active' : ''; ?>">
                                        <?php echo get_sub_field('warego_forecasting_tab_text'); ?>
                                    </a>
                                </li>
                            <?php endwhile; ?>
                        <?php endif; ?>
                    </ul>

                    <div class="slide-owl-nav d-none d-xl-flex">
                        <button class="slide-prev-button">
                            <img src="<?php echo get_template_directory_uri(); ?>/assets/img/left-arrow.webp">
                        </button>
                        <button class="slide-next-button">
                            <img src="<?php echo get_template_directory_uri(); ?>/assets/img/right-arrow.webp">
                        </button>
                    </div>

                    <a href="<?php echo esc_url(get_field('warego_forecasting_button_url') ?: 'javascript:;'); ?>" 
                       class="purple-outline-btn animated-btn mt-5">
                        <?php echo esc_html(get_field('warego_forecasting_button_text')); ?>
                    </a>
                </div>
            </div>

            <div class="col-lg-7">
                <div class="owl-carousel owl-theme forecasting-software-industries-slider">

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

                            <div class="item" data-hash="<?php echo get_sub_field('warego_forecasting_slide_hash'); ?>">
                                <div class="card h-100">

                                    <img src="<?php echo get_sub_field('warego_forecasting_slide_image'); ?>" 
                                         alt="industry" class="img-fluid" loading="lazy">

                                    <div class="text-content">

                                        <div class="box">
                                            <?php echo get_sub_field('warego_forecasting_icon_svg'); ?>
                                            <h3><?php echo get_sub_field('warego_forecasting_slide_title'); ?></h3>
                                        </div>

                                        <div class="box">
                                            <p><?php echo get_sub_field('warego_forecasting_slide_text'); ?></p>
                                        </div>

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

                        <?php endwhile; ?>
                    <?php endif; ?>

                </div>

                <div class="slide-owl-nav d-xl-none d-flex">
                    <button class="slide-prev-button">
                        <img src="<?php echo get_template_directory_uri(); ?>/assets/img/left-arrow.webp">
                    </button>
                    <button class="slide-next-button">
                        <img src="<?php echo get_template_directory_uri(); ?>/assets/img/right-arrow.webp">
                    </button>
                </div>

            </div>
        </div>
    </div>
</section>
<?php endif; ?>


<?php if ( get_field('warego_cta_enable') ): ?>
<section class="section dashboard-access-cta forecasting-business-cta pt-5">
    <div class="container">
        <div class="box">
            <div class="row align-items-center">

                <div class="col-lg-6">
                    <div class="img-cont slide-right">
                        <img src="<?php echo esc_url(get_field('warego_cta_image')); ?>" 
                             alt="cta" class="img-fluid">
                    </div>
                </div>

                <div class="col-lg-6">
                    <div class="text-cont slide-left">
                        
                        <h2><?php echo esc_html(get_field('warego_cta_title')); ?></h2>

                        <p><?php echo nl2br(esc_html(get_field('warego_cta_description'))); ?></p>

                        <a href="<?php echo esc_url(get_field('warego_cta_button_url')); ?>" 
                           class="primary animated-cta-btn">
                           <?php echo esc_html(get_field('warego_cta_button_text')); ?>
                        </a>

                    </div>
                </div>

            </div>
        </div>
    </div>
</section>
<?php endif; ?>


<?php if ( get_field('warego_integrations_enable') ): ?>
<section class="section forecasting-software-integrations pt-0 bg-white">
    <div class="container">
        <div class="row align-items-center">

            <div class="col-lg-6">
                <div class="text-cont">

                    <h2 class="section-title mb-4">
                        <?php echo esc_html(get_field('warego_integrations_title')); ?>
                        <span><?php echo esc_html(get_field('warego_integrations_title_highlight')); ?></span>
                    </h2>

                    <p class="section-content mb-4">
                        <?php echo nl2br(esc_html(get_field('warego_integrations_description'))); ?>
                    </p>

                    <a href="<?php echo esc_url(get_field('warego_integrations_button_url') ?: 'javascript:;'); ?>" 
                       class="primary animated-cta-btn">
                        <?php echo esc_html(get_field('warego_integrations_button_text')); ?>
                    </a>

                </div>
            </div>

            <div class="col-lg-6">
                <div class="img-cont">
                    <img src="<?php echo esc_url(get_field('warego_integrations_image')); ?>" 
                         alt="Integrations" class="img-fluid">
                </div>
            </div>

        </div>
    </div>
</section>
<?php endif; ?>


<?php if ( get_field('warego_shopify_cta_enable') ): ?>
<section class="section dashboard-access-cta wms-business-cta netsuite-business-cta pt-0 pb-0">
    <div class="container">
        <div class="box">
            <div class="row align-items-center">

                <div class="col-lg-6">
                    <div class="img-cont text-lg-start slide-right">
                        <img src="<?php echo esc_url(get_field('warego_shopify_cta_image')); ?>" 
                             alt="cta" class="img-fluid">
                    </div>
                </div>

                <div class="col-lg-6">
                    <div class="text-cont slide-left">

                        <p><?php echo nl2br(esc_html(get_field('warego_shopify_cta_text'))); ?></p>

                        <a href="<?php echo esc_url(get_field('warego_shopify_cta_button_url')); ?>" 
                           class="primary animated-cta-btn">
                           <?php echo esc_html(get_field('warego_shopify_cta_button_text')); ?>
                        </a>

                    </div>
                </div>

            </div>
        </div>
    </div>
</section>
<?php endif; ?>

<!-- case studies start -->
<section class="section real-feedbacks bg-white">
    <div class="container">
        <div class="text-cont slide-down mb-3">
            <h2 class="section-title text-center mb-4"><?php echo get_field('real_feedbacks_section_heading');?></h2>
            <p class="section-content text-center">
       <?php echo get_field('real_feedbacks_section_content'); ?>
      </p>
        </div>

        <?php if( have_rows('real_feedbacks_carousel') ): 
        $i=1;    
        ?>
        <div class="owl-carousel owl-theme real-feedback-slider slide-up mt-5">
        <?php while( have_rows('real_feedbacks_carousel') ): the_row(); ?>
            <div class="item <?php // echo $i == 2 ? 'mt-md-5' : '';?>">
                <div class="feebacks-wrapper">
                    <div class="card">
                        <div class="card-header">
                            <div class="img-content">
                                <img src="<?php echo get_sub_field('real_feedbacks_logo'); ?>" class="img-fluid" alt="oaks-img" loading="lazy" >
                            </div>
                        </div>
                        <div class="card-body">
                            <h2 class="feedback-title"><?php echo get_sub_field('real_feedbacks_title'); ?></h2>
                        
                            <a href="<?php echo get_sub_field('real_feedbacks_link'); ?>" class="read-case">Read the Case Study
                                <svg class="ms-1" width="15" height="18" viewBox="0 0 15 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="m11.078 0 .832.485c.019.045.047.09.07.134.174.344.25.738.346 1.113l.41 1.588 1.08 4.171.56 2.163c.182.707.524 1.443-.045 2.06-.22.236-.525.374-.847.385-1.196.053-1.31-1.202-1.534-2.066l-.79-3.065c-.13-.5-.252-1.014-.398-1.504a.457.457 0 0 0-.834-.117c-.21.33-.406.668-.604 1.003L8.1 8.413l-4.042 6.825-.777 1.31c-.16.27-.313.58-.52.816a1.2 1.2 0 0 1-.835.412c-.333.018-.685-.143-.93-.364a1.15 1.15 0 0 1-.336-1.047c.098-.433 1.22-2.203 1.524-2.715l3.767-6.356L7.18 5.22c.198-.336.407-.665.597-1.007.162-.29.154-.566-.163-.73a.4.4 0 0 0-.185-.044c-.42.057-.844.186-1.257.293l-3.307.857c-.301.078-1.293.356-1.565.375a1.2 1.2 0 0 1-.887-.3A1.2 1.2 0 0 1 0 3.816c-.026-.51.334-1.049.833-1.197.525-.155 1.07-.287 1.6-.426l3.192-.836 3.27-.86C9.501.338 10.501.029 11.077 0" fill="#000"/></svg>                                
                            </a>

                            <div class="divider"></div>

                            <div class="brand-feedback">
                                <p><?php echo get_sub_field('real_feedbacks_text'); ?></p>
                                <div class="owner-name">
                                    <h3><?php echo get_sub_field('real_feedbacks_owner_name'); ?></h3>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <?php $i++;?>
            <?php endwhile; ?>
        </div>
        <?php endif; ?>
</section>


<!-- Faqs Start -->
<?php
    $args = [
        'category'  => 'forecasting-software',
        'heading'   => 'Frequently Asked <span>Questions</span>',
		'class'     => 'pt-0 bg-white',
    ];
    get_template_part('templates-parts/pages/faqs-new', null, $args);
?>
<!-- Faqs End -->
 <script src="<?php echo get_template_directory_uri(); ?>/assets/js/owl.carousel.min.js"></script>
<?php
    get_footer();
?>

<script>
    $('.about-our-product-slider').owlCarousel({
        loop:false,
        margin:10,
        nav:false,
        dots: false,
        responsive:{
            0:{
                items:1,
                autoplay:true
            },
            600:{
                loop:true,
                items:3,
                autoplay:true
            },
            1000:{
                items:5
            }
        }
    });
    $('.real-feedback-slider').owlCarousel({
        loop:false,
        margin:40,
        nav:false,
        dots:false,
        dotsData:true,
        responsive:{
            0:{
                items:1
            },
            768:{
                items:2,
                margin:20
            },
            1000:{
                items:2
            }
        }
    });
</script>

<script>
  jQuery(function($){

    // Initialize Owl ONLY ONCE
    var owl = $('.forecasting-software-industries-slider').owlCarousel({
        loop: false,
        autoplay: false,
        margin: 10,
        nav: false,
        dots: false,
        URLhashListener: true,
        startPosition: 'URLHash',
        responsive: {
            0: { items: 1 },
            480: { items: 1 },
            600: { items: 1 },
            1400: { items: 1 }
        }
    });

    // NEXT & PREV buttons
    $('.slide-next-button').click(function () {
        owl.trigger('next.owl.carousel');
    });

    $('.slide-prev-button').click(function () {
        owl.trigger('prev.owl.carousel');
    });

    // TAB → SLIDE SYNC (TAB click par slide chale)
    $('.industry-tab').on('click', function (e) {
        e.preventDefault();

        var hash = $(this).attr('href').replace('#', '');

        // jis slide ka data-hash match ho uska index lo
        var index = $('.forecasting-software-industries-slider .item')
            .filter(function () {
                return $(this).data('hash') == hash;
            })
            .parent()     // owl-item
            .index();     // index inside owl

        if (index >= 0) {
            owl.trigger('to.owl.carousel', [index, 400, true]);
        }

        $('.industry-tab').removeClass('active');
        $(this).addClass('active');
    });

    // SLIDE CHANGE → TAB SYNC (Arrow / Swipe se bhi tab change hoga)
    owl.on('changed.owl.carousel', function (event) {
        var current = event.item.index;
        var currentItem = $(event.target).find(".owl-item").eq(current);

        var hash = currentItem.find('[data-hash]').data('hash');

        $('.industry-tab').removeClass('active');
        $(`.industry-tab[href="#${hash}"]`).addClass('active');
    });

});


</script>