<?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
 */


?>
<?php 
if( get_theme_mod('sec_footerseTmargin',true) ) {
	$sec_footerseTmargin = 'padding-top:'.esc_attr(get_theme_mod('sec_footerseTmargin')).';';
}
// if( get_theme_mod('sec_footersebottommargin',true) ) {
// 	$sec_footersebottommargin = 'padding-bottom:'.esc_attr(get_theme_mod('sec_footersebottommargin')).';';
// }
if( get_theme_mod('sec_footersecopacity',true) ) {
	$sec_footersecopacity = 'opacity:'.esc_attr(get_theme_mod('sec_footersecopacity')).';';
}

?>		
<footer class="footer-area" style= "<?php echo esc_attr($sec_footersebottommargin); ?>" "<?php echo esc_attr($sec_footersecopacity); ?>" id="footer">
	<div class="f-oly"></div>
	<?php if(is_active_sidebar('luzuk-footer1') || is_active_sidebar('luzuk-footer2') || is_active_sidebar('luzuk-footer3') ){ ?>
			<div class="top-area " style="<?php echo esc_attr($sec_footerseTmargin); ?>">
				<div class="container">
					<div class="footer-block">
						<div class="s-footer col-lg-3 col-md-3 col-sm-6 single-footer-1">
							<div class="single-footer wow zoomIn" data-wow-duration="1s" > 
								<?php if(is_active_sidebar('luzuk-footer1')): 
									dynamic_sidebar('luzuk-footer1');
								endif;
								?>	
							</div>
						</div>

						<div class="s-footer col-lg-3 col-md-3 col-sm-6 single-footer-2">
							<div class="single-footer wow zoomIn" data-wow-duration="1.5s" >
								<?php if(is_active_sidebar('luzuk-footer2')): 
									dynamic_sidebar('luzuk-footer2');
								endif;
								?>	
							</div>
						</div>

						<div class="s-footer col-lg-3 col-md-3 col-sm-6 single-footer-3">
							<div class="single-footer wow zoomIn" data-wow-duration="2s" >
								<?php if(is_active_sidebar('luzuk-footer3')): 
									dynamic_sidebar('luzuk-footer3');
								endif;
								?>	
							</div>
						</div>
						<div class="s-footer col-lg-3 col-md-3 col-sm-6 single-footer-4">
							<div class="single-footer wow zoomIn" data-wow-duration="2.5s" >
								<?php if(is_active_sidebar('luzuk-footer4')): 
									dynamic_sidebar('luzuk-footer4');
								endif;
								?>	
							</div>
						</div>
						<div class="clearfix"></div>
					</div>
					<div class="clearfix"></div>
				</div>
			</div>
	<?php } ?>

	<div class="clearfix"></div>
	<?php
		$footercopyright = get_theme_mod('footer_area_copyrighttext', 'Copyright @ 2022 Cycle-Repair All Right Reserved');
		$facebook = get_theme_mod('fotter_fb', '//facebook.com/');
		$twitter = get_theme_mod('fotter_tw', '//twitter.com/');
		$linkedin = get_theme_mod('fotter_ld', 'https://www.linkedin.com/');
	?>
	<?php 
		if( get_theme_mod('sec_bottomareaTmargin',true) ) {
			$sec_bottomareaTmargin = 'padding-top:'.esc_attr(get_theme_mod('sec_bottomareaTmargin')).';';
		}
		if( get_theme_mod('sec_bottomareabottommargin',true) ) {
			$sec_bottomareabottommargin = 'padding-bottom:'.esc_attr(get_theme_mod('sec_bottomareabottommargin')).';';
		}
		
	?>		
		<?php if( $facebook || $twitter || $linkedin || $footercopyright ) { ?>
		<div class="bottom-area wow zoomIn" style="<?php echo esc_attr($sec_bottomareaTmargin); ?>" "<?php echo esc_attr($sec_bottomareabottommargin); ?>">
			<div class="container">
				<div class="fcopy">
						<div class="footer-text col-md-8">
							<?php if($footercopyright){ ?>
								<?php echo $footercopyright;?>
							<?php } ?>
						</div>
						<div class="trrms-policy col-md-4">
							<div class="footer-social">
								<?php if(!empty($facebook)){ ?>
									<li><a href="<?php echo $facebook ?>" title="Facebook"  target="_blank"><i class="fa fa-facebook"></i></a></li>
								<?php }?>

								<?php if(!empty($twitter)){ ?>
									<li><a href="<?php echo $twitter ?>" title="Twitter"  target="_blank"><i class="fa-brands fa-x-twitter"></i></a></li>
								<?php }?>

								<?php if(!empty($linkedin)){ ?>
									<li><a href="<?php echo $linkedin ?>" title="Linkedin" target="_blank"><i class="fa fa-linkedin"></i></a></li>
								<?php }?>
							</div> 
						</div>

				</div>
			</div>
		</div>
		<?php } ?> 
</footer><!-- #colophon -->
<script type="text/javascript">
$(document).ready(function(){
    var highestBox = 0;
        $('#footer .s-footer').each(function(){  
                if($(this).height() > highestBox){  
                highestBox = $(this).height();  
        }
    });    
    $('#footer .s-footer').height(highestBox);
});
</script>
<script type="text/javascript">
	if(jQuery(window).width() >= 1170){
		new WOW().init();
	}
</script>
<script>
	$(window).scroll(function() {
		var height = $(window).scrollTop();
		if (height > 100) {
			$('#back2Top').fadeIn();
		} else {
			$('#back2Top').fadeOut();
		}
	});
	$(document).ready(function() {
		$("#back2Top").click(function(event) {
			event.preventDefault();
			$("html, body").animate({ scrollTop: 0 }, "slow");
			return false;
		});

	});
</script> 


<?php wp_footer(); ?>
<a id="back2Top" title="Back to top" href="#"> &#10148; </a>
</body>
</html>
