<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div class="container">
 *
 * @package Dry Cleaning Services
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?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('dry_cleaning_services_preloader', false) != "") { ?>
  <div id="preloader">
    <div id="status">&nbsp;</div>
  </div>
<?php }?>

<a class="screen-reader-text skip-link" href="#content"><?php esc_html_e( 'Skip to content', 'dry-cleaning-services' ); ?></a>

<div id="pageholder" <?php if( get_theme_mod( 'dry_cleaning_services_box_layout', false) != "" ) { echo 'class="boxlayout"'; } ?>>

<div class="mainhead">
  <div class="container">
    <div class="header px-3">
      <div class="row m-0">
        <div class="col-xl-2 col-lg-2 col-md-2 col-sm-12 col-12 align-self-center ps-0">
          <div class="dry-cleaning-services-logo text-center text-md-start">
            <?php if (get_theme_mod('dry_cleaning_services_logo_enable', true)) { ?>
              <?php dry_cleaning_services_the_custom_logo(); ?>
            <?php } ?>
            <div class="site-branding-text">
              <?php if (get_theme_mod('dry_cleaning_services_title_enable', false)) { ?>
                <?php if (is_front_page() && is_home()) : ?>
                  <h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a></h1>
                <?php else : ?>
                  <p class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a></p>
                <?php endif; ?>
              <?php } ?>
              <?php $dry_cleaning_services_description = get_bloginfo('description', 'display');
              if ($dry_cleaning_services_description || is_customize_preview()) : ?>
                <?php if (get_theme_mod('dry_cleaning_services_tagline_enable', false)) { ?>
                  <span class="site-description"><?php echo esc_html($dry_cleaning_services_description); ?></span>
                <?php } ?>
              <?php endif; ?>
            </div>
          </div>
        </div>
        <div class="col-xl-10 col-lg-10 col-md-10 col-sm-12 col-12 align-self-center pt-3">
          <?php if (get_theme_mod('dry_cleaning_services_contact_section', true)) { ?>
            <div class="row">
              <div class="col-xl-10 col-lg-10 col-md-9 col-sm-12 col-12 contact-sec py-2 px-4 align-self-center">
                <div class="row">
                  <div class="col-xl-4 col-lg-4 col-md-6 col-12 align-self-center">
                    <?php if ( get_theme_mod('dry_cleaning_services_email_address') != "") { ?>
                      <span class="email me-lg-4 me-md-3 me-0 mb-md-0 mb-2"><i class="far fa-envelope me-2"></i><a href="mailto:<?php echo esc_attr( get_theme_mod('dry_cleaning_services_email_address','') ); ?>"><?php echo esc_html(get_theme_mod ('dry_cleaning_services_email_address','')); ?></a></span>
                    <?php } ?>
                  </div>
                  <div class="col-xl-4 col-lg-4 col-md-6 col-12 align-self-center">
                    <?php if ( get_theme_mod('dry_cleaning_services_time','') != "") { ?>
                      <p class="time mb-md-0 mb-2"><i class="far fa-clock me-2"></i><?php echo esc_html(get_theme_mod ('dry_cleaning_services_time','')); ?></p>
                    <?php } ?>
                  </div>
                  <div class="col-xl-4 col-lg-4 col-md-12 col-12 align-self-center text-lg-end text-md-center text-center">
                    <span class="social-icons">
                      <?php if ( get_theme_mod('dry_cleaning_services_fb_link') != "") { ?>
                        <a title="<?php echo esc_attr('facebook', 'dry-cleaning-services'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('dry_cleaning_services_fb_link')); ?>"><i class="fab fa-facebook-f"></i></a> 
                      <?php } ?>
                      <?php if ( get_theme_mod('dry_cleaning_services_twitt_link') != "") { ?>
                        <a title="<?php echo esc_attr('twitter', 'dry-cleaning-services'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('dry_cleaning_services_twitt_link')); ?>"><i class="fab fa-twitter"></i></a>
                      <?php } ?>
                      <?php if ( get_theme_mod('dry_cleaning_services_linkedin_link') != "") { ?> 
                        <a title="<?php echo esc_attr('linkedin', 'dry-cleaning-services'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('dry_cleaning_services_linkedin_link')); ?>"><i class="fab fa-linkedin"></i></a>
                      <?php } ?>
                      <?php if ( get_theme_mod('dry_cleaning_services_google_link') != "") { ?> 
                        <a title="<?php echo esc_attr('youtube', 'dry-cleaning-services'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('dry_cleaning_services_google_link')); ?>"><i class="fa-brands fa-google"></i></a>
                      <?php } ?>
                    </span>
                  </div>
                </div>
              </div>
              <div class="col-xl-2 col-lg-2 col-md-3 col-sm-12 col-12 align-self-center text-center service-btn py-2">
                <?php if ( get_theme_mod('dry_cleaning_services_header_btn_text') != "" && get_theme_mod('dry_cleaning_services_header_btn_url') != "") { ?> 
                  <a href="<?php echo esc_url(get_theme_mod ('dry_cleaning_services_header_btn_url','')); ?>"><?php echo esc_html(get_theme_mod ('dry_cleaning_services_header_btn_text','Download CV','dry-cleaning-services')); ?></a>
                <?php }?>
              </div>
            </div>
          <?php } ?>
          <div class="row">
            <div class="col-xxl-10 col-xl-9 col-lg-9 col-md-6 col-sm-6 col-4 align-self-center  <?php echo ( get_theme_mod( 'dry_cleaning_services_sticky_header', false ) == 1 ) ? 'header-sticky' : 'close-sticky'; ?>">
              <div class="toggle-nav text-center">
                <?php if (has_nav_menu('primary')) { ?>
                  <button role="tab"><?php esc_html_e('Menu', 'dry-cleaning-services'); ?></button>
                <?php } ?>
              </div>
              <div id="mySidenav" class="nav sidenav">
                <nav id="site-navigation" class="main-nav" role="navigation" aria-label="<?php esc_attr_e('Top Menu', 'dry-cleaning-services'); ?>">
                  <ul class="mobile_nav">
                    <?php wp_nav_menu(array(
                      'theme_location' => 'primary',
                      'container_class' => 'main-menu',
                      'items_wrap' => '%3$s',
                      'fallback_cb' => 'wp_page_menu',
                    )); ?>
                  </ul>
                  <a href="javascript:void(0)" class="close-button"><?php esc_html_e('CLOSE', 'dry-cleaning-services'); ?></a>
                </nav>
              </div>
            </div>
            <div class="col-xxl-2 col-xl-3 col-lg-3 col-md-6 col-sm-6 col-8 align-self-center">
              <?php if ( get_theme_mod('dry_cleaning_services_phone_text','') != "" || get_theme_mod('dry_cleaning_services_phone_number','') != "") { ?>
                <div class="row call-sec">
                  <div class="col-xl-1 col-lg-1 col-md-2 col-sm-2 col-2 align-self-center">
                    <i class="fa-solid fa-mobile-screen-button"></i>
                  </div>
                  <div class="col-xl-11 col-lg-11 col-md-10 col-sm-10 col-10 align-self-center">
                    <p class="phone-text mb-0 ps-2"><?php echo esc_html(get_theme_mod ('dry_cleaning_services_phone_text','')); ?></p>
                    <a class="phone-num ps-2" href="tel:<?php echo esc_attr( get_theme_mod('dry_cleaning_services_phone_number') ); ?>"><?php echo esc_html(get_theme_mod ('dry_cleaning_services_phone_number')); ?></a>                 
                  </div>
                </div>
              <?php } ?>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>