<?php
/*
Template Name: Construction Inventory Management
*/

get_header('new');
?>
<section class="section banner supply-chain-banner pb-5 no-lazy">
    <div class="container">
        <div class="row mt-xl-5 mt-lg-0">
            <div class="col-lg-6">
                <div class="text-cont mt-0">
                    <h1 class="banner-heading"><?php echo get_field('banner_heading'); ?></h1>
                    <p class="banner-content">
                        <?php echo get_field('banner_description'); ?>
                    </p>
					<?php $highlights = get_field('banner_highlights'); ?>
                    <ul>
                        <?php if ($highlights && is_array($highlights)) : ?>
                            <?php foreach ($highlights as $highlight) : ?>
                                <li>
                                    <img src="<?php echo get_template_directory_uri(); ?>/assets/img/apparel-inventory-management/tick.webp" alt="tick" class="img-fluid">
                                    <?php echo $highlight['item']; ?>
                                </li>
                            <?php endforeach; ?>
                        <?php endif; ?>
                    </ul>
                    <div class="banner-btns">
						<?php $cta_1 = get_field('banner_cta_1'); ?>
						 <?php if (!is_null($cta_1)) : ?>
                        <a href="<?php echo esc_url($cta_1['url']); ?>" class="primary animated-cta-btn <?php echo is_modal_link($cta_1['url']); ?>"><?php echo $cta_1['title']; ?>
                            <!-- <svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <path d="M5.598 0.799999H8.19L13.59 6.2L8.19 11.6H5.598L10.062 7.136H0.9V5.264H10.062L5.598 0.799999Z" fill="white"/>
                            </svg> -->
                        </a>
						<?php endif; ?>
						<?php $cta_2 = get_field('banner_cta_2'); ?>
						<?php if (!is_null($cta_2)) : ?>
                        <a href="<?php echo esc_url($cta_2['url']); ?>" class="border-gradient-btn animated-btn <?php echo is_modal_link($cta_2['url']); ?>"><?php echo $cta_2['title']; ?>
                            <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>
						<?php endif; ?>
                    </div>
                </div>
            </div>
            <div class="col-lg-6">
                <div class="img-cont d-block text-center">
					<?php
						$desktop_img_url = get_field('banner_image');
						$mobile_img_url  = get_field('banner_mobile_image');
					?>
					<picture>
						<source class="no-lazy" media="(max-width: 767px)" srcset="<?php echo $mobile_img_url ? $mobile_img_url : $desktop_img_url ?>">
						<img src="<?php echo $desktop_img_url;?>" loading="eager" fetchpriority="high" decoding="async" width="636" height="536" class="img-fluid no-lazy" alt="">
					</picture>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- 2nd section -->
<?php get_template_part('templates-parts/pages/certificates');?>
<!-- end 2nd section -->


<!-- Icons Cards Start start -->
 <?php
 $counters = ['class' => 'pt-5 '];
 get_template_part('templates-parts/pages/counter-new',null,$counters)?>
<!-- Icons Cards Start end -->


<section class="section wms-amazon-success resolve-construction-challanges bg-white">
    <div class="container">
        <div class="text-cont text-center">
            <h2 class="section-title mb-4">
                <?php echo get_field('wms_section_title'); ?>
            </h2>
            <p class="section-content">
                <?php echo get_field('wms_section_description'); ?>
            </p>
        </div>

        <?php if (have_rows('wms_tabs')): ?>
            <div class="responsive-tabs">
                <div class="row">
                    <!-- Tab Links -->
                    <div class="col-lg-12">
                        <ul class="nav nav-tabs my-lg-4" role="tablist">
                            <?php $i = 0; while (have_rows('wms_tabs')): the_row(); ?>
                                <li class="nav-item">
                                    <a id="tab-link-<?php echo $i; ?>" 
                                       href="#tab-pane-<?php echo $i; ?>" 
                                       class="nav-link <?php echo $i === 0 ? 'active' : ''; ?>" 
                                       data-bs-toggle="tab" 
                                       role="tab">
                                        <?php echo get_sub_field('wms_tab_title'); ?>
                                    </a>
                                </li>
                            <?php $i++; endwhile; ?>
                        </ul>
                    </div>
                    <div class="col-lg-12">
                        <div id="tab-content-container" class="tab-content" role="tablist">
                            <?php $i = 0; while (have_rows('wms_tabs')): the_row(); ?>
                                <?php 
                                    $heading   = get_sub_field('wms_tab_heading');
                                    $desc      = get_sub_field('wms_tab_description');
                                    $btn_text  = get_sub_field('wms_tab_button_text');
                                    $btn_link  = get_sub_field('wms_tab_button_link');
                                    $img       = get_sub_field('wms_tab_image');
                                    $tab_title = get_sub_field('wms_tab_title');
                                ?>
                                <div id="tab-pane-<?php echo $i; ?>" 
                                     class="card tab-pane fade <?php echo $i === 0 ? 'show active' : ''; ?>" 
                                     role="tabpanel" 
                                     aria-labelledby="tab-link-<?php echo $i; ?>">

                                    <div class="card-header" role="tab" id="heading-<?php echo $i; ?>">
                                        <h5 class="mb-0">
                                            <a class="<?php echo $i !== 0 ? 'collapsed' : ''; ?>" 
                                               data-bs-toggle="collapse" 
                                               href="#collapse-<?php echo $i; ?>" 
                                               aria-expanded="<?php echo $i === 0 ? 'true' : 'false'; ?>" 
                                               aria-controls="collapse-<?php echo $i; ?>">
                                                <?php echo esc_html($tab_title); ?>
                                            </a>
                                        </h5>
                                    </div>

                                    <div id="collapse-<?php echo $i; ?>" 
                                         class="collapse <?php echo $i === 0 ? 'show' : ''; ?>" 
                                         data-bs-parent="#tab-content-container" 
                                         role="tabpanel" 
                                         aria-labelledby="heading-<?php echo $i; ?>">

                                        <div class="card-body">
                                            <div class="powered-tools-wrapper">
                                                <div class="row gy-3 align-items-center">
                                                    <div class="col-lg-6">
                                                        <div class="powered-tools-content">
                                                            <h3 class="powered-tools-title"><?php echo esc_html($heading); ?></h3>
                                                            <p class="powered-tools-text"><?php echo esc_html($desc); ?></p>

                                                            <?php if ($btn_text && $btn_link): ?>
                                                                <a href="<?php echo esc_url($btn_link); ?>" class="primary animated-cta-btn">
                                                                    <?php echo esc_html($btn_text); ?>
                                                                </a>
                                                            <?php endif; ?>
                                                        </div>
                                                    </div>
                                                    <div class="col-lg-6">
                                                        <?php if ($img): ?>
                                                            <div class="img-cont">
                                                                <img src="<?php echo esc_url($img['url']); ?>" 
                                                                     alt="<?php echo esc_attr($img['alt']); ?>" 
                                                                     class="img-fluid" loading="lazy">
                                                            </div>
                                                        <?php endif; ?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            <?php $i++; endwhile; ?>
                        </div>
                    </div>

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

<!-- Construction Inventory Management Process Section Start -->
<?php $timelineSec = ['class' => 'light-grey']; 
get_template_part('templates-parts/pages/inventory-process-timeline',null,$timelineSec)?>
<!-- Construction Inventory Management Process Section End -->

<!-- integration tabs start -->
<?php get_template_part('templates-parts/pages/integration-post-tabs')?>
<!-- integration tabs end -->


<section class="section apparel-inventory-management-system">
    <div class="container">
        <div class="text-center text-cont">
            <h2 class="section-title mb-5"><?php echo get_field('system_heading'); ?></h2>
            <p class="section-content"><?php echo get_field('system_description'); ?></p>
        </div>
        <div class="row gy-4">
            <?php $highlights = get_field('system_highlights'); ?>
            <?php if ($highlights && is_array($highlights)) : ?>
                <?php foreach ($highlights as $highlight) : ?>
                    <div class="col-lg-4 col-md-6">
                        <div class="flip-card">
                            <div class="flip-card-inner">
                                <div class="flip-card-front">
                                    <div class="svg-content">
                                        <?php echo $highlight['icon']; ?>
										<?php if ( ! empty( $highlight['s_icon__image'] ) ) : ?>
											<img 
												src="<?php echo $highlight['s_icon__image']['url']; ?>" 
												alt="Card Icon" 
												width="<?php echo $highlight['s_icon__image']['width']; ?>" 
												height="<?php echo $highlight['s_icon__image']['height']; ?>"
												 loading="lazy"
												 decoding="async"
											>
										<?php endif; ?>
                                    </div>
                                    <div class="text-content">
                                        <h3><?php echo $highlight['heading']; ?></h3>
                                        <a href="<?php echo $highlight['link']; ?>" <?php echo is_modal_link($highlight['link']); ?>>
                                            <svg width="21" height="19" viewBox="0 0 21 19" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                <path fill-rule="evenodd" clip-rule="evenodd" d="M0.736653 10.0039C0.720373 9.45187 1.1547 8.99115 1.70674 8.97487L17.2858 8.51543L10.8101 2.41077C10.4082 2.03193 10.3896 1.39904 10.7684 0.997176C11.1472 0.59531 11.7801 0.576645 12.182 0.955488L20.4144 8.71619C20.8162 9.09503 20.8349 9.72792 20.456 10.1298L12.6953 18.3621C12.3165 18.764 11.6836 18.7827 11.2817 18.4038C10.8799 18.025 10.8612 17.3921 11.2401 16.9902L17.3447 10.5146L1.7657 10.974C1.21365 10.9903 0.752933 10.556 0.736653 10.0039Z" fill="black"></path>
                                            </svg>
                                        </a>
                                    </div>
                                </div>
                                <div class="flip-card-back">
                                    <p><?php echo $highlight['description']; ?></p>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php endforeach; ?>
            <?php endif; ?>
        </div>
        <?php $cta = get_field('system_cta'); ?>
        <?php if (!is_null($cta)) : ?>
            <div class="text-center mt-5">
                <a href="<?php echo esc_url($cta['url']); ?>" class="primary animated-cta-btn"><?php echo esc_html($cta['title']); ?></a>
            </div>
        <?php endif; ?>
    </div>
</section>
 

<?php 
$benefits =[
    'class' => 'benefits-construction-industry',
    'row_class' => 'g-3',
    'col_class' => 'col-xl-9 col-lg-8',
    'inner_col_class' => 'col-md-6 col-xl-4',
    'col_stake' => true, 
];
get_template_part('templates-parts/pages/supply-chain-benefits',null,$benefits)?>

<!-- pricing section start -->
<?php 
$pricing = [
    'class' => 'supply-chain-pricing-cards pt-5',
    'category' => 'home',
    'headingcon' => 'h2',
];
get_template_part('templates-parts/pages/pricing',null,$pricing)?>
<!-- pricing section end -->


<!-- industry  section start -->
<?php 
$industry = [
    'class' => 'pale-blue',
    'category' => 'construction-inventory-management',
];
get_template_part('templates-parts/pages/industry-solutions',null,$industry)?>
<!-- industry section end -->



<!-- testimonials start -->
<section class="section say-about-warego client-say-about-warego">
    <div class="container">
        <div class="text-center text-cont">
            <h2 class="section-title mb-5"><?php echo get_field('reviews_heading'); ?></h2>
            <p class="section-content"><?php echo get_field('reviews_description'); ?></p>
        </div>

        <?php if( have_rows('reviews') ): ?>
        <div class="row gy-4">
        <?php while( have_rows('reviews') ): the_row();?>
            <div class="col-lg-6 right-sight">
                <div class="card">
                    <p><?php echo get_sub_field('quote');?></p>
                    <ul>
                        <li>
                            <img src="<?php echo get_sub_field('image');?>" alt="Sarah Johnson" class="img-fluid">
                        </li>
                        <li>
                            <h3><?php echo get_sub_field('name');?></h3>
                            <p><?php echo get_sub_field('position');?></p>
                        </li>
                    </ul>
                </div>
            </div>
            <?php endwhile; ?>
        </div>
        <?php endif; ?>
    </div>
</section>
<!-- testimonials end -->


<!-- why leading section start -->
<section class="section why-leading">
    <div class="container">
        <div class="text-cont text-center">
            <h2 class="section-title mb-5"><?php echo get_field('why_warego_wms_heading'); ?></h2>
            <p class="section-content"><?php echo get_field('why_warego_wms_description'); ?></p>
        </div>
        <?php if( have_rows('why_warego_wms_features') ): ?>
        <ul>
            <?php while( have_rows('why_warego_wms_features') ): the_row(); ?>
                <li>
                    <div class="left">
                        <?php $image = get_sub_field('image'); ?>
                        <?php if ($image) : ?>
                            <img src="<?php echo esc_url($image); ?>" alt="<?php echo get_sub_field('heading'); ?>" class="img-fluid">
                        <?php endif; ?>
                    </div>
                    <div class="right">
                        <h3><?php echo get_sub_field('heading'); ?></h3>
                        <p><?php echo get_sub_field('description'); ?></p>
                    </div>
                </li>
            <?php endwhile; ?>
        </ul>
        <?php else: ?>
        <p>No features available.</p>
        <?php endif; ?>

        <div class="text-center mt-5">
            <a href="<?php echo esc_url(get_field('why_warego_wms_cta_link')); ?>" class="primary animated-cta-btn" <?php echo is_modal_link(get_field('why_warego_wms_cta_link')); ?>><?php echo get_field('why_warego_wms_cta_label'); ?></a>
        </div>
    </div>
</section>
<!-- why leading section end -->


<!-- case studies start -->
<?php 
$portfolio = ['class' => 'bg-white pt-lg-0'];
get_template_part('templates-parts/pages/case-studies',null,$portfolio);?>
<!-- case studies end -->

<section class="section manufacturing-warehouse-cta curious-wms-cta free-trial-cta">
    <div class="container">
        <div class="box">
            <p><?php echo get_field('cta_titles'); ?></p>
            <a href="<?php echo get_field('cta_button_links'); ?>" class="primary animated-cta-btn"><?php echo get_field('cta_button_text');?>
                <svg width="14" height="12" viewBox="0 0 14 12" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <path d="M5.598 0.799999H8.19L13.59 6.2L8.19 11.6H5.598L10.062 7.136H0.9V5.264H10.062L5.598 0.799999Z" fill="white"/>
                </svg>
            </a>
        </div>
    </div>
</section>

<!-- Faqs Start -->
<?php
    $args = [
        'category'  => 'construction-inventory-management',
        'heading'   => 'Frequently Asked <span>Questions</span>',
		'class'     => 'pt-0 bg-white',
    ];
    get_template_part('templates-parts/pages/faqs-new', null, $args);
?>
<!-- Faqs End -->

<?php
    get_footer('new');
?>

<script>document.addEventListener("DOMContentLoaded",function(){if(window.jQuery){var $=jQuery;$(".about-our-product-slider").length&&$(".about-our-product-slider").owlCarousel({loop:false,margin:10,nav:false,dots:false,responsive:{0:{items:1},600:{loop:true,items:3},1000:{items:5}}});$(".portfolio-slider").length&&$(".portfolio-slider").owlCarousel({loop:false,margin:40,nav:false,dots:true,dotsData:true,responsive:{0:{items:1},600:{items:2,margin:20},1000:{items:2}}});var more_industries_slider=$(".industry-specific-slider");more_industries_slider.length&&($(".slide-next-button").on("click",function(){more_industries_slider.trigger("next.owl.carousel")}),$(".slide-prev-button").on("click",function(){more_industries_slider.trigger("prev.owl.carousel")}),more_industries_slider.owlCarousel({loop:true,autoplay:false,margin:20,nav:false,stagePadding:50,dots:false,responsive:{0:{items:1,stagePadding:1},480:{items:1},600:{items:2},1400:{items:2}}}))}var scrollList=document.querySelector(".inventory-process-steps-wrapper"),scrollTrack=document.querySelector(".scroll-height-control");if(scrollList&&scrollTrack){var trackDiv=scrollTrack.querySelector(".track-div");if(trackDiv){function updateScrollIndicator(){var contentHeight=scrollList.scrollHeight,visibleHeight=scrollList.clientHeight,scrollTop=scrollList.scrollTop,trackHeight=scrollTrack.offsetHeight;if(!contentHeight||contentHeight<=visibleHeight)return trackDiv.style.height="30px",void(trackDiv.style.top="0px");var thumbHeight=Math.max(visibleHeight/contentHeight*trackHeight,30);trackDiv.style.height=thumbHeight+"px";var maxThumbTop=trackHeight-thumbHeight,thumbTop=scrollTop/(contentHeight-visibleHeight)*maxThumbTop;trackDiv.style.top=thumbTop+"px"}updateScrollIndicator();scrollList.addEventListener("scroll",updateScrollIndicator);window.addEventListener("resize",updateScrollIndicator)}}var processImg=document.querySelector("#process-img"),stepCards=document.querySelectorAll(".inventory-steps-card-wrapper");processImg&&stepCards.length&&stepCards.forEach(function(card){card.addEventListener("click",function(){stepCards.forEach(function(c){c.classList.remove("active")});card.classList.add("active");var imgPath=card.getAttribute("data-image");imgPath&&(processImg.src=imgPath)})})});</script>