<?php
if (get_theme_mod('aboutus_section_disable') != 'on') {
	?> 

    <?php 
        if( get_theme_mod('aboutTpadding',true) ) {
         $aboutTpadding = 'padding-top:'.esc_attr(get_theme_mod('aboutTpadding')).';';
       }
       if( get_theme_mod('aboutBpadding',true) ) {
         $aboutBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('aboutBpadding')).';';
       }

       ?> 
	<section id="about-section" class="ht-section wow zoomIn" style="<?php echo esc_attr($aboutTpadding); ?>" "<?php echo esc_attr($aboutBpadding); ?>">  

  		<?php
  		  $about_page_id = get_theme_mod('about_page');
  		  $about_title = get_theme_mod('about_title', 'ABOUT US');
        $about_subtitle = get_theme_mod('about_subtitle', 'About');
        $about_title2 = get_theme_mod('about_title2', 'Our mission & vision');
  		  $about_text = get_theme_mod('about_text', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit is, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida.');
  		?>
<?php if( get_theme_mod('airoplane_image_display','show' ) == 'show') :?> 
<div class="airoplane">
    <?php 
      $airoplane_image = get_theme_mod('airoplane_image');
      if(!empty($airoplane_image)){
        echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($airoplane_image).'" class="img-responsive secondry-bg-img" />';
      }else{
        echo '<img src="'.get_template_directory_uri().'/images/airoplane.png" class="img-responsive secondry-bg-img" />';
      }
    ?>
    <div class="clearfix"></div>
</div>
<?php endif ?>
        <div class="row">       
        <div class="container">
          <div class="col-md-4 col-sm-12 pd-0">      
                <div class="abtdot">
                  <?php 
                    $abtdot_image = get_theme_mod('abtdot_image');
                    if(!empty($abtdot_image)){
                      echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($abtdot_image).'" class="img-responsive secondry-bg-img" />';
                    }else{
                      echo '<img alt="sldercircle sign" src="'.get_template_directory_uri().'/images/abtdot.png" class="img-responsive" />';
                    }
                  ?>
                </div>
                <div class="abtimgbox">
                  <div class="abtimg">
                        <?php 
                          $abt_image = get_theme_mod('abt_image');
                          if(!empty($abt_image)){
                            echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($abt_image).'" class="img-responsive secondry-bg-img" />';
                          }else{
                            echo '<img alt="sldercircle sign" src="'.get_template_directory_uri().'/images/about.jpg" class="img-responsive" />';
                          }
                        ?>
                  </div>
                </div>
            </div>
            <div class="col-md-offset-1 col-md-5 col-sm-12 "> 
               <div class="about-right-bx">
                  <div class="row ">
                      <div class="section-title">
                        <?php if($about_subtitle) { ?>
                          <div class="subheading"><?php echo ($about_subtitle);  ?></div>
                        <?php }?>
                        <h2><?php echo ($about_title);  ?></h2>  
                      </div>
                  </div>
                  <div class="lz-about-text">
                     <?php echo ($about_text); ?>
                  </div>  
                   <h3 class="inner-area-title">
                     <?php echo ($about_title2); ?>
                  </h3> 
          <?php
                $showStatic = true;
                for( $i = 1; $i < 11; $i++ ){
                  $aboutus_page_id = get_theme_mod('aboutus_page_title'.$i); 
                  if(!empty($aboutus_page_id)){
                    $showStatic = false;
                    break;
                  }
                }
                ?>

                  <div class="aboutus-post-wrap">
                      <?php
                      $cols = get_theme_mod('aboutus_npp_count', 3);
                      $cols++;
                      // echo '$cold: '.$cols;
                      switch($cols){
                        case 1:
                      $colCls = 'col-md-12 col-sm-12';
                      break;
                      case 2: 
                      $colCls = 'col-md-12 col-sm-12';
                      break;
                      case 3:
                      case 5:
                      case 6:
                      case 9:
                      case 11:
                      $colCls = 'col-md-12 col-sm-12';
                      break;
                      default: 
                      $colCls = 'col-md-12 col-sm-12';
                      break;
                      }
                      $icons = array(1=>'heart', 2=>'star', 3=>'flash', 4=>'bell',5=>'heart', 6=>'star', 7=>'flash', 8=>'bell');
                      ?>
                      <div class="row aboutus-post-boxes">
                        <?php
                        for( $i = 1; $i <= $cols; $i++ ){
                            if($showStatic === false){
                              
                              $aboutus_page_title = get_theme_mod('aboutus_page_title'.$i, 'This is a education sit amet, consectetur adipiscing elit.');
                              $aboutus_page_id = get_theme_mod('aboutus_page'.$i); 
                              $aboutus_page_title = get_theme_mod('aboutus_page_title'.$i);
                              if($aboutus_page_title){
                                
                              ?>
                              <div class="<?php echo $colCls;?> pd-0">
                                  <div class="aboutus-single">                   
                                      <div class="about-area-data">
                                        <p class="abtinntxt"><?php echo $aboutus_page_title; ?></p>
                                      </div>
                                  </div>
                                  <div class="clearfix"></div>
                              </div>
                              <?php
                                  
                              }
                            }else{?>
                              <div class="<?php echo $colCls;?> pd-0">
                                  <div class="aboutus-single">
                                      <div class="about-area-data">
                                          <p class="abtinntxt">Lorem ipsum dolor sit amet, consectetur adipiscing elite.</p>    
                                      </div>           
                                  </div>
                                  <div class="clearfix"></div>
                              </div>
                            <?php }
                        }?>
                        <div class="clearfix"></div>
                      </div>
                  </div>
                </div>
                <div class="clearfix"></div>
          </div>
          <div class="col-md-2">
            <div class="certificate">
             
         


          <a href="#my_href_3">
          <div class="box">
              <?php
                  $smash_image = get_theme_mod('smash_image');
                  if(!empty($smash_image)){
                    echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($smash_image).'" class="img-responsive secondry-bg-img" />';
                  }else{
                    echo '<img alt="sldercircle sign" src="'.get_template_directory_uri().'/images/abt-d.jpg" class="img-responsive" />';
                  } ?>
          </div>
        </a>
        <div class="popup-content">
          <div id="my_href_3">
        <iframe width="850" height="500" src="<?php echo ($smash_image) ?>" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
          </div>
        </div>

              </div>

                  <script>
              var links = $('.certificate a');
                  links.colorbox({
                    inline: true,    $abt_image = get_theme_mod('abt_image');
                    rel: 'about-section'
                  });

                  /* Colorbox resize function */
                  var resizeTimer;
                  function resizeColorBox()
                  {
                      if (resizeTimer) clearTimeout(resizeTimer);
                      resizeTimer = setTimeout(function() {
                              if ($('#cboxOverlay').is(':visible')) {
                                      $.colorbox.load(true);
                              }
                      }, 300)
                  }

              // Resize Colorbox when resizing window or changing mobile device orientation
              $(window).resize(resizeColorBox);
              window.addEventListener("orientationchange", resizeColorBox, false);

              $('.certificate a').colorbox({maxWidth:'95%', maxHeight:'95%'});
          </script> 

            <div class="clearfix"></div>
          </div>
            
        </div>
    </div>
    <div class="clearfix"></div>
</section>

<?php
} 