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

get_header(); ?>

<main id="skip-content" role="main">

	<?php do_action( 'disco_night_club_above_banner' ); ?>

	<?php if( get_theme_mod('disco_night_club_banner_hide_show') != ''){ ?>
		<section id="banner">
			<div class="video-overlay1"></div>
			<div class="video-overlay2"></div>
			<div class="video-overlay3"></div>
			<div class="video-overlay4"></div>
			<div class="video-overlay5"></div>
			<div class="video-overlay6"></div>
			<div class="video-overlay7"></div>
			<div class="video-overlay8"></div>
			<div class="video-overlay9"></div>
			<div class="video-overlay10"></div>
			<div class="main-banner-inn">
		    	<div class="container">
				    <div class="carousel-inner vr-bx" role="listbox">
						<div class="row mr-0"> 
							<div class="col-lg-7 col-md-7">
								<div class="inner-carousel">
									<?php 
										echo '<img alt="night-clube" src="'.get_template_directory_uri().'/images/video-bg.png" class="img-responsive" />';
									?>
									<svg  viewBox="0 0 780 800">
										<defs>
											<filter id="Path_16" x="0" y="0" width="733" height="800.148" filterUnits="userSpaceOnUse">
											<feOffset dy="3" input="SourceAlpha"/>
											<feGaussianBlur stdDeviation="44.5" result="blur"/>
											<feFlood/>
											<feComposite operator="in" in2="blur"/>
											<feComposite in="SourceGraphic"/>
											</filter>
										</defs>
										<g transform="matrix(1, 0, 0, 1, 0, 0)" filter="url(#Path_16)">
											<g id="Path_16-2" data-name="Path 16" transform="translate(599.5 127.07) rotate(90)"  stroke-linecap="round">
											<path d="M 392.3207702636719 456 L 147.6791534423828 456 C 143.4133148193359 456 139.4346923828125 453.7070617675781 137.2960815429688 450.0158996582031 L 15.04284572601318 239.0159149169922 C 12.89284610748291 235.3051452636719 12.89284610748291 230.69482421875 15.04284572601318 226.9840545654297 L 137.2961578369141 15.9840612411499 C 139.4347686767578 12.29290771484375 143.4133911132812 9.999984741210938 147.6792297363281 9.999984741210938 L 392.3207702636719 9.999984741210938 C 396.5867004394531 9.999984741210938 400.5653076171875 12.29290771484375 402.7039184570312 15.9840612411499 L 524.9571533203125 226.9840545654297 C 527.107177734375 230.69482421875 527.107177734375 235.3051452636719 524.9570922851562 239.0159149169922 L 402.7039184570312 450.0158996582031 C 400.5653076171875 453.7070617675781 396.5867004394531 456 392.3207702636719 456 Z" stroke="none"/>
											<path class="svgbrdclr" d="M 147.6791687011719 19.99996948242188 C 146.9681701660156 19.99996948242188 146.3050842285156 20.38217163085938 145.9486389160156 20.99725341796875 L 23.6954345703125 231.9971618652344 C 23.33709716796875 232.6157073974609 23.33709716796875 233.3841705322266 23.69537353515625 234.0026245117188 L 145.94873046875 445.0027160644531 C 146.30517578125 445.6177978515625 146.9681701660156 446 147.6791687011719 446 L 392.32080078125 446 C 393.0317993164062 446 393.69482421875 445.6177978515625 394.0513610839844 445.0026245117188 L 516.304443359375 234.0028076171875 C 516.662841796875 233.3842620849609 516.662841796875 232.6157989501953 516.304443359375 231.9973449707031 L 394.05126953125 20.99725341796875 C 393.6949157714844 20.38217163085938 393.0317993164062 19.99996948242188 392.32080078125 19.99996948242188 L 147.6791687011719 19.99996948242188 M 147.6791687011719 -3.0517578125e-05 L 392.32080078125 -3.0517578125e-05 C 400.1685485839844 -3.0517578125e-05 407.4221801757812 4.180450439453125 411.3564453125 10.970703125 L 533.609619140625 221.9708099365234 C 537.5620727539062 228.7924346923828 537.5620727539062 237.2075347900391 533.609619140625 244.0292510986328 L 411.3564453125 455.0291748046875 C 407.4221801757812 461.8195190429688 400.1685485839844 466 392.32080078125 466 L 147.6791687011719 466 C 139.8314514160156 466 132.5778198242188 461.8195190429688 128.6435546875 455.0291748046875 L 6.3902587890625 244.0291595458984 C 2.43780517578125 237.2075347900391 2.43780517578125 228.7924346923828 6.3902587890625 221.9707183837891 L 128.6435546875 10.970703125 C 132.5779113769531 4.180450439453125 139.8314514160156 -3.0517578125e-05 147.6791687011719 -3.0517578125e-05 Z" stroke="none" fill="#a97dff"/>
											</g>
										</g>
									</svg>       			
									<?php
										$disco_night_club_banner_effect = get_theme_mod('disco_night_club_banner_effect', '') 
									?>			        			
									<div class="banner_content <?php echo ($disco_night_club_banner_effect); ?>">
										<a href="<?php echo esc_html(get_theme_mod('disco_night_club_bannerbuttonlink')); ?>"><h2><?php echo esc_html(get_theme_mod('disco_night_club_bannertitle')); ?></h2></a>
										<p ><?php echo esc_html(get_theme_mod('disco_night_club_bannerdescription')); ?></p>
										<?php 
											$disco_night_club_bannerbuttontext = get_theme_mod('disco_night_club_bannerbuttontext');
											if(!empty($disco_night_club_bannerbuttontext)){ ?>
												<a href="<?php echo esc_html(get_theme_mod('disco_night_club_bannerbuttonlink')); ?>" class="read-btn"><span><?php echo esc_html(get_theme_mod('disco_night_club_bannerbuttontext')); ?></span></a>
										<?php } ?>
									</div>
								</div>
							</div>
							<div class="col-lg-5 col-md-5 banner-rightb">	
								<div class="banner-image">
									<div id="yt-player">
									<?php
										$youtube_video_url = get_theme_mod('disco_night_club_banneryoutubevideourl');

										if (!empty($youtube_video_url)) {
											// Extract video ID from the URL
											$video_id = esc_attr(get_youtube_video_id($youtube_video_url));

											// Display embedded YouTube video
											echo '<div class="youtube-video">';
											echo '<iframe width="560" height="315" src="https://www.youtube.com/embed/' . $video_id . '" frameborder="0" allowfullscreen></iframe>';
											echo '</div>';
										}
									?>
									</div>
									<div class="banner-ovly"></div>											
								</div>
							</div> 							
						</div> 
				    </div>
				</div>
		  	<div class="clearfix"></div>
		  	</div>
		</section>
	<?php }?>

	<?php do_action('disco_night_club_below_banner'); ?>

	<?php if(get_theme_mod('disco_night_club_section_titleservice') != '' || get_theme_mod('disco_night_club_category_settingfeature') != ''){?>

	<section id="feature-section">
		<div class="container"> 
			
			<div class="feature-bx"> 
				<div class="glass">
					<?php 
						$glass_image = get_theme_mod('glass_image');
						if(!empty($glass_image)){
							echo '<img alt="night-clube" class="img-responsive secondry-bg-img" />';
						}else{
							echo '<img alt="night-clube" src="'.get_template_directory_uri().'/images/fea-img.png" class="img-responsive" />';
						}
					?>
				</div>
				<div class="feature-head ">
					
					<?php if(get_theme_mod('disco_night_club_section_titleservice') != ''){?>
						<h3><span><?php echo esc_html(get_theme_mod('disco_night_club_section_titleservice')); ?></span></h3>
						<p><span><?php echo esc_html(get_theme_mod('disco_night_club_section_subtitleservice')); ?></span></p>
					<?php }?>
				</div>

				<div class="row mrg-0">
					<?php $disco_night_club_catData1 = get_theme_mod('disco_night_club_category_settingfeature');
					if($disco_night_club_catData1){ 
						$args = array(
							'post_type' => 'post',
							'category_name' => $disco_night_club_catData1,
							'posts_per_page' => get_theme_mod('disco_night_club_features_number',4)
						);
						$i=1; ?>
						<?php $query = new WP_Query( $args );
						if ( $query->have_posts() ) :
							while( $query->have_posts() ) : $query->the_post(); ?>
								<div class="col-lg-3 col-md-3 col-sm-6 featuresbx">
									<div class="feature-box">
										<div class="feature-icon">
											<i class="<?php echo esc_attr(get_theme_mod('disco_night_club_feature_icon' . $i, 'fas fa-utensils')); ?>"></i>
										</div>
										<div class="feature-img">
											<?php the_post_thumbnail(); ?>
											<div class="feature-content">
												<a href="<?php the_permalink(); ?>"><h4><?php the_title(); ?></h4></a>
												<!-- <div class="feature-btn ">
													<a href="</?php the_permalink(); ?>" class="read-btn"><span><?php esc_html_e('Read More','disco-night-club'); ?></span><div class="icn"><i class="fa fa-angle-double-right"></i></div></a>
												</div> -->
												
											</div>
										</div>
										
									</div>
								</div>
							<?php $i++; endwhile; 
							wp_reset_postdata(); ?>
						<?php else : ?>
							<div class="no-postfound"></div>
						<?php endif; ?>
					<?php }?>
				</div>
			</div>
		</div>
	</section>

	<?php }?>

	<?php do_action('disco_night_club_below_feature_section'); ?>
	

	<?php if(get_theme_mod('disco_night_club_section_title') != '' || get_theme_mod('disco_night_club_category_setting') != ''){?>

		<section id="service-section">
			<div class="container"> 
	        	<div class="service-head ">
					
					<?php if(get_theme_mod('disco_night_club_section_title') != ''){?>
			      		<h3><?php echo esc_html(get_theme_mod('disco_night_club_section_title')); ?></h3>
			      	<?php }?>
					  <p><?php echo esc_html(get_theme_mod('disco_night_club_section_subtitle')); ?>
					  	<div class="head-brd"></div>
					  </p>

		       	</div>
		       	<div class="row">
			       	<?php $disco_night_club_catData1 = get_theme_mod('disco_night_club_category_setting');
					if($disco_night_club_catData1){ 
						$args = array(
							'post_type' => 'post',
							'category_name' => $disco_night_club_catData1,
				        );
				        $i=1; ?>
			    		<?php $query = new WP_Query( $args );
			          	if ( $query->have_posts() ) :
			        		while( $query->have_posts() ) : $query->the_post(); ?>
			        			<div class="col-lg-4 col-md-4">
				      				<div class="service-box mb-4">
				      					<a href="<?php the_permalink(); ?>">
				      					<div class="service-img">
				      						<?php the_post_thumbnail(); ?>
				      						<div class="s-oly"></div>
				      						<div class="service-content">
					            				<a href="<?php the_permalink(); ?>"><h4><?php the_title(); ?></h4></a>
				            				</div>
				      					</div>
			  							</a>
				      				</div>
				      			</div>
			          		<?php $i++; endwhile; 
			          		wp_reset_postdata(); ?>
			          	<?php else : ?>
			              	<div class="no-postfound"></div>
			            <?php endif; ?>
			  		<?php }?>
			  	</div>
			</div>
		</section>

	<?php }?>

	<?php do_action('disco_night_club_below_service_section'); ?>

	<!-- <div class="container">
	  	<//?php while ( have_posts() ) : the_post(); ?>
	  		<div class="lz-content py-5">
	        	<//?php the_content(); ?>
	        </div>
	    <//?php endwhile; // end of the loop. ?>
	</div> -->
</main>

<?php get_footer(); ?>