<?php
/**
* The header for GridMini theme.
*
* @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>
*/

?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php wp_head(); ?>
</head>

<body <?php body_class(); ?> id="gridmini-site-body" itemscope="itemscope" itemtype="http://schema.org/WebPage">
<?php wp_body_open(); ?>
<a class="skip-link screen-reader-text" href="#gridmini-posts-wrapper"><?php esc_html_e( 'Skip to content', 'gridmini' ); ?></a>

<?php gridmini_header_image(); ?>

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

<?php gridmini_before_header(); ?>

<div class="gridmini-site-header gridmini-container" id="gridmini-header" itemscope="itemscope" itemtype="http://schema.org/WPHeader" role="banner">
<div class="gridmini-head-content gridmini-clearfix" id="gridmini-head-content">

<?php if ( gridmini_is_header_content_active() ) { ?>
<div class="gridmini-header-inside gridmini-clearfix">
<div class="gridmini-header-inside-content gridmini-clearfix">
<div class="gridmini-outer-wrapper">
<div class="gridmini-header-inside-container">

<div class="gridmini-logo">
<?php if ( has_custom_logo() ) : ?>
    <div class="site-branding site-branding-full">
    <div class="gridmini-custom-logo-image">
    <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" class="gridmini-logo-img-link">
        <img src="<?php echo esc_url( gridmini_custom_logo() ); ?>" alt="" class="gridmini-logo-img"/>
    </a>
    </div>
    <div class="gridmini-custom-logo-info"><?php gridmini_site_title(); ?></div>
    </div>
<?php else: ?>
    <div class="site-branding">
      <?php gridmini_site_title(); ?>
    </div>
<?php endif; ?>
</div>

<?php if ( gridmini_is_primary_menu_active() ) { ?>
<div class="gridmini-header-menu">
<div class="gridmini-container gridmini-primary-menu-container gridmini-clearfix">
<div class="gridmini-primary-menu-container-inside gridmini-clearfix">
<nav class="gridmini-nav-primary" id="gridmini-primary-navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement" role="navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'gridmini' ); ?>">
<button class="gridmini-primary-responsive-menu-icon" aria-controls="gridmini-menu-primary-navigation" aria-expanded="false"><?php echo esc_html( gridmini_primary_menu_text() ); ?></button>
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'gridmini-menu-primary-navigation', 'menu_class' => 'gridmini-primary-nav-menu gridmini-menu-primary gridmini-clearfix', 'fallback_cb' => 'gridmini_fallback_menu', 'container' => '', ) ); ?>
</nav>
</div>
</div>
</div>
<?php } ?>

</div>
</div>
</div>
</div>
<?php } else { ?>
<div class="gridmini-no-header-content">
  <?php gridmini_site_title(); ?>
</div>
<?php } ?>

</div><!--/#gridmini-head-content -->
</div><!--/#gridmini-header -->

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

<?php gridmini_after_header(); ?>

<div id="gridmini-header-end"></div>

<?php gridmini_top_wide_widgets(); ?>

<div class="gridmini-outer-wrapper" id="gridmini-wrapper-outside">

<div class="gridmini-container gridmini-clearfix" id="gridmini-wrapper">
<div class="gridmini-content-wrapper gridmini-clearfix" id="gridmini-content-wrapper">