<?php
    $class = isset($args['class']) ? $args['class'] : '';
?>
<section class="section powerful-partnerships <?php echo $class; ?>">
    <div class="container px-0 px-lg-3">
        <h2 class="section-title text-center"><?php echo get_field('partnerships_title'); ?></h2>
        <p class="section-content text-center"><?php echo get_field('partnerships_description'); ?></p>


        <div class="row">
            <div class="col-lg-12">
                <div class="logos-parent-wrapper">
                    <!-- First Row of Logos -->
                    <div class="logo-marquee mb-3 mb-lg-5">
                        <div class="marquee-content owl-partners">
                            <?php

                            // Check rows exists.
                            if (have_rows('repeater_partner')):

                                // Loop through rows.
                                while (have_rows('repeater_partner')) : the_row();

                                    // Load sub field value.
                                    $partner_images = get_sub_field('partner_images');
                                    if (is_valid_image_array($partner_images)) :
                            ?>
                                    <div class="item">
                                        <img src="<?php echo $partner_images['url']; ?>" alt="<?php echo $partner_images['alt']; ?>">
                                    </div>
                            <?php
                                endif;
                                endwhile;


                            endif; ?>

                        </div>
                    </div>

                    <!-- Next Row -->
                    <div class="logo-marquee">
                        <div class="marquee-content owl-partners owl-partners-2">
                            <?php

                            // Check rows exists.
                            if (have_rows('repeater_partner2')):

                                // Loop through rows.
                                while (have_rows('repeater_partner2')) : the_row();

                                    // Load sub field value.
                                    $partner_images2 = get_sub_field('partner_images2');
                                    if (is_valid_image_array($partner_images2)) :

                            ?>
                                    <div class="item">
                                        <img src="<?php echo $partner_images2['url']; ?>" class="img-fluid" alt="<?php echo $partner_images2['alt']; ?>" loading="lazy">
                                    </div>
                            <?php
                                endif;
                                endwhile;


                            endif; ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>