<?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 eco-solar-energy
 */

?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="https://gmpg.org/xfn/11">

	<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
	<a class="skip-link screen-reader-text" href="#primaryid"><?php esc_html_e( 'Skip to content', 'eco-solar-energy' ); ?></a>
	<header id="masthead" class="site-header">
<div class="headericondiv">
		<div class="container px-0 d-flex align-items-center justify-content-center justify-content-md-between ">
				<div class="social-links d-flex">
					<a href="https://www.facebook.com/" target="_blank" class="me-2">
						<i class="fa-brands <?php echo esc_html(get_theme_mod('solar_facebook_icon', __('fa-facebook-f', 'eco-solar-energy'))) ?>"></i>
					</a>
					<a href="https://www.instagram.com/" target="_blank" class="me-2">
						<i class="fa-brands <?php echo esc_html(get_theme_mod('solar_instagram_icon', __('fa-instagram', 'eco-solar-energy'))) ?>">"></i>
					</a>
					<a href="https://twitter.com/" target="_blank" class="me-2">
						<i class="fa-brands <?php echo esc_html(get_theme_mod('solar_twitter_icon', __('fa-twitter', 'eco-solar-energy'))) ?>"></i>
					</a>
            	</div>
            <div class="contact-info d-flex align-items-center d-none d-md-flex">
                <div class="phone_call">
                    <a href="#" class="d-flex justify-content-center align-item-center me-3">
                        <i class="fa-solid <?php echo esc_html(get_theme_mod('solar_phone_icon', __('fa-phone-volume', 'eco-solar-energy'))) ?> icon me-2"></i>
                        <p class="mb-0 mt-2"><?php echo esc_html(get_theme_mod('eco_solar_energy_head_calltitle', __('1110-222-333', 'eco-solar-energy')))?></p>
                    </a>
                </div>
                <div class="email_info">
                    <a href="#" class="d-flex justify-content-center align-item-center me-3">
                        <i class="fa-solid <?php echo esc_html(get_theme_mod('solar_email_icon', __('fa-envelope', 'eco-solar-energy'))) ?> icon me-2"></i>
                        <p class="mb-0 mt-2"><?php echo esc_html(get_theme_mod('eco_solar_energy_head_emailtitle', __('info@example.com', 'eco-solar-energy')))?></p>
                    </a>
                </div>               
            </div>
        </div>
</div>
		<nav id="site-navigation" class="main-navigation navbar navbar-expand-lg">
			<div class="sitenave">
				<div class="site-branding py-2">
					<?php
					if (has_custom_logo()) {
						the_custom_logo();
					} else {
						if (is_front_page() && is_home()): ?>
							<div class="business-box">
								<div class="business-title-container">
									<h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></h1>
								</div>
							</div>
						<?php else: ?>
							<div class="business-box">
								<div class="business-title-container">
									<p class="site-title m-0"><a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></p>
								</div>
							</div>
						<?php endif; ?>
						
						<?php
						$the_corporate_business_description = get_bloginfo('description', 'display');
						if ($the_corporate_business_description || is_customize_preview()): ?>
							<p class="site-description"><?php echo $the_corporate_business_description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
						<?php endif; 
					} ?>
				</div>
				<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false">
					<span class="navbar-toggler-icon">
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</span>
				</button>  
			</div>
					
		<?php
// Get values from Customizer with defaults
$contact_text = get_theme_mod( 'header_contact_button_text', 'Contact Us' );
$contact_url  = get_theme_mod( 'header_contact_button_url', home_url('/contact') );

wp_nav_menu(
    array(
        'theme_location' => 'menu-1',
        'menu_id'        => 'primary-menu',
        'items_wrap'     => '<ul id="%1$s" class="%2$s">%3$s<li class="menu-item contact-item"><a href="' . esc_url( $contact_url ) . '" class="btn contact-btn">' . esc_html( $contact_text ) . '</a></li></ul>',
    )
);
?>


		</nav><!-- #site-navigation -->
	</header><!-- #masthead -->
<!-- // Get values from Customizer
$contact_text = get_theme_mod( 'header_contact_button_text', 'Contact' );
$contact_url  = get_theme_mod( 'header_contact_button_url', home_url('/contact') );
?>

<a href="</?php echo esc_url( $contact_url ); ?>" class="btn btn-primary contact-btn">
    </?php echo esc_html( $contact_text ); ?>
</a> -->

