<?php
/**
* The template for displaying the footer
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package GridFeel WordPress Theme
* @copyright Copyright (C) 2025 ThemesDNA
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
* @author ThemesDNA <themesdna@gmail.com>
*/
?>

</div>

</div><!--/#gridfeel-content-wrapper -->
</div><!--/#gridfeel-wrapper -->

<?php gridfeel_bottom_wide_widgets(); ?>

<?php gridfeel_before_footer(); ?>

<?php if ( !(gridfeel_hide_footer_widgets()) ) { ?>
<?php if ( is_active_sidebar( 'gridfeel-footer-1' ) || is_active_sidebar( 'gridfeel-footer-2' ) || is_active_sidebar( 'gridfeel-footer-3' ) || is_active_sidebar( 'gridfeel-footer-4' ) || is_active_sidebar( 'gridfeel-top-footer' ) || is_active_sidebar( 'gridfeel-bottom-footer' ) ) : ?>
<div class='gridfeel-clearfix' id='gridfeel-footer-blocks' itemscope='itemscope' itemtype='http://schema.org/WPFooter' role='contentinfo'>
<div class='gridfeel-container gridfeel-clearfix'>
<div class="gridfeel-outer-wrapper">

<?php if ( is_active_sidebar( 'gridfeel-top-footer' ) ) : ?>
<div class='gridfeel-clearfix'>
<div class='gridfeel-top-footer-block'>
<?php dynamic_sidebar( 'gridfeel-top-footer' ); ?>
</div>
</div>
<?php endif; ?>

<?php if ( is_active_sidebar( 'gridfeel-footer-1' ) || is_active_sidebar( 'gridfeel-footer-2' ) || is_active_sidebar( 'gridfeel-footer-3' ) || is_active_sidebar( 'gridfeel-footer-4' ) ) : ?>
<div class='gridfeel-footer-block-cols gridfeel-clearfix'>

<div class="gridfeel-footer-block-col gridfeel-footer-4-col" id="gridfeel-footer-block-1">
<?php dynamic_sidebar( 'gridfeel-footer-1' ); ?>
</div>

<div class="gridfeel-footer-block-col gridfeel-footer-4-col" id="gridfeel-footer-block-2">
<?php dynamic_sidebar( 'gridfeel-footer-2' ); ?>
</div>

<div class="gridfeel-footer-block-col gridfeel-footer-4-col" id="gridfeel-footer-block-3">
<?php dynamic_sidebar( 'gridfeel-footer-3' ); ?>
</div>

<div class="gridfeel-footer-block-col gridfeel-footer-4-col" id="gridfeel-footer-block-4">
<?php dynamic_sidebar( 'gridfeel-footer-4' ); ?>
</div>

</div>
<?php endif; ?>

<?php if ( is_active_sidebar( 'gridfeel-bottom-footer' ) ) : ?>
<div class='gridfeel-clearfix'>
<div class='gridfeel-bottom-footer-block'>
<?php dynamic_sidebar( 'gridfeel-bottom-footer' ); ?>
</div>
</div>
<?php endif; ?>

</div>
</div>
</div><!--/#gridfeel-footer-blocks-->
<?php endif; ?>
<?php } ?>

<?php gridfeel_after_footer(); ?>

<div class='gridfeel-clearfix' id='gridfeel-copyright-area'>
<div class='gridfeel-copyright-area-inside gridfeel-container'>
<div class="gridfeel-outer-wrapper">

<div class='gridfeel-copyright-area-inside-content gridfeel-clearfix'>

<?php if ( gridfeel_get_option('footer_text') ) : ?>
  <p class='gridfeel-copyright'><?php echo wp_kses_post( force_balance_tags( gridfeel_get_option('footer_text') ) ); ?></p>
<?php else : ?>
  <p class='gridfeel-copyright'><?php /* translators: %s: Year and site name. */ printf( esc_html__( 'Copyright &copy; %s', 'gridfeel' ), esc_html(date_i18n(__('Y','gridfeel'))) . ' ' . esc_html(get_bloginfo( 'name' ))  ); ?></p>
<?php endif; ?>
<p class='gridfeel-credit'><a href="<?php echo esc_url( 'https://themesdna.com/' ); ?>"><?php /* translators: %s: Theme author. */ printf( esc_html__( 'Design by %s', 'gridfeel' ), 'ThemesDNA.com' ); ?></a></p>

</div>

</div>
</div>
</div><!--/#gridfeel-copyright-area -->

</div>

<?php if ( gridfeel_is_backtotop_active() ) { ?><button class="gridfeel-scroll-top" title="<?php esc_attr_e('Scroll to Top','gridfeel'); ?>"><i class="fas fa-arrow-up" aria-hidden="true"></i><span class="gridfeel-sr-only"><?php esc_html_e('Scroll to Top', 'gridfeel'); ?></span></button><?php } ?>

<?php wp_footer(); ?>
</body>
</html>