<?php
/**
* The template for displaying the footer
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package GridMini 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><!--/#gridmini-content-wrapper -->
</div><!--/#gridmini-wrapper -->

<?php gridmini_bottom_wide_widgets(); ?>

<?php if ( 'before-footer' === gridmini_secondary_menu_location() ) { ?><?php gridmini_secondary_menu_area(); ?><?php } ?>

<?php gridmini_before_footer(); ?>

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

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

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

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

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

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

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

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

</div>
<?php endif; ?>

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

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

<?php if ( 'after-footer' === gridmini_secondary_menu_location() ) { ?><?php gridmini_secondary_menu_area(); ?><?php } ?>

<?php gridmini_after_footer(); ?>

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

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

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

</div>

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

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

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