<?php 
/**
 * Template part for displaying Featured Gallery Section
 *
 *@package schoolkids
 */
    $featured_gallery_section_title           = schoolkids_get_option( 'featured_gallery_section_title' );
    $featured_gallery_section_subtitle        = schoolkids_get_option( 'featured_gallery_section_subtitle' );
    $number_of_featured_gallery_items         = schoolkids_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 col-4 clear">
        <?php for( $i=1; $i<=$number_of_featured_gallery_items; $i++ ) : 
            $featured_gallery_image[$i]  = schoolkids_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 -->