<?php
/**
 * Displays main header
 *
 * @package Social Media Marketing
 */
?>
<?php
$social_media_marketing_sticky_header = get_theme_mod('social_media_marketing_sticky_header');
    $social_media_marketing_data_sticky = "false";
    if ($social_media_marketing_sticky_header) {
    $social_media_marketing_data_sticky = "true";
    }
?>
<div class="main-header text-center text-md-start" data-sticky="<?php echo esc_attr($social_media_marketing_data_sticky); ?>">
    <div class="container">
        <div class="row nav-box m-0">
            <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 $social_media_marketing_blog_info = get_bloginfo( 'name' ); ?>
                        <?php if ( ! empty( $social_media_marketing_blog_info ) ) : ?>
                            <?php if ( is_front_page() && is_home() ) : ?>
                                <?php if( get_theme_mod('social_media_marketing_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('social_media_marketing_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
                            $social_media_marketing_description = get_bloginfo( 'description', 'display' );
                            if ( $social_media_marketing_description || is_customize_preview() ) :
                        ?>
                        <?php if( get_theme_mod('social_media_marketing_theme_description',false) != ''){ ?>
                            <p class="site-description pb-2"><?php echo esc_html($social_media_marketing_description); ?></p>
                        <?php } ?>
                    <?php endif; ?>
                </div>
            </div>
            <div class="col-xl-7 col-lg-6 col-md-4 align-self-center header-box">
                <?php get_template_part('template-parts/navigation/nav'); ?>
            </div>
            <div class="col-xl-2 col-lg-3 col-md-4  align-self-center header-btn text-md-end text-center">
                <?php if ( get_theme_mod('social_media_marketing_login_url') != "" || get_theme_mod('social_media_marketing_signup_url') != "" ) {?>
                    <span class="header-btn">
                        <a href="<?php echo esc_url(get_theme_mod('social_media_marketing_login_url')); ?>"><?php echo esc_html('Log In', 'social-media-marketing'); ?></a>
                        <a href="<?php echo esc_url(get_theme_mod('social_media_marketing_signup_url')); ?>" class="signup-btn"><?php echo esc_html('Sign Up', 'social-media-marketing'); ?></a>
                    </span>
                <?php }?>
            </div>
        </div>
    </div>
</div>
