<?php
/*
* Display header
*/
?>

<div class="headerbox">
    <div class="header-main py-2">
        <div class="container">
            <div class="row mx-0">
                <div class="col-lg-3 col-md-3 align-self-center">
                    <div class="logo text-md-start text-center my-2 my-md-0">
                        <?php if (has_custom_logo()) : ?>
                            <?php the_custom_logo(); ?>
                        <?php endif; ?>

                        <?php if (get_theme_mod('babysitter_childcare_site_title', true)) : ?>
                            <?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 mb-0">
                                    <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a>
                                </p>
                            <?php endif; ?>
                        <?php endif; ?>

                        <?php
                        $babysitter_childcare_description = get_bloginfo('description', 'display');
                        if ($babysitter_childcare_description || is_customize_preview()) :
                            if (get_theme_mod('babysitter_childcare_site_tagline', false)) :
                                ?>
                                <p class="site-description my-1 text-capitalize"><?php echo esc_html($babysitter_childcare_description); ?></p>
                            <?php endif;
                        endif;
                        ?>
                    </div>
                </div>
                <div class="col-lg-5 col-md-3 col-5 align-self-center">
                    <?php get_template_part('template-parts/navigation/site-nav'); ?>
                </div>
                <div class="col-lg-2 col-md-3 col-7 align-self-center">
                    <?php if( get_theme_mod( 'babysitter_childcare_header_link' ) != '' || get_theme_mod( 'babysitter_childcare_header_button' ) != '') { ?>
                         <div class="header-btn text-center text-md-end">
                            <a href="<?php echo esc_url( get_theme_mod( 'babysitter_childcare_header_link','' ) ); ?>" class="get-quote-btn"><?php echo esc_html( get_theme_mod( 'babysitter_childcare_header_button','' ) ); ?></a>
                        </div>
                    <?php } ?>
                </div>
                <div class="col-lg-2 col-md-3 align-self-center text-center text-md-end my-md-0 my-3">
                    <?php if( get_theme_mod( 'babysitter_childcare_phone' ) != '') { ?>
                        <span class="mb-0 phone"><a href="tel:<?php echo esc_html( get_theme_mod('babysitter_childcare_phone','') ); ?>"><?php echo esc_html( get_theme_mod('babysitter_childcare_phone','')); ?><i class="fas fa-phone-volume ms-lg-3 ms-2"></i></a></span>
                    <?php } ?>
                </div>
            </div>
        </div>
    </div>
</div>

