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

$cargo_ships_top_header_text = get_theme_mod('cargo_ships_top_header_text');

$cargo_ships_top_twitter_link = get_theme_mod('cargo_ships_top_twitter_link');
$cargo_ships_top_linkdin_link = get_theme_mod('cargo_ships_top_linkdin_link');
$cargo_ships_top_youtube_link = get_theme_mod('cargo_ships_top_youtube_link');
$cargo_ships_top_facebook_link = get_theme_mod('cargo_ships_top_facebook_link');
$cargo_ships_top_instagram_link = get_theme_mod('cargo_ships_top_instagram_link');

$cargo_ships_header_button_link = get_theme_mod('cargo_ships_header_button_link');
$cargo_ships_header_button_text = get_theme_mod('cargo_ships_header_button_text');

$cargo_ships_header_phone_number = get_theme_mod('cargo_ships_header_phone_number');
$cargo_ships_header_email_address = get_theme_mod('cargo_ships_header_email_address');
$cargo_ships_header_opening_time = get_theme_mod('cargo_ships_header_opening_time');

?>

<div class="top-header wow zoomIn" data-wow-duration="2s">
	<div class="container">
		<div class="row">
			<div class="col-lg-6 col-md-6 align-self-center">
				<?php if ( ! empty( $cargo_ships_top_header_text ) ): ?>
					<p class="mb-0 text-center text-md-start"><?php echo esc_html( $cargo_ships_top_header_text ); ?></p>
				<?php endif; ?>
			</div>
			<div class="col-lg-6 col-md-6 align-self-center text-center text-md-end">
				<?php if ( ! empty( $cargo_ships_top_twitter_link ) ): ?>
					<a href="<?php echo esc_url( $cargo_ships_top_twitter_link ); ?>"><i class="fa fa-twitter me-3" aria-hidden="true"></i>
					</a>
				<?php endif; ?>
				<?php if ( ! empty( $cargo_ships_top_linkdin_link ) ): ?>
					<a href="<?php echo esc_url( $cargo_ships_top_linkdin_link ); ?>"><i class="fa fa-linkedin me-3" aria-hidden="true"></i>
					</a>
				<?php endif; ?>
				<?php if ( ! empty( $cargo_ships_top_youtube_link ) ): ?>
					<a href="<?php echo esc_url( $cargo_ships_top_youtube_link ); ?>"><i class="fa fa-youtube-play me-3" aria-hidden="true"></i>
					</a>
				<?php endif; ?>
				<?php if ( ! empty( $cargo_ships_top_facebook_link ) ): ?>
					<a href="<?php echo esc_url( $cargo_ships_top_facebook_link ); ?>"><i class="fa fa-facebook me-3" aria-hidden="true"></i>
					</a>
				<?php endif; ?>
				<?php if ( ! empty( $cargo_ships_top_instagram_link ) ): ?>
					<a href="<?php echo esc_url( $cargo_ships_top_instagram_link ); ?>"><i class="fa fa-instagram me-3" aria-hidden="true"></i>
					</a>
				<?php endif; ?>
			</div>
		</div>
	</div>
</div>

<header id="header" class="wow fadeInDown" data-wow-duration="2s" role="banner" <?php if ( get_header_image() ) { ?> style="background-image: url( <?php header_image(); ?> ); background-size: 100%;" <?php } ?> >
	<div class="container">
		<div class="row">
			<div class="col-lg-3 col-md-3 align-self-center">
				<div class="logo main">
					<?php if ( function_exists( 'cargo_ships_logo_title_description' ) ) :	cargo_ships_logo_title_description(); endif; ?>
				</div>
			</div>
			<div class="col-lg-2 col-md-3 align-self-center header-contact text-center">
				<?php if ( ! empty( $cargo_ships_header_phone_number ) ) : ?>
					<p class="mb-0">
						<i class="fa fa-phone me-3" aria-hidden="true"></i>
						<span><?php esc_html_e( 'Call: ', 'cargo-ships' ); ?></span>
						<a href="<?php echo esc_url( 'tel:' . preg_replace( '/[^0-9+]/', '', $cargo_ships_header_phone_number ) ); ?>">
							<?php echo esc_html( $cargo_ships_header_phone_number ); ?>
						</a>
					</p>
				<?php endif; ?>
			</div>

			<div class="col-lg-4 col-md-3 align-self-center header-contact text-center">
				<?php if ( ! empty( $cargo_ships_header_email_address ) ) : ?>
					<p class="mb-0">
						<i class="fa fa-envelope me-3" aria-hidden="true"></i>
						<span><?php esc_html_e( 'Send Us Email: ', 'cargo-ships' ); ?></span>
						<a href="<?php echo esc_url( 'mailto:' . sanitize_email( $cargo_ships_header_email_address ) ); ?>">
							<?php echo esc_html( $cargo_ships_header_email_address ); ?>
						</a>
					</p>
				<?php endif; ?>
			</div>
			<div class="col-lg-3 col-md-3 align-self-center header-contact text-center">
				<?php if ( ! empty( $cargo_ships_header_opening_time ) ): ?>
					<p class="mb-0"><i class="fa fa-clock-o me-3" aria-hidden="true"></i><span><?php esc_html_e('Timing: ','cargo-ships'); ?></span><?php echo esc_html( $cargo_ships_header_opening_time ); ?></p>
				<?php endif; ?>
			</div>
		</div>
	</div>
</header>

<div class="container">
	<div class="header-menu <?php echo esc_attr(cargo_ships_sticky_header()); ?>">
		<div class="row">
			<div class="col-lg-8 col-md-7 align-self-center">
				<div class="toggle-menu gb_menu mb-2 mb-md-0 text-left">
					<button onclick="cargo_ships_navigation_open()" class="gb_toggle"><p class="mb-0"><?php esc_html_e('Menu','cargo-ships'); ?></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', 'cargo-ships' ); ?>">
						<?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="cargo_ships_navigation_close()">x<span class="screen-reader-text"><?php esc_html_e('Close Menu','cargo-ships'); ?></span></a>
					</nav>
				</div>
			</div>
			<div class="col-lg-4 col-md-5 align-self-center text-md-end text-center">
				<?php if ( ! empty( $cargo_ships_header_button_link ) || ! empty( $cargo_ships_header_button_text ) ): ?>
					<a class="header_button" href="<?php echo esc_url( $cargo_ships_header_button_link ); ?>">
						<?php echo esc_html( $cargo_ships_header_button_text ); ?>
					</a>
				<?php endif; ?>
			</div>
		</div>
	</div>
</div>