<?php 
/**
 * Template part for displaying Featured Classes Section
 *
 * @package Prime Ecology
 */

 
$prime_ecology_classes = get_theme_mod( 'prime_ecology_classes_setting',false );

?>
<?php if ( $prime_ecology_classes ){?>
<div class="our-classes">
    <div class="container">
        <div class="row">
            <?php for ($i=1; $i <=3; $i++) {  ?>
                <div class="col-xl-4 col-lg-4 col-md-4 col-sm-4 position-relative">
                    <?php $prime_ecology_tab_bg_image = get_theme_mod( 'prime_ecology_tab_bg_image'.$i ); ?>
                    <div class="tab-bg my-2">
                        <div class="bg-image" style="background-image: url('<?php echo esc_url( $prime_ecology_tab_bg_image ); ?>');" ></div>
                    </div>
                    <div class="category-box mb-2 wow zoomInUp delay-1000" data-wow-duration="2s">
                        <?php if( get_theme_mod( 'prime_ecology_category_icon'.$i ) != '' ) { ?>
                            <span><i class="<?php echo esc_attr(get_theme_mod('prime_ecology_category_icon'.$i)); ?>"></i></span>
                        <?php } ?>
                          <?php if( get_theme_mod( 'prime_ecology_section_category_title'.$i ) != '' ) { ?>
                            <h5 class="mt-2"><a target="_blank" href="<?php echo esc_url( get_theme_mod( 'prime_ecology_section_category_title_url'.$i,'#' ) ); ?>"><?php echo esc_html( get_theme_mod( 'prime_ecology_section_category_title'.$i,'' ) ); ?></a></h5>
                          <?php } ?>
                          <?php if( get_theme_mod( 'prime_ecology_section_category_text'.$i ) != '' ) { ?>
                            <p class="mt-2"><?php echo esc_html( get_theme_mod( 'prime_ecology_section_category_text'.$i,'' ) ); ?></p>
                          <?php } ?>
                    </div>
                </div>
            <?php }?>      
        </div>
    </div>
</div>
<?php } ?>