<?php
if (!defined('SITE_NAME')) require_once __DIR__ . '/config/config.php';
$pageTitle = isset($pageTitle) ? $pageTitle . ' — ' . SITE_NAME : SITE_NAME;
$pageDesc = isset($pageDesc) ? $pageDesc : getSetting('site_description');
$pageUrl = isset($pageUrl) ? $pageUrl : SITE_URL;
$currentPage = basename($_SERVER['PHP_SELF'], '.php');
?>
<!DOCTYPE html>
<html lang="bn" data-theme="dark">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><?= e($pageTitle) ?></title>
  <meta name="description" content="<?= e($pageDesc) ?>">
  <meta name="robots" content="index, follow">
  <!-- Open Graph -->
  <meta property="og:title" content="<?= e($pageTitle) ?>">
  <meta property="og:description" content="<?= e($pageDesc) ?>">
  <meta property="og:url" content="<?= e($pageUrl) ?>">
  <meta property="og:type" content="website">
  <meta property="og:site_name" content="<?= e(SITE_NAME) ?>">
  <!-- Fonts & Icons -->
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link href="https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
  <link rel="stylesheet" href="<?= SITE_URL ?>/assets/css/style.css">
  <!-- JSON-LD -->
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "WebSite",
    "name": "<?= e(SITE_NAME) ?>",
    "url": "<?= e(SITE_URL) ?>",
    "description": "<?= e($pageDesc) ?>"
  }
  </script>
</head>
<body>
  <!-- Loader -->
  <div class="loader-wrap"><div class="loader-heart">💕</div></div>

  <!-- Floating Hearts -->
  <div class="floating-hearts"></div>

  <!-- Navbar -->
  <nav class="navbar">
    <div class="nav-inner">
      <a href="<?= SITE_URL ?>" class="nav-logo">💕 তজিয়া গ্রুপ</a>
      <ul class="nav-links">
        <li><a href="<?= SITE_URL ?>/index.php" class="<?= $currentPage === 'index' ? 'active' : '' ?>"><i class="fas fa-home"></i> হোম</a></li>
        <li><a href="<?= SITE_URL ?>/search.php" class="<?= $currentPage === 'search' ? 'active' : '' ?>"><i class="fas fa-search"></i> খুঁজুন</a></li>
        <li><a href="<?= SITE_URL ?>/gallery.php" class="<?= $currentPage === 'gallery' ? 'active' : '' ?>"><i class="fas fa-images"></i> গ্যালারি</a></li>
        <li><a href="<?= SITE_URL ?>/videos.php" class="<?= $currentPage === 'videos' ? 'active' : '' ?>"><i class="fas fa-video"></i> ভিডিও</a></li>
        <li><a href="<?= SITE_URL ?>/submit.php" class="<?= $currentPage === 'submit' ? 'active' : '' ?>"><i class="fas fa-plus-circle"></i> তথ্য দিন</a></li>
        <li><a href="<?= SITE_URL ?>/about.php" class="<?= $currentPage === 'about' ? 'active' : '' ?>"><i class="fas fa-info-circle"></i> সম্পর্কে</a></li>
        <li><button class="theme-toggle"><i class="fas fa-sun"></i></button></li>
      </ul>
      <button class="nav-toggle"><i class="fas fa-bars"></i></button>
    </div>
  </nav>

  <!-- Ticker -->
  <div class="ticker">
    <div class="ticker-inner"><?= e(getSetting('ticker_text', '🔥 তজিয়া গ্রুপে স্বাগতম!')) ?></div>
  </div>
