<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div class="container">
 *
 * @package Luxury Interior
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>

<?php if ( function_exists( 'wp_body_open' ) ) {
  wp_body_open();
} else {
  do_action( 'wp_body_open' );
} ?>

<?php if ( get_theme_mod('luxury_interior_preloader', false) != "") { ?>
  <div id="preloader">
    <div id="status">&nbsp;</div>
  </div>
<?php }?>

<div id="pageholder" <?php if( get_theme_mod( 'luxury_interior_box_layout', false) != "" ) { echo 'class="boxlayout"'; } ?>>

<div class="header">
  <div class="container">
    
    <?php if ( get_theme_mod('luxury_interior_topbar', false) != "") { ?>
      <div class="upper-header">
        <div class="row">
          <div class="col-lg-4 col-md-5 col-sm-5 center-align">
            <?php $luxury_interior_description = get_bloginfo( 'description', 'display' );
              if ( $luxury_interior_description || is_customize_preview() ) : ?>
              <?php if ( get_theme_mod('luxury_interior_tagline_enable',false) != "") { ?>
              <span class="site-description"><?php echo esc_html( $luxury_interior_description ); ?></span>
              <?php } ?>
            <?php endif; ?>
          </div>
          <div class="col-lg-4 col-md-4 col-sm-4 center-align">
              <?php if ( get_theme_mod('luxury_interior_email_address') != "") { ?>
                <p class="mb-0"><a class="mb-0 email" href="mailto:<?php echo esc_attr( get_theme_mod('luxury_interior_email_address','') ); ?>"><i class="far fa-envelope me-2"></i><?php echo esc_html(get_theme_mod ('luxury_interior_email_address','')); ?></a></p>
              <?php }?>
          </div>
          <div class="col-lg-4 col-md-3 col-sm-3 center-align social-icons">
            <?php if ( get_theme_mod('luxury_interior_fb_link') != "") { ?>
              <a title="<?php echo esc_attr('facebook', 'luxury-interior'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('luxury_interior_fb_link')); ?>"><i class="fab fa-facebook-f me-2"></i></a>
            <?php } ?>
            <?php if ( get_theme_mod('luxury_interior_twitt_link') != "") { ?>
              <a title="<?php echo esc_attr('twitter', 'luxury-interior'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('luxury_interior_twitt_link')); ?>"><i class="fab fa-twitter me-2"></i></a>
            <?php } ?>
            <?php if ( get_theme_mod('luxury_interior_linked_link') != "") { ?>
              <a title="<?php echo esc_attr('linkedin', 'luxury-interior'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('luxury_interior_linked_link')); ?>"><i class="fab fa-linkedin-in me-2"></i></a>
            <?php } ?>
            <?php if ( get_theme_mod('luxury_interior_insta_link') != "") { ?>
              <a title="<?php echo esc_attr('instagram', 'luxury-interior'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('luxury_interior_insta_link')); ?>"><i class="fab fa-instagram me-2"></i></a>
            <?php } ?>
            <?php if ( get_theme_mod('luxury_interior_youtube_link') != "") { ?>
              <a title="<?php echo esc_attr('youtube', 'luxury-interior'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('luxury_interior_youtube_link')); ?>"><i class="fab fa-youtube me-2"></i></a>
            <?php } ?>
          </div>
        </div>
      </div>
    <?php }?>

    <div class="inner-header <?php echo esc_attr(luxury_interior_sticky_menu()); ?>">
      <div class="row">
        <div class="col-lg-3 col-md-4 center-align">
          <div class="logo py-2 py-md-0 py-sm-0">
            <?php if (get_theme_mod('luxury_interior_logo_enable', true)) { ?>
              <?php luxury_interior_the_custom_logo(); ?>
            <?php } ?>
            <?php $luxury_interior_blog_info = get_bloginfo( 'name' ); ?>
            <?php if ( ! empty( $luxury_interior_blog_info ) ) : ?>
              <?php if ( get_theme_mod('luxury_interior_title_enable',false) != "") { ?>
                <?php if ( is_front_page() && is_home() ) : ?>
                  <h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a></h1>
                <?php else : ?>
                  <p class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a></p>
              <?php endif; ?>
            <?php } ?>
          <?php endif; ?>
          </div>
        </div>
        <div class="col-lg-9 col-md-8 center-align">
          <div class="toggle-nav text-center">
            <button role="tab"><?php esc_html_e('MENU','luxury-interior'); ?></button>
          </div>
          <div id="mySidenav" class="nav sidenav text-right">
            <nav id="site-navigation" class="main-nav" role="navigation" aria-label="<?php esc_attr_e( 'Top Menu','luxury-interior' ); ?>">
              <ul class="mobile_nav">
                <?php 
                  wp_nav_menu( array( 
                    'theme_location' => 'primary',
                    'container_class' => 'main-menu' ,
                    'items_wrap' => '%3$s',
                    'fallback_cb' => 'wp_page_menu',
                  ) ); 
                 ?>
              </ul>
              <a href="javascript:void(0)" class="close-button"><?php esc_html_e('CLOSE','luxury-interior'); ?></a>
            </nav>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
