<?php
/**
 * Template Name: Header Two
 */
$show_social = get_theme_mod('show_header_social_icons', false);
?>
<header id="masthead" class="site-header header-one" style="background-image: url(<?php echo esc_url( get_header_image() ); ?>);">
	<div class="container">
		<div class="row">
			<?php if ( $show_social ) : ?>
				<!-- Branding Column -->
				<div class="col-12 col-md-4 col-lg-3 d-flex align-items-center justify-content-center justify-content-md-start order-1">
			<?php else : ?>
				<!-- Branding Column - wider if social icons are hidden -->
				<div class="col-12 col-md-6 col-lg-4 d-flex align-items-center justify-content-center justify-content-md-start order-1">
			<?php endif; ?>
					<div class="site-branding header-logo author-portfolio-text-center author-portfolio-text-md-left">
						<?php if ( has_custom_logo() ) the_custom_logo(); ?>
						<h1 class="site-title">
							<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
						</h1>
						<?php
						$description = get_bloginfo( 'description', 'display' );
						if ( $description || is_customize_preview() ) :
							echo '<p class="site-description">' . esc_html( $description ) . '</p>';
						endif;
						?>
					</div>
				</div>

			<?php if ( $show_social ) : ?>
				<!-- Social Column -->
				<div class="col-12 col-md-4 col-lg-3 d-flex align-items-center justify-content-center justify-content-md-end order-2 order-md-3">
					<div class="header-social-links author-portfolio-text-center author-portfolio-text-md-right" id="header-social-links">
						<?php echo author_portfolio_social_links(); ?>
					</div>
				</div>
			<?php endif; ?>

			<?php if ( $show_social ) : ?>
				<!-- Menu Column -->
				<div class="col-12 col-md-4 col-lg-6 d-flex align-items-center justify-content-center order-3 order-md-2">
			<?php else : ?>
				<!-- Menu Column - wider if social icons are hidden -->
				<div class="col-12 col-md-6 col-lg-8 d-flex align-items-center justify-content-end order-3 order-md-2">
			<?php endif; ?>
					<div class="cssmenu author-portfolio-text-center" id="cssmenu">
						<?php
						wp_nav_menu(array(
							'theme_location' => 'main-menu',
							'container' => 'ul',
							'depth' => 3,
							'menu_class' => 'nav'
						));
						?>
					</div>
				</div>
		</div>
	</div>
</header><!-- #masthead -->
