<style type="text/css">
  .navbar>ul>li>a {
    font-weight: 1000 !important;
    /* font-size: 15px !important; */
    font-size: 13px !important;
    font-style: normal;
    text-decoration: none;
    text-transform: none;
    /* letter-spacing: -0.5px; */
    letter-spacing: 0.5px;
    display: inline-block;
    position: relative;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
  }

  /* Active Tab Styling */
  .navbar>ul>li>a.active {
    background-color: #ffffff !important;
    /* White background for active tab */
    color: #560b3c !important;
    /* Dark text for contrast */
    border-radius: 0px;
  }

  /* Proper Hover Effect for Individual Tabs */
  .navbar>ul>li>a:hover {
    background-color: #f0e0e6 !important;
    /* Light pinkish background */
    color: #560b3c !important;
    border-radius: 0px;
  }

  /* Prevent Active Tab from Changing on Hover */
  .navbar>ul>li>a.active:hover {
    background-color: #ffffff !important;
    /* Keep active tab white */
    color: #560b3c !important;
  }

  /* Fix Tab Spacing - Prevent Overlapping */
  .navbar>ul>li {
    margin: 0 5px;
    /* Adds spacing between tabs */
  }


  .navbar-mobile ul {
    display: block;
    position: absolute;
    top: 55px;
    right: 15px;
    bottom: 15px;
    left: 15px;
    padding: 10px 0;
    overflow-y: auto;
    transition: 0.3s;
    background: #560b3c78 !important;
  }

  @media only screen and (min-width: 992px) {
    #navmobile {
      justify-content: center !important;
    }
  }

  .navbar .dropdown ul {
    background: #b02135;
  }

  .navbar .dropdown ul a {
    color: white;
  }

  /*.dropdown-item.active, .dropdown-item:active {
    background-color: #780011fc!important;
  }*/
  .navbar .dropdown ul a:hover,
  .navbar .dropdown ul .active:hover,
  .navbar .dropdown ul li:hover>a {
    color: #fff;
    background-color: #790012;
  }

  .navlink:after {
    background: none repeat scroll 0 0 transparent;
    bottom: 0;
    content: "";
    display: block;
    height: 2px;
    position: absolute;
    background: #F08B54;
    transition: width 0.3s ease 0s, left 0.3s ease 0s;
    width: 0;
  }

  .navlink:hover:after {
    width: 100%;
    left: 0;
  }

  .navlink2:after {
    background: none repeat scroll 0 0 transparent;
    bottom: 0;
    content: "";
    display: block;
    height: 2px;
    position: absolute;
    background: #F08B54;
    transition: width 0.3s ease 0s, left 0.3s ease 0s;
    width: 0;
  }

  .navlink2:hover:after {
    width: 100%;
    left: 0;
  }

  .navbar a,
  .navbar a:focus {
    /* padding: 10px 30px 10px 30px!important; */
    /* padding: 10px 15px 10px 15px !important; */
    padding: 10px 10px 10px 10px !important;
  }

  #header {
    color: white;
    transition: all 0.5s;
    z-index: 997;
    transition: all 0.5s;
    font-weight: 1000;
    height: 55px;
  }

  .dropdown-item {
    background-color: #b02135 !important;
  }

  @media only screen and (max-width: 1233px) and (min-width: 1176px) {
    .service-tab a {
      /* width: 166px !important; */
    }

    .signin-tab a {
      width: 167px !important;
    }
  }
</style>

<!-- ======= Header ======= -->
<header id="header" class="d-flex align-items-center menu-bg" style="border-top: 1px solid white; margin-top: -5px;">
  <div class="container d-flex" id="navmobile">


    <?php

    if (@$this->uri->segment(1) != 'membership-form' && @$this->uri->segment(1) != 'facilities' && @$this->uri->segment(2) != 'request' && @$this->uri->segment(1) != "prasadam" && @$this->uri->segment(1) != "checkout_prasadam" && @$this->uri->segment(1) != "akshaya-patra" && @$this->uri->segment(1) != "checkout_akshaya_patra") {

      $service_cart_items = @$this->session->userdata('service_cart');
      $sponser_cart_items = @$this->session->userdata('sponsorship_cart');
      $event_cart_items = @$this->session->userdata('events_cart');
      $donation_cart_items = @$this->session->userdata('donations_cart');
      $books_cart_items = @$this->session->userdata('books_cart');
      //  $sponser_cart_items = $this->session->userdata($session_data);
      // var_dump($sponser_cart_items);die();
      $totalItemsCount = 0;

      $totalItemsCount += !empty($service_cart_items) && isset($service_cart_items['ids']) ? count($service_cart_items['ids']) : 0;
      $totalItemsCount += !empty($sponser_cart_items) && isset($sponser_cart_items['ids']) ? count($sponser_cart_items['ids']) : 0;
      $totalItemsCount += !empty($event_cart_items) && isset($event_cart_items['ids']) ? count($event_cart_items['ids']) : 0;
      $totalItemsCount += !empty($donation_cart_items) && isset($donation_cart_items['ids']) ? count($donation_cart_items['ids']) : 0;
      $totalItemsCount += !empty($books_cart_items) && isset($books_cart_items['ids']) ? count($books_cart_items['ids']) : 0;

    ?>

      <div style="float:left;" class="mobile-nav-cart">
        <span style="padding-right:6px!important;">

          <a href="javaScript:void(0)" onclick="ViewCartMobile('checkout')"> <i class="fa fa-shopping-cart fa-2x" style="color:#fff;"></i>
            <span class="cart-count text-white" style="font-size: 20px!important;"><?= $totalItemsCount; ?></span>
          </a>
        </span>
      </div>
      <!-- <div style="float:left; position: relative;" class="mobile-nav-cart">
  <a href="javaScript:void(0)" onclick="ViewCartMobile('checkout')" style="position: relative; display: inline-block;">
    <i class="fa fa-shopping-cart fa-2x" style="color:#000;"></i>
    <span class="cart-count" style="
      position: absolute;
      top: -8px;
      right: -10px;
      background-color: blue;
      color: white;
      font-size: 16px;
      font-weight: bold;
      border-radius: 50%;
      padding: 4px 8px;
      line-height: 1;
    ">
      <?= $totalItemsCount; ?>
    </span>
  </a>
</div> -->

    <?php }
    if (@$this->uri->segment(1) == "prasadam") {
      $session_prasadam_cart_data = $this->session->userdata('prasadam_cart') ?? [];
      if (!isset($session_prasadam_cart_data['ids'])) {
        $session_prasadam_cart_data['ids'] = [];
      }
    ?>



      <div style="float:left;" class="mobile-nav-cart">
        <span style="padding-right:6px!important;">

          <a href="javaScript:void(0)" onclick="ValidateCheckout();"> <i class="fa fa-shopping-cart fa-2x" style="color:#fff;"></i>
            <span class="cart-count text-white" style="font-size: 20px!important;"><?= count($session_prasadam_cart_data['ids']) ?></span>
          </a>
        </span>
      </div>

    <?php
    } 
    if (@$this->uri->segment(1) == "akshaya-patra") {
      $session_akshaya_patra_cart_data = $this->session->userdata('akshaya_patra_cart') ?? [];
      if (!isset($session_akshaya_patra_cart_data['ids'])) {
        $session_akshaya_patra_cart_data['ids'] = [];
      }
    ?>



      <div style="float:left;" class="mobile-nav-cart">
        <span style="padding-right:6px!important;">

          <a href="javaScript:void(0)" onclick="ValidateAkshyaPatraCheckout();"> <i class="fa fa-shopping-cart fa-2x" style="color:#fff;"></i>
            <span class="cart-count text-white" style="font-size: 20px!important;"><?= count($session_akshaya_patra_cart_data['ids']) ?></span>
          </a>
        </span>
      </div>

    <?php
    }
    ?>
    <!-- <?php

          if (@$this->uri->segment(1) == 'event' || @$this->uri->segment(1) == 'all-upcoming-events') {

            $cartList = $this->session->userdata('events_cart');
            $cart_count = isset($cartList['ids']) && $cartList['ids'] ? count($cartList['ids']) : 0;
            $cart_count = $cart_count != '' ? $cart_count : 0; ?>

      <div style="float:left;" class="mobile-nav-cart">
        <span style="padding-right:6px!important;">
        
          <a href="javaScript:void(0)" onclick="ViewCartMobile('Events')"> <i class="fa fa-shopping-cart fa-2x" style="color:#fff;"></i>
            <span class="cart-count text-white" style="font-size: 20px!important;"><?= $cart_count; ?></span>
          </a>
        </span>
      </div>

    <?php } else if (@$this->uri->segment(1) == 'donations') {

            $cartList = $this->session->userdata('donations_cart');
            $cart_count = isset($cartList['ids']) && $cartList['ids'] ? count($cartList['ids']) : 0;
            $cart_count = $cart_count != '' ? $cart_count : 0; ?>

      <div style="float:left;" class="mobile-nav-cart">
        <span style="padding-right:6px!important;">
          <a href="javaScript:void(0)" onclick="ViewCartMobile('Donations')"> <i class="fa fa-shopping-cart fa-2x" style="color:#fff;"></i>
            <span class="cart-count text-white" style="font-size: 20px!important;"><?= $cart_count; ?></span>
          </a>
        </span>
      </div>

    <?php } else if (@$this->uri->segment(1) == 'facilities') {

            $cartList = $this->session->userdata('facilities_cart');
            $cart_count = isset($cartList['ids']) && $cartList['ids'] ? count($cartList['ids']) : 0;
            $cart_count = $cart_count != '' ? $cart_count : 0;  ?>

      <div style="float:left;" class="mobile-nav-cart">
        <span style="padding-right:6px!important;">
          <a href="javaScript:void(0)" onclick="ViewCartMobile('Facilities')"> <i class="fa fa-shopping-cart fa-2x" style="color:#fff;"></i>
            <span class="cart-count text-white" style="font-size: 20px!important;"><?= $cart_count; ?></span>
          </a>
        </span>
      </div>

    <?php } else if (@$this->uri->segment(1) == 'services') {

            $cartList = $this->session->userdata('service_cart');
            $cart_count = isset($cartList['ids']) && $cartList['ids'] ? count($cartList['ids']) : 0;
            $cart_count = $cart_count != '' ? $cart_count : 0;  ?>

      <div style="float:left;" class="mobile-nav-cart">
        <span style="padding-right:6px!important;">
          <a href="javaScript:void(0)" onclick="ViewCartMobile('Services')"> <i class="fa fa-shopping-cart fa-2x" style="color:#fff;"></i>
            <span class="cart-count text-white" style="font-size: 20px!important;"><?= $cart_count; ?></span>
          </a>
        </span>
      </div>

    <?php } else if (@$this->uri->segment(1) == 'membership-form') {

            $cartList = $this->session->userdata('membership_cart');
            $cart_count = isset($cartList['service_id']) && $cartList['service_id'] ? 1 : 0;
            $cart_count = $cart_count != '' ? $cart_count : 0;  ?>

      <div style="float:left;" class="mobile-nav-cart">
        <span style="padding-right:6px!important;">
          <a href="javaScript:void(0)" onclick="ViewCartMobile('MembershipForm')"> <i class="fa fa-shopping-cart fa-2x" style="color:#fff;"></i>
            <span class="cart-count text-white" style="font-size: 20px!important;"><?= $cart_count; ?></span>
          </a>
        </span>
      </div>

    <?php } ?> -->



    <nav id="navbar" class="navbar">
      <ul>
        <li><a class="navlink  <?php if ($page == 'Home') { ?> active<?php } ?>" href="<?= base_url() ?>">HOME</a></li>
        <li class="dropdown">
          <a class="navlink2 <?php if ($page == 'ABOUT-FOUNDERS' || $page == 'ABOUT-TEMPLE' || $page == 'ABOUT-COMMITTEE' || $page == 'ABOUT-DEITY' || $page == 'ABOUT-TEMPLE' || $page == 'ABOUT-PRIEST' || $page == 'BHAJAN LYRICS' || $page == 'PRASAD BHOG POLICY' || $page == 'GENERAL-REFERENCE') { ?>active<?php } ?>" href="javascript:void()" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> ABOUT US <i class="fa fa-caret-down"></i></a>
          <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
            <!-- <li><a  href="<?= base_url('about-temple-founders') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'ABOUT-FOUNDERS') { ?>active<?php } ?>" >ABOUT TEMPLE FOUNDER</a></li> -->
            <li><a href="<?= base_url('about-temple') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'ABOUT-TEMPLE') { ?>active<?php } ?>">ABOUT TEMPLE</a></li>
            <li><a href="<?= base_url('about-deities') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'ABOUT-DEITY') { ?>active<?php } ?>">ABOUT DEITIES</a></li>
            <li><a href="<?= base_url('about-priest') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'ABOUT-PRIEST') { ?>active<?php } ?>">ABOUT PRIESTS</a></li>
            <li><a href="<?= base_url('books') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'BOOKS') { ?>active<?php } ?>">SHOP</a></li>
            <!-- <li><a href="<?= base_url('siddha-prabha') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'SIDDHA-PRABHA') { ?>active<?php } ?>">SIDDHA PRABHA</a></li> -->

            <li><a href="<?= base_url('siddha-prabha') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'SIDDHA-PRABHA') { ?>active<?php } ?>">SIDDHA PRABHA</a></li>

            <!-- <li><a href="<?= base_url('executive-committee') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'EXECUTIVE-COMMITTEE') { ?>active<?php } ?>">EXECUTIVE COMMITTEE</a></li> -->

            <!-- <li><a href="<?= base_url('education') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'EDUCATION') { ?>active<?php } ?>">EDUCATION</a></li>
            <li><a href="<?= base_url('all-classes') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'all-classes') { ?>active<?php } ?>">All CLASSES</a></li>
            <li><a href="<?= base_url('language-classes') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'language-classes') { ?>active<?php } ?>">LANGUAGE-CLASSES</a></li> -->


            <!-- <li><a href="<?= base_url('land-donors') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'LAND-DONORS') { ?>active<?php } ?>">LAND DONORS</a></li> -->
            <!-- <li><a href="<?= base_url('board-of-regents') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'BOARD-OF-REGENTS') { ?>active<?php } ?>">BOARD OF REGENTS</a></li> -->
            <!-- <li><a href="<?= base_url('temple-etiquette-and-visits') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'TEMPLE-ETIQUETTE-AND-VISITS') { ?>active<?php } ?>">Temple Etiquette and Visits</a></li> -->
            <!-- <li><a href="<?= base_url('Jain-Singh') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'JAIN-SINGH') { ?>active<?php } ?>">JAIN-SINGH</a></li> -->
            <!-- <li><a href="<?= base_url('Shirdi-Sai-Satsang') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'SHIRDI-SAI-SATSANG') { ?>active<?php } ?>">SHIRDI SAI SATSANG</a></li> -->



            <!-- <li><a href="<?= base_url('contact-us') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'CONTACT-US') { ?>active<?php } ?>">Contact Us</a></li> -->



            <!-- <li><a  href="<?= base_url('general-reference') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'GENERAL-REFERENCE') { ?>active<?php } ?>">GENERAL REFERENCE</a></li> -->
            <!-- <li><a  href="<?= base_url('bhajan-lyrics') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'BHAJAN LYRICS') { ?>active<?php } ?>">BHAJAN LYRICS</a></li>
            <li><a  href="<?= base_url('prasad-bhog-policy') ?>" class="text-uppercase dropdown-item navlink <?php if ($page == 'PRASAD BHOG POLICY') { ?>active<?php } ?>">PRASAD/BHOG POLICY</a></li> -->
          </ul>
        </li>
        <li><a class="navlink <?php if ($page == 'Services' || $page == 'Services Cart') { ?> active  <?php } ?>" href="<?= base_url('services') ?>">SERVICES</a></li>
        <li><a class="navlink <?php if ($page == 'Events') { ?> active  <?php } ?>" href="<?= base_url('all-upcoming-events') ?>">EVENTS</a></li>

        <li><a class="navlink <?php if ($page == 'Sponsor Now') { ?> active  <?php } ?>" href="<?= base_url('sponsor-now') ?>">SPONSORSHIPS</a></li>

        <li><a class="navlink <?php if ($page == 'Calendar') { ?> active  <?php } ?>" href="<?= base_url('calendar') ?>">CALENDAR</a></li>

        <!-- <li><a class="navlink <?php if ($page == 'Facilities') { ?> active  <?php } ?>" href="<?= base_url('facilities') ?>">FACILITIES</a></li> -->
        <!-- <li><a class="navlink <?php if ($page == 'Facilities') { ?> active  <?php } ?>" href="javaScript:void(0)" onclick="CartCheckLoginTabFacility('facilitiesPage')">FACILITIES</a></li> -->
        <li><a class="navlink <?php if ($page == 'Facilities') { ?> active  <?php } ?>" href="<?= base_url('facilities') ?>">FACILITIES</a></li>
        <!-- <li><a class="navlink <?php if ($page == 'Gallery') { ?> active  <?php } ?>" href="<?= base_url('gallery') ?>">GALLERY</a></li> -->


        <li class="dropdown">
          <a class="<?php if ($page == 'Prasadam' || $page == 'Akshaya Patra') { ?>active<?php } ?>" href="javaScript:void()" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">AKSHAYA PATRA <i class="fa fa-caret-down"></i></a>

          <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
            <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'Prasadam') { ?> active  <?php } ?>" href="<?= base_url('prasadam') ?>">PRASADAM</a></li>
            <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'Akshaya Patra') { ?> active  <?php } ?>" href="<?= base_url('akshaya-patra') ?>">CATERING</a></li>
          </ul>
        </li>

        <li class="dropdown">
          <a class="<?php if ($page == 'DONATIONS' || $page == 'RECURRING-DONATIONS' || $page == 'PLEDGE FORM') { ?>active<?php } ?>" href="javaScript:void()" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">DONATIONS <i class="fa fa-caret-down"></i></a>

          <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">

            <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'DONATIONS') { ?> active  <?php } ?>" href="<?= base_url('donations') ?>">GENERAL DONATIONS</a></li>
            <!-- <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'RECURRING-DONATIONS') { ?> active  <?php } ?>" href="<?= base_url('recurring-sponsor-now/recurring-donations') ?>">RECURRING DONATIONS</a></li> -->
            <!-- <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'PLEDGE FORM') { ?> active  <?php } ?>" href="<?= base_url('pledge-form') ?>">PLEDGE FORM</a></li> -->
          </ul>
        </li>

        <li>
          <!-- <a class="<?php if ($page == 'education' || $page == 'all-classes' || $page == 'language-classes') { ?>active<?php } ?>"  href="https://Chatwala.vaaptech.com/hskylou.org" target="_blank"> HINDU SCHOOL
  </a> -->
        </li>


        <!-- <li><a class="navlink <?php if ($page == 'CONTACT-US') { ?>  active   <?php } ?>" href="<?= base_url('contact-us') ?>">CONTACT US</a></li> -->

        <!-- <li class="dropdown">
          <a class="<?php if ($page == 'MEMBERSHIP FORM' || $page == 'PRIEST FORM' || $page == 'VOLUNTEERS FORM') { ?>active<?php } ?>" href="javaScript:void()" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">FORMS <i class="fa fa-caret-down"></i></a>

          <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">

            <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'MEMBERSHIP FORM') { ?> active  <?php } ?>" href="<?= base_url('membership-form') ?>">MEMBERSHIP FORM</a></li> -->

        <!-- <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'PRIEST FORM') { ?> active  <?php } ?>" href="<?= base_url('priest-request-form') ?>">PRIEST REQUEST FORM</a></li> -->
        <!-- <li> <a class="text-uppercase dropdown-item navlink <?php if ($page == 'VOLUNTEERS FORM') { ?> active <?php } ?>"  href="<?= base_url('volunteer') ?>"> VOLUNTEER FORM </a></li>


          </ul>
        </li> -->
        <!-- 
        <?php if ($this->session->userdata('logged_in') == 1) {
          $userSession = $this->session->userdata('refDataName'); ?>

          <li class="dropdown">
            <a href="javaScript:void()" class="navlink2" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> MY ACCOUNT <i class="fa fa-caret-down"></i></a>
            <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">

              <?php if ($this->session->userdata('userType') == 'Devotee') { ?>
                <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'Dashboard') { ?> active  <?php } ?>" href="<?= base_url('admin/my-profile') ?>">MY ACCOUNT</a></li>

              <?php } else if ($this->session->userdata('userType') == 'Managements') { ?>
                <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'MEMBER DIRECTORY') { ?> active  <?php } ?>" href="<?= base_url('managements/member-directory') ?>">MY ACCOUNT</a></li>

              <?php }
              if (empty($this->session->userdata('memberTypes'))) {
              ?>
                <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'MEMBERSHIP FORM') { ?> active  <?php } ?>" href="<?= base_url('membership-form') ?>">MEMBERSHIP FORM</a></li>
              <?php
              }
              ?>
              <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'Logout') { ?> active  <?php } ?>" href="<?= base_url('logout') ?>">LOGOUT</a></li>
            </ul>
          </li>

        <?php } else { ?> -->
        <!-- <li><a  href="javaScript:void(0);" class="navlink dotlgbtn <?php if ($page == 'Devotee Sign In') { ?> active  <?php } ?>" onclick="checkLoginStatus()">SIGN-IN</a></li> -->
        <!-- <li class="dropdown">
            <a href="javaScript:void()" class="navlink2" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> SIGN-IN <i class="fa fa-caret-down"></i></a>
            <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">

              <li><a href="javaScript:void(0);" class="navlink dotlgbtn <?php if ($page == 'Devotee Sign In') { ?> active  <?php } ?>" onclick="checkLoginStatus()">SIGN-IN</a></li>

              <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'MEMBERSHIP FORM') { ?> active  <?php } ?>" href="<?= base_url('membership-form') ?>">MEMBERSHIP FORM</a></li>

            </ul>
          </li>
        <?php } ?> -->


        <!-- <?php if ($this->session->userdata('logged_in') == 1) {
                $userSession = $this->session->userdata('refDataName'); ?>

         <li class="dropdown">
          <a href="javaScript:void()" class="navlink2"  id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> MY ACCOUNT <i class="fa fa-caret-down"></i></a>
          <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">

           <?php if ($this->session->userdata('userType') == 'Devotee') { ?>
             <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'Dashboard') { ?> active  <?php } ?>" href="<?= base_url('admin/my-profile') ?>">MY ACCOUNT</a></li>

           <?php } else if ($this->session->userdata('userType') == 'Managements') { ?>
            <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'MEMBER DIRECTORY') { ?> active  <?php } ?>" href="<?= base_url('managements/member-directory') ?>">MY ACCOUNT</a></li>

          <?php } ?>
          <li><a class="text-uppercase dropdown-item navlink <?php if ($page == 'Logout') { ?> active  <?php } ?>" href="<?= base_url('logout') ?>">LOGOUT</a></li>
        </ul>
      </li>

    <?php } else { ?>
     <li><a  href="javaScript:void(0);" class="navlink dotlgbtn <?php if ($page == 'Devotee Sign In') { ?> active  <?php } ?>" onclick="checkLoginStatus()">SIGN-IN</a></li>
   <?php } ?> -->

        <?php

        if (@$this->uri->segment(1) != 'membership-form' && @$this->uri->segment(1) != 'facilities' && @$this->uri->segment(2) != 'request' && @$this->uri->segment(1) != "prasadam" && @$this->uri->segment(1) != "checkout_prasadam" && @$this->uri->segment(1) != "akshaya-patra" && @$this->uri->segment(1) != "checkout_akshaya_patra") {


        ?>
          <li>
            <a href="javaScript:void(0)" onclick="ViewCartMobile('checkout')"> <i class="fa fa-shopping-cart fa-2x" style="font-size: 25px!important;"></i>
              <span class="cart-count" style="font-size: 20px!important;"><?= $totalItemsCount; ?></span>
            </a>
          </li>
          <!-- <li style="position: relative;">
  <a href="javaScript:void(0)" onclick="ViewCartMobile('checkout')" style="position: relative; display: inline-block;">
    <i class="fa fa-shopping-cart" style="font-size: 25px!important; color: black;"></i>
    <span class="cart-count" style="
      position: absolute;
      top: -8px;
      right: -10px;
      background-color: blue;
      color: white;
      font-size: 16px;
      font-weight: bold;
      border-radius: 50%;
      padding: 4px 8px;line-height: 1;
    ">
      <?= $totalItemsCount; ?>
    </span>
  </a>
</li> -->


        <?php }

        if (@$this->uri->segment(1) == "prasadam") {

        ?>
          <li>
            <a href="javaScript:void(0)" onclick="ValidateCheckout();"> <i class="fa fa-shopping-cart fa-2x" style="font-size: 25px!important;"></i>
              <span class="cart-count" style="font-size: 20px!important;"><?= count($session_prasadam_cart_data['ids']) ?></span>
            </a>
          </li>


        <?php
        } 
         if (@$this->uri->segment(1) == "akshaya-patra") {

        ?>
          <li>
            <a href="javaScript:void(0)" onclick="ValidateAkshyaPatraCheckout();"> <i class="fa fa-shopping-cart fa-2x" style="font-size: 25px!important;"></i>
              <span class="cart-count" style="font-size: 20px!important;"><?= count($session_akshaya_patra_cart_data['ids']) ?></span>
            </a>
          </li>


        <?php
        }

        if (@$this->uri->segment(1) == 'event' || @$this->uri->segment(1) == 'all-upcoming-events') {

          $cartList = $this->session->userdata('events_cart');
          $cart_count = isset($cartList['ids']) && $cartList['ids'] ? count($cartList['ids']) : 0;
          $cart_count = $cart_count != '' ? $cart_count : 0; ?>

          <!-- <li>
            <a href="javaScript:void(0)" onclick="ViewCartMobile('Events')"> <i class="fa fa-shopping-cart fa-2x" style="font-size: 45px!important;"></i>
              <span class="cart-count" style="font-size: 20px!important;"><?= $cart_count; ?></span>
            </a>
          </li> -->

        <?php } else if (@$this->uri->segment(1) == 'donations') {

          $cartList = $this->session->userdata('donations_cart');
          $cart_count = isset($cartList['ids']) && $cartList['ids'] ? count($cartList['ids']) : 0;
          $cart_count = $cart_count != '' ? $cart_count : 0; ?>

          <!-- <li>
            <a href="javaScript:void(0)" onclick="ViewCartMobile('Donations')"> <i class="fa fa-shopping-cart fa-2x" style="font-size: 45px!important;"></i>
              <span class="cart-count" style="font-size: 20px!important;"><?= $cart_count; ?></span>
            </a>
          </li> -->

        <?php } else if (@$this->uri->segment(1) == 'services') {

          $cartList = $this->session->userdata('service_cart');
          $cart_count = isset($cartList['ids']) && $cartList['ids'] ? count($cartList['ids']) : 0;
          $cart_count = $cart_count != '' ? $cart_count : 0;  ?>

          <!-- <li>
            <a href="javaScript:void(0)" onclick="ViewCartMobile('Services')"> <i class="fa fa-shopping-cart fa-2x" style="font-size: 45px!important;"></i>
              <span class="cart-count" style="font-size: 20px!important;"><?= $cart_count; ?></span>
            </a>
          </li> -->

        <?php } else if (@$this->uri->segment(1) == 'facilities') {

          $cartList = $this->session->userdata('facilities_cart');
          $cart_count = isset($cartList['ids']) && $cartList['ids'] ? count($cartList['ids']) : 0;
          $cart_count = $cart_count != '' ? $cart_count : 0;  ?>

          <!-- <li>
            <a href="javaScript:void(0)" onclick="ViewCartMobile('facilitiesContollers/Facilities')"> <i class="fa fa-shopping-cart fa-2x" style="font-size: 45px!important;"></i>
              <span class="cart-count" style="font-size: 20px!important;"><?= $cart_count; ?></span>
            </a>
          </li> -->

        <?php } else if (@$this->uri->segment(1) == 'recurring-sponsor-now') {

          $cartList = $this->session->userdata('recurring_donations_cart');
          $cart_count = isset($cartList['ids']) && $cartList['ids'] ? count($cartList['ids']) : 0;
          $cart_count = $cart_count != '' ? $cart_count : 0;  ?>

          <li>
            <a href="javaScript:void(0)" onclick="ViewCartMobile('RecurringSponsorNow')"> <i class="fa fa-shopping-cart fa-2x" style="font-size: 45px!important;"></i>
              <span class="cart-count" style="font-size: 20px!important;"><?= $cart_count; ?></span>
            </a>
          </li>

        <?php } else if (@$this->uri->segment(1) == 'sponsor-now') {

          $cartList = $this->session->userdata('sponsorship_cart');
          $cart_count = isset($cartList['ids']) && $cartList['ids'] ? count($cartList['ids']) : 0;
          $cart_count = $cart_count != '' ? $cart_count : 0;  ?>

          <!-- <li>
            <a href="javaScript:void(0)" onclick="ViewCartMobile('SponsorNow')"> <i class="fa fa-shopping-cart fa-2x" style="font-size: 45px!important;"></i>
              <span class="cart-count" style="font-size: 20px!important;"><?= $cart_count; ?></span>
            </a>
          </li> -->

        <?php } else if (@$this->uri->segment(1) == 'membership-form') {

          $cartList = $this->session->userdata('membership_cart');
          $cart_count = isset($cartList['service_id']) && $cartList['service_id'] ? 1 : 0;
          $cart_count = $cart_count != '' ? $cart_count : 0;  ?>

          <li>
            <a href="javaScript:void(0)" onclick="ViewCartMobile('MembershipForm')"> <i class="fa fa-shopping-cart fa-2x" style="font-size: 45px!important;"></i>
              <span class="cart-count" style="font-size: 20px!important;"><?= $cart_count; ?></span>
            </a>
          </li>

        <?php } ?>


      </ul>
      <i class="bi bi-list mobile-nav-toggle text-white"></i>
    </nav>

  </div>
</header><!-- End Header -->