<?php
/**
 * The header for our theme
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package NDesign
 */
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
	<!-- Meta Tags Start -->
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="format-detection" content="telephone=no">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, user-scalable=no,  initial-scale=1, minimum-scale=1, maximum-scale=1"/>
	<!-- Meta Tags End -->
	<link rel="profile" href="https://gmpg.org/xfn/11">
	<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php endif; ?>
<?php wp_head(); ?>
<?php $ndesign_primary_color= !empty(get_theme_mod('theme_color'))? get_theme_mod('theme_color') : '#161B5A'; ?>
<style>
	/* Primary Color as text color */
	#ndesign_custom_menu ul li > ul li a, #ndesign_custom_menu ul ul a:hover, a, .btn.btn-link, .main-title, h1.page-title, .swiper-button-prev:hover:before, .swiper-button-next:hover:before, .site-title, .menu li.menu-item a, .menu li.page_item a, .main-banner-caption, #ndesign_custom_menu li.current-menu-parent>a:before, #ndesign_custom_menu li.current-menu-item>a:before, .entry-content a, .btn.btn-link, #return-to-top:hover{
		color: <?php  echo $ndesign_primary_color; ?>;
	}

	/* Primary color as background and contrast text */
	.main-title:before, .swiper-pagination-bullet-active, .top-header, .hamburger-inner, .hamburger-inner::before, .hamburger-inner::after, footer.site-footer, .widget-title, .widgettitle, .menu:not(#primary-menu) li.menu-item a.active, .menu:not(#primary-menu) li.page_item a.active, .service-icon, .team-detail{
		background-color: <?php  echo $ndesign_primary_color; ?>;
		color:<?php echo ndesign_get_contrast_color($ndesign_primary_color); ?>;
	}

	/* Primary Border Color */
	.swiper-button-prev:hover, .swiper-button-next:hover, .menu li.menu-item, .menu li.page_item, #return-to-top:hover, .service-icon, .testimonial-image{
		border-color: <?php  echo $ndesign_primary_color; ?>;
	}

	/* Primary Text Shadow */
	#ndesign_custom_menu li.current-menu-item>a:before, #ndesign_custom_menu li.current-menu-parent>a:before{
		text-shadow: 10px 0 <?php  echo $ndesign_primary_color; ?>, -10px 0 <?php  echo $ndesign_primary_color; ?>;
	}

	/* Extralight Primary Color */
	#ndesign_custom_menu ul li > ul li:hover{
		background-color: <?php echo ndesign_color_luminance($ndesign_primary_color,'0.9');?>;
	}

	/* Dark Primary Color */
	a:hover, a:focus, a:active,.menu li.menu-item a:hover, .menu li.page_item a:hover, #ndesign_custom_menu li.current-menu-item>a:hover:before, #ndesign_custom_menu li.current-menu-parent>a:hover:before {
		color: <?php echo ndesign_color_luminance($ndesign_primary_color,'-0.4');?>;
	}
	/* Only contrast text */
	.email-phone-links li a,.footer-copyright-section, .footer-social-links li a, .footer-contact-form input[type="submit"], .footer-social-links li a:hover, .social-media-links li a, .footer-address-listing li a{
		color:<?php echo ndesign_get_contrast_color($ndesign_primary_color); ?>;
	}
	/* Dark Primary Background Color */
	.footer-social-links li a:hover, .footer-copyright-section, .btn-dark-primary{
		background-color: <?php echo ndesign_color_luminance($ndesign_primary_color,'-0.4');?>;
		color:<?php echo ndesign_get_contrast_color(ndesign_color_luminance($ndesign_primary_color,'-0.4')); ?>;
	}
	.footer-copyright-section a{
		color:<?php echo ndesign_get_contrast_color(ndesign_color_luminance($ndesign_primary_color,'-0.4')); ?>;
	}
	.btn-dark-primary:hover, .btn-dark-primary:focus, .btn-dark-primary:focus:active{
		color:<?php echo ndesign_color_luminance($ndesign_primary_color,'0.4'); ?>;
	}
	/* Dark Primary Text Shadow */
	#ndesign_custom_menu li.current-menu-item>a:hover:before, #ndesign_custom_menu li.current-menu-parent>a:hover:before{
		text-shadow: 10px 0 <?php  echo ndesign_color_luminance($ndesign_primary_color,'-0.4'); ?>, -10px 0 <?php  echo ndesign_color_luminance($ndesign_primary_color,'-0.4'); ?>;
	}
	/* Extradark Primary Color */
	a:visited:not(.site-info[href='']) {
		color: <?php echo ndesign_color_luminance($ndesign_primary_color,'-0.6');?>;
	}
	/* Only contrast Border Color */
	.footer-social-links li a, .footer-contact-form input[type="submit"]{
		border-color:<?php echo ndesign_get_contrast_color($ndesign_primary_color); ?>;
	}
	/* Contrast Background Color */
	.footer-title:before{
		background-color:<?php echo ndesign_get_contrast_color($ndesign_primary_color); ?>;
	}

	#return-to-top{
		color: <?php echo ndesign_color_luminance($ndesign_primary_color,'0.6');?>;
		border-color: <?php echo ndesign_color_luminance($ndesign_primary_color,'0.6');?>;
	}

	article.post{
		border-color:<?php echo ndesign_color_luminance($ndesign_primary_color,'0.8')?>;
	}
	article.post:hover{
		border-color:<?php echo ndesign_color_luminance($ndesign_primary_color,'0')?>;
	}
	/*Button Gradient effect Start*/
	input[type="submit"], .btn-primary,.search-form .search-submit,.about-video-content-overlay:before, .fill-cat.active, .fill-cat:hover, .btn-primary:focus,.btn-primary:active:focus{
		background: -webkit-linear-gradient(162deg, <?php echo $ndesign_primary_color;?> 0%, <?php echo ndesign_color_luminance($ndesign_primary_color,'0.3');;?> 100%);
		background: -o-linear-gradient(162deg, <?php echo $ndesign_primary_color;?> 0%, <?php echo ndesign_color_luminance($ndesign_primary_color,'0.3');?> 100%);
		background: linear-gradient(162deg, <?php echo $ndesign_primary_color; ?> 0%, <?php echo ndesign_color_luminance($ndesign_primary_color,'0.3');?> 100%);
		color: <?php echo ndesign_get_contrast_color($ndesign_primary_color); ?>;
	}

	input[type="submit"], .btn-primary, .team-detail, .btn-dark-primary, .fill-cat.active, .fill-cat:hover{
		-webkit-box-shadow: 0px 8px 15px -2px <?php echo ndesign_color_luminance($ndesign_primary_color,'0.4');?>;
		box-shadow: 0px 8px 15px -2px <?php echo ndesign_color_luminance($ndesign_primary_color,'0.4');?>;
	}

	input[type="submit"]:not(.search-submit):hover, .btn-primary:hover,.btn-primary:focus,.btn-primary:active:focus, .team-detail:hover, .team-blk:hover .team-detail,.btn-dark-primary:hover, .fill-cat.active:hover{
		-webkit-box-shadow: 0px 12px 17px -2px <?php echo ndesign_color_luminance($ndesign_primary_color,'0.35');?>;
		box-shadow: 0px 12px 17px -2px <?php echo ndesign_color_luminance($ndesign_primary_color,'0.35');?>;
	}
	/*Button Gradient effect end*/
	/*Portfolio Hover effect start*/
	.portfolio-image:before, .portfolio-image:after{
        background: -webkit-linear-gradient(left, <?php  echo $ndesign_primary_color; ?> 0%, <?php  echo $ndesign_primary_color; ?> 80%, <?php echo ndesign_color_luminance($ndesign_primary_color,'0.3');?> 80%, <?php echo ndesign_color_luminance($ndesign_primary_color,'0.3');?> 100%);
	    background: -o-linear-gradient(left, <?php  echo $ndesign_primary_color; ?> 0%, <?php  echo $ndesign_primary_color; ?> 80%, <?php echo ndesign_color_luminance($ndesign_primary_color,'0.3');?> 80%, <?php echo ndesign_color_luminance($ndesign_primary_color,'0.3');?> 100%);
		background: linear-gradient(left, <?php  echo $ndesign_primary_color; ?> 0%, <?php  echo $ndesign_primary_color; ?> 80%, <?php echo ndesign_color_luminance($ndesign_primary_color,'0.3');?> 80%, <?php echo ndesign_color_luminance($ndesign_primary_color,'0.3');?> 100%);
	}
	/*Portfolio Hover effect end*/
</style>
</head>
<body <?php body_class(); ?>>
	<?php wp_body_open(); ?>
	<div id="page" class="site">
		<!-- Top header section start -->
		<?php if ( get_theme_mod( 'fb_link' ) || get_theme_mod( 'twitter_link' ) || get_theme_mod( 'linked_in_link' ) || get_theme_mod( 'pinterest_link' ) || get_theme_mod( 'youtube_link' ) || get_theme_mod( 'phone_text' ) || get_theme_mod( 'email_text' ) ) { ?>
			<div class="container-fluid top-header">
				<!-- Container start -->
				<div class="container">
					<div class="row">
						<div class="col-lg-6 text-center text-lg-left">
							<!-- Phone and Email Id start -->
							<ul class="list-inline mb-1 mb-lg-0 email-phone-links">
								<!-- Phone Number start -->
								<?php if ( get_theme_mod( 'phone_text' ) ) : ?>
									<li class="list-inline-item">
										<span class="phone-number">
											<i class="fa fa-<?php echo esc_attr( get_theme_mod( 'phone_icon' ) ); ?>"></i>
											<a href="<?php echo esc_url( get_theme_mod( 'phone_link' ) ); ?>"><?php echo esc_html( get_theme_mod( 'phone_text' ) ); ?></a>
										</span>
									</li>
								<?php endif ?>
								<!-- Phone Number end -->
								<!-- Seperator start -->
								<?php if ( get_theme_mod( 'phone_text' ) && get_theme_mod( 'email_text' ) ) : ?>
								<li class="list-inline-item">
									<span class="mx-1">|</span>
								</li>
							<?php endif ?>
							<!-- Seperator end -->
							<!-- Email start -->
							<?php if ( get_theme_mod( 'email_text' ) ) : ?>
								<li class="list-inline-item email-address">
									<span>
										<i class="fa fa-<?php echo esc_attr( get_theme_mod( 'email_icon' ) ); ?>"></i>
										<a href="<?php echo esc_url( get_theme_mod( 'email_link' ) ); ?>"><?php echo esc_html( get_theme_mod( 'email_text' ) ); ?></a>
									</span>
								</li>
							<?php endif ?>
							<!-- Email end -->
						</ul>
						<!-- Phone and Email Id end -->
					</div>
					<?php if ( get_theme_mod( 'fb_link' ) || get_theme_mod( 'twitter_link' ) || get_theme_mod( 'linked_in_link' ) || get_theme_mod( 'pinterest_link' ) || get_theme_mod( 'youtube_link' ) ) { ?>
						<div class="col-lg-6 text-center text-lg-right">
							<!-- Social media links start -->
							<ul class="list-inline mb-0 social-media-links">
								<!-- Facebook link start -->
								<?php if ( get_theme_mod( 'fb_link' ) ) : ?>
									<li class="list-inline-item">
										<span class="facebook-link">
											<a href="<?php echo esc_url( get_theme_mod( 'fb_link' ) ); ?>" target="_blank"><i class="fa fa-<?php echo esc_attr( get_theme_mod( 'fb_icon' ) ); ?>"></i></a>
										</span>
									</li>
								<?php endif ?>
								<!-- Facebook link end -->
								<!-- Twitter link start -->
								<?php if ( get_theme_mod( 'twitter_link' ) ) : ?>
									<li class="list-inline-item">
										<span class="twitter-link">
											<a href="<?php echo esc_url( get_theme_mod( 'twitter_link' ) ); ?>" target="_blank"><i class="fa fa-<?php echo esc_attr( get_theme_mod( 'twitter_icon' ) ); ?>"></i></a>
										</span>
									</li>
								<?php endif ?>
								<!-- Twitter link end -->
								<!-- linkedin link start -->
								<?php if ( get_theme_mod( 'linked_in_link' ) ) : ?>
									<li class="list-inline-item">
										<span class="linkedin-link">
											<a href="<?php echo esc_url( get_theme_mod( 'linked_in_link' ) ); ?>" target="_blank"><i class="fa fa-<?php echo esc_attr( get_theme_mod( 'linked_in_icon' ) ); ?>"></i></a>
										</span>
									</li>
								<?php endif ?>
								<!-- linkedin link end -->
								<!-- Pinterest link start -->
								<?php if ( get_theme_mod( 'pinterest_link' ) ) : ?>
									<li class="list-inline-item">
										<span class="pinterest-link">
											<a href="<?php echo esc_url( get_theme_mod( 'pinterest_link' ) ); ?>" target="_blank"><i class="fa fa-<?php echo esc_attr( get_theme_mod( 'pinterest_icon' ) ); ?>"></i></a>
										</span>
									</li>
								<?php endif ?>
								<!-- Pinterest link end -->
								<!-- Youtube link start -->
								<?php if ( get_theme_mod( 'youtube_link' ) ) : ?>
									<li class="list-inline-item">
										<span class="youtube-link">
											<a href="<?php echo esc_url( get_theme_mod( 'youtube_link' ) ); ?>" target="_blank"><i class="fa fa-<?php echo esc_attr( get_theme_mod( 'youtube_icon' ) ); ?>"></i></a>
										</span>
									</li>
								<?php endif ?>
								<!-- Youtube link end -->
							</ul>
							<!-- Social media links end -->
						</div>
					<?php } ?>
				</div>
				<!-- Container end -->
			</div>
		</div>
	<?php } else if(is_user_logged_in()){ ?>
		<div class="container-fluid top-header">
			<div class="container">
				<div class="row">
					<div class="col-12">
						<a class="btn btn-dark-primary" href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>"><i class="fa fa-pencil mr-2"></i>Customize</a>
					</div>
				</div>
			</div>
		</div>
	<?php } ?>
	<!-- Top header section end -->
	<!-- Skip to content link start -->
	<a class="skip-link screen-reader-text" href="#main"><?php esc_html_e( 'Skip to content', 'ndesign' ); ?></a>
	<!-- Skip to content link end -->
	<!-- Header section start -->
	<div class="header-parent">
		<header id="masthead" class="site-header">
			<div class="container">
				<div class="row">
					<div class="col-lg-12">
						<!-- Primary Menu Start -->
						<nav class="navbar navbar-expand-lg navbar-light px-0">
							<!-- Site Branding Detail Start -->
							<div class="site-branding">
								<?php echo has_nav_menu('primary'); ?>
								<?php
								the_custom_logo();
								?>
								<?php
								if (!empty(get_bloginfo( 'name' ))) :
									?>
									<?php
									if ( is_front_page() && is_home() ) :
										?>
									<h1 class="site-title my-2"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
									<?php
								else :
									?>
									<p class="site-title my-2"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
								<?php endif; ?>
							<?php endif; ?>
							<?php
							if (!empty(get_bloginfo( 'description' ))) :
								?>
								<?php
								$ndesign_description = get_bloginfo( 'description', 'display' );
								if ( $ndesign_description || is_customize_preview() ) :
									?>
									<p class="site-description mb-0"><?php echo esc_html( $ndesign_description ); /* WPCS: xss ok. */ ?></p>
								<?php endif; ?>
							<?php endif; ?>
						</div>
						<!-- Site Branding Detail End -->
						<!-- Responsive Menu Button Start -->
						<?php if ( has_nav_menu('menu-1') ) { ?>
							<button class="navbar-toggler hamburger hamburger--slider" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
								<!-- <span class="navbar-toggler-icon"></span> -->
								<span class="hamburger-box">
									<span class="hamburger-inner"></span>
								</span>
							</button>
						<?php } ?>
						<!-- Responsive Menu Button End -->
						<!-- Menu Links Start -->
						<div class="collapse navbar-collapse" id="navbarSupportedContent">
							<?php
							if (has_nav_menu('menu-1')) {
								wp_nav_menu(
									array(
										'theme_location' => 'menu-1',
										'menu_id' => 'primary-menu',
										'container'=>'div',
										'container_id' => 'ndesign_custom_menu',
										'walker'=>new ndesign_Menu_Walker(),
									)
								);
							}
							?>
						</div>
						<!-- Menu Links End -->
					</nav>
					<!-- Primary Menu End -->
				</div>
			</div>
		</div>
	</header>
</div><!-- #masthead -->
<!-- Header section end -->
<div>
	<!-- <pre> -->
		<?php //ndesign_nav_menu(); ?>
		<!-- </pre> -->
	</div>
