<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width">
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta name="format-detection" content="telephone=no">

    <?php wp_head(); ?> 

</head>

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

  <?php if( get_theme_mod( 'enable_loader',0) ){?>    
  <div id="loader-wrapper">
      <div id="loader"></div>
      <div class="loader-section section-left"></div>
      <div class="loader-section section-right"></div>
  </div>
  <?php }?>    

  <header id="header" class="site-header">
  
  <?php
  	if (  get_theme_mod( 'enable-topbar-check', true ) && texas_check_kirki() )
	{
  ?>
    <!--==============topbar html==================-->
    <div class="topbar">
      <div class="topbar-container">
        <div class="topbar-info">
        <?php if ( get_theme_mod( 'ct_phone_number', esc_attr__( '0-12345678', 'texas' ) ) != '' ) {   ?>
          <div class="topbar-phone">
            <div class="fa-icon"><i class="fa fa-phone" aria-hidden="true"></i></div>
            <span class="phone"><?php  echo esc_html(get_theme_mod( 'ct_phone_number', __( '0-12345678', 'texas' ) )); ?></span>
          </div>
        <?php  }   ?>
        
        <?php if ( get_theme_mod( 'ct_email', get_bloginfo( 'admin_email') ) != '' ) {   ?>        
          <div class="topbar-email" >
            <div class="fa-icon"><i class="fa fa-envelope-o" aria-hidden="true"></i></div>
            <span class="email-address"><?php echo esc_html(get_theme_mod( 'ct_email', get_bloginfo( 'admin_email') ));?></span>
          </div>
        <?php  }   ?>          

        </div><!--div class="topbar-info"-->
        
        <?php if ( get_theme_mod( 'texas_socials', 1 ) == 1 ) : ?>
        <div class="topbar-social-link">
          <?php texas_social_links();  ?> 
        </div><!--div class="topbar-social-link"-->
        <?php endif; ?>
      </div><!--div class="topbar-container"-->
    </div><!--div class="topbar"-->
    <!--==============topbar html end==================--> 
  <?php }?>     
 
 
 	<!--==============nav html==================-->
	<nav id="site-nav" class="main-nav" role="navigation">
	  <div class="nav-container">
        <div class="logo-container">
			<?php 
                if ( has_custom_logo() )
                {
            ?>
                <a href="<?php echo esc_url(home_url('/')); ?>"  title="<?php esc_attr_e('Logo', 'texas'); ?>">
                    <?php the_custom_logo();?>
                </a>
            <?php
                }else{
            ?> 
            
            <div class="logo-text">
                <h1><a href="<?php echo esc_url(home_url('/')); ?>"><span class="blogname"><?php bloginfo('name'); ?></span></a></h1>
                <a href="<?php echo esc_url(home_url('/')); ?>"><span class="blogdescription"><?php bloginfo('description'); ?></span></a>
            </div>
            <?php }?>   

        </div>
        
        <div class="mobile-nav-ico"><i class="fa fa-2x fa-bars" aria-hidden="true"></i></div>
        <?php 
			if ( get_theme_mod( 'enable_section_header_search', 1 )   ){ 
		?>         
        
 		<div class="search-wrap">
          <div id="search-toggle" class="search-nav">
            <a href="javascript:void(0)" class="search-icon"><i class="fa fa-search"></i><i class="fa fa-times" aria-hidden="true"></i></a>
            <div class="search-main">
            <?php  
				get_search_form();
			?>  
            </div>
          </div>
        </div><!--div class="search-wrap"-->         
        <?php 
			} 
		?>        

        <div class="nav-wrap">
          <div class="menu-wrapper">

            <ul id="primary-menu" class="menu">
            <?php
				wp_nav_menu(array( 'container' => false,'items_wrap' => '%3$s' ,'theme_location' => 'header-menu', 'fallback_cb' => 'default_menu',));
				if( is_page_template( 'template-home.php' ) && get_theme_mod( 'enable_section_header_menu', 0 ) ){  texas_get_section_menu(); }
            ?>

            </ul>            

          </div><!--div class="menu-wrapper"-->
        </div><!--div class="nav-wrap"-->
 
        <div class="mobile-nav-wrap">
          <div class="menu-wrapper">
            <ul id="primary-menu" class="menu">

			<?php
				//====pro==== 
                wp_nav_menu(array( 'theme_location' => 'header-menu','container' => false,'items_wrap' => '%3$s', 'fallback_cb' => 'default_menu'));
				
				if( is_page_template( 'template-home.php' ) && get_theme_mod( 'enable_section_header_menu', 0 )){ texas_get_section_menu(); }
            ?>

            </ul><!--ul id="primary-menu" class="menu"-->
            <!--div style="clear:both"></div-->
          </div><!--div class="menu-wrapper"-->
        </div><!--div class="nav-wrap"-->

      </div><!--div class="nav-container"-->
    </nav> 
 	<!--==============nav html end==================--> 
  </header>