<?php
/**
 * Replicates header.php from the main PHP site so the WordPress blog
 * feels like a seamless part of the same site. Non-blog nav links point
 * back to GX_MAIN_SITE_URL (the main PHP site); the Blog link stays inside WordPress.
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
  <meta charset="<?php bloginfo('charset'); ?>" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <link rel="shortcut icon" href="<?php echo GX_MAIN_SITE_URL; ?>/images/favicon.ico" sizes="16x16 32x32" />
  <?php wp_head(); ?>
</head>
<body <?php body_class('dark'); ?>>

  <!-- ============ TOP BAR ============ -->
  <div class="topbar">
    <div class="container">Data-Driven Insights for Smarter Business Decisions</div>
  </div>

  <!-- ============ NAVBAR ============ -->
  <nav class="gx-nav" id="gxNav">
    <div class="container">
      <div class="d-flex align-items-center justify-content-between">
        <a class="brand" href="<?php echo GX_MAIN_SITE_URL; ?>/index.php"><img src="<?php echo GX_MAIN_SITE_URL; ?>/images/logo.png" alt="Globinex Research" /></a>

        <button class="navbar-toggler border-0 d-lg-none text-white fs-3 p-0" type="button"
                data-bs-toggle="collapse" data-bs-target="#gxMenu">
          <i class="bi bi-list"></i>
        </button>

        <div class="collapse navbar-collapse d-lg-flex flex-grow-1 justify-content-lg-center" id="gxMenu">
          <ul class="navbar-nav flex-row flex-wrap gap-lg-4 gap-3 mx-lg-auto my-3 my-lg-0">
            <li class="nav-item"><a class="nav-link" href="<?php echo GX_MAIN_SITE_URL; ?>/about.php">About GXR</a></li>
            <li class="nav-item dropdown gx-dropdown">
              <a class="nav-link gx-drop-toggle" href="<?php echo GX_MAIN_SITE_URL; ?>/solutions.php">Solutions <i class="bi bi-chevron-down small"></i></a>
              <ul class="dropdown-menu gx-dropdown-menu">
                <li><a class="dropdown-item" href="<?php echo GX_MAIN_SITE_URL; ?>/capi-computer-assisted-personal-interviewing.php">CAPI</a></li>
                <li><a class="dropdown-item" href="<?php echo GX_MAIN_SITE_URL; ?>/cati-computer-assisted-telephonic-interviewing.php">CATI</a></li>
                <li><a class="dropdown-item" href="<?php echo GX_MAIN_SITE_URL; ?>/online-services-cawi.php">Online Research</a></li>
                <li><a class="dropdown-item" href="<?php echo GX_MAIN_SITE_URL; ?>/idi-in-depth-interviews.php">IDI / TDI</a></li>
                <li><a class="dropdown-item" href="<?php echo GX_MAIN_SITE_URL; ?>/eye-tracking.php">Eye Tracking</a></li>
                <li><a class="dropdown-item" href="<?php echo GX_MAIN_SITE_URL; ?>/mystery-shopping.php">Mystery Shopping</a></li>
              </ul>
            </li>
            <li class="nav-item"><a class="nav-link" href="<?php echo GX_MAIN_SITE_URL; ?>/case-studies.php">Case Studies</a></li>
            <li class="nav-item"><a class="nav-link active" href="<?php echo home_url('/'); ?>">Blog</a></li>
            <li class="nav-item"><a class="nav-link" href="<?php echo GX_MAIN_SITE_URL; ?>/contact.php">Contact</a></li>
          </ul>

          <div class="lang-switch d-none d-lg-block" id="langSwitch">
            <button type="button" class="gx-lang lang-trigger" id="langTrigger" aria-haspopup="true" aria-expanded="false">
              <span id="langTriggerLabel">EN</span> <i class="bi bi-chevron-down small"></i>
            </button>
            <ul class="lang-menu" id="langMenu">
              <li><a href="#" class="lang-item active" data-lang="en" data-label="EN">English</a></li>
              <li><a href="#" class="lang-item" data-lang="ar" data-label="AR">Arabic</a></li>
              <li><a href="#" class="lang-item" data-lang="fr" data-label="FR">French</a></li>
              <li><a href="#" class="lang-item" data-lang="es" data-label="ES">Spanish</a></li>
              <li><a href="#" class="lang-item" data-lang="de" data-label="DE">German</a></li>
              <li><a href="#" class="lang-item" data-lang="zh-CN" data-label="ZH">Chinese (Simplified)</a></li>
              <li><a href="#" class="lang-item" data-lang="hi" data-label="HI">Hindi</a></li>
              <li><a href="#" class="lang-item" data-lang="ur" data-label="UR">Urdu</a></li>
              <li><a href="#" class="lang-item" data-lang="pt" data-label="PT">Portuguese</a></li>
              <li><a href="#" class="lang-item" data-lang="ru" data-label="RU">Russian</a></li>
              <li><a href="#" class="lang-item" data-lang="ja" data-label="JA">Japanese</a></li>
              <li><a href="#" class="lang-item" data-lang="tr" data-label="TR">Turkish</a></li>
            </ul>
            <div id="google_translate_element" class="goog-te-hidden"></div>
          </div>
        </div>
      </div>
    </div>
  </nav>
