<?php
// Dynamic Page Title
if ($tt_page_info['Page_Info']['Title'] == '') {
  $tt_webpage_title = $advancenews['Website_title'].$advancenews['Title_Separetor'].$advancenews['Website_Description'];
}else {
  $tt_webpage_title = $tt_page_info['Page_Info']['Title'].$advancenews['Title_Separetor'].$advancenews['Website_title'];
}
// Dynamic Page Url
if ($tt_page_info['Social_og']['URL'] == '') {
  $tt_webpage_url = $site_domain;
}else {
  $tt_webpage_url = $site_domain.$tt_page_info['Social_og']['URL'];
}

// Dynamic Page Description
if ( $tt_page_info['Page_Info']['Description'] == '') {
  $tt_webpage_desc = $advancenews['Website_Description'];
}else {
  $tt_webpage_desc =  $tt_page_info['Page_Info']['Description'];
}

// Dynamic Page Keyword
if ( $tt_page_info['Page_Info']['Keyword'] == '') {
  $tt_webpage_keyword = $advancenews['Website_Keyword'];
}else {
  $tt_webpage_keyword =  $tt_page_info['Page_Info']['Keyword'];
}

// Dynamic Social Image
if ( $tt_page_info['Social_og']['Image'] == '') {
  $tt_webpage_image = $advancenews['Website_Social'];
}else {
  $tt_webpage_image =  $tt_page_info['Social_og']['Image'];
}

?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="keywords" content="<?php echo $tt_webpage_keyword ?>">

    <!-- Page Data -->
    <title><?php  echo $tt_webpage_title ?></title>
    <meta name="description" content="<?php echo $tt_webpage_desc; ?>" >

    <!-- Favicons -->
    <link href="<?php echo $advancenews['Website_Fevicon'] ?>" rel="icon">
    <link href="<?php echo $advancenews['Website_Fevicon'] ?>" rel="apple-touch-icon">

    <?php
    if ($advancenews['Theme_Color'] !='') {
      ?>
        <meta name="theme-color" content="<?php echo $advancenews['Theme_Color'] ?>" />
        <meta name="msapplication-navbutton-color" content="<?php echo $advancenews['Theme_Color'] ?>">
        <meta name="apple-mobile-web-app-status-bar-style" content="<?php echo $advancenews['Theme_Color'] ?>">
      <?php
    }

     ?>
    <!-- Open Graph  -->
    <meta property="og:url"             content="<?php echo $tt_webpage_url ?>" />
    <meta property="og:type"            content="<?php echo $tt_page_info['Social_og']['Type'] ?>" />
    <meta property="og:title"           content="<?php echo $tt_webpage_title ?>" />
    <meta property="og:description"     content="<?php echo $tt_webpage_desc ?>" />
    <meta property="og:image"           content="<?php echo $tt_webpage_image ?>" />
    <meta property="og:image:width"     content="1200" />
    <meta property="og:image:height"    content="630" />

    <!--End of Tawk.to Script-->
    <!-- Theme Colors -->
    <style media="screen">
    :root{
      --tt-white-color :#ffffff;
      --tt-gray-color :#eff3f4;
      --tt-text-color :#000;
      --tt_primary_color :  <?php echo $advancenews['Theme_Color'] ?>;
      --tt_secondary_color : <?php echo $advancenews['Secondary_Theme_Color'] ?>;
      --tt_footer_bg: <?php echo $advancenews['Footer_BgColor'] ?>;
      --tt_footer_top_bg: <?php echo $advancenews['FooterTop_BgColor'] ?>;
      --tt_footer_top_color: <?php echo $advancenews['FooterTop_TextColor'] ?>;
      --tt_footer_top_padding: <?php echo $advancenews['FooterTop_Padding'] ?>;
      --tt_footer_top_font_size: <?php echo $advancenews['FooterTop_TextSize'] ?>;
      --tt_footer_middle_bg: <?php echo $advancenews['FooterMiddleBgColor'] ?>;
      --tt_footer_middle_color: <?php echo $advancenews['FooterMiddle_TextColor'] ?>;
      --tt_footer_middle_padding: <?php echo $advancenews['FooterMiddlePadding'] ?>;
      --tt_footer_middle_font_size: <?php echo $advancenews['FooterMiddleTextSize'] ?>;
      --tt_footer_bottom_bg: <?php echo $advancenews['FooterBottom_BgColor'] ?>;
      --tt_footer_bottom_color: <?php echo $advancenews['FooterBottom_TextColor'] ?>;
      --tt_footer_bottom_padding: <?php echo $advancenews['FooterBottom_Padding'] ?>;
      --tt_footer_bottom_font_size: <?php echo $advancenews['FooterBottom_TextSize'] ?>;
      --tt_post_title_fs : <?php echo $advancenews['PostTitleFontSize'] ?>;
      --tt_post_content_fs : <?php echo $advancenews['PostContentFontSize'] ?>;
      --tt_post_block_fs : <?php echo $advancenews['PS_Block_FS'] ?>;
    }
    [data-theme=dark] {
      --tt-white-color :#424242;
      --tt-gray-color :#2d2d2d;
      --tt-text-color :#ffffff;
      --tt_footer_bg: <?php echo $advancenews['Footer_BgColor_Dark'] ?>;
      --tt_footer_top_bg: <?php echo $advancenews['FooterTop_BgColor_Dark'] ?>;
      --tt_footer_top_color: <?php echo $advancenews['FooterTop_TextColor_Dark'] ?>;
      --tt_footer_middle_color: <?php echo $advancenews['FooterMiddle_TextColor_Dark'] ?>;
      --tt_footer_bottom_bg: <?php echo $advancenews['FooterBottom_BgColor_Dark'] ?>;
      --tt_footer_bottom_color: <?php echo $advancenews['FooterBottom_TextColor_Dark'] ?>;
    } 
    </style>

    <!-- Cropper And Jquery -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.6.2/cropper.css" integrity="sha512-087vysR/jM0N5cp13Vlp+ZF9wx6tKbvJLwPO8Iit6J7R+n7uIMMjg37dEgexOshDmDITHYY5useeSmfD1MYiQA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js" integrity="sha512-v2CJ7UaYy4JwqLDIrZUI/4hqeoQieOmAZNXBeQyjo21dadnwR+8ZaIJVT8EE2iyI61OV8e6M8PP2/4hpQINQ/g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/1.6.2/cropper.min.js" integrity="sha512-JyCZjCOZoyeQZSd5+YEAcFgz2fowJ1F1hyJOXgtKu4llIa0KneLcidn5bwfutiehUTiOuK87A986BZJMko0eWQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css" integrity="sha512-yHknP1/AwR+yx26cB1y0cjvQUMvEa2PFzt1c9LlS4pRQ5NOTZFWbhBig+X9G9eYW/8m0/4OXNx8pxJ6z57x0dw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick-theme.min.css" integrity="sha512-17EgCFERpgZKcm0j0fEq1YCJuyAWdz9KUtv1EjVuaOz8pDnh/0nZxmU6BBXwaaxqoi9PQXnRWqlcDB027hgv9A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js" integrity="sha512-HGOnQO9+SP1V92SrtZfjqxxtLmVzqZpjFFekvzZVWoiASSQgSr4cw9Kqd2+l8Llp4Gm0G8GIFJ4ddwZilcdb8A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <!-- Editor -->
    <link rel="stylesheet" href="<?php echo $site_domain ?>mfit-admin/assets/vendor/editor/richtext.css">
    <script src="<?php echo $site_domain ?>mfit-admin/assets/vendor/editor/jquery.richtext.js"></script>

    <!-- swiper  -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css" />
    <script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script>


    <!-- Magnific Popup CSS -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.min.css">

    <!-- Magnific Popup JS -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js"></script>


    <!-- Bootstrap  -->
    <link rel="stylesheet" href="<?php echo $site_domain;?>lib/bootstrap-5.3.3/css/bootstrap.min.css">

    <!-- Fonawesome Icon -->
    <link rel="stylesheet" href="<?php echo $site_domain;?>lib/fontawesome-free-6.7.2/css/all.min.css">

    <!-- Bootstrap Icon -->
	  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.1/font/bootstrap-icons.css">

    <!-- Share This -->
    <script type='text/javascript' src='https://platform-api.sharethis.com/js/sharethis.js#property=5e3fe478ea3c1a0012ed0983&product=inline-share-buttons' async='async'></script>

    <!-- MahamudFutureIT.Com Style -->
    <link rel="stylesheet" href="<?php echo $site_domain;?>assets/css/mahamudfutureit.css?v=<?php echo time();  ?>">

    <!-- Zabuto Calendar -->
  	<link href="<?php echo $site_domain;?>lib/calender/zabuto_calendar.min.css" rel="stylesheet">
  	<script src="<?php echo $site_domain;?>lib/calender/zabuto_calendar.min.js"></script>
    <?php
    $header_file = "includes/template-part/header/".$advancenews['Header_Design'].".php";
    if (file_exists($header_file)) {
       include $header_file;
    }
    ?>
    <style media="screen">
      <?php
        echo $advancenews['Custome_CSS_ALL'];

        if ($advancenews['Custome_CSS_MOBILE'] !='') {
          ?>
          @media (max-width: 767px) {
              <?php echo $advancenews['Custome_CSS_MOBILE']; ?>
          }
          <?php
        }

        if ($advancenews['Custome_CSS_TAB'] !='') {
          ?>
          @media (min-width: 768px) and (max-width: 1023px) {
              <?php echo $advancenews['Custome_CSS_TAB']; ?>
          }
          <?php
        }
        if ($advancenews['Custome_CSS_PC'] !='') {
          ?>
          @media (min-width: 1024px){
              <?php echo $advancenews['Custome_CSS_PC']; ?>
          }
          <?php
        }
       ?>

    </style>
    <?php
    echo $advancenews['Custome_Header_Code'];
    echo $advancenews['Custome_Header_JS'];
    echo $advancenews['GLOBAL_SCHEMA'];
    // Homepage Header Codes
    if ($tt_page_name == 'homepage') {
      echo $advancenews['HOME_SCHEMA'];
    }
    ?>
</head>
<body>
  <?php echo $advancenews['Custome_Body_Code'] ?>
  <?php include 'includes/template-part/header/' . $advancenews['mobileHeader_Design'] . '.php'; ?>

  <!-- Off Canvas Sidemenu -->
  <div class="offcanvas offcanvas-start" tabindex="-1" id="mobileMenuOffcanvas" >
    <div class="offcanvas-header border-bottom">
        <div class="col-6">
          <img src="<?php echo ($advancenews['OffCanvas_logo']!='')? $advancenews['OffCanvas_logo'] :  $advancenews['Website_Logo'] ?>" style="height:<?php echo ($advancenews['OffCanvas_logo_size']!='')? $advancenews['OffCanvas_logo_size'] : '30px'; ?>; width:auto;" alt="<?php echo $advancenews['Website_title'] ?>">
        </div>
        <div class="col-6 text-end">
          <?php
          if ($advancenews['ttWriterAccountSystem'] == 'on') {
            ?>
            <a href="<?php echo $site_domain ?><?php echo ($writer_login == true)? 'account/' :'login/'; ?>" class="me-3 p-2 pe-2 border rounded-2 border-2 header_profile_icon_name">
              <i class="bi bi-person-fill"></i> লগইন
            </a>
            <?php
          }
          ?>
          <i  class="bi bi-x-lg cursor-pointer" data-bs-dismiss="offcanvas"></i>
        </div>
    </div>
    <div class="offcanvas-body">
      <?php
        if ($advancenews['Show_Offcanvas_Searchbar'] == 'on') {
          ?>
          <div class="">
            <style media="screen">
              .tt_search_btn{
                background-color: <?php echo $advancenews['Show_Offcanvas_Searchbar_btn_bg'] ?> !important;
                color: <?php echo $advancenews['Show_Offcanvas_Searchbar_btn_txtclr'] ?> !important;
                border-radius: <?php echo $advancenews['Show_Offcanvas_Searchbar_border'] ?>;
              }
              .tt_search_bar {
                  border-color: <?php echo $advancenews['Show_Offcanvas_Searchbar_borderclr'] ?>;
                  border-radius:<?php echo $advancenews['Show_Offcanvas_Searchbar_border'] ?>;
              }
            </style>
            <form class="input-group mb-3" action="<?php echo $site_domain ?>search/" method="get">
              <input type="text" name="q" class="tt_search_bar form-control" placeholder="<?php echo $advancenews['Show_Offcanvas_Searchbar_placeholder'] ?>">
              <button class="btn tt_search_btn" type="submit">
                <?php
                if ($advancenews['Show_Offcanvas_Searchbar_btn_icon'] == 'on') {
                  ?>
                  <i class="fa-solid fa-magnifying-glass"></i>
                  <?php
                }
                ?>
                <?php echo $advancenews['Show_Offcanvas_Searchbar_text'] ?></button>
            </form>
          </div>
          <?php
        }
      ?>

      <nav>
           <ul class="mobile_navmenu">
             <?php
             $menu_main = $advancenews['MainOffCanvas'];

             $tt_main_menu_array = json_decode($menu_main, true);
             foreach ($tt_main_menu_array as $tt_ms_item) {
                 $tt_c_class_m = isset($tt_ms_item['children']) ? 'has-children' : '';
               ?>
               <li class="nav-item <?php echo $tt_c_class_m ?>">
                   <a  target="<?php echo $tt_ms_item['target']  ?>"  href="<?php echo $tt_ms_item['url']  ?>"><?php echo $tt_ms_item['name']  ?></a>
                   <?php
                   if (isset($tt_ms_item['children'])) {
                     ?>
                     <ul class="child-menu">
                       <?php
                       foreach ($tt_ms_item['children'] as $tt_cs_item) {
                         ?>
                         <li class="child-item">
                           <a target="<?php echo $tt_cs_item['target']  ?>" href="<?php echo $tt_cs_item['url']  ?>"><?php echo $tt_cs_item['name']  ?></a>
                         </li>
                         <?php
                       }
                        ?>
                     </ul>
                     <?php
                   }
                   ?>
               </li>
               <?php
             }
             ?>
           </ul>
      </nav>
    </div>
    <div class="offcanvas-footer p-3">
      <div class="text-center">
        <hr>
        <?php
        if ($advancenews['Show_Offcanvas_sicon'] == 'on') {
          if($advancenews['Offcanvas_Socialicon'] =='normal_gray') {
            $ttsicon_style ='';
          }elseif ($advancenews['Offcanvas_Socialicon'] =='normal_color') {
            $ttsicon_style ='color';
          }elseif ($advancenews['Offcanvas_Socialicon'] =='border_squere_gray') {
            $ttsicon_style ='bordered squere';
          }elseif ($advancenews['Offcanvas_Socialicon'] =='border_squere_color') {
            $ttsicon_style ='bordered squere color';
          }elseif ($advancenews['Offcanvas_Socialicon'] =='border_rounded_gray') {
            $ttsicon_style ='bordered round';
          }elseif ($advancenews['Offcanvas_Socialicon'] =='border_rounded_color') {
            $ttsicon_style ='bordered round color';
          }
          ?>
          <div class="mahamudfutureit_social_menu  <?php echo $ttsicon_style ?> ">
            <?php
            if ($advancenews['SL_Facebook'] !='') {
              ?>
              <a href="<?php echo $advancenews['SL_Facebook'] ?>" target="_blank" class="facebook"><i class="fa-brands fa-facebook-f"></i></a>
              <?php
            }
            if ($advancenews['SL_X'] !='') {
              ?>
              <a href="<?php echo $advancenews['SL_X'] ?>" target="_blank" class="twitter"><i class="fa-brands fa-x-twitter"></i></a>
              <?php
            }
            if ($advancenews['SL_Linkedin'] !='') {
              ?>
              <a href="<?php echo $advancenews['SL_Linkedin'] ?>" target="_blank" class="linkedin"><i class="fa-brands fa-linkedin-in"></i></a>
              <?php
            }
            if ($advancenews['SL_Instagram'] !='') {
              ?>
              <a href="<?php echo $advancenews['SL_Instagram'] ?>" target="_blank" class="instagram"><i class="fa-brands fa-instagram"></i></a>
              <?php
            }
            if ($advancenews['SL_Youtube'] !='') {
              ?>
              <a href="<?php echo $advancenews['SL_Youtube'] ?>" target="_blank" class="youtube"><i class="fa-brands fa-youtube"></i></a>
              <?php
            }
            if ($advancenews['SL_Whatsapp'] !='') {
              ?>
              <a href="https://wa.me/<?php echo $advancenews['SL_Whatsapp'] ?>" target="_blank" class="whatsapp"><i class="fa-brands fa-whatsapp"></i></a>
              <?php
            }
            if ($advancenews['SL_Email'] !='') {
              ?>
              <a href="mailto:<?php echo $advancenews['SL_Email'] ?>" target="_blank" class="envelope"><i class="fa-regular fa-envelope"></i></a>
              <?php
            }
            ?>
          </div>

          <?php
        }
        if ($advancenews['Show_Offcanvas_Copyright'] !='') {
          ?>
          <div class="mt-2">
            <p class="m-0 p-0"><?php echo $advancenews['Show_Offcanvas_Copyright'] ?></p>
          </div>
          <?php
        }
        ?>
      </div>
    </div>
  </div>
