<?php
/**
 * The header for our theme
 *
 * @subpackage Motivational Speaker
 * @since 1.0
 */

?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js no-svg">
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>

<?php
	if ( function_exists( 'wp_body_open' ) ) {
	    wp_body_open();
	} else {
	    do_action( 'wp_body_open' );
	}
?>
	<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'motivational-speaker' ); ?></a>
	<?php if( get_option('motivational_speaker_theme_loader',true) != 'off'){ ?>
		<?php $motivational_speaker_loader_option = get_theme_mod( 'motivational_speaker_loader_style','style_one');
		if($motivational_speaker_loader_option == 'style_one'){ ?>
			<div id="preloader" class="circle">
				<div id="loader"></div>
			</div>
		<?php }
		else if($motivational_speaker_loader_option == 'style_two'){ ?>
			<div id="preloader">
				<div class="spinner">
					<div class="rect1"></div>
					<div class="rect2"></div>
					<div class="rect3"></div>
					<div class="rect4"></div>
					<div class="rect5"></div>
				</div>
			</div>
		<?php }?>
	<?php }?>
	<div id="page" class="site">
		<div id="header">
			<div class="container">
				<div class="wrap_figure wow fadeInDown">
					<div class="top_bar text-center text-lg-start text-md-start">
						<div class="container">
							<div class="row">
								<div class="col-lg-3 col-md-6 col-sm-6 align-self-center">
									<div class="motivational-speaker-logo">
								        <?php if ( has_custom_logo() ) : ?>
						            		<?php the_custom_logo(); ?>
							            <?php endif; ?>
						              	<?php $blog_info = get_bloginfo( 'name' ); ?>
						              	<?php if( get_option('motivational_speaker_logo_title',false) != 'off'){ ?>
							                <?php if ( ! empty( $blog_info ) ) : ?>
							                  	<?php if ( is_front_page() && is_home() ) : ?>
							                    	<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
							                  	<?php else : ?>
						                      		<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
						                  		<?php endif; ?>
							                <?php endif; ?>
							                <?php }?>
							                <?php
						                  		$description = get_bloginfo( 'description', 'display' );
							                  	if ( $description || is_customize_preview() ) :
							                ?>
							                <?php if( get_option('motivational_speaker_logo_text',true) != 'off'){ ?>
						                  	<p class="site-description">
						                    	<?php echo esc_html($description); ?>
						                  	</p>
						                  <?php }?>
						              	<?php endif; ?>
								    </div>
								</div>
								<div class="col-lg-3 col-md-6 col-sm-6 align-self-center">
									<?php if( get_theme_mod('motivational_speaker_email_address_text') != '' || get_theme_mod('motivational_speaker_email_address') != '' ){ ?>
										<div class="row mailling-box">
											<div class="col-lg-2 col-md-2 align-self-center text-md-end icon-box">
												<i class="<?php echo esc_attr(get_theme_mod('motivational_speaker_email_icon','')); ?>"></i>
											</div>
											<div class="col-lg-10 col-md-10 align-self-center">
												<h6 class="mb-0"><?php echo esc_html(get_theme_mod('motivational_speaker_email_address_text','')); ?></h6>
												<p class="mb-0"><a href="mailto:<?php echo esc_attr(get_theme_mod('motivational_speaker_email_address', '')); ?>"><?php echo esc_html(get_theme_mod('motivational_speaker_email_address', '')); ?></a></p>
											</div>
										</div>
									<?php }?>
								</div>
								<div class="col-lg-4 col-md-6 col-sm-6 align-self-center">
									<?php if( get_option('motivational_speaker_search_enable',false) != 'off'){ ?>
										<div class="searching-box">
											<?php get_search_form(); ?>
										</div>
									<?php }?>
								</div>
								<?php if( get_option('motivational_speaker_social_enable',false) != 'off'){ ?>
									<?php
							            $motivational_speaker_header_twt_target = esc_attr(get_option('motivational_speaker_header_twt_target','true'));
							            $motivational_speaker_header_fb_target = esc_attr(get_option('motivational_speaker_header_fb_target','true'));
							            $motivational_speaker_header_youtube_target = esc_attr(get_option('motivational_speaker_header_youtube_target','true'));
							            $motivational_speaker_header_instagram_target = esc_attr(get_option('motivational_speaker_header_instagram_target','true'));
							        ?> 					
									<div class="col-lg-2 col-md-6 col-sm-6 align-self-center media-box">
										 <?php if( get_theme_mod('motivational_speaker_twitter') != ''){ ?>
							            <a target="<?php echo $motivational_speaker_header_twt_target !='off' ? '_blank' : '' ?>" href="<?php echo esc_url(get_theme_mod('motivational_speaker_twitter','')); ?>">
							              <i class="<?php echo esc_attr(get_theme_mod('motivational_speaker_twitter_icon','fab fa-x-twitter')); ?>"></i>
							            </a>
							          <?php }?>
							          <?php if( get_theme_mod('motivational_speaker_facebook') != ''){ ?>
							            <a target="<?php echo $motivational_speaker_header_fb_target !='off' ? '_blank' : '' ?>" href="<?php echo esc_url(get_theme_mod('motivational_speaker_facebook','')); ?>">
							              <i class="<?php echo esc_attr(get_theme_mod('motivational_speaker_fb_icon','fab fa-facebook-f')); ?>"></i>
							            </a>
							          <?php }?>
							          <?php if( get_theme_mod('motivational_speaker_youtube') != ''){ ?>
							            <a target="<?php echo $motivational_speaker_header_youtube_target !='off' ? '_blank' : '' ?>" href="<?php echo esc_url(get_theme_mod('motivational_speaker_youtube','')); ?>">
							              <i class="<?php echo esc_attr(get_theme_mod('motivational_speaker_youtube_icon','fab fa-youtube')); ?>"></i>
							            </a>
							          <?php }?>
							          <?php if( get_theme_mod('motivational_speaker_instagram') != ''){ ?>
							            <a target="<?php echo $motivational_speaker_header_instagram_target !='off' ? '_blank' : '' ?>" href="<?php echo esc_url(get_theme_mod('motivational_speaker_instagram','')); ?>">
							              <i class="<?php echo esc_attr(get_theme_mod('motivational_speaker_instagram_icon','fab fa-instagram')); ?>"></i>
							            </a>
							          <?php }?>
									</div>
								<?php } ?>
							</div>
						</div>
					</div>
					<div class="menu_header">
						<div class="container">
							<div class="row">
								<div class="col-lg-9 col-md-4 col-sm-4 col-2 align-self-center">
									<div class="fixed_header">
										<div class="toggle-menu gb_menu">
											<button onclick="motivational_speaker_gb_Menu_open()" class="gb_toggle p-2"><i class="<?php echo esc_attr(get_theme_mod('motivational_speaker_menu_icon','fas fa-bars')); ?>"></i></button>
										</div>
					   				<?php get_template_part('template-parts/navigation/navigation'); ?>
					   			</div>
					   			</div>
					   			<div class="col-lg-3 col-md-8 col-sm-8 col-10 align-self-center">
					   				<?php if( get_theme_mod('motivational_speaker_call_text') != '' || get_theme_mod('motivational_speaker_call_number') != '' ){ ?>
						   				<div class="row calling-box">
											<div class="col-lg-2 col-md-2 col-3 align-self-center text-end icon-box">
												<i class="<?php echo esc_attr(get_theme_mod('motivational_speaker_call_icon','')); ?>"></i>
											</div>
											<div class="col-lg-10 col-md-10 col-9 align-self-center">
												<h6 class="mb-0"><?php echo esc_html(get_theme_mod('motivational_speaker_call_text','')); ?></h6>
												<p class="mb-0"><a href="tel:<?php echo esc_attr(get_theme_mod('motivational_speaker_call_number', '')); ?>"><?php echo esc_html(get_theme_mod('motivational_speaker_call_number', '')); ?></a></p>
											</div>
										</div>
									<?php }?>
					   			</div>
					   		</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>