<?php
/**
 * The template part for top header
 *
 * @package VW Life Coach
 * @subpackage vw-life-coach
 * @since vw-life-coach 1.0
 */
?>

<div class="middle-bar text-lg-left text-md-left py-2">
  <div class="container">
    <div class="row">
      <div class="col-lg-3 col-md-4 align-self-center">
        <div class="logo">
          <?php if ( has_custom_logo() ) : ?>
            <div class="site-logo"><?php the_custom_logo(); ?></div>
          <?php endif; ?>
          <?php $blog_info = get_bloginfo( 'name' ); ?>
            <?php if ( ! empty( $blog_info ) ) : ?>
              <?php if ( is_front_page() && is_home() ) : ?>
                <?php if( get_theme_mod('vw_life_coach_logo_title_hide_show',true) ==1){ ?>
                  <p class="site-title py-1 mb-0"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                <?php } ?>
              <?php else : ?>
                <?php if( get_theme_mod('vw_life_coach_logo_title_hide_show',true) ==1){ ?>
                  <p class="site-title py-1 mb-0"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                <?php } ?>
              <?php endif; ?>
            <?php endif; ?>
            <?php
              $description = get_bloginfo( 'description', 'display' );
              if ( $description || is_customize_preview() ) :
            ?>
            <?php if( get_theme_mod('vw_life_coach_tagline_hide_show',false) ==1){ ?>
              <p class="site-description mb-0">
                <?php echo esc_html($description); ?>
              </p>
            <?php } ?>
          <?php endif; ?>
        </div>
      </div>
      <div class="col-lg-3 col-md-4 align-self-center text-lg-start text-md-center text-center">
        <?php if( get_theme_mod('vw_life_coach_email_text') != '' || get_theme_mod('vw_life_coach_email_address') != ''){ ?>
          <p class="py-2 py-lg-3 py-md-3 mb-0"><i class="<?php echo esc_attr(get_theme_mod('vw_life_coach_mail_icon','far fa-envelope')); ?> me-2"></i><?php echo esc_html(get_theme_mod('vw_life_coach_email_text',''));?>: <a href="mailto:<?php echo esc_attr(get_theme_mod('vw_life_coach_email_address',''));?>"><?php echo esc_html(get_theme_mod('vw_life_coach_email_address',''));?></a></p>
        <?php } ?>
      </div>
      <div class="col-lg-2 col-md-4 align-self-center text-lg-start text-md-end text-center">
        <?php if( get_theme_mod('vw_life_coach_phone_text') != '' || get_theme_mod('vw_life_coach_phone_number') != ''){ ?>
          <p class="py-2 py-lg-3 py-md-3 mb-0"><i class="<?php echo esc_attr(get_theme_mod('vw_life_coach_phone_icon','fas fa-phone')); ?> me-2"></i><?php echo esc_html(get_theme_mod('vw_life_coach_phone_text',''));?>: <a href="tel:<?php echo esc_attr( get_theme_mod('vw_life_coach_phone_number','') ); ?>"><?php echo esc_html(get_theme_mod('vw_life_coach_phone_number',''));?></a></p>
        <?php } ?>
      </div>
      <div class="col-lg-2 col-md-6 align-self-center text-lg-start text-md-end text-center">
        <?php if (is_active_sidebar('social-links')) : ?>
          <?php dynamic_sidebar('social-links'); ?>
        <?php else : ?>
        <!-- Default Social Icons Widgets -->
          <div class="widget">
              <ul class="custom-social-icons" >
                <li><a href="https://twitter.com" target="_blank"><i class="fab fa-twitter"></i></a></li>
                <li><a href="https://facebook.com" target="_blank"><i class="fab fa-facebook"></i></a></li> 
                <li><a href="https://pinterest.com" target="_blank"><i class="fab fa-pinterest"></i></a></li>
                <li><a href="https://instagram.com" target="_blank"><i class="fab fa-instagram"></i></a></li>                 
              </ul>
          </div>
        <?php endif; ?>    
      </div>
      <div class="col-lg-2 col-md-6 align-self-center ">
        <?php if( get_theme_mod('vw_life_coach_cosulation_btn_text') != '' || get_theme_mod('vw_life_coach_cosulation_btn_link') != ''){ ?>
          <div class="cosulation-btn my-2 text-lg-end text-md-start">
            <a class="p-3" href="<?php echo esc_url(get_theme_mod('vw_life_coach_cosulation_btn_link',''));?>"><i class="<?php echo esc_attr(get_theme_mod('vw_life_coach_cosulation_icon','far fa-user')); ?> me-2"></i><?php echo esc_html(get_theme_mod('vw_life_coach_cosulation_btn_text',''));?></a>
          </div>
          <?php } ?>
      </div>
    </div>
  </div>
</div>