<?php
/**
 * The Header for our theme.
 * @package Swimming Pool Cleaning
 */
?>
<!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('swimming_pool_cleaning_preloader',false) != '' || get_theme_mod( 'swimming_pool_cleaning_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', 'swimming-pool-cleaning' ); ?></a>
    
    <div id="header">
      <div class="topbar">
        <div class="container">
          <div class="row mx-0">
            <div class="col-lg-2 col-md-3 position-relative">
              <div class="logo text-center">
                <div class="row">
                  <div class="<?php if( get_theme_mod( 'swimming_pool_cleaning_site_logo_inline') != '') { ?>col-lg-5 col-md-5 col-5<?php } else { ?>col-lg-12 col-md-12 <?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( 'swimming_pool_cleaning_site_logo_inline') != '') { ?>col-lg-7 col-md-7 col-7 site-logo-inline"<?php } else { ?>col-lg-12 col-md-12 <?php } ?>">
                    <?php $blog_info = get_bloginfo( 'name' ); ?>
                    <?php if ( ! empty( $blog_info ) ) : ?>
                      <?php if( get_theme_mod('swimming_pool_cleaning_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
                    $description = get_bloginfo( 'description', 'display' );
                    if ( $description || is_customize_preview() ) : ?>
                      <?php if( get_theme_mod('swimming_pool_cleaning_site_tagline_enable',false) != ''){ ?>
                        <p class="site-description"><?php echo esc_html($description); ?></p>
                      <?php }?>
                    <?php endif; ?>
                  </div>
                </div>
              </div>
            </div>
            <div class="col-lg-10 col-md-9 ps-md-0">
              <?php if ( get_theme_mod('swimming_pool_cleaning_timing_text') != '' ) {?>
                <span class="time"><?php echo esc_html(get_theme_mod('swimming_pool_cleaning_timing_text')); ?></span>
              <?php }?>
            </div>  
          </div>
        </div>
      </div>
      <div class="middle-header">
        <div class="container">
          <div class="row">
            <div class="offset-lg-3 offset-md-3 col-lg-3 col-md-3 align-self-center">
              <?php if( get_theme_mod( 'swimming_pool_cleaning_location','' ) != '') { ?>
                <div class="row">
                  <div class="col-lg-2 col-md-4 p-0">
                    <p class="mb-0 py-2 text-center"><i class="fas fa-map-marker-alt"></i></p>
                  </div>
                  <div class="col-lg-10 col-md-8 p-0">            
                    <p class="f_para location"><?php echo esc_html( get_theme_mod('swimming_pool_cleaning_location','') ); ?></p>
                    <p class="location1"><?php echo esc_html( get_theme_mod('swimming_pool_cleaning_location1','') ); ?></p>        
                  </div>
                </div>
              <?php }?>
            </div>
            <div class="col-lg-3 col-md-3 align-self-center">
              <?php if( get_theme_mod( 'swimming_pool_cleaning_email_address','' ) != '') { ?>
                <div class="row">
                  <div class="col-lg-2 col-md-4 p-0">
                    <p class="mb-0 py-2 text-center"><i class="fas fa-envelope"></i></p>
                  </div>
                  <div class="col-lg-10 col-md-8 p-0">            
                    <p class="email"><?php echo esc_html( get_theme_mod('swimming_pool_cleaning_email_address','') ); ?></p>
                    <p><a class="email1" href="mailto:<?php echo esc_attr( get_theme_mod('swimming_pool_cleaning_email_address1','' )); ?>"><?php echo esc_html( get_theme_mod('swimming_pool_cleaning_email_address1','') ); ?><span class="screen-reader-text"><?php echo esc_html( get_theme_mod('swimming_pool_cleaning_email_address1','') ); ?></span></a></p>        
                  </div>
                </div>
              <?php }?>
            </div>
            <div class="col-lg-3 col-md-3 align-self-center">
              <?php if( get_theme_mod( 'swimming_pool_cleaning_call_number','' ) != '') { ?>
                <div class="row">
                  <div class="col-lg-2 col-md-4 p-0">
                    <p class="mb-0 py-2 text-center"><i class="fas fa-phone"></i></p>
                  </div>
                  <div class="col-lg-10 col-md-8 p-0">            
                    <p class="call"><?php echo esc_html( get_theme_mod('swimming_pool_cleaning_call_number','') ); ?></p>
                    <p><a class="call1" href="tel:<?php echo esc_attr( get_theme_mod('swimming_pool_cleaning_number1','' )); ?>"><?php echo esc_html( get_theme_mod('swimming_pool_cleaning_number1','') ); ?><span class="screen-reader-text"><?php echo esc_html( get_theme_mod('swimming_pool_cleaning_number1','') ); ?></span></a></p>        
                  </div>
                </div>
              <?php }?>
            </div>
          </div>
        </div>
      </div>
      <div class="bottom-header">
        <div class="row">
          <div class="offset-lg-3 <?php if(get_theme_mod('swimming_pool_cleaning_header_btn_text') != '' || get_theme_mod('swimming_pool_cleaning_header_btn_url') != ''){ ?>col-lg-7 col-md-7 <?php } else {?> col-lg-9 col-md-9 <?php }?> col-6 align-self-center ps-md-5">
              <div class="toggle-menu responsive-menu text-md-end text-center">
                <button role="tab" onclick="swimming_pool_cleaning_menu_open()" class="mobiletoggle"><i class="<?php echo esc_attr(get_theme_mod('swimming_pool_cleaning_responsive_menu_open_icon','fas fa-bars')); ?>"></i><?php echo esc_html( get_theme_mod('swimming_pool_cleaning_open_menu_label')); ?><span class="screen-reader-text"><?php esc_html_e('Open Menu','swimming-pool-cleaning'); ?></span>
                </button>
              </div>
              <div id="navbar-header" class="menu-brand primary-nav">
                <nav id="site-navigation" class="primary-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'swimming-pool-cleaning' ); ?>">
                  <?php
                    wp_nav_menu( array( 
                      'theme_location' => 'primary',
                      'container_class' => 'main-menu-navigation clearfix' ,
                      'menu_class' => 'main-menu-navigation clearfix',
                      'items_wrap' => '<ul id="%1$s" class="%2$s mobile_nav m-0 ps-0">%3$s</ul>',
                      'fallback_cb' => 'wp_page_menu',
                    ) ); 
                  ?>
                </nav>
                <a href="javascript:void(0)" class="closebtn responsive-menu" onclick="swimming_pool_cleaning_menu_close()"><?php echo esc_html( get_theme_mod('swimming_pool_cleaning_close_menu_label')); ?><i class="<?php echo esc_attr(get_theme_mod('swimming_pool_cleaning_responsive_menu_close_icon','fas fa-times')); ?>"></i><span class="screen-reader-text"><?php esc_html_e('Close Menu','swimming-pool-cleaning'); ?></span></a>
              </div>
          </div>
          <?php if(get_theme_mod('swimming_pool_cleaning_header_btn_text') != '' || get_theme_mod('swimming_pool_cleaning_header_btn_url') != ''){ ?>
            <div class="col-lg-2 col-md-3 col-6 align-self-center header-btn">
              <a href="<?php echo esc_url(get_theme_mod('swimming_pool_cleaning_header_btn_url')); ?>" class="book-btn"><?php echo esc_html(get_theme_mod('swimming_pool_cleaning_header_btn_text')); ?><span class="screen-reader-text"><?php echo esc_html(get_theme_mod('swimming_pool_cleaning_header_btn_text')); ?></span></a>
            </div>
          <?php }?>
        </div>
      </div>

    </div>
  </header>