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

?><!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="gridfeel-site-body" itemscope="itemscope" itemtype="http://schema.org/WebPage">
<?php wp_body_open(); ?>
<a class="skip-link screen-reader-text" href="#gridfeel-posts-wrapper"><?php esc_html_e( 'Skip to content', 'gridfeel' ); ?></a>

<div class="gridfeel-site-wrapper">

<?php gridfeel_header_image(); ?>

<?php gridfeel_secondary_menu_area(); ?>

<?php gridfeel_before_header(); ?>

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

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

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

<div class="gridfeel-header-banner">
<?php dynamic_sidebar( 'gridfeel-header-ad' ); ?>
</div>

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

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

<?php gridfeel_after_header(); ?>

<?php gridfeel_primary_menu_area(); ?>

<div class="gridfeel-outer-wrapper" id="gridfeel-wrapper-outside">
<div class="gridfeel-container gridfeel-clearfix" id="gridfeel-wrapper">

<?php gridfeel_top_wide_widgets(); ?>

<div class="gridfeel-content-wrapper gridfeel-clearfix" id="gridfeel-content-wrapper">