<?php
/**
 * Welcome Section - RSK World Education
 * Founded by Molla Samser, Designed & Tested by Rima Khatun
 * Website: https://rskworld.in
*/  

$section_title = get_theme_mod( 'education_zone_welcome_section_title', __( 'About RSK World Education', 'education-zone' ) );
?>
    
<div class="container">
    <?php 
    education_zone_get_section_header( $section_title );  

    // RSK World Education Default Stats
    $first_stats_number  = get_theme_mod( 'education_zone_first_stats_number', '1000' );
    $first_stats_title   = get_theme_mod( 'education_zone_first_stats_title', __( 'Free Source Code Projects', 'education-zone' ) );
	$first_stats_suffix   = get_theme_mod( 'education_zone_first_stats_suffix', '+' );
	$first_stats_prefix   = get_theme_mod( 'education_zone_first_stats_prefix', '' );
    $second_stats_number = get_theme_mod( 'education_zone_second_stats_number', '50' );
    $second_stats_title  = get_theme_mod( 'education_zone_second_stats_title', __( 'Development Tutorials', 'education-zone' ) );
    $third_stats_number  = get_theme_mod( 'education_zone_third_stats_number', '24' );
    $third_stats_title   = get_theme_mod( 'education_zone_third_stats_title', __( 'Free Access Hours', 'education-zone' ) );
    $fourth_stats_number = get_theme_mod( 'education_zone_fourth_stats_number', '100' );
    $fourth_stats_title  = get_theme_mod( 'education_zone_fourth_stats_title', __( 'Quality Assured', 'education-zone' ) );
	$fourth_stats_suffix   = get_theme_mod( 'education_zone_fourth_stats_suffix', '%' );
 
    if( $first_stats_number || $first_stats_title || $second_stats_number || $second_stats_title || $third_stats_number || $third_stats_title || $fourth_stats_number || $fourth_stats_title ){ ?>
    
        <div class="row">
        
            <?php if( $first_stats_number && $first_stats_title ){ ?>
            	<div class="col">
            		<div class="text">
						<?php } if( $first_stats_suffix || $first_stats_prefix){ ?>
						
							<h3 style="display:inline-block;"><?php echo $first_stats_prefix; ?></h3><h3 class="number" style="display:inline-block;"><?php echo absint( $first_stats_number ); ?></h3><h3 style="display:inline-block;"><?php echo $first_stats_suffix; ?></h3>
							<span><?php echo esc_html( $first_stats_title ); ?></span>
							
						<?php } else { ?>
						
							<h3 class="number"><?php echo absint( $first_stats_number ); ?></h3>
							<span><?php echo esc_html( $first_stats_title ); ?></span>  
						<?php } ?>
            		</div>
            	</div>
                
            <?php if( $second_stats_number && $second_stats_title ){ ?>
            	<div class="col">
            		<div class="text">
            			<h3 class="number"><?php echo absint( $second_stats_number ); ?></h3>
            			<span><?php echo esc_html( $second_stats_title ); ?></span>            
            		</div>
            	</div>
                
            <?php } if( $third_stats_number && $third_stats_title ){ ?>
            	<div class="col">
            		<div class="text">
            			<h3 class="number"><?php echo absint( $third_stats_number ); ?></h3>
            			<span><?php echo esc_html( $third_stats_title ); ?></span>    
            		</div>
            	</div>
                
            <?php }  if( $fourth_stats_number && $fourth_stats_title ){ ?>
            	<div class="col">
            		<div class="text">
					  <h3 class="number" style="display:inline-block;"><?php echo absint( $fourth_stats_number ); ?></h3><h3 style="display:inline-block;"><?php echo $fourth_stats_suffix; ?></h3>
            			<span><?php echo esc_html( $fourth_stats_title ); ?></span>
            		</div>
            	</div>
                
            <?php } ?>
        
        </div>
    <?php } ?>
</div>