<?php
/**
* The header for GridRead theme.
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package GridRead 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="gridread-body-wrapper" itemscope="itemscope" itemtype="http://schema.org/WebPage">
<?php wp_body_open(); ?>
<a class="skip-link screen-reader-text" href="#gridread-content-wrapper"><?php esc_html_e( 'Skip to content', 'gridread' ); ?></a>

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

<?php gridread_header_image(); ?>

<?php gridread_before_header(); ?>

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

<?php if ( gridread_is_header_content_active() ) { ?>
<div class="gridread-header-inside gridread-clearfix">
<div class="gridread-header-inside-content gridread-clearfix">
<div class="gridread-boxview-wrapper">
<div class="gridread-header-inside-container">

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

<?php if ( is_active_sidebar( 'gridread-header-widgets' ) ) : ?>
<div class="gridread-header-right">
<?php dynamic_sidebar( 'gridread-header-widgets' ); ?>
</div>
<?php endif; ?>

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

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

<?php gridread_after_header(); ?>

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

<?php gridread_slider_area(); ?>

<?php gridread_top_wide_widgets(); ?>

<div class="gridread-boxview-wrapper" id="gridread-wrapper-outside">

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