<?php
/**
 * The header for our theme.
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @package Consultco
 */
?>
<!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="http://gmpg.org/xfn/11">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
<link rel="pingback" href="<?php echo esc_url(get_bloginfo( 'pingback_url' )); ?>">
<?php endif; ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?> >
<?php wp_body_open(); ?>
<a class="skip-link screen-reader-text" href="#content">
<?php esc_html_e( 'Skip to content', 'consultco' ); ?></a>
<div class="wrapper">
 <header class="bs-headwidget default">
 <div class="header_widgets d-none d-lg-block">
       <div class="container"> 
    <?php do_action('icycp_top_header'); ?>
       </div>
  </div>
    <div class="clearfix"></div>
    <!-- Main Menu Area-->
          <div class="container mobi-menu"> 
           <!-- Logo image --> 
           <div class="navbar-header"> 
            <div class="navbar-header-logo">
          <?php the_custom_logo(); 
                     if (display_header_text()) : ?>
                        <div class="site-branding-text navbar-brand">
                          <?php if (is_front_page() || is_home()) { ?>
                            <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html(get_bloginfo( 'name' )); ?></a></h1>
                          <?php } else { ?>
                            <p class="site-title"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html(get_bloginfo( 'name' )); ?></a></p>
                          <?php } ?>
                          <p class="site-description"><?php echo esc_html(bloginfo('description')); ?></p>
                          </div>
                      <?php endif; ?>
            <!-- navbar-toggle --> 
            </div>
            <!-- /Logo -->
            <a class="top-cart ms-auto" href="#"><i class="fas fa-shopping-cart"></i></a>
              <div class="desk-header ms-auto position-relative align-items-center">
                <?php $hide_show_nav_menu_btn = get_theme_mod('hide_show_nav_menu_btn','1'); 
                $menu_btn_label = get_theme_mod('menu_btn_label');
                $menu_btn_link = get_theme_mod('menu_btn_link');
                $menu_btn_target = get_theme_mod('menu_btn_target','1');
                if($hide_show_nav_menu_btn == '1') { if($menu_btn_label) { ?>
                <a <?php if($menu_btn_target == '1') { ?> target ="_blank" <?php } ?> href="<?php echo esc_url($menu_btn_link); ?>" class="btn btn-0"><?php echo esc_html($menu_btn_label); ?></a>
              <?php } } ?>
            <button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target=".navbar-collapse">
              <span class="navbar-toggler-icon"><i class="fas fa-bars"></i></span>
            </button>
            </div>
          </div>
        </div>
  <?php $nav_menu_sticky = get_theme_mod('nav_menu_sticky','sticky'); ?>
        <div class="container desk-menu "> 
          <div class="bs-main-nav header-<?php echo $nav_menu_sticky;?>">
            <nav class="navbar navbar-expand-lg navbar-wp" >
          <!-- Logo image -->  
           <div class="navbar-header">
            <div class="navbar-header-logo"> 
            <?php the_custom_logo(); 
                  if (display_header_text()) : ?>
                    <div class="site-branding-text navbar-brand">
                    <?php if (is_front_page() || is_home()) { ?>
                      <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html(get_bloginfo( 'name' )); ?></a></h1>
                    <?php } else { ?>
                      <p class="site-title"> <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html(get_bloginfo( 'name' )); ?></a></p>
                    <?php } ?>
                      <p class="site-description"><?php echo esc_html(bloginfo('description')); ?></p>
                    </div>
            <?php endif; ?>
          </div>
          </div>
          <!-- /Logo -->
          <!-- /navbar-toggle --> 
          <!-- Navigation -->
           <div class="collapse navbar-collapse justify-content-center">
           <?php wp_nav_menu( array(
                'theme_location' => 'primary',
                'container'  => 'collapse navbar-collapse',
                'menu_class' => 'nav navbar-nav ml-auto',
                'fallback_cb' => 'consultco_fallback_page_menu',
                'walker' => new consultco_nav_walker()
              ) ); 
      ?>
          </div>
          <div class="desk-header pl-3 ms-auto my-2 my-lg-0 position-relative align-items-center">
            <?php if ( class_exists( 'woocommerce' ) ) { ?>
            <?php echo consultco_wc_cart_count(); ?>
            <?php } ?>
              <!-- Header Search --->
              <?php $header_search_enable = get_theme_mod('header_search_enable','1');
                  if($header_search_enable == '1') {
              ?>
               <div class="dropdown show mg-search-box">
    
                <a class="dropdown-toggle msearch" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown"
                  aria-haspopup="true" aria-expanded="false">
                  <i class="fa fa-search"></i>
                </a>
                    <div class="dropdown-menu searchinner" aria-labelledby="dropdownMenuLink">
                      <?php get_search_form(); ?>
                    </div>
              </div>
              <?php } ?>
                <?php $hide_show_nav_menu_btn = get_theme_mod('hide_show_nav_menu_btn','1'); 
                $menu_btn_label = get_theme_mod('menu_btn_label');
                $menu_btn_link = get_theme_mod('menu_btn_link');
                $menu_btn_target = get_theme_mod('menu_btn_target','1');
				if($hide_show_nav_menu_btn == '1') { if($menu_btn_label) { ?>
                <a <?php if($menu_btn_target == '1') { ?> target ="_blank" <?php } ?> href="<?php echo esc_url($menu_btn_link); ?>" class="btn btn-0 ml-2 mr-1 d-none d-md-block"><?php echo esc_html($menu_btn_label); ?></a>
            	<?php } } ?>
          </div>
        </div>
      </nav>
    </div>
    </div>
    </div>
    <!--/main Menu Area-->
  </header>