<?php  
if(get_theme_mod('gallery_section_disable') != 'on' ){ ?>  
	<?php 
		if( get_theme_mod('secgalleryTpadding',true) ) {
			$secgalleryTpadding = 'padding-top:'.esc_attr(get_theme_mod('secgalleryTpadding')).';';
		}
		if( get_theme_mod('secgalleryBpadding',true) ) {
			$secgalleryBpadding = 'padding-bottom:'.esc_attr(get_theme_mod('secgalleryBpadding')).';';
		}
	?>		

<section id="gallery" class="gallery-area" style="<?php echo esc_attr($secgalleryTpadding); ?>" "<?php echo esc_attr($secgalleryBpadding); ?>">
	<?php
		$gallery_page_id = get_theme_mod('gallery_page');	
		$gallery_maintitle = get_theme_mod('gallery_maintitle', 'Our Gallery');
	?>
	<div class="row justify-content-center">
		<?php if($gallery_maintitle){ ?>	
		<div class="section-title">
			<div class="heading-brd1"></div>
			<h2><?php echo ($gallery_maintitle);  ?></h2>
		</div>
		<?php }?>
	</div>
	<div class="container">
		<div class="gall-bx">
			<div class="gallery-main-box">
				<div class="row">
				<!-- <div class="owl-carousel owl-theme"> -->
					<?php 
					$showStatic = true;
					$cols = get_theme_mod('gallery_npp_count', 5);
					$cols++;
					switch($cols){
						case 1:
						$colCls = 'col-lg-12 col-md-12 col-sm-12';
						break;
						case 2:	
						$colCls = 'col-lg-6 col-md-6 col-sm-6';
						break;
						case 3:
						case 5:
						case 6:
						case 9:
						case 11:
						case 13:
						case 15:
						$colCls = 'col-lg-4 col-md-6 col-sm-6';
						break;
						default: 
						$colCls = 'col-lg-4 col-md-6 col-sm-6';
						break;
					}
					for( $i = 1; $i <= $cols; $i++ ){
						$gallery_page_id = get_theme_mod('gallery_page'.$i); 
						$gallery_page_icon = get_theme_mod('gallery_page_icon'.$i);
						if($gallery_page_id){
							$showStatic = false;
							echo galleryShortCode($gallery_page_id, $isCustomizer=true, $i);
						}
					}
					if($showStatic === true){
	 					for( $i = 1; $i <= $cols; $i++ ){
					?>	
						
						 <div class="<?php echo $colCls; ?> gall-contain wow zoomIn">
							<div class="homegalry ">
								<div class="lz-gallery-images ">
									<figure class="spa-gall">
										 <a class="group1" href="<?php echo esc_url(get_template_directory_uri().'/images/gallery.jpg');?>" title="Gallery 1"> 
											<img src="<?php echo esc_url(get_template_directory_uri().'/images/gallery.jpg');?>" alt="Gallery" />
											
										</a>
				                    </figure>
				                     <a class="group1" href="<?php echo esc_url(get_template_directory_uri().'/images/gallery.jpg');?>" title="Gallery 1"> 
										
										<div class="over-text">
											<i class="fa fa-plus" aria-hidden="true"></i>
										</div>
									</a>
								</div>
								<div class="clearfix"></div>
							</div>
						</div>  
							<?php 
							 } //wp_reset_query();
						} ?>
					</div>
					<!-- </div> -->
				</div>			
			</div>
		</div> 
		<div class="clearfix"></div>
	</section>
<?php }