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

<section class="section <?php echo $style; ?>">
    <div class="container">
        <div class="text-cont slide-down">
            <h2 class="section-title"><?php echo get_field('vehicle_management_heading'); ?></h2>
			<p class="section-content mt-3 mb-0">
			    <?php echo get_field('vehicle_management_description'); ?>
			</p>
        </div>
        <div class="row align-items-lg-center">
            <div class="col-lg-6">
                <div class="img-cont slide-right">
                    <img src="<?php echo get_field('vehicle_management_image'); ?>" alt="<?php echo get_field('vehicle_management_heading'); ?>" class="img-fluid" loading="lazy">
                </div>
            </div>
            <?php $vehicle_management_cards = get_field('vehicle_management_cards'); ?>
            <?php if ( is_array($vehicle_management_cards) && count($vehicle_management_cards) ) : ?>
                <div class="col-lg-5 offset-lg-1">
                    <ul class="slide-left">
                        <?php foreach ($vehicle_management_cards as $card) : ?>
                            <li>
                                <span class="left">
                                    <img src="<?php echo $card['icon']; ?>" alt="<?php echo $card['heading']; ?>" class="img-fluid" loading="lazy">
                                </span>
                                <span class="right">
                                    <h3><?php echo $card['heading']; ?></h3>
                                    <p><?php echo $card['description']; ?></p>
                                </span>
                            </li>
                        <?php endforeach; ?>
                    </ul>
                </div>
            <?php endif; ?>
        </div>
    </div>
</section>