<?php
/**
 * The template part for top header
 *
 * @package Architect Architecture
 * @subpackage architect-architecture
 * @since architect-architecture 1.0
 */
?>

<div class="main-header py-3 <?php if( get_theme_mod( 'architect_architecture_sticky_header', false) == 1 || get_theme_mod( 'architect_architecture_stickyheader_hide_show', false) == 1) { ?> header-sticky"<?php } else { ?>close-sticky <?php } ?>">
  <div class="container">
    <div class="row">
      <div class="col-lg-3 col-md-4 align-self-center">
        <div class="logo text-center text-md-start pb-3 pb-md-0">
          <?php if ( has_custom_logo() ) : ?>
            <div class="site-logo"><?php the_custom_logo(); ?></div>
          <?php endif; ?>
          <?php $blog_info = get_bloginfo( 'name' ); ?>
            <?php if ( ! empty( $blog_info ) ) : ?>
              <?php if ( is_front_page() && is_home() ) : ?>
                <?php if( get_theme_mod('architect_architecture_logo_title_hide_show',true) == 1){ ?>
                  <h1 class="site-title mb-0"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
                <?php } ?>
              <?php else : ?>
                <?php if( get_theme_mod('architect_architecture_logo_title_hide_show',true) == 1){ ?>
                  <p class="site-title mb-0"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                <?php } ?>
              <?php endif; ?>
            <?php endif; ?>
            <?php
              $description = get_bloginfo( 'description', 'display' );
              if ( $description || is_customize_preview() ) :
            ?>
            <?php if( get_theme_mod('architect_architecture_tagline_hide_show',false) == 1){ ?>
              <p class="site-description mb-0">
                <?php echo esc_html($description); ?>
              </p>
            <?php } ?>
          <?php endif; ?>
        </div>
      </div>
      <div class="col-lg-6 col-md-2 col-3 align-self-center">
        <?php get_template_part('template-parts/header/navigation'); ?>
      </div>
      <div class="col-lg-1 col-md-2 col-2 align-self-center">
        <?php if( get_theme_mod( 'architect_architecture_search_hide_show',true) == 1) { ?>
        <div class="search-box text-center">
          <span><a href="#"><i class="<?php echo esc_attr(get_theme_mod('architect_architecture_search_icon','fas fa-search')); ?>"></i></a></span>
        </div>
        <?php }?>
      </div>
      <div class="col-lg-2 col-md-4 col-7 align-self-center">
        <div class="topbar_btn text-center text-md-end py-3 py-md-0">
          <?php if( get_theme_mod('architect_architecture_topbar_btn_link') != '' || get_theme_mod('architect_architecture_topbar_btn_text') != '' ){ ?>
            <a href="<?php echo esc_url(get_theme_mod('architect_architecture_topbar_btn_link',''));?>"><?php echo esc_html(get_theme_mod('architect_architecture_topbar_btn_text',''));?><i class="<?php echo esc_attr(get_theme_mod('architect_architecture_topbar_icon_icon','fas fa-long-arrow-alt-right')); ?> ms-2"></i></a>
          <?php }?>
        </div>
      </div>
    </div>
    <div class="serach_outer">
      <div class="closepop"><a href="#maincontent"><i class="<?php echo esc_attr(get_theme_mod('architect_architecture_search_close_icon','fa fa-window-close')); ?>"></i></a></div>
      <div class="serach_inner">
        <?php get_search_form(); ?>
      </div>
    </div>
  </div>
</div>

