<?php
/**
 * The header for our theme
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Glowify WP
 */
?>

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

    <?php
    $enable_image_logo = glowify_wp_option('enable_image_logo');
    $image_logo = glowify_wp_option('image_logo');
    $image_logo_max_height = glowify_wp_option('image_logo_max_height');
    $text_logo = glowify_wp_option('text_logo');

    wp_head(); 
    ?>
</head>

<body <?php body_class(); ?>>

<?php wp_body_open(); ?>


<div id="page" class="site">
    

     <!-- Start Header Section -->
     <header class="cs_site_header cs_style_1 cs_primary_color cs_sticky_header cs_default_header cs_white_bg">
   
      <div class="cs_bottom_header">
        <div class="container">
          <div class="cs_bottom_header_in">
            <div class="cs_bottom_header_left">
            
                <div class="cs_main_header_left">

                    <?php if($enable_image_logo == true && !empty($image_logo['id'])) : $image_logo_src = wp_get_attachment_image_src($image_logo['id'], 'large', false); ?>
                        <div class="logo">
                            <div class="img-logo">
                                <a class="cs_site_branding" href="<?php echo esc_url(home_url('/')); ?>"><img style="max-height:<?php echo esc_attr($image_logo_max_height); ?>px" src="<?php echo esc_url($image_logo_src[0]); ?>" alt="<?php echo bloginfo('name'); ?>"></a>
                            </div>
                        </div>
                    <?php else : ?>
                        <div class="text-logo">
                            <a class="cs_site_branding" href="<?php echo esc_url(home_url('/')); ?>"><?php if (!empty($text_logo)) {
                                    echo esc_html($text_logo);
                                } else {
                                    bloginfo('name');
                                } ?></a>
                        </div>
                    <?php endif; ?>
                </div>

              <div class="cs_nav_wrap">
                <div class="cs_site_branding_wrap cs_mobile_show">
                    <?php if($enable_image_logo == true && !empty($image_logo['id'])) : $image_logo_src = wp_get_attachment_image_src($image_logo['id'], 'large', false); ?>
                          <a class="cs_site_branding" href="<?php echo esc_url(home_url('/')); ?>"><img style="max-height:<?php echo esc_attr($image_logo_max_height); ?>px" src="<?php echo esc_url($image_logo_src[0]); ?>" alt="<?php echo bloginfo('name'); ?>"></a>
                    <?php else : ?>
                        <a class="cs_site_branding" href="<?php echo esc_url(home_url('/')); ?>"><?php if (!empty($text_logo)) {
                            echo esc_html($text_logo);
                        } else {
                            bloginfo('name');
                        } ?></a>
                    <?php endif; ?>       
                  <button class="cs_close_mobile_active">
                    <i class="fa-regular fa-circle-xmark"></i>
                  </button>
                </div>
                <div class="cs_nav_out">
                  <nav class="cs_nav cs_mobile_active">
                      <?php
                          wp_nav_menu(array(
                              'theme_location' => 'menu-1',
                              'menu_id' => 'primary-menu',
                              'menu_class' => 'nav cs_nav_list',
                              'fallback_cb' => '__return_false'
                          ));
                      ?>
                  </nav>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="cs_header_overlay_mobile"></div>
    </header>


    <main>
