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

get_header(); ?>

<main id="skip-content">
  <?php if (get_theme_mod('futuristic_architecture_banner_section_setting', false) != '') { ?>
    <section id="top-banner">
      <div class="banner-img">
        <?php if (get_theme_mod('futuristic_architecture_banner_image') != '') {?>
          <img src="<?php echo esc_url(get_theme_mod('futuristic_architecture_banner_image'));?>"/>
        <?php } else {?>
          <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/slider.png"/>
        <?php }?>
      </div>
      <div class="banner-content">
        <?php if (get_theme_mod('futuristic_architecture_banner_heading') != '') {?>
          <h2><?php echo esc_html(get_theme_mod('futuristic_architecture_banner_heading')); ?></h2>
        <?php }?>
        <?php if (get_theme_mod('futuristic_architecture_banner_content') != '') {?>
          <p><?php echo esc_html(get_theme_mod('futuristic_architecture_banner_content')); ?></p>
        <?php }?>
      </div>
      <?php if (get_theme_mod('futuristic_architecture_banner_short_heading') != '') {?>
        <h5 class="bottom-heading"><?php echo esc_html(get_theme_mod('futuristic_architecture_banner_short_heading')); ?></h5>
      <?php }?>
      <div class="banner-form">
        <div class="row ms-0">
          <div class="col-lg-2 col-md-2 col-2 bform-btn">
            <?php if(get_theme_mod('futuristic_architecture_portfolio_btn_url') != ''){?>
              <a href="<?php echo esc_attr(get_theme_mod('futuristic_architecture_portfolio_btn_url')); ?>" class="portfolio-btn"><?php echo esc_html('View our Portfolio', 'futuristic-architecture'); ?></a>
            <?php }?>
            <?php if(get_theme_mod('futuristic_architecture_call_btn_url') != ''){?>
              <a href="<?php echo esc_attr(get_theme_mod('futuristic_architecture_call_btn_url')); ?>" class="call-btn"><?php echo esc_html('Schedule A Call', 'futuristic-architecture'); ?></a>
            <?php }?>
          </div>
          <div class="col-lg-10 col-md-10 col-10 align-self-center">
            <?php if(get_theme_mod('futuristic_architecture_contact_form_shortcode') != ''){ ?>
              <?php echo do_shortcode(get_theme_mod('futuristic_architecture_contact_form_shortcode')); ?>
            <?php }?>
          </div>
        </div>
      </div>
    </section>
  <?php }?>

  <?php if (get_theme_mod('futuristic_architecture_categories_section_setting', false) != '') { ?>
    <section id="top-projects" class="py-5 mt-5">
      <div class="container">
        <div class="project-heading text-center">
          <?php if(get_theme_mod('futuristic_architecture_project_heading') != ''){ ?>
            <h3 class="main-heading"><?php echo esc_html(get_theme_mod('futuristic_architecture_project_heading')); ?></h3>
          <?php }?>
          <?php if(get_theme_mod('futuristic_architecture_project_content') != ''){ ?>
            <p><?php echo esc_html(get_theme_mod('futuristic_architecture_project_content')); ?></p>
          <?php }?>
        </div>
        <div class="owl-carousel mt-4 ser-box">
          <?php
            $futuristic_architecture_project_cat = get_theme_mod('futuristic_architecture_project_category');
            if($futuristic_architecture_project_cat){
              $futuristic_architecture_page_query5 = new WP_Query(array( 'category_name' => esc_html($futuristic_architecture_project_cat,'futuristic-architecture')));
              $i=1;
              while( $futuristic_architecture_page_query5->have_posts() ) : $futuristic_architecture_page_query5->the_post(); ?>
                <div class="project-box">
                  <div class="project-img">
                    <?php if(has_post_thumbnail()){
                      the_post_thumbnail();
                      } else{?>
                      <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/slider.png"/>
                    <?php } ?>
                  </div>
                  <h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
                </div>
              <?php $i++; endwhile;
            wp_reset_postdata();
          } ?>
        </div>
      </div>
    </section>
  <?php }?>
  <section id="page-content">
    <div class="container">
      <div class="py-5">
        <?php
          if ( have_posts() ) :
            while ( have_posts() ) : the_post();
              the_content();
            endwhile;
          endif;
        ?>
      </div>
    </div>
  </section>
</main>

<?php get_footer(); ?>