<?php
/*
* Display Logo and contact details
*/
?>
<div class="main-header">
  <div class="headerbox">
    <div class="menubox">
      <div class="container">
        <div class="row">
          <div class="col-lg-3 col-md-3 logo-col align-self-center">
            <div class="logo my-lg-2 my-3">
              <?php if( has_custom_logo() ) saas_agency_the_custom_logo(); ?>
              <?php if(get_theme_mod('saas_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 $saas_agency_description = get_bloginfo( 'description', 'display' );
              if ( $saas_agency_description || is_customize_preview() ) : ?>
                <?php if(get_theme_mod('saas_agency_site_tagline',false)){ ?>
                  <p class="site-description mb-0"><?php echo esc_html($saas_agency_description); ?></p>
                <?php }?>
              <?php endif; ?>
            </div>
          </div>
          <div class="col-lg-5 col-md-3 align-self-center">
            <?php get_template_part('template-parts/navigation/site-nav'); ?>
          </div>
          <div class="col-lg-4 col-md-6 btn-col align-self-center">
            <div class="search-block">
              <?php 
                get_search_form();
              ?>
            </div>
            <?php if (get_theme_mod('saas_agency_header_login_link') || get_theme_mod('saas_agency_header_login_button','Log In')) : ?>
              <div class="header-btn main my-md-0 my-2 text-center ms-xl-5 ms-md-2 ms-0">
                  <a href="<?php echo esc_url(get_theme_mod('saas_agency_header_login_link')); ?>" class="log-in">
                    <?php echo esc_html(get_theme_mod('saas_agency_header_login_button','Log In')); ?></a>
              </div>
            <?php endif; ?>
            <?php if (get_theme_mod('saas_agency_header_signup_link') || get_theme_mod('saas_agency_header_signup_button','Sign Up')) : ?>
              <div class="header-btn my-md-0 my-2 text-center ms-md-2 ms-0">
                  <a href="<?php echo esc_url(get_theme_mod('saas_agency_header_signup_link')); ?>" class="signup">
                    <?php echo esc_html(get_theme_mod('saas_agency_header_signup_button','Signup')); ?></a>
              </div>
            <?php endif; ?>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>