<?php
/**
 * The Header for our theme.
 * @package Home Repair 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('home_repair_service_preloader',false) != '' || get_theme_mod( 'home_repair_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', 'home-repair-service' ); ?></a>
  <div class="top-header">
    <div class="container-fluid">
      <div class="row">
        <div class="col-xxl-11 col-xl-11 col-lg-11 col-md-11 col-10 p-0 top-left">
          <div class="topbar">
            <div class="row">
              <div class="col-xxl-2 col-xl-2 col-lg-2 col-md-3 col-4 logo-box">
                <div class="logo py-2">
                  <div class="row">
                    <div class="<?php if( get_theme_mod( 'home_repair_service_site_logo_inline') != '') { ?>col-lg-5 col-md-5 col-5<?php } else { ?>col-lg-12 col-md-12 text-center 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( 'home_repair_service_site_logo_inline') != '') { ?>col-lg-7 col-md-7 col-7 site-logo-inline"<?php } else { ?>col-lg-12 col-md-12 text-center align-self-center<?php } ?>">
                      <?php $home_repair_service_blog_info = get_bloginfo( 'name' ); ?>
                      <?php if ( ! empty( $home_repair_service_blog_info ) ) : ?>
                        <?php if( get_theme_mod('home_repair_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
                      $home_repair_service_description = get_bloginfo( 'description', 'display' );
                      if ( $home_repair_service_description || is_customize_preview() ) : ?>
                        <?php if( get_theme_mod('home_repair_service_site_tagline_enable',false) != ''){ ?>
                          <p class="site-description"><?php echo esc_html($home_repair_service_description); ?></p>
                        <?php }?>
                      <?php endif; ?>
                    </div>
                  </div>
                </div>
              </div>
              <div class="col-xxl-8 col-xl-8 col-lg-7 col-md-4 col-2 align-self-center mail-box">
                <div class="navigation-header">
                  <div class="toggle-nav mobile-menu">
                    <button onclick="home_repair_service_openNav()"><i class="<?php echo esc_attr(get_theme_mod('home_repair_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', 'home-repair-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="home_repair_service_closeNav()"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_responsive_menu_close_icon','fas fa-times')); ?>"></i></a>
                  </div>
                </div>
              </div>
              <div class="col-xxl-2 col-xl-2 col-lg-3 col-md-5 col-6 align-self-center topbar-btn">
                <?php if(get_theme_mod('home_repair_service_header_btn_text') != ''){ ?>
                  <a href="<?php echo esc_url(get_theme_mod('home_repair_service_header_btn_url')); ?>" class="header-btn text-uppercase"><?php echo esc_html(get_theme_mod('home_repair_service_header_btn_text')); ?><span class="screen-reader-text"><?php echo esc_html(get_theme_mod('home_repair_service_header_btn_text')); ?></span><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_header_btn_icon','fa-solid fa-arrow-right-long')); ?> ms-2"></i></a>
                <?php }?>
              </div>
            </div>
          </div>
        </div>
        <div class="col-xxl-1 col-xl-1 col-lg-1 col-md-1 col-2 align-self-center top-sidebar">
          <div class="toggle-btn">
            <a href="#" id="sidebar-pop"><i class="fa-solid fa-bars-staggered"></i></a>
          </div>
          <div class="header-sidebar">
            <div class="close-pop"><a href="#maincontent"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_sidebar_close_icon','fas fa-window-close')); ?>"></i></a>
            </div>
            <div class="menu-drawer">
              <div class="logo p-0">
                <div class="row">
                  <div class="<?php if( get_theme_mod( 'home_repair_service_site_logo_inline') != '') { ?>col-lg-5 col-md-5 col-5<?php } else { ?>col-lg-12 col-md-12 text-start 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( 'home_repair_service_site_logo_inline') != '') { ?>col-lg-7 col-md-7 col-7 site-logo-inline"<?php } else { ?>col-lg-12 col-md-12 text-start align-self-center<?php } ?>">
                    <?php $home_repair_service_blog_info = get_bloginfo( 'name' ); ?>
                    <?php if ( ! empty( $home_repair_service_blog_info ) ) : ?>
                      <?php if( get_theme_mod('home_repair_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
                    $home_repair_service_description = get_bloginfo( 'description', 'display' );
                    if ( $home_repair_service_description || is_customize_preview() ) : ?>
                      <?php if( get_theme_mod('home_repair_service_site_tagline_enable',false) != ''){ ?>
                        <p class="site-description"><?php echo esc_html($home_repair_service_description); ?></p>
                      <?php }?>
                    <?php endif; ?>
                  </div>
                </div>
              </div>
              <?php if(get_theme_mod('home_repair_service_top_sidebar_text') != '') {?>
                <p class="my-3 text-start"><?php echo esc_html(get_theme_mod('home_repair_service_top_sidebar_text')) ?></p>
              <?php }?>
              <div class="phone-box mb-3">
                <div class="row">
                  <?php if( get_theme_mod( 'home_repair_service_top_sidebar_phone_text') != '' || get_theme_mod( 'home_repair_service_top_sidebar_phone_number') != '') { ?>
                    <div class="col-xl-2 col-lg-2 col-md-2 col-2 align-self-center text-start">
                      <div class="phone">
                        <i class="<?php echo esc_attr(get_theme_mod('home_repair_service_top_sidebar_phone_no_icon','fas fa-phone')); ?>"></i>
                      </div>
                    </div>
                    <div class="col-xl-10 col-lg-10 col-md-10 col-10 align-self-center text-start">
                      <h6 class="text-capitalize pb-0"><?php echo esc_html(get_theme_mod('home_repair_service_top_sidebar_phone_text'));?></h6>
                      <p class="mb-0"><a href="tel:<?php echo esc_attr( get_theme_mod('home_repair_service_top_sidebar_phone_number') ); ?>"><?php echo esc_html(get_theme_mod('home_repair_service_top_sidebar_phone_number'));?></a></p>
                    </div>
                  <?php }?>
                </div>
              </div>
              <div class="mail-box mb-4">
                <div class="row">
                  <?php if( get_theme_mod( 'home_repair_service_top_sidebar_email_text') != '' || get_theme_mod( 'home_repair_service_top_sidebar_email_address') != '') { ?>
                      <div class="col-xl-2 col-lg-2 col-md-2 col-2 align-self-center text-start">
                        <div class="envelope">
                          <i class="<?php echo esc_attr(get_theme_mod('home_repair_service_top_sidebar_email_address_icon','fas fa-envelope-open')); ?>"></i>
                        </div>
                      </div>
                      <div class="col-xl-10 col-lg-10 col-md-10 col-10 align-self-center text-start">
                        <h6 class="text-capitalize pb-0"><?php echo esc_html(get_theme_mod('home_repair_service_top_sidebar_email_text'));?></h6>
                        <p class="mb-0"><a href="mailto:<?php echo esc_attr(get_theme_mod('home_repair_service_top_sidebar_email_address'));?>"><?php echo esc_html(get_theme_mod('home_repair_service_top_sidebar_email_address'));?><span class="screen-reader-text"><?php esc_html_e( 'support@example.com','home-repair-service' );?></span></a></p>
                      </div>
                  <?php }?>
                </div>
              </div>
              <div class="social-icon text-start">
                <?php if(get_theme_mod('home_repair_service_facebook_url') != ''){ ?>
                  <a target="_blank" href="<?php echo esc_url(get_theme_mod('home_repair_service_facebook_url')); ?>"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_facebook_icon','fab fa-facebook-f')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Facebook', 'home-repair-service'); ?></span></a>
                <?php }?>
                <?php if(get_theme_mod('home_repair_service_twitter_url') != ''){ ?>
                  <a target="_blank" href="<?php echo esc_url(get_theme_mod('home_repair_service_twitter_url')); ?>"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_twitter_icon','fab fa-twitter')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Twitter', 'home-repair-service'); ?></span></a>
                <?php }?>
                <?php if(get_theme_mod('home_repair_service_instagram_url') != ''){ ?>
                  <a target="_blank" href="<?php echo esc_url(get_theme_mod('home_repair_service_instagram_url')); ?>"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_instagram_icon','fab fa-instagram')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Instagram', 'home-repair-service'); ?></span></a>
                <?php }?>
                <?php if(get_theme_mod('home_repair_service_pinterest_url') != ''){ ?>
                  <a target="_blank" href="<?php echo esc_url(get_theme_mod('home_repair_service_pinterest_url')); ?>"><i class="<?php echo esc_attr(get_theme_mod('home_repair_service_pinterest_icon','fab fa-pinterest-p')); ?>"></i><span class="screen-reader-text"><?php echo esc_html('Youtube', 'home-repair-service'); ?></span></a>
                <?php }?>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</header>
