<?php 
/**
 * Template part for displaying Featured Gallery Section
 *
 *@package UniKids
 */
    $featured_gallery_section_title           = unikids_get_option( 'featured_gallery_section_title' );
    $featured_gallery_section_subtitle        = unikids_get_option( 'featured_gallery_section_subtitle' );
    $number_of_featured_gallery_items         = unikids_get_option( 'number_of_featured_gallery_items' ); ?>

    <?php if( !empty($featured_gallery_section_title) || !empty($featured_gallery_section_subtitle) ):?>
        <div class="section-header">
            <h2 class="section-title"><?php echo esc_html($featured_gallery_section_title);?></h2>
            <p class="section-subtitle"><?php echo esc_html($featured_gallery_section_subtitle);?></p>
        </div><!-- .section-header -->
    <?php endif;?>

    <div class="section-content" data-slick='{"slidesToShow": 4, "slidesToScroll": 1, "infinite": false, "speed": 800, "dots": false, "arrows": true, "autoplay": false, "draggable": true, "fade": false }'>
        <?php for( $i=1; $i<=$number_of_featured_gallery_items; $i++ ) : 
            $featured_gallery_image[$i]  = unikids_get_option( 'featured_gallery_image_'. $i ); ?>

            <?php if( !empty($featured_gallery_image[$i]) ): ?>
                <article>
                    <div class="featured-gallery-item">
                        <div class="featured-image" style="background-image: url('<?php echo esc_url($featured_gallery_image[$i]); ?>');">
                        </div><!-- .featured-image -->
                    </div><!-- .featured-gallery-item -->
                </article>
            <?php endif; ?>
        <?php endfor; ?>
    </div><!-- .section-content -->