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

<section class="section supply-chain-printing-industry <?php echo $class; ?>">
    <div class="container">
        <div class="text-cont text-center">
            <?php if (get_field('review_cards_title')): ?>
            <h2 class="section-title">
                <?php echo get_field('review_cards_title'); ?>
            </h2>
            <?php endif; ?>
            <?php if (get_field('review_cards_content')): ?>
                <p class="section-content">
                  <?php echo get_field('review_cards_content'); ?>
                </p>
            <?php endif; ?>
        </div>
        <div class="row justify-content-center gy-4 gx-5">
            <?php if (have_rows('review_cards')): ?>
                <?php while (have_rows('review_cards')): the_row(); ?>
                    <div class="<?php echo $cols ? $cols : 'col-lg-4 col-md-6' ?>">
                        <div class="card">
                            <div class="svg-content">
                                <?php echo get_sub_field('icon_svg'); ?>
								<?php if ($icon = get_sub_field('icon__image')) : ?>
									<img src="<?php echo $icon['url']; ?>" alt="Icon Image" width="<?php echo $icon['width']; ?>" height="<?php echo $icon['height']; ?>" class="img-fluid" loading="lazy" decoding="async">
								<?php endif; ?>
                            </div>
                            <div class="text-content">
                                <span class="d-block h3"><?php echo get_sub_field('heading'); ?></span>
                                <p><?php echo get_sub_field('description'); ?></p>
                            </div>
                        </div>
                    </div>
                <?php endwhile; ?>
            <?php endif; ?>
    </div>
</section>