<?php
/**
 * The Header for our theme.
 * @since 1.0
 * @package evaWp
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
 	<meta charset="<?php bloginfo( 'charset' ); ?>">
 	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="http://gmpg.org/xfn/11">
 	<?php wp_head(); ?>
</head>
<body <?php evawp_schema_for_tags( 'body' ); body_class(); ?> >
	<?php wp_body_open(); ?>
	<a class="skip-link screen-reader-text" href="#site-content">
		<?php esc_html_e( 'Skip to content', 'evawp' ); ?>
	</a>
	<?php do_action( 'evawp-before-header' ); ?>
	<header id="masthead" <?php evawp_schema_for_tags( 'header' ); ?>class="evawp-main-header">
		<?php do_action( 'evawp-before-inside-header' ); ?>
		<div class="evawp-top-wrapper">
			<div class="container evawp-top-inner">
				<div class="evawp-menu-wrapper">
					<nav class="evawp-primary-menu" id="site-navigation">
						<?php wp_nav_menu( array(
							'theme_location' => 'primary-menu',
							'echo'           => true,
							'container'      => false,
							'menu_id'        => 'primary-menu',
							'menu_class'     => 'navigation clearfix'
						)); ?>
					</nav>
					<button class="menu-toggler" id="menu-icon">
						<span></span>
						<span></span>
						<span></span>
						<span></span>
					</button>
				</div>

				<?php if( has_nav_menu( 'social-menu-header' ) ): ?>
					<div class="evawp-social-menu-wrapper">
						<?php wp_nav_menu( array(
							'menu_id'		 => 'social-menu-header',
							'theme_location' => 'social-menu-header',
							'fallback_cb'    => false,
							'echo'           => true,
							'container'      => false,
							'menu_class'	 => 'menu',
							'link_before'	 => '<span>',
							'link_after'	 => '</span>',
							'depth'			 => 1
						)); ?>
					</div>
				<?php endif; ?>
				<div class="evawp-search-wrapper">
					<div class="evawp-search-form">					
						<?php get_search_form(); ?>
					</div>
				</div>
			</div>
		</div>
		<div class="evawp-site-branding">
			<div>
				<?php the_custom_logo(); ?>
				<div>
					<?php if ( is_front_page() ) :
						?>
						<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;
					
					$description = get_bloginfo( 'description', 'display' );
					if ( $description || is_customize_preview() ) :
						?>
						<p class="site-description">
							<?php echo esc_html( $description ); /* WPCS: xss ok. */ ?>								
						</p>
					<?php endif; ?>
				</div>
				<?php if( !is_single() && !is_page() ):
					evawp_the_breadcrumb();
				endif; ?>
			</div>
		</div>
		<?php do_action( 'evawp-after-inside-header' ); ?>
	</header>
	<?php do_action( 'evawp-after-header' ); ?>
