<?php
/**
 * The template part for Top Header
 *
 * @package VW Business Consulting
 * @subpackage vw-business-consulting
 * @since vw-business-consulting 1.0
 */
?>
<!-- Top Header -->
<div class="topbar  <?php if( get_theme_mod( 'vw_business_consulting_sticky_header', false) == 1 || get_theme_mod( 'vw_business_consulting_stickyheader_hide_show', false) == 1) { ?> header-sticky"<?php } else { ?>close-sticky <?php } ?>">
  <div class="container">
    <div class="topbar-sec">
      <div class="row">
        <div class="col-xl-2 col-lg-2 col-md-3 align-self-center text-lg-start text-md-start text-center mb-3 mb-lg-0 mb-md-0">
          <div class="logo">
            <?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('vw_business_consulting_logo_title_hide_show',true) == 1){ ?>
                        <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
                      <?php } ?>
                    <?php else : ?>
                      <?php if( get_theme_mod('vw_business_consulting_logo_title_hide_show',true) == 1){ ?>
                        <p class="site-title"><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('vw_business_consulting_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-xl-7 col-lg-6 col-md-3 col-3 align-self-center text-lg-start text-md-start text-center">
          <div class="menu-section">
            <?php get_template_part('template-parts/header/navigation'); ?>
          </div>
        </div>
        <div class="col-xl-2 col-lg-3 col-md-4 col-6 align-self-center text-lg-end text-md-center text-center">
          <?php if(get_theme_mod('vw_business_consulting_phone_number') != '' || get_theme_mod('vw_business_consulting_phone_text') != '' ){ ?>
            <span class="phone-number me-3 me-md-0 md-lg-0 align-self-center">
              <div class="row">
                <div class="col-xl-3 col-lg-3 col-md-3 col-12 align-self-center ">
                  <i class="<?php echo esc_attr(get_theme_mod('vw_business_consulting_phone_no_icon','fas fa-phone')); ?> me-2"></i>
                </div>
                <div class="col-xl-9 col-lg-9 col-md-9 col-12 align-self-center text-lg-start text-md-start "> 
                  <p><?php echo esc_html(get_theme_mod('vw_business_consulting_phone_text','Hot Line:'));?></p>
                  <a href="tel:<?php echo esc_attr( get_theme_mod('vw_business_consulting_phone_number','') ); ?>">
                    <?php echo esc_html(get_theme_mod('vw_business_consulting_phone_number',''));?>
                  </a>
                </div>
              </div>
            </span>
          <?php }?>                                                                               
        </div>
        <div class="col-xl-1 col-lg-1 col-md-2 col-3 align-self-center text-lg-start text-md-start text-center toggle-btn">
          <a href="#" id="sidebar-pop"><i class="<?php echo esc_attr(get_theme_mod('vw_business_consulting_baropen_icon','fas fa-bars')); ?>"></i></a>
        </div>
        <div class="header-sidebar">
          <div class="close-pop"><a href="#maincontent"><i class="<?php echo esc_attr(get_theme_mod('vw_business_consulting_barclose_icon','fas fa-window-close')); ?>"></i></a>
          </div>
          <div class="menu-drawer">
            <div class="logo">
              <?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('vw_business_consulting_logo_title_hide_show',true) == 1){ ?>
                          <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
                        <?php } ?>
                      <?php else : ?>
                        <?php if( get_theme_mod('vw_business_consulting_logo_title_hide_show',true) == 1){ ?>
                          <p class="site-title"><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('vw_business_consulting_tagline_hide_show',false) == 1){ ?>
                      <p class="site-description mb-0">
                        <?php echo esc_html($description); ?>
                      </p>
                    <?php } ?>
                <?php endif; ?>
            </div>
            <?php if(get_theme_mod('vw_business_consulting_openclose_text') != '') {?>
              <p class="mt-3"><?php echo esc_html(get_theme_mod('vw_business_consulting_openclose_text')) ?></p>
            <?php }?>
            <div class="row info-ctr">
              <?php if( get_theme_mod( 'vw_business_consulting_phone_text') != '' || get_theme_mod( 'vw_business_consulting_phone_number') != '') { ?>
                  <div class="col-xl-2 col-lg-2 col-md-3 col-12 icon-ctr align-self-center ">
                    <div class="phone">
                      <i class="<?php echo esc_attr(get_theme_mod('vw_business_consulting_phone_no_icon','fas fa-phone')); ?>"></i>
                    </div>
                  </div>
                  <div class="col-xl-10 col-lg-10 col-md-9 col-12 align-self-center text-lg-start text-md-start text-center">
                    <h6><?php echo esc_html(get_theme_mod('vw_business_consulting_phone_text','Hot Line'));?></h6>
                    <p><a href="tel:<?php echo esc_attr( get_theme_mod('vw_business_consulting_phone_number','') ); ?>"><?php echo esc_html(get_theme_mod('vw_business_consulting_phone_number',''));?></a></p>
                  </div>
                <?php }?>
            </div>
            <div class="row info-ctr">
              <?php if( get_theme_mod( 'vw_business_consulting_email_text') != '' || get_theme_mod( 'vw_business_consulting_email_address') != '') { ?>
                    <div class="col-xl-2 col-lg-2 col-md-3 col-12 icon-ctr align-self-center">
                      <div class="envelope">
                        <i class="<?php echo esc_attr(get_theme_mod('vw_business_consulting_email_address_icon','fas fa-envelope-open')); ?>"></i>
                      </div>
                    </div>
                    <div class="col-xl-10 col-lg-10 col-md-9 col-12 align-self-center text-lg-start text-md-start text-center">
                      <h6><?php echo esc_html(get_theme_mod('vw_business_consulting_email_text',''));?></h6>
                      <p><a href="mailto:<?php echo esc_attr(get_theme_mod('vw_business_consulting_email_address',''));?>"><?php echo esc_html(get_theme_mod('vw_business_consulting_email_address',''));?><span class="screen-reader-text"><?php esc_html_e( 'example@gmail.com','vw-business-consulting' );?></span></a></p>
                    </div>
                <?php }?>
            </div>
            <div class="topbar-social-icon mt-2 mt-lg-0 mt-md-0">
              <?php dynamic_sidebar('social-widget'); ?>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

