<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<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 wp_body_open(); ?>

<a class="skip-link screen-reader-text" href="#main"><?php esc_html_e( 'Skip to content', 'easysite-pro' ); ?></a>

<header id="site-header" class="easysite-header<?php echo easysite_ve_active() ? ' esb-ve-region' : ''; ?>"<?php echo easysite_ve_active() ? ' data-esb-region="header"' : ''; ?>>
	<div class="easysite-container">
		<?php
		$use_header_builder = easysite_is_bundle() || easysite_ve_active();
		if ( $use_header_builder && easysite_ve_active() && ! get_theme_mod( 'easysite_header_builder_layout' ) ) {
			set_theme_mod( 'easysite_header_builder_layout', array( 'logo', 'menu', 'button' ) );
		}
		if ( $use_header_builder && get_theme_mod( 'easysite_header_builder_layout' ) ) {
			easysite_render_header_builder();
		} else {
			?>
			<div class="easysite-header-inner">
				<div class="easysite-branding">
					<?php
					if ( has_custom_logo() ) {
						the_custom_logo();
					} else {
						$ve = easysite_ve_active();
						?>
						<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="easysite-site-title<?php echo $ve ? ' esb-ve-region-el' : ''; ?>" <?php echo $ve ? 'contenteditable="true" data-esb-region-field="site_title" data-esb-type="text"' : ''; ?>><?php bloginfo( 'name' ); ?></a>
						<?php if ( get_bloginfo( 'description' ) ) : ?>
							<p class="easysite-tagline"><?php bloginfo( 'description' ); ?></p>
						<?php endif; ?>
					<?php } ?>
				</div>
				<button class="easysite-menu-toggle" aria-controls="primary-menu" aria-expanded="false" aria-label="<?php esc_attr_e( 'Toggle menu', 'easysite-pro' ); ?>">
					<span></span><span></span><span></span>
				</button>
				<nav id="primary-menu" class="easysite-primary-nav" aria-label="<?php esc_attr_e( 'Primary', 'easysite-pro' ); ?>">
					<?php
					wp_nav_menu( array(
						'theme_location' => 'primary',
						'menu_class'     => 'easysite-nav-menu',
						'container'      => false,
						'fallback_cb'    => 'easysite_fallback_menu',
					) );
					?>
				</nav>
			</div>
			<?php
		}
		?>
	</div>
</header>

<main id="main" class="easysite-main">
