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

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

                    <?php if (get_theme_mod('food_blogger_hub_site_title', true)) : ?>
                        <?php if (is_front_page() && is_home()) : ?>
                            <h1 class="text-capitalize mb-2">
                                <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a>
                            </h1>
                        <?php else : ?>
                            <p class="text-capitalize site-title mb-2">
                                <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a>
                            </p>
                        <?php endif; ?>
                    <?php endif; ?>

                    <?php
                    $food_blogger_hub_description = get_bloginfo('description', 'display');
                    if ($food_blogger_hub_description || is_customize_preview()) :
                        if (get_theme_mod('food_blogger_hub_site_tagline', false)) :
                    ?>
                            <p class="site-description my-1 text-capitalize"><?php echo esc_html($food_blogger_hub_description); ?></p>
                    <?php
                        endif;
                    endif;
                    ?>
                </div>
            </div>
            <div class="col-lg-8 col-md-4 col-6 align-self-center">
                <div class="main-navhead">
                    <div class="menubox">
                        <div class="container">
                            <div class="menu-content">
                                <?php get_template_part('template-parts/navigation/site-nav'); ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-1 col-md-4 col-6 align-self-center text-lg-end text-center d-md-flex justify-content-lg-end align-items-md-center justify-content-center">
                <span class="search-bar text-md-end me-3">
                    <button type="button" class="open-search"><i class="fas fa-search"></i></button>
                </span>
                <span class="mb-0 pe-4 wishlist-box">
                    <?php if (class_exists('YITH_WCWL')): ?>
                        <a href="<?php echo esc_url(YITH_WCWL()->get_wishlist_url()); ?>"><i class="fas fa-heart"></i></a>
                    <?php endif; ?>
                </span>
                
            </div>
            <div class="search-outer">
                <div class="inner_searchbox w-100 h-100">
                    <?php get_search_form(); ?>
                </div>
                <button type="button" class="search-close"><?php esc_html_e('CLOSE', 'food-blogger-hub'); ?></button>
            </div> 
        </div>
    </div>
</div>
 <div class="clearfix"></div>
