<?php
/**
 * Displays main header
 *
 * @package Deep Cleaning
 */
?>

<?php
$deep_cleaning_sticky_header = get_theme_mod('deep_cleaning_sticky_header');
    $deep_cleaning_data_sticky = "false";
    if ($deep_cleaning_sticky_header) {
    $deep_cleaning_data_sticky = "true";
    }
?>
<div class="main-header text-center text-md-start" data-sticky="<?php echo esc_attr($deep_cleaning_data_sticky); ?>">
    <div class="container">
        <div class="row nav-box m-0">
            <div class="col-xl-3 col-lg-3 col-md-4 col-sm-4 logo-box align-self-center">
                <div class="navbar-brand ">
                    <?php if ( has_custom_logo() ) : ?>
                        <div class="site-logo"><?php the_custom_logo(); ?></div>
                    <?php endif; ?>
                    <?php $deep_cleaning_blog_info = get_bloginfo( 'name' ); ?>
                        <?php if ( ! empty( $deep_cleaning_blog_info ) ) : ?>
                            <?php if ( is_front_page() && is_home() ) : ?>
                                <?php if( get_theme_mod('deep_cleaning_logo_title_text',true) != ''){ ?>
                                    <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
                                <?php } ?>
                            <?php else : ?>
                                <?php if( get_theme_mod('deep_cleaning_logo_title_text',true) != ''){ ?>
                                    <p class="site-title "><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
                                <?php } ?>
                            <?php endif; ?>
                        <?php endif; ?>
                        <?php
                            $deep_cleaning_description = get_bloginfo( 'description', 'display' );
                            if ( $deep_cleaning_description || is_customize_preview() ) :
                        ?>
                        <?php if( get_theme_mod('deep_cleaning_theme_description',false) != ''){ ?>
                            <p class="site-description pb-2"><?php echo esc_html($deep_cleaning_description); ?></p>
                        <?php } ?>
                    <?php endif; ?>
                </div>
            </div>
            <div class="col-xl-6 col-lg-6 col-md-4 col-sm-2 col-12 align-self-center header-box">
                <?php get_template_part('template-parts/navigation/nav'); ?>
            </div>
            <div class="col-xl-3 col-lg-3 col-md-4 col-sm-6 col-12 align-self-center meta-main-box text-end">
                <?php if ( get_theme_mod('deep_cleaning_topbar_phone_number') != "" ) {?>
                    <div class="text-end py-2">
                        <p class="topbar-mail m-0"><i class="fas fa-phone me-2"></i><a href="tell:<?php echo esc_attr(get_theme_mod('deep_cleaning_topbar_phone_number')); ?>"><?php echo esc_html(get_theme_mod('deep_cleaning_topbar_phone_number')); ?></a></p>  
                    </div>
                <?php }?>
            </div>
        </div>
    </div>
</div>
