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

get_header();
?>

<main id="primary">

    <?php 
    $wildlife_photography_main_slider_wrap = absint(get_theme_mod('wildlife_photography_enable_slider',0));
    if($wildlife_photography_main_slider_wrap == 1): 
    ?>
        <section id="main-slider-wrap">
            <div class="owl-carousel">
                <?php for ($wildlife_photography_main_i=1; $wildlife_photography_main_i <= 3; $wildlife_photography_main_i++): ?>
                    <?php if ($wildlife_photography_slider_image = get_theme_mod('wildlife_photography_slider_image'.$wildlife_photography_main_i)): ?>
                        <div class="main-slider-inner-box">
                            <img src="<?php echo esc_url($wildlife_photography_slider_image); ?>" alt="<?php echo esc_attr( get_theme_mod('wildlife_photography_slider_heading'.$wildlife_photography_main_i) ); ?>">
                            <div class="main-slider-content-box">
                                <?php if ($wildlife_photography_top_text = get_theme_mod('wildlife_photography_slider_top_text'.$wildlife_photography_main_i)): ?>
                                    <p class="slider-top"><?php echo esc_html($wildlife_photography_top_text); ?></p>
                                <?php endif; ?>
                                <?php if ($wildlife_photography_heading = get_theme_mod('wildlife_photography_slider_heading' . $wildlife_photography_main_i)): ?>
                                    <h1><?php echo esc_html($wildlife_photography_heading); ?></h1>
                                <?php endif; ?>

                                <?php if ($wildlife_photography_text = get_theme_mod('wildlife_photography_slider_text'.$wildlife_photography_main_i)): ?>
                                    <p class="slider-content"><?php echo esc_html($wildlife_photography_text); ?></p>
                                <?php endif; ?>
                                <div class="main-slider-button">
                                    <?php if ( get_theme_mod('wildlife_photography_slider_button1_link'.$wildlife_photography_main_i) ||  get_theme_mod('wildlife_photography_slider_button1_text'.$wildlife_photography_main_i )) : ?><a class="slide-btn-1" href="<?php echo esc_url( get_theme_mod('wildlife_photography_slider_button1_link'.$wildlife_photography_main_i) ); ?>"><?php echo esc_html( get_theme_mod('wildlife_photography_slider_button1_text'.$wildlife_photography_main_i) ); ?></a><?php endif; ?>

                                    <?php 
                                        $wildlife_photography_button2_link = get_theme_mod('wildlife_photography_slider_button2_link' . $wildlife_photography_main_i);
                                        $wildlife_photography_button2_text = get_theme_mod('wildlife_photography_slider_button2_text' . $wildlife_photography_main_i);
                                        if ($wildlife_photography_button2_link || $wildlife_photography_button2_text): 
                                        ?>
                                            <a class="slide-btn-2" href="<?php echo esc_url($wildlife_photography_button2_link); ?>">
                                                <?php echo esc_html($wildlife_photography_button2_text); ?>
                                            </a>
                                    <?php endif; ?>
                                </div>
                            </div>
                        </div>
                    <?php endif; ?>
                <?php endfor; ?>
            </div>
        </section>
    <?php endif; ?>

   <?php
    if (get_theme_mod('wildlife_photography_gallery_sec_enable', 0) != '') : ?>
        <section id="service">
            <div class="container">
                <div class="match-heading">
                    <?php if (!empty(get_theme_mod('wildlife_photography_service_sub_heading'))) : ?>
                        <h2 class="about-h2"><?php echo esc_html(get_theme_mod('wildlife_photography_service_sub_heading')); ?></h2>
                    <?php endif; ?>
                    <?php if (!empty(get_theme_mod('wildlife_photography_service_about_us'))) : ?>
                        <p class="gallery-content">
                            <?php echo esc_html(get_theme_mod('wildlife_photography_service_about_us')); ?>
                        </p>
                    <?php endif; ?>
                </div>
                <div class="flex-row">
                    <div class="gallery-col-1">
                        <?php
                            $wildlife_photography_gallery_first = get_theme_mod('wildlife_photography_gallery_first');
                            if (!empty($wildlife_photography_gallery_first)) { ?>
                            <div class="gallery-banner1">
                                <img src="<?php echo esc_url($wildlife_photography_gallery_first); ?>" alt="<?php esc_attr_e('Background Image', 'wildlife-photography'); ?>" />
                            
                                <div class="banner-main-content">
                                    <?php if (!empty(get_theme_mod('wildlife_photography_banner_first_heading'))) : ?>
                                        <h3 class="gallery_title"><?php echo esc_html(get_theme_mod('wildlife_photography_banner_first_heading')); ?></h3>
                                    <?php endif; ?>
                                    <?php if (!empty(get_theme_mod('wildlife_photography_banner_first_date_time'))) : ?>
                                        <p class="date-time">
                                            <i class="fas fa-calendar-alt"></i><?php echo esc_html(get_theme_mod('wildlife_photography_banner_first_date_time')); ?>
                                        </p>
                                    <?php endif; ?>
                                    <?php if (get_theme_mod('wildlife_photography_banner_first_button_link') && get_theme_mod('wildlife_photography_banner_first_button_text', 'Read More')): ?>
                                        <div class="banner-button">
                                            <a href="<?php echo esc_url(get_theme_mod('wildlife_photography_banner_first_button_link')); ?>"><?php echo esc_html(get_theme_mod('wildlife_photography_banner_first_button_text', 'Read More')); ?><i class="fas fa-chevron-right"></i></a>
                                        </div>
                                    <?php endif; ?>
                                </div>
                            </div>
                        <?php } ?>
                        <?php
                            $wildlife_photography_gallery_sec = get_theme_mod('wildlife_photography_gallery_sec');
                            if (!empty($wildlife_photography_gallery_sec)) { ?>
                            <div class="gallery-banner1">
                                <img src="<?php echo esc_url($wildlife_photography_gallery_sec); ?>" alt="<?php esc_attr_e('Background Image', 'wildlife-photography'); ?>" />
                                <div class="banner-main-content">
                                    <?php if (!empty(get_theme_mod('wildlife_photography_banner_sec_heading'))) : ?>
                                        <h3 class="gallery_title"><?php echo esc_html(get_theme_mod('wildlife_photography_banner_sec_heading')); ?></h3>
                                    <?php endif; ?>
                                    <?php if (!empty(get_theme_mod('wildlife_photography_banner_sec_date_time'))) : ?>
                                        <p class="date-time">
                                            <i class="fas fa-calendar-alt"></i><?php echo esc_html(get_theme_mod('wildlife_photography_banner_sec_date_time')); ?>
                                        </p>
                                    <?php endif; ?>
                                    <?php if (get_theme_mod('wildlife_photography_banner_sec_button_link') && get_theme_mod('wildlife_photography_banner_sec_button_text', 'Read More')): ?>
                                        <div class="banner-button">
                                            <a href="<?php echo esc_url(get_theme_mod('wildlife_photography_banner_sec_button_link')); ?>"><?php echo esc_html(get_theme_mod('wildlife_photography_banner_sec_button_text', 'Read More')); ?><i class="fas fa-chevron-right"></i></a>
                                        </div>
                                    <?php endif; ?>
                                </div>
                            </div>
                        <?php } ?>
                    </div>
                    <div class="gallery-col-2">
                        <?php
                            $wildlife_photography_gallery_third = get_theme_mod('wildlife_photography_gallery_third');
                            if (!empty($wildlife_photography_gallery_third)) { ?>
                            <div class="gallery-banner1">
                                <img src="<?php echo esc_url($wildlife_photography_gallery_third); ?>" alt="<?php esc_attr_e('Background Image', 'wildlife-photography'); ?>" />
                                <div class="banner-main-content">
                                    <?php if (!empty(get_theme_mod('wildlife_photography_banner_third_heading'))) : ?>
                                        <h3 class="gallery_title"><?php echo esc_html(get_theme_mod('wildlife_photography_banner_third_heading')); ?></h3>
                                    <?php endif; ?>
                                    <?php if (!empty(get_theme_mod('wildlife_photography_banner_third_date_time'))) : ?>
                                        <p class="date-time">
                                            <i class="fas fa-calendar-alt"></i><?php echo esc_html(get_theme_mod('wildlife_photography_banner_third_date_time')); ?>
                                        </p>
                                    <?php endif; ?>
                                    <?php if (get_theme_mod('wildlife_photography_banner_third_button_link') && get_theme_mod('wildlife_photography_banner_third_button_text', 'Read More')): ?>
                                        <div class="banner-button">
                                            <a href="<?php echo esc_url(get_theme_mod('wildlife_photography_banner_third_button_link')); ?>"><?php echo esc_html(get_theme_mod('wildlife_photography_banner_third_button_text', 'Read More')); ?><i class="fas fa-chevron-right"></i></a>
                                        </div>
                                    <?php endif; ?>
                                </div>
                            </div>
                        <?php } ?>
                    </div>
                    <div class="gallery-col-3">
                        <?php
                            $wildlife_photography_gallery_fourth = get_theme_mod('wildlife_photography_gallery_fourth');
                            if (!empty($wildlife_photography_gallery_fourth)) { ?>
                            <div class="gallery-banner1">
                                <img src="<?php echo esc_url($wildlife_photography_gallery_fourth); ?>" alt="<?php esc_attr_e('Background Image', 'wildlife-photography'); ?>" />
                                <div class="banner-main-content">
                                    <?php if (!empty(get_theme_mod('wildlife_photography_banner_fourth_heading'))) : ?>
                                        <h3 class="gallery_title"><?php echo esc_html(get_theme_mod('wildlife_photography_banner_fourth_heading')); ?></h3>
                                    <?php endif; ?>
                                    <?php if (!empty(get_theme_mod('wildlife_photography_banner_fourth_date_time'))) : ?>
                                        <p class="date-time">
                                            <i class="fas fa-calendar-alt"></i><?php echo esc_html(get_theme_mod('wildlife_photography_banner_fourth_date_time')); ?>
                                        </p>
                                    <?php endif; ?>
                                    <?php if (get_theme_mod('wildlife_photography_banner_fourth_button_link') && get_theme_mod('wildlife_photography_banner_fourth_button_text', 'Read More')): ?>
                                        <div class="banner-button">
                                            <a href="<?php echo esc_url(get_theme_mod('wildlife_photography_banner_fourth_button_link')); ?>"><?php echo esc_html(get_theme_mod('wildlife_photography_banner_fourth_button_text', 'Read More')); ?><i class="fas fa-chevron-right"></i></a>
                                        </div>
                                    <?php endif; ?>
                                </div>
                            </div>
                        <?php } ?>
                        <?php
                            $wildlife_photography_gallery_fifth = get_theme_mod('wildlife_photography_gallery_fifth');
                            if (!empty($wildlife_photography_gallery_fifth)) { ?>
                            <div class="gallery-banner1">
                                <img src="<?php echo esc_url($wildlife_photography_gallery_fifth); ?>" alt="<?php esc_attr_e('Background Image', 'wildlife-photography'); ?>" />
                            <div class="banner-main-content">
                                <?php if (!empty(get_theme_mod('wildlife_photography_banner_fifth_heading'))) : ?>
                                    <h3 class="gallery_title"><?php echo esc_html(get_theme_mod('wildlife_photography_banner_fifth_heading')); ?></h3>
                                <?php endif; ?>
                                <?php if (!empty(get_theme_mod('wildlife_photography_banner_fifth_date_time'))) : ?>
                                    <p class="date-time">
                                        <i class="fas fa-calendar-alt"></i><?php echo esc_html(get_theme_mod('wildlife_photography_banner_fifth_date_time')); ?>
                                    </p>
                                <?php endif; ?>
                                <?php if (get_theme_mod('wildlife_photography_banner_fifth_button_link') && get_theme_mod('wildlife_photography_banner_fifth_button_text', 'Read More')): ?>
                                    <div class="banner-button">
                                        <a href="<?php echo esc_url(get_theme_mod('wildlife_photography_banner_fifth_button_link')); ?>"><?php echo esc_html(get_theme_mod('wildlife_photography_banner_fifth_button_text', 'Read More')); ?><i class="fas fa-chevron-right"></i></a>
                                    </div>
                                <?php endif; ?>
                            </div>
                            </div>
                        <?php } ?>
                    </div>
                </div>
            </div>
        </section>
    <?php endif; ?>
  
</main>

<?php
get_footer();
?>