<?php
$class = isset($args['class']) ? $args['class'] : '';
$col_class = isset($args['col_class']) ? $args['col_class'] : '';

?>


<section class="section supply-chain-software-features <?php echo $class;?>">
    <div class="container">
        <div class="text-cont text-center">
            <?php if(get_field('supply_chain_mgmt_features_section_title')):?>
                <h2 class="section-title"><?php echo get_field('supply_chain_mgmt_features_section_title')?></h2>
            <?php endif?>
            <?php if(get_field('supply_chain_mgmt_features_section_text')):?>
                <p class="section-content pt-0 mt-0"><?php echo get_field('supply_chain_mgmt_features_section_text')?></p>
            <?php endif?>
            </div>
        <?php if( have_rows('supply_chain_mgmt__features') ): ?>    
        <div class="row justify-content-center gy-4">
        <?php while( have_rows('supply_chain_mgmt__features') ): the_row();?>
            <div class="<?php echo $col_class ? $col_class : 'col-lg-3 col-md-6'?>">
                <div class="card h-100">
                    <div class="svg-cont">
                        <?php echo get_sub_field('supply_chain_mgmt__features__icon')?>
                    </div>
                    <div class="text-content">
                        <h3><?php echo get_sub_field('supply_chain_mgmt__features__heading')?></h3>
                    </div>
                </div>
            </div>
            <?php endwhile; ?>
        </div>
        <?php endif; ?>
        <?php
        $cta = get_field('supply_chain_mgmt__features__cta');
        if($cta) :
        ?>
        <div class="text-center mt-3">
            <a href="<?php echo esc_url($cta['url'])?>" class="primary animated-cta-btn"><?php echo $cta['title']?></a>
        </div>
        <?php endif;?>
    </div>
</section>