<?php
/*
* Display Logo and contact details
*/
?>

<div class="bottom-header-box">
  <div class="main-header">
    <div class="headerbox">
      <div class="container py-2">
        <div class="row">
          <div class="col-lg-3 col-md-4 col-12 align-self-center">
            <div class="logo">
              <?php if( has_custom_logo() ) carpentry_contractor_the_custom_logo(); ?>
              <?php if(get_theme_mod('carpentry_contractor_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 $carpentry_contractor_description = get_bloginfo( 'description', 'display' );
              if ( $carpentry_contractor_description || is_customize_preview() ) : ?>
                <?php if(get_theme_mod('carpentry_contractor_site_tagline',false)){ ?>
                  <p class="site-description mb-0"><?php echo esc_html($carpentry_contractor_description); ?></p>
                <?php }?>
              <?php endif; ?>
            </div>
          </div>
          <div class="col-lg-7 col-md-4 navigation-col align-self-center">
            <?php get_template_part('template-parts/navigation/site-nav'); ?>
          </div>
          <div class="col-lg-2 col-md-4 btn-col align-self-center">
            <?php 
            $carpentry_contractor_phone_number = get_theme_mod('carpentry_contractor_header_info_phone', '');
            if (!empty($carpentry_contractor_phone_number)) : ?>
                <span class="contact-info mt-md-0 mt-3">
                    <span class="main-box phone">
                        <span class="main-head">
                            <a href="tel:<?php echo esc_attr($carpentry_contractor_phone_number); ?>" class="call-btn">
                                <i class="fas fa-phone"></i>
                                <?php echo esc_html__('Call Us', 'carpentry-contractor'); ?>
                            </a>
                        </span>
                    </span>
                </span>
            <?php endif; ?>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>