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

<div class="headerbox pt-md-2 pb-md-3">
    <div class="header-main px-md-5 px-lg-0">
        <div class="row mx-0">
            <div class="col-lg-3 col-md-12 align-self-center">
                <div class="logo text-center">
                    <?php if (has_custom_logo()) : ?>
                        <?php the_custom_logo(); ?>
                    <?php endif; ?>

                    <?php if (get_theme_mod('window_blinds_repair_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 site-title">
                                <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a>
                            </p>
                        <?php endif; ?>
                    <?php endif; ?>
                    <?php
                    $window_blinds_repair_description = get_bloginfo('description', 'display');
                    if ($window_blinds_repair_description || is_customize_preview()) :
                        if (get_theme_mod('window_blinds_repair_site_tagline', false)) :
                            ?>
                            <p class="site-description my-1 text-capitalize"><?php echo esc_html($window_blinds_repair_description); ?></p>
                        <?php endif; 
                    endif;
                    ?>
                </div>
            </div>

            <div class="col-lg-9 col-md-12 align-self-center">
                <div class="row">
                    <div class="col-lg-3 col-md-4 align-self-center my-md-0 my-2">
                        <div class="contact call">
                            <?php if (get_theme_mod('window_blinds_repair_call_text') || get_theme_mod('window_blinds_repair_call')) : ?>
                                <div class="row">
                                    <div class="col-lg-2 col-md-4 col-3 align-self-center text-center text-md-left">
                                        <i class="fas fa-phone"></i>
                                    </div>
                                    <div class="col-lg-10 col-md-8 col-9 align-self-center text-lg-start ps-md-4 contact-col call">
                                        <p class="infotext text-capitalize"><?php echo esc_html(get_theme_mod('window_blinds_repair_call_text', '')); ?></p>
                                        <p class="mb-0 contact-content">
                                            <a href="tel:<?php echo esc_html(get_theme_mod('window_blinds_repair_call', '')); ?>">
                                                <?php echo esc_html(get_theme_mod('window_blinds_repair_call', '')); ?>
                                            </a>
                                        </p>
                                    </div>
                                </div>
                            <?php endif; ?>
                        </div>
                    </div>

                    <div class="col-lg-4 col-md-4 align-self-center my-md-0 my-2">
                        <div class="contact">
                            <?php if (get_theme_mod('window_blinds_repair_mail_text') || get_theme_mod('window_blinds_repair_mail')) : ?>
                                <div class="row">
                                    <div class="col-lg-2 col-md-4 col-3 align-self-center text-center text-md-left">
                                        <i class="fas fa-envelope-open"></i>
                                    </div>
                                    <div class="col-lg-10 col-md-8 col-9 align-self-center contact-col">
                                        <p class="infotext text-capitalize"><?php echo esc_html(get_theme_mod('window_blinds_repair_mail_text', '')); ?></p>
                                        <p class="mb-0 contact-content">
                                            <a href="mailto:<?php echo esc_html(get_theme_mod('window_blinds_repair_mail', '')); ?>">
                                                <?php echo esc_html(get_theme_mod('window_blinds_repair_mail', '')); ?>
                                            </a>
                                        </p>
                                    </div>
                                </div>
                            <?php endif; ?>
                        </div>
                    </div>

                    <div class="col-lg-4 col-md-4 align-self-center my-md-0 my-2">
                        <div class="contact">
                            <?php if (get_theme_mod('window_blinds_repair_location_text') || get_theme_mod('window_blinds_repair_location')) : ?>
                                <div class="row">
                                    <div class="col-lg-2 col-md-4 col-3 align-self-center text-center text-md-left">
                                        <i class="fas fa-map-marker-alt"></i>
                                    </div>
                                    <div class="col-lg-10 col-md-8 col-9 align-self-center contact-col">
                                        <p class="infotext text-capitalize"><?php echo esc_html(get_theme_mod('window_blinds_repair_location_text', '')); ?></p>
                                        <p class="mb-0 contact-content">
                                            <?php echo esc_html(get_theme_mod('window_blinds_repair_location', '')); ?>
                                        </p>
                                    </div>
                                </div>
                            <?php endif; ?>
                        </div>
                    </div>
                    <div class="col-lg-1"></div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="main-navhead">
    <div class="menubox text-end">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-4 col-md-4 col-4"></div>
                <div class="col-lg-8 col-md-8 col-8 px-0">
                    <div class="menu-content">
                        <?php get_template_part('template-parts/navigation/site-nav'); ?>
                        <div class="search-bar">
                            <button type="button" class="open-search"><i class="fas fa-search"></i></button>
                        </div>
                    </div>
                </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', 'window-blinds-repair'); ?></button>
                </div>
            </div>
        </div>
    </div>
</div>
