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

get_header();
?>

<main id="primary">

    <?php if (get_theme_mod('pixel_hair_spa_banner_section_on_off_setting', false)) { ?>
        <section id="main-banner-wrap">
            <div id="banner-area">
                <div class="owl-carousel owl-theme">
                    <?php
                        $pixel_hair_spa_banner = get_theme_mod( 'pixel_hair_spa_slider');
                        for ( $i = 1; $i <= $pixel_hair_spa_banner; $i++ ){ ?>
                        <div class="item">
                            <div class="container">
                                <div class="row">
                                    <div class="col-lg-7 col-md-7">
                                        <div class="main-banner-content-box">
                                            <?php
                                                $pixel_hair_spa_banner_heading = get_theme_mod( 'pixel_hair_spa_banner_heading'.$i, '' );
                                                if ( ! empty( $pixel_hair_spa_banner_heading ) ) { ?>
                                                <h3><?php echo esc_html( $pixel_hair_spa_banner_heading ); ?></h3>
                                            <?php } ?>
                                            <?php
                                                $pixel_hair_spa_banner_content = get_theme_mod( 'pixel_hair_spa_banner_content'.$i, '' );
                                                if ( ! empty( $pixel_hair_spa_banner_content ) ) { ?>
                                                <p><?php echo esc_html( $pixel_hair_spa_banner_content ); ?></p>
                                            <?php } ?>
                                            <?php
                                                $pixel_hair_spa_banner_btn = get_theme_mod( 'pixel_hair_spa_banner_btn'.$i, '' );
                                                $pixel_hair_spa_banner_button_link = get_theme_mod( 'pixel_hair_spa_banner_button_link'.$i, '' );
                                                if ( ! empty( $pixel_hair_spa_banner_btn ) ) { ?>
                                                <a href="<?php echo esc_url( $pixel_hair_spa_banner_button_link ); ?>"><?php echo esc_html( $pixel_hair_spa_banner_btn ); ?></a>
                                            <?php } ?>
                                        </div>
                                    </div>
                                    <div class="col-lg-5 col-md-5">
                                        <div class="main-banner-inner-box mt-4 mb-md-0">
                                            <?php
                                            $pixel_hair_spa_banner_image = get_theme_mod( 'pixel_hair_spa_banner_image'.$i, '' );
                                            if ( ! empty( $pixel_hair_spa_banner_image ) ) { ?>
                                                <img src="<?php echo esc_url( $pixel_hair_spa_banner_image ); ?>">
                                            <?php } ?>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    <?php }?>                
                </div>
            </div>
        </section>
    <?php } ?>

    <?php if (get_theme_mod('pixel_hair_spa_services_section_on_off_setting', false)) { ?>
        <section class="services py-5">
            <div class="container">
                <?php
                    $pixel_hair_spa_services_title = get_theme_mod( 'pixel_hair_spa_services_title', '' );
                    if ( ! empty( $pixel_hair_spa_services_title ) ) { ?>
                    <div class="main-heading">
                        <h3 class="mb-0"><?php echo esc_html( $pixel_hair_spa_services_title ); ?></h3>
                    </div>
                <?php } ?>
                <?php
                    $pixel_hair_spa_services_short_title = get_theme_mod( 'pixel_hair_spa_services_short_title', '' );
                    if ( ! empty( $pixel_hair_spa_services_short_title ) ) { ?>
                    <div class="main-heading mb-5">
                        <p class="mb-0"><?php echo esc_html( $pixel_hair_spa_services_short_title ); ?></p>
                    </div>
                <?php } ?>
                <div class="row">
                    <?php
                        $pixel_hair_spa_services = get_theme_mod( 'pixel_hair_spa_services_count');
                        for ( $i = 1; $i <= $pixel_hair_spa_services; $i++ ){ ?>
                        <div class="col-lg-4 col-md-6">
                            <div class="services-box mb-4 text-center">
                                <?php
                                    $pixel_hair_spa_services_image = get_theme_mod( 'pixel_hair_spa_services_image'.$i, '' );
                                    if ( ! empty( $pixel_hair_spa_services_image ) ) { ?>
                                        <img src="<?php echo esc_url( $pixel_hair_spa_services_image ); ?>">
                                <?php } ?>
                                <?php
                                    $pixel_hair_spa_services_name = get_theme_mod( 'pixel_hair_spa_services_name'.$i, '' );
                                    if ( ! empty( $pixel_hair_spa_services_name ) ) { ?>
                                    <h3 class="mt-4 mb-1"><?php echo esc_html( $pixel_hair_spa_services_name ); ?></h3>
                                <?php } ?>
                                <?php
                                    $pixel_hair_spa_services_designation = get_theme_mod( 'pixel_hair_spa_services_designation'.$i, '' );
                                    if ( ! empty( $pixel_hair_spa_services_designation ) ) { ?>
                                    <p><?php echo esc_html( $pixel_hair_spa_services_designation ); ?></p>
                                <?php } ?>                            
                            </div>
                        </div>
                    <?php }?>
                </div>
            </div>
        </section>
    <?php } ?>

</main>

<?php
get_footer();