<?php
/*
* Display Logo and contact details
*/
?>
<div class="main-header">
  <div class="headerbox">
    <div class="top-header">
      <div class="container">
        <div class="row">
          <div class="col-lg-3 col-md-3 logo-col">
            <div class="logo my-lg-2 my-3">
              <?php if( has_custom_logo() ) notary_services_the_custom_logo(); ?>
              <?php if(get_theme_mod('notary_services_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 $notary_services_description = get_bloginfo( 'description', 'display' );
              if ( $notary_services_description || is_customize_preview() ) : ?>
                <?php if(get_theme_mod('notary_services_site_tagline',false)){ ?>
                  <p class="site-description mb-0"><?php echo esc_html($notary_services_description); ?></p>
                <?php }?>
              <?php endif; ?>
            </div>
          </div>
          <div class="col-lg-3 col-md-3 call-box">
            <div class="contactbox">
              <div class="contact call">
                <?php if (get_theme_mod('notary_services_call_contact_no_text') || get_theme_mod('notary_services_call_contact_no')) : ?>
                    <div class="pe-lg-3 pe-2 align-self-center text-center text-md-left">
                      <i class="fas fa-phone-alt"></i>
                    </div>
                    <div class="ps-md-0 align-self-center text-lg-start contact-col call">
                      <p class="infotext text-capitalize"><?php echo esc_html(get_theme_mod('notary_services_call_contact_no_text', '')); ?></p>
                      <p class="mb-0 contact-content">
                        <a href="tel:<?php echo esc_attr(get_theme_mod('notary_services_call_contact_no', '')); ?>">
                          <?php echo esc_html(get_theme_mod('notary_services_call_contact_no', '')); ?>
                        </a>
                      </p>
                    </div>
                <?php endif; ?>
              </div>
            </div>
          </div>
          <div class="col-lg-3 col-md-3 time-box">
            <div class="contactbox clock">
              <div class="contact time">
                <?php if (get_theme_mod('notary_services_contact_time_text') || get_theme_mod('notary_services_add_time')) : ?>
                    <div class="pe-lg-3 pe-2 align-self-center text-center text-md-left clock-icon">
                      <i class="fas fa-clock"></i>
                    </div>
                    <div class="ps-md-0 align-self-center text-lg-start contact-col call">
                      <p class="infotext text-capitalize"><?php echo esc_html(get_theme_mod('notary_services_contact_time_text', '')); ?></p>
                      <p class="mb-0 contact-content">
                        <?php echo esc_html(get_theme_mod('notary_services_add_time', '')); ?>
                      </p>
                    </div>
                <?php endif; ?>
              </div>
            </div>
          </div>
          <div class="col-lg-3 col-md-3 social-box">
            <div class="social-media">
              <?php
                $notary_services_fb_url = get_theme_mod('notary_services_facebook_url');
                $notary_services_ins_url = get_theme_mod('notary_services_instagram_url');
                $notary_services_linkedin_url = get_theme_mod('notary_services_linkedin_url');
                $notary_services_twt_url = get_theme_mod('notary_services_twitter_url');

                $notary_services_fb_new_tab = esc_attr(get_theme_mod('notary_services_header_fb_new_tab', 'true'));
                $notary_services_ins_new_tab = esc_attr(get_theme_mod('notary_services_header_ins_new_tab', 'true'));
                $notary_services_linkedin_new_tab = esc_attr(get_theme_mod('notary_services_linkedin_new_tab', 'true'));
                $notary_services_twt_new_tab = esc_attr(get_theme_mod('notary_services_header_twt_new_tab', 'true'));

                if ($notary_services_twt_url || $notary_services_fb_url || $notary_services_ins_url || $notary_services_linkedin_url) : ?>
                  <div class="icon-social">
                    <?php if ($notary_services_fb_url) : ?>
                        <a <?php if ($notary_services_fb_new_tab != false) : ?>target="_blank" <?php endif; ?>href="<?php echo esc_url($notary_services_fb_url); ?>"><i class="<?php echo esc_attr(get_theme_mod('notary_services_facebook_icon', 'fab fa-facebook-f')); ?>"></i></a>
                    <?php endif; ?>

                    <?php if ($notary_services_ins_url) : ?>
                        <a <?php if ($notary_services_ins_new_tab != false) : ?>target="_blank" <?php endif; ?>href="<?php echo esc_url($notary_services_ins_url); ?>"><i class="ms-md-2 ms-3 <?php echo esc_attr(get_theme_mod('notary_services_instagram_icon', 'fab fa-instagram')); ?>"></i></a>
                    <?php endif; ?>
                    <?php if ($notary_services_twt_url) : ?>
                        <a <?php if ($notary_services_twt_new_tab != false) : ?>target="_blank" <?php endif; ?>href="<?php echo esc_url($notary_services_twt_url); ?>"><i class="ms-md-2 ms-3 <?php echo esc_attr(get_theme_mod('notary_services_twitter_icon', 'fab fa-twitter')); ?>"></i></a>
                    <?php endif; ?>
                    <?php if ($notary_services_linkedin_url) : ?>
                        <a <?php if ($notary_services_linkedin_new_tab != false) : ?>target="_blank" <?php endif; ?>href="<?php echo esc_url($notary_services_linkedin_url); ?>"><i class="ms-md-2 ms-3 ms-2 <?php echo esc_attr(get_theme_mod('notary_services_linkedin_icon', 'fa-brands fa-linkedin-in')); ?>"></i></a>
                    <?php endif; ?>
                </div>
              <?php endif; ?>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="menubox py-md-2 py-3">
      <div class="container">
        <div class="row">
          <div class="col-lg-9 col-md-6 align-self-center">
            <?php get_template_part('template-parts/navigation/site-nav'); ?>
          </div>
          <div class="col-lg-3 col-md-6 align-self-center">
            <div class="header-menu-right">
              <?php if (get_theme_mod('notary_services_header_link') || get_theme_mod('notary_services_header_button','CONSULT NOW!')) : ?>
                <span class="header-btn text-center ps-md-3 ps-lg-4">
                  <a href="<?php echo esc_url(get_theme_mod('notary_services_header_link')); ?>" class="book-appoin"><?php echo esc_html(get_theme_mod('notary_services_header_button','CONSULT NOW!')); ?></a>
                </span>
              <?php endif; ?>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>