<?php
/**
 * The template part for Top Header
 *
 * @package VW Coaching Institute 
 * @subpackage vw-coaching-institute
 * @since vw-coaching-institute 1.0
 */
?>

<div class="main-header <?php if( get_theme_mod( 'vw_coaching_institute_sticky_header', false) == 1 || get_theme_mod( 'vw_coaching_institute_stickyheader_hide_show', false) == 1) { ?> header-sticky"<?php } else { ?>close-sticky <?php } ?>">
  <div class="container px-0">
    <div class="main-topbar ps-2">
      <div class="row">
        <div class="col-xxl-2 col-xl-2 col-lg-2 col-md-3 col-sm-12 col-12 align-self-center">
          <div class="logo text-center pb-0 pb-md-0">
            <?php if ( has_custom_logo() ) : ?>
              <div class="site-logo"><?php the_custom_logo(); ?></div>
            <?php endif; ?>
            <?php $vw_coaching_institute_blog_info = get_bloginfo( 'name' ); ?>
              <?php if ( ! empty( $vw_coaching_institute_blog_info ) ) : ?>
                <?php if ( is_front_page() && is_home() ) : ?>
                  <?php if( get_theme_mod('vw_coaching_institute_logo_title_hide_show',true) == 1){ ?>
                    <p class="site-title mb-0 text-center"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                  <?php } ?>
                <?php else : ?>
                  <?php if( get_theme_mod('vw_coaching_institute_logo_title_hide_show',true) == 1){ ?>
                    <p class="site-title mb-0 text-center"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                  <?php } ?>
                <?php endif; ?>
              <?php endif; ?>
              <?php
                $vw_coaching_institute_description = get_bloginfo( 'description', 'display' );
                if ( $vw_coaching_institute_description || is_customize_preview() ) :
              ?>
              <?php if( get_theme_mod('vw_coaching_institute_tagline_hide_show',false) == 1){ ?>
                <p class="site-description mb-0 text-center">
                  <?php echo esc_html($vw_coaching_institute_description); ?>
                </p>
              <?php } ?>
            <?php endif; ?>
          </div>
        </div>
        <div class="col-xxl-10 col-xl-10 col-lg-10 col-md-9 col-sm-12 col-12">
          <?php if (get_theme_mod('vw_coaching_institute_topbar_section_hide_show', true)== 1 || get_theme_mod( 'vw_coaching_institute_topbar_resp_hide_show', true) == 1){ ?>
            <div class="contact-info">
              <div class="row">
                <div class="col-xl-2 col-lg-3 col-md-2 col-sm-4 col-4 align-self-center phone-number">
                  <?php if(get_theme_mod('vw_coaching_institute_phone_number') != ''){ ?>
                    <a href="tel:<?php echo esc_attr( get_theme_mod('vw_coaching_institute_phone_number','') ); ?>"><i class="<?php echo esc_attr(get_theme_mod('vw_coaching_institute_phone_icon','fa-solid fa-phone')); ?> me-2"></i><span><?php echo esc_html(get_theme_mod('vw_coaching_institute_phone_number',''));?></span></a>
                  <?php }?>
                </div>
                <div class="col-xl-3 col-lg-3 col-md-2 col-sm-4 col-4 align-self-center mail">
                  <?php if(get_theme_mod('vw_coaching_institute_email_address') != ''){ ?>
                    <a href="mailto:<?php echo esc_attr(get_theme_mod('vw_coaching_institute_email_address',''));?>"><i class="<?php echo esc_attr(get_theme_mod('vw_coaching_institute_email_address_icon','fa-solid fa-envelope-open-text')); ?> me-2"></i><span><?php echo esc_html(get_theme_mod('vw_coaching_institute_email_address',''));?></span></a>
                  <?php } ?>
                </div>
                <div class="col-xl-3 col-lg-3 col-md-2 col-sm-4 col-4 align-self-center location">
                  <?php if(get_theme_mod('vw_coaching_institute_topbar_location_text') != ''){ ?>
                    <a href="<?php echo esc_url(get_theme_mod('vw_coaching_institute_track_locatin_url',false));?>" target="_blank">
                      <i class="<?php echo esc_attr(get_theme_mod('vw_coaching_institute_topbar_location_icon','fa-solid fa-location-dot')); ?> me-2"></i><span class="mb-0"><?php echo esc_html(get_theme_mod('vw_coaching_institute_topbar_location_text')) ?></span>
                    </a>
                  <?php }?>
                </div>
                <div class="col-xl-4 col-lg-3 col-md-6 col-sm-12 col-12 align-self-center topbar-time">
                  <?php if(get_theme_mod('vw_coaching_institute_topbar_time_text') != ''){ ?>
                    <p class="mb-0"><i class="<?php echo esc_attr(get_theme_mod('vw_coaching_institute_topbar_time_icon','fa-solid fa-clock')); ?> me-2"></i><?php echo esc_html(get_theme_mod('vw_coaching_institute_topbar_time_text')) ?></p>
                  <?php }?>
                </div>
              </div>
            </div>
          <?php }?>
          <div class="menu-sec py-1 pe-2">
            <div class="row">
              <div class="col-xxl-8 col-xl-8 col-lg-8 col-md-3 col-sm-6 col-6 align-self-center header-sec-top">
                <?php get_template_part('template-parts/header/navigation'); ?>
              </div>
              <div class="col-xxl-1 col-xl-1 col-lg-1 col-md-3 col-sm-6 col-6 align-self-center myaccount text-center">
                <a href="<?php echo esc_html(get_theme_mod('vw_coaching_institute_myaccount_button_link')); ?>"><i class="<?php echo esc_attr(get_theme_mod('vw_coaching_institute_myaccount_icon','fa-solid fa-user')); ?>"></i></a>
              </div>
              <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-6 col-sm-12 col-12 align-self-center top-search">
                <?php if( get_theme_mod( 'vw_coaching_institute_header_search',true) == 1) { ?>
                  <?php get_search_form(); ?>
                <?php }?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>