<?php
/**
 * Template Name: Custom Home Page
 */
get_header();

?>
<!-- banner section -->
<main id="maincontent" role="main">
  <?php do_action( 'business_association_above_banner' ); ?>
  <?php if (get_theme_mod('business_association_hide_show_banner_section', false)) { ?>
    <section id="banner-sec" class="d-flex align-items-center">
      <div class="container">
        <div class="banner-box">
          <div class="row">
            <div class="col-xxl-7 col-xl-7 col-lg-7 col-md-6 col-12 align-self-center banner-text-box wow zoomInUp">
              <?php if (get_theme_mod('business_association_banner_title') != '') { ?>
                <h1 class="banner-title text-capitalize"><?php echo esc_html(get_theme_mod('business_association_banner_title')); ?></h1>
              <?php } ?>
              <?php if (get_theme_mod('business_association_banner_text') != '') { ?>
                <p class="banner-text my-4"><?php echo esc_html(get_theme_mod('business_association_banner_text')); ?></p>
              <?php } ?>
              <?php if ( get_theme_mod('business_association_banner_first_button_label') != '') {?>
                <div class ="bnr-btn1 d-inline-block me-lg-4 me-md-4 me-0 mt-3 mb-4 pt-4">
                  <a href="<?php echo esc_url(get_theme_mod('business_association_banner_first_button_url'));?>" class="text-capitalize"><i class="<?php echo esc_attr(get_theme_mod('business_association_banner_first_btn_icon','fa-solid fa-arrow-right')); ?>"></i><?php echo esc_html(get_theme_mod('business_association_banner_first_button_label'));?>
                  </a>
                </div>
              <?php }?>
              <?php if (get_theme_mod('business_association_banner_second_button_label') != '') {?>
                <div class ="bnr-btn2 d-inline-block mt-3 mb-4 pt-4">
                  <a href="<?php echo esc_url(get_theme_mod('business_association_banner_second_button_url'));?>" class="text-capitalize"><i class="<?php echo esc_attr(get_theme_mod('business_association_banner_second_btn_icon','fa-solid fa-arrow-right')); ?>"></i><?php echo esc_html(get_theme_mod('business_association_banner_second_button_label'));?>
                  </a>
                </div>
              <?php }?>
              <div class="review-box d-flex align-items-center gap-lg-4 gap-md-2 gap-4 mt-4 pt-3 mb-lg-0 mb-md-0 mb-4">
                <div class="review-images">
                  <?php if (get_theme_mod('business_association_banner_review_img1') != "") { ?>
                    <img src="<?php echo esc_url(get_theme_mod('business_association_banner_review_img1')); ?>" class="review-img" alt="<?php echo esc_attr('banner image', 'business-association'); ?>">
                  <?php }?>
                  <?php if (get_theme_mod('business_association_banner_review_img2') != "") { ?>
                    <img src="<?php echo esc_url(get_theme_mod('business_association_banner_review_img2')); ?>" class="review-img" alt="<?php echo esc_attr('banner image', 'business-association'); ?>">
                  <?php }?>
                  <?php if (get_theme_mod('business_association_banner_review_img3') != "") { ?>
                    <img src="<?php echo esc_url(get_theme_mod('business_association_banner_review_img3')); ?>" class="review-img" alt="<?php echo esc_attr('banner image', 'business-association'); ?>">
                  <?php }?>
                  <?php if (get_theme_mod('business_association_banner_review_img4') != "") { ?>
                    <img src="<?php echo esc_url(get_theme_mod('business_association_banner_review_img4')); ?>" class="review-img" alt="<?php echo esc_attr('banner image', 'business-association'); ?>">
                  <?php }?>
                </div>
                <?php if (get_theme_mod('business_association_banner_review_text') != '') { ?>
                  <p class="review-text text-capitalize mb-0 position-relative"><?php echo esc_html(get_theme_mod('business_association_banner_review_text')); ?></p>
                <?php } ?>
              </div>
            </div>
            <div class="col-xxl-5 col-xl-5 col-lg-5 col-md-6 col-12 align-self-center bnr-img-box text-center position-relative">
              <div class="row">
                <div class="col-xl-4 col-lg-4 col-md-4 col-12 align-self-end d-flex flex-column gap-3 bnr-img-col1">
                  <?php for ( $business_association_i = 0; $business_association_i < 2; $business_association_i++ ) {
                    $business_association_banner_img1 = get_theme_mod( 'business_association_banner_right_imgbox_first' . $business_association_i );
                    if ( ! empty( $business_association_banner_img1 ) ) {?>
                      <div class="banner-img wow rollIn">
                        <img src="<?php echo esc_url( $business_association_banner_img1 ); ?>" class="img" alt="<?php esc_attr_e( 'Banner image', 'business-association' ); ?>">
                      </div>
                  <?php }}?>
                </div>
                <div class="col-xl-4 col-lg-4 col-md-4 col-12 align-self-end d-flex flex-column gap-3 bnr-img-col2">
                  <?php for ( $business_association_j = 0; $business_association_j < 3; $business_association_j++ ) {
                    $business_association_banner_img2 = get_theme_mod( 'business_association_banner_right_imgbox_second' . $business_association_j );
                    if ( ! empty( $business_association_banner_img2 ) ) {?>
                      <div class="banner-img wow rollIn">
                        <img src="<?php echo esc_url( $business_association_banner_img2 ); ?>" class="img" alt="<?php esc_attr_e( 'Banner image', 'business-association' ); ?>">
                      </div>
                  <?php }}?>
                </div>
                <div class="col-xl-4 col-lg-4 col-md-4 col-12 align-self-end d-flex flex-column gap-3 bnr-img-col3">
                  <?php for ( $business_association_k = 0; $business_association_k < 2; $business_association_k++ ) {
                    $business_association_banner_img3 = get_theme_mod( 'business_association_banner_right_imgbox_third' . $business_association_k );
                    if ( ! empty( $business_association_banner_img3 ) ) {?>
                      <div class="banner-img wow rollIn">
                        <img src="<?php echo esc_url( $business_association_banner_img3 ); ?>" class="img" alt="<?php esc_attr_e( 'Banner image', 'business-association' ); ?>">
                      </div>
                  <?php }}?>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
  <?php }?>
  <?php do_action( 'business_association_below_banner' ); ?>

  <!-- Category Section -->
  <?php if (get_theme_mod('business_association_members_section_hide_show', false)){ ?>
    <section id="members-section" class="my-5">
      <div class="container">
        <div class="members-sec-content mb-4 text-center wow fadeInDown">
          <?php if(get_theme_mod('business_association_members_section_text') != '') {?>
            <div class="small-text-box d-inline-flex align-items-center gap-3">
              <span class="before-small-text position-relative"></span><p class="small-text mb-0 text-capitalize d-inline-block"><?php echo esc_html(get_theme_mod('business_association_members_section_text')) ?></p><span class="after-small-text"></span>
            </div>
          <?php }?>
          <?php if(get_theme_mod('business_association_members_section_title') != '') {?>
            <h2 class="section-title mt-4"><?php echo esc_html(get_theme_mod('business_association_members_section_title')) ?></h2>
          <?php }?>
        </div>
        <div class="owl-carousel pt-5">
          <?php for ($business_association_p=0; $business_association_p < 5; $business_association_p++) {?>
            <div class="row">
              <div class="col-xl-3 col-lg-3 col-md-3 col-12"></div>
              <div class="col-xl-9 col-lg-9 col-md-9 col-12">
                <div class="member-card me-1 wow zoomIn">
                  <?php if(get_theme_mod('business_association_members_name' .$business_association_p) != '') {?>
                    <p class="member-name mb-2 text-capitalize px-4"><?php echo esc_html(get_theme_mod('business_association_members_name' .$business_association_p)) ?></p>
                  <?php }?>
                  <?php if(get_theme_mod('business_association_members_country' .$business_association_p) != '') {?>
                    <p class="member-country mb-2 text-capitalize px-4"><?php echo esc_html(get_theme_mod('business_association_members_country' .$business_association_p)) ?></p>
                  <?php }?>
                  <div class="profile-main-img-box px-3">
                    <div class="row mt-3">
                      <div class="col-xl-7 col-lg-7 col-md-7 col-12 profile-img-box">
                        <?php if (get_theme_mod('business_association_members_profile_img' .$business_association_p) != "") { ?>
                          <img src="<?php echo esc_url(get_theme_mod('business_association_members_profile_img' .$business_association_p)); ?>" class="profile-img" alt="<?php echo esc_attr('member profile image', 'business-association'); ?>">
                        <?php }?>
                      </div>
                      <div class="col-xl-5 col-lg-5 col-md-5 col-12">
                        <?php if(get_theme_mod('business_association_members_description' .$business_association_p) != '') {?>
                          <p class="member-desc mt-2 text-capitalize"><?php echo esc_html(get_theme_mod('business_association_members_description' .$business_association_p)) ?></p>
                        <?php }?>
                        <div class="member-review">
                          <?php $business_association_member_ratings = absint( get_theme_mod( 'business_association_member_ratings' . $business_association_p, 0 ) );
                            if ( $business_association_member_ratings > 0 ) {
                              for ( $business_association_i = 1; $business_association_i <= $business_association_member_ratings; $business_association_i++ ) {
                                echo '<span class="star"></span>';
                              }
                          }?>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          <?php }?>
        </div>
      </div>
    </section>
  <?php }?>
  <?php do_action( 'business_association_after_service' ); ?>

  <div id="content-vw" class="entry-content">
    <div class="container">
      <?php while (have_posts()) : the_post(); ?>
        <?php the_content(); ?>
      <?php endwhile; // end of the loop. 
      ?>
    </div>
  </div>
</main>

<?php get_footer(); ?> 