<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div class="container">
 *
 * @package Classic Artificial Intelligence
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>

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

<?php if ( function_exists( 'wp_body_open' ) ) {
    wp_body_open();
} else {
    do_action( 'wp_body_open' );
} ?>

<?php if ( get_theme_mod('classic_artificial_intelligence_preloader', false) ) { ?>
    <div id="preloader">
        <div id="status">&nbsp;</div>
    </div>
<?php } ?>

<a class="screen-reader-text skip-link" href="#content"><?php esc_html_e( 'Skip to content', 'classic-artificial-intelligence' ); ?></a>

<div id="pageholder" <?php if( get_theme_mod( 'classic_artificial_intelligence_box_layout', false) ) { echo 'class="boxlayout"'; } ?>>

  <div class="mainhead <?php echo ( get_theme_mod( 'classic_artificial_intelligence_sticky_header', false ) == 1 ) ? 'header-sticky' : 'close-sticky'; ?>">
      <div class="header py-3 px-md-0 px-3">
          <div class="container head-box ps-md-5">
              <div class="row">
                  <div class="col-lg-3 col-md-4 align-self-center px-md-0">
                      <div class="classic-artificial-intelligence-logo text-center text-md-start">
                          <?php classic_artificial_intelligence_the_custom_logo(); ?>
                          <div class="site-branding-text">
                              <?php if (get_theme_mod('classic_artificial_intelligence_title_enable', true)) { ?>
                                  <?php if (is_front_page() && is_home()) : ?>
                                      <h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a></h1>
                                  <?php else : ?>
                                      <p class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a></p>
                                  <?php endif; ?>
                              <?php } ?>
                              <?php $classic_artificial_intelligence_description = get_bloginfo('description', 'display');
                              if ($classic_artificial_intelligence_description || is_customize_preview()) : ?>
                                  <?php if (get_theme_mod('classic_artificial_intelligence_tagline_enable', false)) { ?>
                                      <span class="site-description"><?php echo esc_html($classic_artificial_intelligence_description); ?></span>
                                  <?php } ?>
                              <?php endif; ?>
                          </div>
                      </div>
                  </div>
                  <div class="col-lg-8 col-md-4 col-6 align-self-center">
                      <div class="toggle-nav text-center">
                          <?php if (has_nav_menu('primary')) { ?>
                              <button role="tab"><?php esc_html_e('Menu', 'classic-artificial-intelligence'); ?></button>
                          <?php } ?>
                      </div>
                      <div id="mySidenav" class="nav sidenav px-lg-5">
                          <nav id="site-navigation" class="main-nav" role="navigation" aria-label="<?php esc_attr_e('Top Menu', 'classic-artificial-intelligence'); ?>">
                              <ul class="mobile_nav">
                                  <?php wp_nav_menu(array(
                                      'theme_location' => 'primary',
                                      'container_class' => 'main-menu',
                                      'items_wrap' => '%3$s',
                                      'fallback_cb' => 'wp_page_menu',
                                  )); ?>
                              </ul>
                              <a href="javascript:void(0)" class="close-button"><?php esc_html_e('CLOSE', 'classic-artificial-intelligence'); ?></a>
                          </nav>
                      </div>
                  </div>
                  <div class="col-lg-1 col-md-4 col-6 align-self-center text-center text-lg-end my-md-0 my-3 product-icon px-0">
                      <span class="search-box text-center me-3">
                          <button type="button" class="search-open"><i class="fas fa-search"></i></button>
                      </span>
                  </div>
                  <div class="search-outer">
                      <div class="serach_inner w-100 h-100">
                          <?php get_search_form(); ?>
                      </div>
                      <button type="button" class="search-close"><span>X</span></button>
                  </div>
              </div>
          </div>
      </div>
  </div>
