<?php
/*
* Display Logo and header details
*/
?>
<div class="main-header">
  <div class="headerbox">
    <?php if (get_theme_mod('online_startup_agency_topbar_visibility', true)) : ?>
      <div class="top-header py-lg-3 py-md-2">
        <div class="container">
          <div class="top-details">
            <div class="discount-text text-md-start text-center">
              <?php 
              $online_startup_agency_header_text_top = get_theme_mod('online_startup_agency_header_text_top');
              if (!empty($online_startup_agency_header_text_top)) : ?>
                  <p class="discount-top m-md-0 my-2">
                    <?php echo esc_html($online_startup_agency_header_text_top); ?>
                  </p>
              <?php endif; ?>
            </div>
            <div class="timing">
                <?php 
                $online_startup_agency_opening_time = get_theme_mod('online_startup_agency_time');
                if (!empty($online_startup_agency_opening_time)) : ?>
                    <p class="mb-md-0 mb-2 contact-content">
                        <i class="fa-solid fa-clock me-2" aria-hidden="true"></i><?php echo esc_html($online_startup_agency_opening_time); ?>
                    </p>
                <?php endif; ?>
            </div>
            <div class="main-call">
                <?php 
                $online_startup_agency_contact_number = get_theme_mod('online_startup_agency_call');
                if (!empty($online_startup_agency_contact_number)) : ?>
                    <p class="mb-md-0 mb-2 ps-md-3 contact-content">
                        <a href="tel:<?php echo esc_attr($online_startup_agency_contact_number); ?>">
                            <i class="fas fa-phone me-2" aria-hidden="true"></i><?php echo esc_html($online_startup_agency_contact_number); ?>
                        </a>
                    </p>
                <?php endif; ?>
            </div>
            <div class="location">
                <?php 
                $online_startup_agency_location = get_theme_mod('online_startup_agency_location');
                if (!empty($online_startup_agency_location)) : ?>
                    <p class="mb-md-0 mb-2 ps-md-3 contact-content">
                        <i class="fas fa-map-marker-alt me-2" aria-hidden="true"></i><?php echo esc_html($online_startup_agency_location); ?>
                    </p>
                <?php endif; ?>
            </div>
          </div>
        </div>
      </div>
    <?php endif; ?>
    <div class="menubox py-md-2 py-3">
      <div class="container">
        <div class="row">
          <div class="col-lg-3 col-md-4 logo-col align-self-center">
            <div class="logo my-lg-2 my-3">
              <?php if( has_custom_logo() ) online_startup_agency_the_custom_logo(); ?>
              <?php if(get_theme_mod('online_startup_agency_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 $online_startup_agency_description = get_bloginfo( 'description', 'display' );
              if ( $online_startup_agency_description || is_customize_preview() ) : ?>
                <?php if(get_theme_mod('online_startup_agency_site_tagline',false)){ ?>
                  <p class="site-description mb-0"><?php echo esc_html($online_startup_agency_description); ?></p>
                <?php }?>
              <?php endif; ?>
            </div>
          </div>
          <div class="col-lg-6 col-md-4 col-12 align-self-center">
            <?php get_template_part('template-parts/navigation/site-nav'); ?>
          </div>
          <div class="col-lg-3 col-md-4 col-12 align-self-center text-center text-md-end align-items-center">
            <div class="searchbox">
                <span class="search-bar">
                    <button type="button" class="open-search"><i class="fas fa-search"></i></button>
                </span>
                <?php if (get_theme_mod('online_startup_agency_header_link') || get_theme_mod('online_startup_agency_header_button', 'Get A Quote')) : ?>
                    <span class="header-btn">
                        <a href="<?php echo esc_url(get_theme_mod('online_startup_agency_header_link')); ?>" class="book-appoin"><?php echo esc_html(get_theme_mod('online_startup_agency_header_button', 'Get A Quote')); ?></a>
                    </span>
                <?php endif; ?>
            </div>
          </div>
          <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', 'online-startup-agency'); ?></button>
          </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>