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

    $cards_directions = [
        'right',
        'up',
        'left',
        'right',
        'left',
        'right'
    ];
?>

<section class="section <?php echo $style; ?>">
    <div class="container">
        <div class="text-cont slide-down">
            <h2 class="section-title"><?php echo get_field('custom_forms_reports_heading'); ?></h2>
			<p class="section-content mt-3 mb-0">
    			<?php echo get_field('custom_forms_reports_description'); ?>
			</p>
        </div>
        <?php $custom_forms_reports_cards = get_field('custom_forms_reports_cards'); ?>
        <?php if ( Is_array($custom_forms_reports_cards) && count($custom_forms_reports_cards) ) : ?>
            <div class="row justify-content-center">
                <?php for ($i=0; $i < count($custom_forms_reports_cards); $i++) : ?>
                    <div class="col-lg-4 col-md-6">
                        <div class="card slide-<?php echo $cards_directions[$i]; ?>">
                            <div class="img-content">
                                <img src="<?php echo $custom_forms_reports_cards[$i]['icon']; ?>" alt="<?php echo $custom_forms_reports_cards[$i]['heading']; ?>" class="img-fluid" loading="lazy">
                            </div>
                            <div class="text-content">
                                <h3><?php echo $custom_forms_reports_cards[$i]['heading']; ?></h3>
                                <p><?php echo $custom_forms_reports_cards[$i]['description']; ?></p>
                            </div>
                        </div>
                    </div>
                <?php endfor; ?>
            </div>
        <?php endif; ?>
    </div>
</section>