<?php
/*
* Display Logo and contact details
*/
?>
<div class="main-header">
  <div class="headerbox py-2">
    <div class="container">
    <div class="row m-0">
      <div class="col-xl-3 col-lg-3 col-md-3 align-self-center">
        <div class="logo">
          <?php if( has_custom_logo() ) multipurpose_sports_club_the_custom_logo(); ?>
          <?php if(get_theme_mod('multipurpose_sports_club_site_title',true) == 1){ ?>
            <?php if (is_front_page() && is_home()) : ?>
              <h1 class="text-capitalize">
                <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a>
              </h1> 
            <?php else : ?>
              <p class="text-capitalize site-title mb-1">
                <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a>
              </p>
            <?php endif; ?>
          <?php }?>
          <?php $multipurpose_sports_club_description = get_bloginfo( 'description', 'display' );
          if ( $multipurpose_sports_club_description || is_customize_preview() ) : ?>
            <?php if(get_theme_mod('multipurpose_sports_club_site_tagline',false)){ ?>
              <p class="site-description mb-0"><?php echo esc_html($multipurpose_sports_club_description); ?></p>
            <?php }?>
          <?php endif; ?>
        </div>
      </div>
      <div class="col-xl-5 col-lg-5 col-md-3 align-self-center">
        <?php get_template_part('template-parts/navigation/site-nav'); ?>
      </div>
      <div class="col-xl-4 col-lg-4 col-md-6 align-self-center">
        <div class="header-menu-right">
          <div class="main-call">
            <?php 
            $multipurpose_sports_club_contact_number = get_theme_mod('multipurpose_sports_club_call');
            if (!empty($multipurpose_sports_club_contact_number)) : ?>
              <p class="mb-0 contact-content">
                <a href="tel:<?php echo esc_attr($multipurpose_sports_club_contact_number); ?>">
                  <i class="fas fa-phone me-2" aria-hidden="true"></i><?php echo esc_html($multipurpose_sports_club_contact_number); ?>
                </a>
              </p>
            <?php endif; ?>
          </div>
          <div class="searchbox ps-md-2 ps-lg-3">
            <span class="search-bar">
              <button type="button" class="open-search"><i class="fas fa-search"></i></button>
            </span>
          </div>
          <?php if (get_theme_mod('multipurpose_sports_club_header_link') || get_theme_mod('multipurpose_sports_club_header_button','sign up')) : ?>
            <span class="header-btn text-center ps-md-2 ps-lg-3">
              <a href="<?php echo esc_url(get_theme_mod('multipurpose_sports_club_header_link')); ?>" class="book-appoin text-uppercase"><?php echo esc_html(get_theme_mod('multipurpose_sports_club_header_button','sign up')); ?></a>
            </span>
          <?php endif; ?>
          <div class="search-outer">
            <div class="inner_searchbox w-100 h-100">
              <?php get_search_form(); ?>
            </div>
            <button type="button" class="search-close"><?php esc_html_e('CLOSE', 'multipurpose-sports-club'); ?></button>
          </div>
        </div>
      </div>
    </div>
    </div>
  </div>
</div>