<?php
/**
 * The header for our theme
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package Alpha
 */

?>
<!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="https://gmpg.org/xfn/11">

	<?php wp_head(); ?>
	<!-- Meta Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '996152485016763');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=996152485016763&ev=PageView&noscript=1"
/></noscript>
<!-- End Meta Pixel Code -->
</head>

<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
	<a class="skip-link screen-reader-text" href="#primary"><?php esc_html_e( 'Skip to content', 'alpha' ); ?></a>

	<nav id="topline-nav" class="topline-nav">
		<?php
		wp_nav_menu(
			array(
				'theme_location' => 'topline',
				'menu_id'        => 'topline-menu',
			)
		);
		?>
	</nav>

	<?php

	$site_header_class = 'site-header';
	if ( is_page() && has_block( 'acf/hero' ) ) {
		$site_header_class .= ' overlay';
	} else {
		$site_header_class .= ' solid';
	}

	?>


	<header id="masthead" class="<?php echo esc_attr( $site_header_class ); ?>">

		<div class="branding" id="branding">

			<a id="header-menu-logo" title="<?php bloginfo( 'name' ); ?>" rel="home" class="aicon-logo" href="<?php echo esc_url( home_url() ); ?>"></a>

			<a href="#" class="menu-toggle" id="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><i class="aicon-hamburger"></i></a>

			<nav id="site-navigation" class="main-navigation">
				<a href="#" id="menu-close" class="menu-close"><i class="aicon-close"></i></a>

				<?php
				wp_nav_menu(
					array(
						'theme_location'  => 'primary',
						'menu_id'         => 'primary-menu',
						'container_class' => 'primary-menu-container',
						'walker'          => new Alpha_Menu_Walker(),
					)
				);
				wp_nav_menu(
					array(
						'theme_location'  => 'primary-right',
						'menu_id'         => 'primary-right-menu',
						'container_class' => 'primary-right-menu-container',
						'walker'          => new Alpha_Menu_Walker(),
					)
				);
				?>
			</nav><!-- #site-navigation -->

		</div><!-- .branding -->

	</header><!-- #masthead -->
