<!-- Start: Header
============================= -->
<?php

$gym_workout_header_myaccount_feild = get_theme_mod('gym_workout_header_myaccount_feild');
$gym_workout_header_phone_number_feild = get_theme_mod('gym_workout_header_phone_number_feild');
$gym_workout_header_email_address_feild = get_theme_mod('gym_workout_header_email_address_feild');
$gym_workout_header_social_icon_1_feild = get_theme_mod('gym_workout_header_social_icon_1_feild');
$gym_workout_header_social_icon_2_feild = get_theme_mod('gym_workout_header_social_icon_2_feild');
$gym_workout_header_social_icon_3_feild = get_theme_mod('gym_workout_header_social_icon_3_feild');
$gym_workout_header_social_icon_4_feild = get_theme_mod('gym_workout_header_social_icon_4_feild');
$gym_workout_header_social_icon_5_feild = get_theme_mod('gym_workout_header_social_icon_5_feild');
$gym_workout_header_social_link_1_feild = get_theme_mod('gym_workout_header_social_link_1_feild');
$gym_workout_header_social_link_2_feild = get_theme_mod('gym_workout_header_social_link_2_feild');
$gym_workout_header_social_link_3_feild = get_theme_mod('gym_workout_header_social_link_3_feild');
$gym_workout_header_social_link_4_feild = get_theme_mod('gym_workout_header_social_link_4_feild');
$gym_workout_header_social_link_5_feild = get_theme_mod('gym_workout_header_social_link_5_feild');

?>
<?php if ( true == get_theme_mod( 'gym_workout_top_header_on_off', 'on' ) ) : ?>
	<div id="header-top">
	   <div class="container">
	      <div class="row">
	      	<div class="col-lg-5 col-md-12 align-self-center text-md-end text-center">
	      	</div>
	         <div class="col-lg-5 col-md-7 align-self-center text-md-end text-center">
	         	<ul>
						<?php if ( ! empty( $gym_workout_header_email_address_feild ) ) : ?>
							<li class="me-2"><span class="dashicons dashicons-email me-2"></span><a href="mailto:<?php echo esc_html( $gym_workout_header_email_address_feild ); ?>"><?php echo esc_html( $gym_workout_header_email_address_feild ); ?></a></li>
						<?php endif; ?>
						<?php if ( ! empty( $gym_workout_header_phone_number_feild ) ) : ?>
							<li class="me-2"><span class="dashicons dashicons-phone me-2"></span><a href="tel:<?php echo esc_html( $gym_workout_header_phone_number_feild ); ?>tel:"><?php echo esc_html( $gym_workout_header_phone_number_feild ); ?></a></li>
						<?php endif; ?>
	         	</ul>
	         </div>
	         <div class="col-lg-2 col-md-5 align-self-center">
	         	<?php if ( true == get_theme_mod( 'gym_workout_social_icon_on_off', 'on' ) ) : ?>
					<div class="media-links text-md-end text-center">
						<?php if ( ! empty( $gym_workout_header_social_icon_1_feild ) || ! empty( $gym_workout_header_social_link_1_feild ) ): ?>
							<a href="<?php echo esc_url( $gym_workout_header_social_link_1_feild ); ?>">
								<span class="dashicons dashicons-<?php echo esc_html( $gym_workout_header_social_icon_1_feild ); ?>"></span>
							</a>
						<?php endif; ?>
						<?php if ( ! empty( $gym_workout_header_social_icon_2_feild ) || ! empty( $gym_workout_header_social_link_2_feild ) ): ?>
							<a href="<?php echo esc_url( $gym_workout_header_social_link_2_feild ); ?>">
								<span class="dashicons dashicons-<?php echo esc_html( $gym_workout_header_social_icon_2_feild ); ?>"></span>
							</a>
						<?php endif; ?>
						<?php if ( ! empty( $gym_workout_header_social_icon_3_feild ) || ! empty( $gym_workout_header_social_link_3_feild ) ) : ?>
							<a href="<?php echo esc_url( $gym_workout_header_social_link_3_feild ); ?>">
								<span class="dashicons dashicons-<?php echo esc_html( $gym_workout_header_social_icon_3_feild ); ?>"></span>
							</a>
						<?php endif; ?>
						<?php if ( ! empty( $gym_workout_header_social_icon_4_feild ) || ! empty( $gym_workout_header_social_link_4_feild ) ) : ?>
							<a href="<?php echo esc_url( $gym_workout_header_social_link_4_feild ); ?>">
								<span class="dashicons dashicons-<?php echo esc_html( $gym_workout_header_social_icon_4_feild ); ?>"></span>
							</a>
						<?php endif; ?>
						<?php if ( ! empty( $gym_workout_header_social_icon_5_feild ) || ! empty( $gym_workout_header_social_link_5_feild ) ) : ?>
							<a href="<?php echo esc_url( $gym_workout_header_social_link_5_feild ); ?>">
								<span class="dashicons dashicons-<?php echo esc_html( $gym_workout_header_social_icon_5_feild ); ?>"></span>
							</a>
						<?php endif; ?>
					</div>
				<?php endif; ?>
	         </div>
	      </div>
	   </div>
	</div>
<?php endif; ?>

<header id="header" role="banner" <?php if ( get_header_image() ) { ?> style="background-image: url( <?php header_image(); ?> ); background-size: 100%;" <?php } ?> >
	<div class="navbar-area <?php echo esc_attr(gym_workout_sticky_header()); ?> normal-h py-3">
		<div class="container">
			<div class="row">
				<div class="col-lg-3 col-md-5 col-8 align-self-center">
					<div class="logo main">
						<?php if ( function_exists( 'gym_workout_logo_title_description' ) ) :	gym_workout_logo_title_description(); endif; ?>
					</div>
				</div>
				<div class="col-lg-7 col-md-3 col-4 align-self-center">
					<div class="toggle-menu gb_menu text-md-start">
						<button onclick="gym_workout_navigation_open()" class="gb_toggle p-2"><p class="mb-0"><?php esc_html_e('Menu','gym-workout'); ?></p></button>
					</div>
					<div id="gb_responsive" class="nav side_gb_nav">
						<nav id="top_gb_menu" class="gb_nav_menu" role="navigation" aria-label="<?php esc_attr_e( 'Menu', 'gym-workout' ); ?>">
							<?php 
							    wp_nav_menu( array( 
									'theme_location' => 'primary_menu',
									'container_class' => 'gb_navigation clearfix' ,
									'menu_class' => 'clearfix',
									'items_wrap' => '<ul id="%1$s" class="%2$s mobile_nav mb-0 px-0">%3$s</ul>',
									'fallback_cb' => 'wp_page_menu',
							    ) ); 
							?>
							<a href="javascript:void(0)" class="closebtn gb_menu" onclick="gym_workout_navigation_close()">x<span class="screen-reader-text"><?php esc_html_e('Close Menu','gym-workout'); ?></span></a>
						</nav>
					</div>
				</div>
				<div class="col-lg-2 col-md-4 align-self-center text-md-end text-center">
					<ul class="woo-info p-0">
						<?php if ( class_exists( 'woocommerce' ) ) {?>
							<li><a class="cart-customlocation" href="<?php if(function_exists('wc_get_cart_url')){ echo esc_url(wc_get_cart_url()); } ?>" title="<?php esc_attr_e( 'View Shopping Cart','gym-workout' ); ?>"><span class="dashicons dashicons-cart me-1"></span><?php esc_html_e('Cart','gym-workout'); ?> ( <span class="cart-item-box"><?php echo esc_html(wp_kses_data( WC()->cart->get_cart_contents_count() ));?></span> )</a></li>
						<?php }?>
						<?php if ( ! empty( $gym_workout_header_myaccount_feild ) ) : ?>
							<li><a href="<?php echo esc_url( $gym_workout_header_myaccount_feild ); ?>"><span class="dashicons dashicons-admin-users"></span></a></li>
						<?php endif; ?>
					</ul>
				</div>
			</div>
		</div>
	</div>
</header>