<?php
/**
 * The template for displaying the footer.
 * @package Transport Movers
 */
?>
<?php if( get_theme_mod( 'transport_movers_hide_show_scroll',true) != '' || get_theme_mod( 'transport_movers_display_scrolltop', true) != '') { ?>
    <?php $transport_movers_theme_lay = get_theme_mod( 'transport_movers_footer_options','Right');
        if($transport_movers_theme_lay == 'Left align'){ ?>
            <a href="#" id="scrollbutton" class="left"><i class="<?php echo esc_attr(get_theme_mod('transport_movers_back_to_top_icon','fas fa-long-arrow-alt-up')); ?>"></i><span class="screen-reader-text"><?php esc_html_e( 'Back to Top', 'transport-movers' ); ?></span></a>
        <?php }else if($transport_movers_theme_lay == 'Center align'){ ?>
            <a href="#" id="scrollbutton" class="center"><i class="<?php echo esc_attr(get_theme_mod('transport_movers_back_to_top_icon','fas fa-long-arrow-alt-up')); ?>"></i><span class="screen-reader-text"><?php esc_html_e( 'Back to Top', 'transport-movers' ); ?></span></a>
        <?php }else{ ?>
            <a href="#" id="scrollbutton"><i class="<?php echo esc_attr(get_theme_mod('transport_movers_back_to_top_icon','fas fa-long-arrow-alt-up')); ?>"></i><span class="screen-reader-text"><?php esc_html_e( 'Back to Top', 'transport-movers' ); ?></span></a>
    <?php }?>
<?php }?>
<footer role="contentinfo">
    <?php if (get_theme_mod('transport_movers_show_hide_footer', true)){ ?>

    <?php //Set widget areas classes based on user choice
        $transport_movers_widget_areas = get_theme_mod('transport_movers_footer_widget_areas', '4');
        if ($transport_movers_widget_areas == '3') {
            $transport_movers_cols = 'col-lg-4 col-md-6 col-sm-12';
        } elseif ($transport_movers_widget_areas == '4') {
            $transport_movers_cols = 'col-lg-3 col-md-6 col-sm-12';
        } elseif ($transport_movers_widget_areas == '2') {
            $transport_movers_cols = 'col-md-6 col-sm-12';
        } else {
            $transport_movers_cols = 'col-md-12 col-sm-12';
        }
    ?>
    
    <aside id="sidebar-footer" class="footer-wp" role="complementary">
        <div class="container">
            <div class="row">

                <div class="<?php echo esc_attr($transport_movers_cols); ?> footer-block wow zoomIn">
                    <?php if (is_active_sidebar('footer-1')) : ?>
                        <?php dynamic_sidebar('footer-1'); ?>
                    <?php else : ?>
                        <aside id="search" class="widget py-3" role="complementary" aria-label="<?php esc_attr_e('footer1', 'transport-movers'); ?>">
                            <h3 class="widget-title"><?php esc_html_e( 'Search', 'transport-movers' ); ?></h3>
                            <?php get_search_form(); ?>
                        </aside>
                    <?php endif; ?>
                </div>

                <div class="<?php echo esc_attr($transport_movers_cols); ?> footer-block wow zoomIn">
                    <?php if (is_active_sidebar('footer-2')) : ?>
                        <?php dynamic_sidebar('footer-2'); ?>
                    <?php else : ?>
                        <aside id="archives" class="widget py-3" role="complementary" aria-label="<?php esc_attr_e('footer2', 'transport-movers'); ?>">
                            <h3 class="widget-title"><?php esc_html_e( 'Archives', 'transport-movers' ); ?></h3>
                            <ul>
                                <?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
                            </ul>
                        </aside>
                    <?php endif; ?>
                </div>

                <div class="<?php echo esc_attr($transport_movers_cols); ?> footer-block wow zoomIn">
                    <?php if (is_active_sidebar('footer-3')) : ?>
                        <?php dynamic_sidebar('footer-3'); ?>
                    <?php else : ?>
                        <aside id="meta" class="widget py-3" role="complementary" aria-label="<?php esc_attr_e('footer3', 'transport-movers'); ?>">
                            <h3 class="widget-title"><?php esc_html_e( 'Meta', 'transport-movers' ); ?></h3>
                            <ul>
                                <?php wp_register(); ?>
                                <li><?php wp_loginout(); ?></li>
                                <?php wp_meta(); ?>
                            </ul>
                        </aside>
                    <?php endif; ?>
                </div>

                <div class="<?php echo esc_attr($transport_movers_cols); ?> footer-block wow zoomIn">
                    <?php if (is_active_sidebar('footer-4')) : ?>
                        <?php dynamic_sidebar('footer-4'); ?>
                    <?php else : ?>
                        <aside id="categories" class="widget py-3" role="complementary" aria-label="<?php esc_attr_e('footer4', 'transport-movers'); ?>">
                            <h3 class="widget-title"><?php esc_html_e( 'Categories', 'transport-movers' ); ?></h3>
                            <ul>
                                <?php wp_list_categories('title_li=');  ?>
                            </ul>
                        </aside>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </aside>

    <?php }?>
     <?php if ( get_theme_mod( 'transport_movers_show_hide_footer_copyright', true ) ) : ?>
    <div class="<?php echo esc_attr(get_theme_mod( 'transport_movers_sticky_copyright' )? 'sticky-copyright': 'close-sticky'); ?>">
	<div class="copyright-wrapper">
        <div class="container">
            <p><?php transport_movers_credit(); ?> <?php echo esc_html(get_theme_mod('transport_movers_footer_copy',__('By Buywptemplate','transport-movers'))); ?></p>
            <?php if (get_theme_mod('transport_movers_show_footer_icons', true)){ ?> 
            <div class="socialicons mt-2">
                <?php if ( get_theme_mod('transport_movers_footer_facebook','') != "" ) {?>
                    <a target="_blank" href="<?php echo esc_attr( get_theme_mod('transport_movers_footer_facebook','' )); ?>"><i class="<?php echo esc_attr(get_theme_mod('transport_movers_footer_facebook_icon','fab fa-facebook-f')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Facebook', 'transport-movers'); ?></span></a>
                <?php }?>
                <?php if ( get_theme_mod('transport_movers_footer_twitter','') != "" ) {?>
                    <a target="_blank" href="<?php echo esc_attr( get_theme_mod('transport_movers_footer_twitter','' )); ?>"><i class="<?php echo esc_attr(get_theme_mod('transport_movers_footer_twitter_icon','fab fa-twitter')); ?>" aria-hidden="true"></i><span class="screen-reader-text"><?php echo esc_html('Twitter', 'transport-movers'); ?></span></a>
                <?php }?>
                <?php if ( get_theme_mod('transport_movers_footer_linkdin','') != "" ) {?>
                    <a target="_blank" href="<?php echo esc_attr( get_theme_mod('transport_movers_footer_linkdin','' )); ?>"><i class="<?php echo esc_attr(get_theme_mod('transport_movers_footer_linkedin_icon','fab fa-linkedin-in')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Linkdin', 'transport-movers'); ?></span></a>
                <?php }?>   
                <?php if ( get_theme_mod('transport_movers_footer_pinterest','') != "" ) {?>
                    <a target="_blank" href="<?php echo esc_attr( get_theme_mod('transport_movers_footer_pinterest','' )); ?>"><i class="<?php echo esc_attr(get_theme_mod('transport_movers_footer_pinterest_icon','fab fa-pinterest-p')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Instagram', 'transport-movers'); ?></span></a>
                <?php }?>   
                <?php if ( get_theme_mod('transport_movers_footer_instagram','') != "" ) {?>
                    <a target="_blank" href="<?php echo esc_attr( get_theme_mod('transport_movers_footer_instagram','' )); ?>"><i class="<?php echo esc_attr(get_theme_mod('transport_movers_footer_instagram_icon','fab fa-instagram')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Pintrest', 'transport-movers'); ?></span></a>
                <?php }?>  
                <?php if ( get_theme_mod('transport_movers_footer_youtube','') != "" ) {?>
                    <a target="_blank" href="<?php echo esc_attr( get_theme_mod('transport_movers_footer_youtube','' )); ?>"><i class="<?php echo esc_attr(get_theme_mod('transport_movers_footer_youtube_icon','fab fa-youtube')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Youtube', 'transport-movers'); ?></span></a>
                <?php }?>                
            </div>   
            <?php }?>
        </div>
        <div class="clear"></div>
    </div>
    <?php endif;
    ?>
</footer>
<?php if(get_theme_mod('transport_movers_progress_bar', false )== true): ?>
    <div id="transport_movers_elemento_progress_bar" class="top"></div>
<?php endif; ?>   
<?php wp_footer(); ?>
</body>
</html>