<?php
/**
 * Displays main header
 *
 * @package Academic Education Lite
 */
?>

<div class="main-header text-center text-md-start" data-sticky="<?php echo esc_attr($academic_education_lite_data_sticky); ?>">
    <div class="container">
        <div class="row nav-box">
            <div class="col-xl-3 col-lg-3 col-md-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 $academic_education_lite_blog_info = get_bloginfo( 'name' ); ?>
                        <?php if ( ! empty( $academic_education_lite_blog_info ) ) : ?>
                            <?php if ( is_front_page() && is_home() ) : ?>
                                <?php if( get_theme_mod('academic_education_lite_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('academic_education_lite_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
                            $academic_education_lite_description = get_bloginfo( 'description', 'display' );
                            if ( $academic_education_lite_description || is_customize_preview() ) :
                        ?>
                        <?php if( get_theme_mod('academic_education_lite_theme_description',false) != ''){ ?>
                            <p class="site-description pb-2"><?php echo esc_html($academic_education_lite_description); ?></p>
                        <?php } ?>
                    <?php endif; ?>
                </div>
            </div>
            <div class="col-xl-6 col-lg-7 col-md-4 align-self-center header-box">
                <?php get_template_part('template-parts/navigation/nav'); ?>
                <?php if ( get_theme_mod('academic_education_lite_login_btn_url') != "") {?>
                    <a href="<?php echo esc_url(get_theme_mod('academic_education_lite_login_btn_url')); ?>" class="login-btn"><?php echo esc_html('Login', 'academic-education-lite'); ?></a>
                <?php }?>
            </div>
            <div class="col-xl-3 col-lg-2 col-md-4  align-self-center header-btn text-md-end text-center">
                <?php if ( get_theme_mod('academic_education_lite_register_btn_url') != "") {?>
                    <span class="header-btn">
                        <a href="<?php echo esc_url(get_theme_mod('academic_education_lite_register_btn_url')); ?>"><?php echo esc_html('Register', 'academic-education-lite'); ?></a>
                    </span>
                <?php }?>
            </div>
        </div>
    </div>
</div>
