<?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_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')).';';
		}
?>		
<footer class="footer-area" id="footer">
	<!-- <?php
        // width 
        $c_width = get_theme_mod('footer_c_width', 'container');

        if ($c_width === 'container') {
            $c_alignment = 'container';
        } elseif ($c_width === 'container-fluid') {
            $c_alignment = 'container-fluid';
        } else {
            $text_alignment = 'container'; // Default to 'container' if the setting is invalid
        }
            
    ?> -->
	<?php
		$footercopyright = get_theme_mod('footer_area_copyrighttext', '- Electrician All Rights Reserved -');
		$f1txt = get_theme_mod('f1txt', 'There Are Many Variations Of Passages Of Lorem Ipsum Available, But The Majority Have Suffered Alteration In Slightly Believable.');

		$twitter = get_theme_mod('f_twitt', '//twitter.com/');
		$instagram = get_theme_mod('f_insta', '//instagram.com/');
		$linkedin = get_theme_mod('f_lin', '//linkedin.com/');				
		$facebook = get_theme_mod('f_fb', '//facebook.com/');
	?>
	<?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="<?php echo esc_attr($c_width); ?>">  -->
			<div class="fbox">
				<div class="row mr-0"> 
					<div class="f_box1">
						<div class="f_bxing">
						<?php 
							$fimg1 = get_theme_mod('fimg1');
							if(!empty($fimg1)){
								echo '<img alt="'. esc_html(get_the_title()) .'" src="'.esc_url($fimg1).'" class="img-responsive secondry-bg-img" />';
							}else{
								echo '<img src="'.get_template_directory_uri().'/images/logo.png" class="img-responsive" />';
							}
						?>	
						</div>
						<p><?php echo $f1txt;?></p>
						<?php if($facebook || $instagram || $linkedin || $twitter ){ ?>
						<div class="h_social">							
							<ul>
							<?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 }?>
									
							<?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($linkedin)){ ?>
								<li><a href="<?php echo $linkedin ?>" title="Linkedin" class="site-button sharp" target="_blank"><i class="fa fa-linkedin"></i></a></li>
							<?php }?>

							<?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 }?>
						 	</ul>						
						</div>
						<?php }?>
						<div class="clearfix"></div>
					</div>
					<div class="f_box2"> 		
						<div class="row mr-0"> 				
							<div class="s-footer single-footer-1 ">
								<div class="single-footer " data-wow-duration="1s">	
									<?php if(is_active_sidebar('luzuk-footer1')): 
											dynamic_sidebar('luzuk-footer1');
										endif;
									?>	
								</div>
							</div> 
								
							<div class="s-footer single-footer-2">
								<div class="single-footer " data-wow-duration="1.5s" >
									<?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 "  data-wow-duration="1.4s" >
									<?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 " data-wow-duration="1.8s" >
									</?php if(is_active_sidebar('luzuk-footer4')): 
										dynamic_sidebar('luzuk-footer4');
									endif;
									?>	
								</div>
							</div> -->
						</div> 
						<?php if( $footercopyright  ){ ?>
						<div class="bottom-area " >
							<div class="footer-text">
								<?php if($footercopyright){ ?>
										<?php echo $footercopyright;?>
								<?php } ?>
							</div>
						</div>
						<?php } ?>
					</div>
				</div>

				
			</div>
			<div class="clearfix"></div>
		<!-- </div> -->
	<?php } ?>
</footer>

<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> -->
	<div id="back2Top" title="Back to top" >
		<span class="circle">
		    <i class="fa fa-bolt" aria-hidden="true"></i>
		  </span>
  		<span class="movepulse"></span>
	</div>

</body>
</html>
