<?php
/**
 * Screenshot-faithful Sanctuary header.
 *
 * @package Sanctuary
 */

defined( 'ABSPATH' ) || exit;

$sanctuary_links = array(
	'Home'       => home_url( '/' ),
	'About'      => home_url( '/about/' ),
	'Ministries' => home_url( '/ministries/' ),
	'Sermons'    => home_url( '/sermons/' ),
	'Events'     => home_url( '/events/' ),
	'Give'       => home_url( '/give/' ),
	'Contact'    => home_url( '/contact/' ),
);
?>
<div class="sanctuary-topbar">
	<div class="cw-container sanctuary-topbar-inner">
		<span class="sanctuary-topbar-cross" aria-hidden="true">†</span>
		<span><?php esc_html_e( 'Sunday Services  9:00 AM & 11:00 AM', 'sanctuary' ); ?></span>
		<span class="sanctuary-topbar-dot" aria-hidden="true">•</span>
		<span><?php esc_html_e( 'Wednesday Bible Study  7:00 PM', 'sanctuary' ); ?></span>
	</div>
</div>

<header id="masthead" class="cw-header sanctuary-header">
	<div class="cw-container sanctuary-header-inner">
		<a class="sanctuary-brand" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" aria-label="<?php esc_attr_e( 'Sanctuary Baptist Church home', 'sanctuary' ); ?>">
			<span class="sanctuary-brand-mark" aria-hidden="true">
				<svg viewBox="0 0 54 72" role="img"><path d="M3 69V29C3 14.6 13.7 3 27 3s24 11.6 24 26v40H3Z"/><path d="M26 16h4v13h10v4H30v24h-4V33H16v-4h10V16Z"/></svg>
			</span>
			<span class="sanctuary-brand-copy"><strong><?php esc_html_e( 'Sanctuary', 'sanctuary' ); ?></strong><small><i></i><?php esc_html_e( 'Baptist Church', 'sanctuary' ); ?><i></i></small></span>
		</a>

		<nav class="sanctuary-primary" aria-label="<?php esc_attr_e( 'Primary', 'sanctuary' ); ?>">
			<ul>
				<?php foreach ( $sanctuary_links as $sanctuary_label => $sanctuary_url ) : ?>
					<?php
					$sanctuary_slug       = sanitize_title( $sanctuary_label );
					$sanctuary_is_current = ( 'home' === $sanctuary_slug && is_front_page() )
						|| ( 'events' === $sanctuary_slug && is_post_type_archive( 'diy_event' ) )
						|| is_page( $sanctuary_slug );
					?>
					<li><a<?php echo $sanctuary_is_current ? ' aria-current="page"' : ''; ?> href="<?php echo esc_url( $sanctuary_url ); ?>"><?php echo esc_html( $sanctuary_label ); ?></a></li>
				<?php endforeach; ?>
			</ul>
		</nav>

		<a class="sanctuary-header-cta" href="<?php echo esc_url( home_url( '/new-here/' ) ); ?>"><?php esc_html_e( 'Plan Your Visit', 'sanctuary' ); ?><span aria-hidden="true">›</span></a>
		<button type="button" class="cw-mobile-toggle sanctuary-menu-toggle" aria-expanded="false" aria-controls="cw-mobile-menu">
			<span class="screen-reader-text"><?php esc_html_e( 'Menu', 'sanctuary' ); ?></span>
			<span aria-hidden="true"></span><span aria-hidden="true"></span><span aria-hidden="true"></span>
		</button>
	</div>
</header>
