<?php
/**
 * The Header for our theme.
 * @package Visa Consulting Service
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
  <meta charset="<?php bloginfo( 'charset' ); ?>">
  <meta name="viewport" content="width=device-width">
  <?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('visa_consulting_service_preloader',false) != '' || get_theme_mod( 'visa_consulting_service_display_preloader',false) != ''){ ?>
    <div class="frame w-100 h-100">
      <div class="loader">
        <div class="dot-1"></div>
        <div class="dot-2"></div>
        <div class="dot-3"></div>
      </div>
    </div>
  <?php }?>
<header role="banner" class="header-box">
  <a class="screen-reader-text skip-link" href="#skip_content"><?php esc_html_e( 'Skip to content', 'visa-consulting-service' ); ?></a>
  <?php if ( get_theme_mod( 'visa_consulting_service_topbar_hide', false ) ) { ?>
    <div class="top-header py-2 wow fadeInDown">
      <div class="container">
        <div class="row">
          <div class="col-lg-8 col-md-8 col-12 align-self-center text-lg-start text-md-start text-center">
            <?php if ( get_theme_mod( 'visa_consulting_service_topbar_text') != '' ){ ?>
              <p class="topheader-text">
                <?php echo esc_html( get_theme_mod( 'visa_consulting_service_topbar_text') ); ?>
              </p>
            <?php } ?>
          </div>
          <div class="col-lg-4 col-md-4 col-12 align-self-center text-end">
            <div class="social-icon d-flex justify-content-lg-end justify-content-md-end justify-content-center gap-3">
              <?php if(get_theme_mod('visa_consulting_service_facebook_url') != ''){ ?>
                <a target="_blank" href="<?php echo esc_url(get_theme_mod('visa_consulting_service_facebook_url')); ?>"><i class="<?php echo esc_attr(get_theme_mod('visa_consulting_service_facebook_icon','fab fa-facebook-f')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Facebook', 'visa-consulting-service'); ?></span></a>
              <?php }?>
              <?php if(get_theme_mod('visa_consulting_service_twitter_url') != ''){ ?>
                <a target="_blank" href="<?php echo esc_url(get_theme_mod('visa_consulting_service_twitter_url')); ?>"><i class="<?php echo esc_attr(get_theme_mod('visa_consulting_service_twitter_icon','fa-brands fa-x-twitter')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Twitter', 'visa-consulting-service'); ?></span></a>
              <?php }?>
              <?php if(get_theme_mod('visa_consulting_service_instagram_url') != ''){ ?>
                <a target="_blank" href="<?php echo esc_url(get_theme_mod('visa_consulting_service_instagram_url')); ?>"><i class="<?php echo esc_attr(get_theme_mod('visa_consulting_service_instagram_icon','fab fa-instagram')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Instagram', 'visa-consulting-service'); ?></span></a>
              <?php }?>
            </div>
          </div>
        </div>
      </div>
    </div>
  <?php }?>
  <div class="header-bottom py-3 wow fadeInDown">
    <div class="container">
      <div class="row">
        <div class="col-xxl-3 col-xl-3 col-lg-3 col-md-6 col-12 align-self-center logo-box">
          <div class="visa-consulting-service-logo">
            <div class="row">
              <div class="<?php if( get_theme_mod( 'visa_consulting_service_site_logo_inline') != '') { ?>col-lg-5 col-md-5 col-5<?php } else { ?>col-lg-12 col-md-12 align-self-center<?php } ?>">
                <?php if ( has_custom_logo() ) : ?>
                  <div class="site-logo"><?php the_custom_logo(); ?></div>
                <?php endif; ?>
              </div>
              <div class="<?php if( get_theme_mod( 'visa_consulting_service_site_logo_inline') != '') { ?>col-lg-7 col-md-7 col-7 site-logo-inline"<?php } else { ?>col-lg-12 col-md-12 align-self-center<?php } ?>">
                <?php $visa_consulting_service_blog_info = get_bloginfo( 'name' ); ?>
                <?php if ( ! empty( $visa_consulting_service_blog_info ) ) : ?>
                  <?php if( get_theme_mod('visa_consulting_service_site_title_enable',true) != ''){ ?>
                    <?php if ( is_front_page() && is_home() ) : ?>
                      <h1 class="site-title pb-0"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
                    <?php else : ?>
                      <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                    <?php endif; ?>
                  <?php }?>
                <?php endif; ?>
                <?php
                $visa_consulting_service_description = get_bloginfo( 'description', 'display' );
                if ( $visa_consulting_service_description || is_customize_preview() ) : ?>
                  <?php if( get_theme_mod('visa_consulting_service_site_tagline_enable',false) != ''){ ?>
                    <p class="site-description"><?php echo esc_html($visa_consulting_service_description); ?></p>
                  <?php }?>
                <?php endif; ?>
              </div>
            </div>
          </div>
        </div>
        <div class="col-xxl-9 col-xl-9 col-lg-9 col-md-6 col-12 align-self-center menu-box d-flex justify-content-between align-items-center">
          <div class="navigation-header">
            <div class="toggle-nav mobile-menu">
              <button onclick="visa_consulting_service_openNav()"><i class="<?php echo esc_attr(get_theme_mod('visa_consulting_service_responsive_menu_open_icon','fas fa-bars')); ?>"></i></button>
            </div>
            <div id="mySidenav" class="nav sidenav">
              <nav id="site-navigation" class="main-navigation navbar navbar-expand-xl" aria-label="<?php esc_attr_e( 'Top Menu', 'visa-consulting-service' ); ?>">
                <?php {
                  wp_nav_menu(
                    array(
                      'theme_location' => 'primary',
                      'menu_class'     => 'menu', 
                      'items_wrap'     => '<ul id="%1$s" class="%2$s">%3$s</ul>',
                      'fallback_cb' => 'wp_page_menu',
                    )
                  );
                } ?>
              </nav>
              <a href="javascript:void(0)" class="closebtn mobile-menu" onclick="visa_consulting_service_closeNav()"><i class="<?php echo esc_attr(get_theme_mod('visa_consulting_service_responsive_menu_close_icon','fas fa-times')); ?>"></i></a>
            </div>
          </div>


       
            <div class="main-search d-inline-block">
              <span><a href="#" class="d-block"><i class="<?php echo esc_attr(get_theme_mod('visa_consulting_service_search_icon','fas fa-search')); ?>"></i></a></span>
            </div>
            <div class="searchform_page w-100 h-100">
              <div class="visa-consulting-service-close w-100 text-end me-lg-4 me-3"><a href="#maincontent"><i class="fa fa-times"></i></a></div>
              <div class="search_input">
                <div class="header-search">
                  <?php get_search_form(); ?>
                </div>
              </div>
            </div>

        </div>
        
      </div>
    </div>
  </div>
</header>
