<?php
/**
 * The template for displaying the footer.
 *
 * Contains the closing of the #content div and all content after
 *
 * @package Landscape Architecture
 */
?>
<div style="background-color: #efebe5;">
<div id="footer">
  <?php 
    $landscape_architecture_footer_widget_enabled = get_theme_mod('landscape_architecture_footer_widget', true);
    
    if ($landscape_architecture_footer_widget_enabled !== false && $landscape_architecture_footer_widget_enabled !== '') { ?>

    <?php 
        $landscape_architecture_widget_areas = get_theme_mod('landscape_architecture_footer_widget_areas', '4');
        if ($landscape_architecture_widget_areas == '3') {
            $landscape_architecture_cols = 'col-lg-4 col-md-6';
        } elseif ($landscape_architecture_widget_areas == '4') {
            $landscape_architecture_cols = 'col-lg-3 col-md-6';
        } elseif ($landscape_architecture_widget_areas == '2') {
            $landscape_architecture_cols = 'col-lg-6 col-md-6';
        } else {
            $landscape_architecture_cols = 'col-lg-12 col-md-12';
        }
    ?>

    <div class="footer-widget">
        <div class="container">
          <div class="row wow bounceInUp delay-3000" data-wow-duration="2s">
            <!-- Footer 1 -->
            <div class="<?php echo esc_attr($landscape_architecture_cols); ?> footer-block">
                <?php if (is_active_sidebar('footer-1')) : ?>
                    <?php dynamic_sidebar('footer-1'); ?>
                <?php else : ?>
                    <aside id="categories" class="widget pb-3" role="complementary" aria-label="<?php esc_attr_e('footer1', 'landscape-architecture'); ?>">
                        <h3 class="widget-title"><?php esc_html_e('Categories', 'landscape-architecture'); ?></h3>
                        <ul>
                            <?php wp_list_categories('title_li='); ?>
                        </ul>
                    </aside>
                <?php endif; ?>
            </div>

            <!-- Footer 2 -->
            <div class="<?php echo esc_attr($landscape_architecture_cols); ?> footer-block">
                <?php if (is_active_sidebar('footer-2')) : ?>
                    <?php dynamic_sidebar('footer-2'); ?>
                <?php else : ?>
                    <aside id="archives" class="widget pb-3" role="complementary" aria-label="<?php esc_attr_e('footer2', 'landscape-architecture'); ?>">
                        <h3 class="widget-title"><?php esc_html_e('Archives', 'landscape-architecture'); ?></h3>
                        <ul>
                            <?php wp_get_archives(array('type' => 'monthly')); ?>
                        </ul>
                    </aside>
                <?php endif; ?>
            </div>

            <!-- Footer 3 -->
            <div class="<?php echo esc_attr($landscape_architecture_cols); ?> footer-block">
                <?php if (is_active_sidebar('footer-3')) : ?>
                    <?php dynamic_sidebar('footer-3'); ?>
                <?php else : ?>
                    <aside id="meta" class="widget pb-3" role="complementary" aria-label="<?php esc_attr_e('footer3', 'landscape-architecture'); ?>">
                        <h3 class="widget-title"><?php esc_html_e('Meta', 'landscape-architecture'); ?></h3>
                        <ul>
                            <?php wp_register(); ?>
                            <li><?php wp_loginout(); ?></li>
                            <?php wp_meta(); ?>
                        </ul>
                    </aside>
                <?php endif; ?>
            </div>

            <!-- Footer 4 -->
            <div class="<?php echo esc_attr($landscape_architecture_cols); ?> footer-block">
                <?php if (is_active_sidebar('footer-4')) : ?>
                    <?php dynamic_sidebar('footer-4'); ?>
                <?php else : ?>
                    <aside id="search-widget" class="widget pb-3" role="complementary" aria-label="<?php esc_attr_e('footer4', 'landscape-architecture'); ?>">
                        <h3 class="widget-title"><?php esc_html_e('Search', 'landscape-architecture'); ?></h3>
                        <?php the_widget('WP_Widget_Search'); ?>
                    </aside>
                <?php endif; ?>
            </div>
          </div>
        </div>
    </div>

    <?php } ?>
    <div class="clear"></div>
  <div class="copywrap text-center">
    <?php $landscape_architecture_social_links_present = get_theme_mod('landscape_architecture_footer_facebook_link') || get_theme_mod('landscape_architecture_footer_twitter_link') || get_theme_mod('landscape_architecture_footer_linked_link') || get_theme_mod('landscape_architecture_footer_rss_link') || get_theme_mod('landscape_architecture_footer_youtube_link'); ?>
    <div class="container copywrap-info <?php echo $landscape_architecture_social_links_present ? '' : 'center-content'; ?>">
      <p>
        <a href="<?php 
          $landscape_architecture_copyright_link = get_theme_mod('landscape_architecture_copyright_link', '');
          if (empty($landscape_architecture_copyright_link)) {
              echo esc_url('https://www.theclassictemplates.com/products/free-architecture-wordpress-theme');
          } else {
              echo esc_url($landscape_architecture_copyright_link);
          } ?>" target="_blank">
          <?php echo esc_html(get_theme_mod('landscape_architecture_copyright_line', __('Landscape Architecture WordPress Theme', 'landscape-architecture'))); ?>
        </a> 
        <?php echo esc_html('By Classic Templates', 'landscape-architecture'); ?>
      </p>
      <?php if ( $landscape_architecture_social_links_present ) { ?>
        <div class="footer-social d-flex gap-3">
            <?php if ( get_theme_mod('landscape_architecture_footer_facebook_link') ) { ?>
                <a title="<?php echo esc_attr('facebook', 'landscape-architecture'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('landscape_architecture_footer_facebook_link')); ?>"><i class="fab fa-facebook-f"></i></a> 
            <?php } ?>
            <?php if ( get_theme_mod('landscape_architecture_footer_twitter_link') ) { ?> 
                <a title="<?php echo esc_attr('instagram', 'landscape-architecture'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('landscape_architecture_footer_twitter_link')); ?>"><i class="fab fa-twitter"></i></a>
            <?php } ?>
            <?php if ( get_theme_mod('landscape_architecture_footer_linked_link') ) { ?>
                <a title="<?php echo esc_attr('linkedin', 'landscape-architecture'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('landscape_architecture_footer_linked_link')); ?>"><i class="fab fa-linkedin-in"></i></a>
            <?php } ?>
            <?php if ( get_theme_mod('landscape_architecture_footer_rss_link') ) { ?> 
                <a title="<?php echo esc_attr('rss', 'landscape-architecture'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('landscape_architecture_footer_rss_link')); ?>"><i class="fas fa-rss"></i></a>
            <?php } ?>
            <?php if ( get_theme_mod('landscape_architecture_footer_youtube_link') ) { ?>
                <a title="<?php echo esc_attr('youtube', 'landscape-architecture'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('landscape_architecture_footer_youtube_link')); ?>"><i class="fab fa-youtube"></i></a>
            <?php } ?>
        </div>
      <?php } ?>
    </div>
  </div>
</div>
</div>

<?php if(get_theme_mod('landscape_architecture_scroll_hide',true)){ ?>
    <a id="button"><?php echo esc_html( get_theme_mod('landscape_architecture_scroll_text',__('TOP', 'landscape-architecture' )) ); ?></a>
<?php } ?>
  
<?php wp_footer(); ?>
</body>
</html>
