<?php
    $style = isset($args['style']) ? $args['style'] : '';
?>
<section class="section <?php echo $style; ?>">
    <div class="container">
        <?php $popular_system_integrations = get_field('popular_system_integrations'); ?>
        <div class="text-cont slide-down">
            <h2 class="section-title"><?php echo $popular_system_integrations['heading']; ?></h2>
            <p class="section-content">
            <?php echo $popular_system_integrations['description']; ?>
            </p>
        </div>

        <?php if ( is_array($popular_system_integrations['systems']) && count($popular_system_integrations['systems']) ) : ?>
            <div class="row">
                <?php foreach ($popular_system_integrations['systems'] as $system) : ?>
                    <div class="col-xl-3 col-lg-4 col-md-6 ">
                        <div class="card slide-up">
                            <div class="img-content">
                                <img src="<?php echo $system['logo']['url']; ?>" alt="<?php echo $system['logo']['alt']; ?>" class="img-fluid" loading="lazy">
                            </div>
                            <div class="text-content">
                                <p><?php echo $system['description']; ?></p>
                                <a href="<?php echo empty($system['cta_ling']) ? site_url('/signup/') : $system['cta_ling']; ?>" aria-label="Learn more about WareGo Signup">
                                    <?php echo $system['cta_label']; ?>
                                    <svg width="26" height="9" viewBox="0 0 26 9" fill="none" xmlns="http://www.w3.org/2000/svg">
                                        <path d="M1.35021 4.54088H23.1575" stroke="#BCBCBC" stroke-width="1.5" stroke-linecap="square"/>
                                        <path d="M20.793 1.07639L24.293 4.54089L20.793 8.0054" stroke="#BCBCBC" stroke-width="1.5"/>
                                    </svg>
                                </a>
                            </div>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>
        <?php endif; ?>
    </div>
</section>