<?php
/**
 * Template Name: Home Page
 */

get_header();
?>

<main id="primary">

    <?php 
    $forest_safari_main_slider_wrap = absint(get_theme_mod('forest_safari_enable_slider', 0));
    if($forest_safari_main_slider_wrap == 1){ 
    ?>

    <section id="main-slider-wrap">
        <div class="owl-carousel">
            <?php for ($forest_safari_i=1; $forest_safari_i <= 3; $forest_safari_i++) { ?>
                <div class="main-slider-inner-box">
                    <?php if ( get_theme_mod('forest_safari_slider_image'.$forest_safari_i) ) : ?>
                        <img src="<?php echo esc_url( get_theme_mod('forest_safari_slider_image'.$forest_safari_i) ); ?>">
                        <div class="main-slider-content-box">
                            <?php if ( get_theme_mod('forest_safari_slider_heading'.$forest_safari_i) ) : ?><h3><?php echo esc_html( get_theme_mod('forest_safari_slider_heading'.$forest_safari_i) ); ?></h3><?php endif; ?>
                            <?php if ( get_theme_mod('forest_safari_slider_text'.$forest_safari_i) ) : ?><p><?php echo esc_html( get_theme_mod('forest_safari_slider_text'.$forest_safari_i) ); ?></p><?php endif; ?>
                            <div class="main-slider-button">
                                <?php if ( get_theme_mod('forest_safari_slider_button1_link'.$forest_safari_i) ||  get_theme_mod('forest_safari_slider_button1_text'.$forest_safari_i )) : ?><a href="<?php echo esc_url( get_theme_mod('forest_safari_slider_button1_link'.$forest_safari_i) ); ?>"><?php echo esc_html( get_theme_mod('forest_safari_slider_button1_text'.$forest_safari_i) ); ?></a><?php endif; ?>
                            </div>
                        </div>
                    <?php endif; ?>
                </div>
            <?php } ?>
        </div>
    </section>

    <?php } ?>

    <?php 
    $forest_safari_main_expert_wrap = absint(get_theme_mod('forest_safari_enable_aboutus', 0));
    if($forest_safari_main_expert_wrap == 1){ 
    ?>

    <section id="main-expert-wrap">
        <div class="container"> 
            <div class="flex-row">
                <div class="aboutus-left">
                    <?php if ( get_theme_mod('forest_safari_aboutus_short_heading') ) : ?><h5><?php echo esc_html( get_theme_mod('forest_safari_aboutus_short_heading') ); ?></h5><?php endif; ?>
                    <?php if ( get_theme_mod('forest_safari_aboutus_heading') ) : ?><h3><?php echo esc_html( get_theme_mod('forest_safari_aboutus_heading') ); ?></h3><?php endif; ?>
                    <?php if ( get_theme_mod('forest_safari_aboutus_text') ) : ?><p><?php echo esc_html( get_theme_mod('forest_safari_aboutus_text') ); ?></p><?php endif; ?>
                    <div class="grid-container">
                        <?php for ($forest_safari_i=1; $forest_safari_i <= 6; $forest_safari_i++) { ?>
                            <div class="grid-item">
                                <?php if ( get_theme_mod('forest_safari_aboutus_list_icon'.$forest_safari_i) || get_theme_mod('forest_safari_aboutus_list'.$forest_safari_i) ) : ?><span><i class="<?php echo esc_attr( get_theme_mod('forest_safari_aboutus_list_icon'.$forest_safari_i) ); ?>"></i> <?php echo esc_html( get_theme_mod('forest_safari_aboutus_list'.$forest_safari_i) ); ?></span><?php endif; ?>
                            </div>
                        <?php } ?>
                    </div>
                </div>
                <div class="aboutus-left">
                    <div class="box-image">
                        <?php if ( get_theme_mod('forest_safari_aboutus_image') ) : ?><img src="<?php echo esc_url( get_theme_mod('forest_safari_aboutus_image') ); ?>"><?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <?php } ?>
    
</main>

<?php
get_footer();