<?php   
/**
 * The template for displaying the footer.
 *
 * Contains the closing of the #content div and all content after.
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Luzuk Premium
 */
?>
<footer class="footer-area" id="footer">
	<?php if(is_active_sidebar('luzuk-footer1') || is_active_sidebar('luzuk-footer2') || is_active_sidebar('luzuk-footer3') || is_active_sidebar('luzuk-footer4') || is_active_sidebar('luzuk-footer5') ){ ?>
			
		<div class="top-area">
				<div class="s-footer  single-footer-1">
						<div class="single-footer single-footer-first " data-wow-duration="1s" >
							<?php if(is_active_sidebar('luzuk-footer1')): 
								dynamic_sidebar('luzuk-footer1');
							endif;
							?>	
						</div>
				</div>
				<div class="container">
						<div class="s-footer single-footer-2">
								<div class="single-footer wow zoomIn" data-wow-duration="1s" >
									<?php if(is_active_sidebar('luzuk-footer2')): 
										dynamic_sidebar('luzuk-footer2');
									endif;
									?>	
								</div>
						</div>

						<div class="s-footer single-footer-3">
								<div class="single-footer wow zoomIn"  data-wow-duration="1.5s" >
									<?php if(is_active_sidebar('luzuk-footer3')): 
										dynamic_sidebar('luzuk-footer3');
									endif;
									?>	
								</div>
						</div>
						<div class="s-footer  single-footer-4" >
								<div class="single-footer wow zoomIn" data-wow-duration="2s" >
									<?php if(is_active_sidebar('luzuk-footer4')): 
										dynamic_sidebar('luzuk-footer4');
									endif;
									?>	
								</div>
						</div>

						<div class="s-footer  single-footer-5" >
								<div class="single-footer wow zoomIn" data-wow-duration="2.5s" >
									<?php if(is_active_sidebar('luzuk-footer5')): 
										dynamic_sidebar('luzuk-footer5');
									endif;
									?>	
								</div>
						</div>
						<div class="clearfix"></div>
				</div>
				<div class="clearfix"></div>
		</div>
	<?php } ?>

		<div class="clearfix"></div>
<?php
		$facebook = get_theme_mod('footer_fb', 'https://facebook.com/');
		$instagram = get_theme_mod('footer_insta', 'https://www.instagram.com/');
		$twitter = get_theme_mod('footer_tw', 'https://twitter.com/');
		$footercopyright = get_theme_mod('footer_area_copyrighttext', '© 2025 All Rights Reserved');
?>	
		<?php if(!empty($facebook || $instagram || $twitter  || $footercopyright)){ ?>
			<div class="container">
					<div class="bottom-area ">
							<div class="row">
									<div class="fs-media">
											<?php if(!empty($facebook)){ ?>
												<li><a href="<?php echo $facebook ?>" title="Facebook" class="site-button sharp" target="_blank"><i class="fa fa-facebook"></i></a></li>
											<?php }?>

											<?php if(!empty($instagram)){ ?>
												<li><a href="<?php echo $instagram ?>" title="Instagram" class="site-button sharp" target="_blank"><i class="fa fa-instagram" aria-hidden="true"></i></a></li>
											<?php }?>

											<?php if(!empty($twitter)){ ?>
												<li><a href="<?php echo $twitter ?>" title="Twitter" class="site-button sharp" target="_blank"><i class="fa-brands fa-x-twitter"></i></a></li>
											<?php }?>
									</div>
									<div class="footer-text">
											<?php echo $footercopyright;?>
									</div>	
							</div>
					</div>
			</div>
		<?php }?>
		<div class="clearfix"></div> 
</footer><!-- #colophon -->
<script type="text/javascript">
	if(jQuery(window).width() >= 1170){
		new WOW().init();
	}
</script>
<!-- iphone -->
<script>
document.addEventListener('DOMContentLoaded', function () {
    // Cancel auto scroll if triggered
    const originalScrollTo = window.scrollTo;
    window.scrollTo = function (x, y) {
        if (y !== 0) {
            originalScrollTo(x, y); // allow scroll if not 0
        }
    };
});
</script>
 
<script>
document.addEventListener('DOMContentLoaded', function () {
  if (/iPhone|iPad|iPod/i.test(navigator.userAgent)) {
    const originalScrollTo = window.scrollTo;
    window.scrollTo = function (x, y) {
      if (y > 0) originalScrollTo(x, y);
    };
  }
});
</script>
<!-- end -->

<script type="text/javascript"> 
	jQuery(document).ready(function() {
		$("#back2Top").click(function(event) {
			event.preventDefault();
			$("html, body").animate({ scrollTop: 0 }, "slow");
			return false;
		});

	});
</script>

<?php wp_footer(); ?>
<div id="back2Top" title="Back to top" >
		<div class="center-con">
		    <div class="round">
		        <span></span>
		        <span></span>
		        <span></span>
		        <span></span>
		    </div>   
		</div>
	</div>
</body>
</html>