<?php
// blog/includes/blog-header.php
if (!isset($baseDir)) { $baseDir = '../'; }
if (!isset($blogKicker)) { $blogKicker = "Developer Guide"; }
if (!isset($blogLead)) { $blogLead = ""; }
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <title><?= htmlspecialchars($pageTitle ?? '') ?></title>
  <?php include __DIR__ . '/../../includes/header.php'; ?>
  <style>
    .blog-wrap { max-width: 800px; margin: 60px auto 120px; padding: 0 24px; color: #1e293b; line-height: 1.8; }
    .blog-header { margin-bottom: 40px; text-align: center; }
    .blog-kicker { color: #2563eb; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
    .blog-title { font-size: clamp(36px, 5vw, 48px); font-weight: 800; letter-spacing: -1.5px; color: #0f172a; line-height: 1.1; margin: 0 0 20px; }
    .blog-lead { font-size: 18px; color: #64748b; max-width: 600px; margin: 0 auto; }
    .blog-content h2 { font-size: 28px; font-weight: 700; color: #0f172a; letter-spacing: -0.5px; margin: 48px 0 16px; border-bottom: 1px solid #e2e8f0; padding-bottom: 8px; }
    .blog-content h3 { font-size: 20px; font-weight: 600; color: #0f172a; margin: 32px 0 12px; }
    .blog-content p { font-size: 16px; color: #334155; margin-bottom: 24px; }
    .blog-content ul, .blog-content ol { margin-bottom: 24px; padding-left: 24px; color: #334155; font-size: 16px; }
    .blog-content li { margin-bottom: 10px; }
    .blog-content .highlight, .blog-content .highlight-box { background: #f8fafc; border-left: 4px solid #10b981; padding: 16px 20px; border-radius: 8px; font-weight: 500; color: #1e293b; margin: 24px 0; }
    .blog-content pre { background: #0f172a; color: #e2e8f0; padding: 20px; border-radius: 8px; overflow-x: auto; font-size: 0.95rem; margin: 20px 0; }
    .author-bio { margin-top: 60px; padding: 30px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; display: flex; flex-direction: column; gap: 16px; }
    .author-bio h4 { font-size: 18px; font-weight: 700; color: #0f172a; margin: 0; }
    .author-bio p { margin: 0; font-size: 15px; color: #475569; line-height: 1.6; }
    .author-socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
    .author-socials a { font-size: 13px; font-weight: 600; text-decoration: none; padding: 6px 12px; border-radius: 6px; background: #fff; border: 1px solid #e2e8f0; color: #0f172a; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
    .author-socials a:hover { background: #f1f5f9; border-color: #cbd5e1; }
    .author-socials a.whatsapp { color: #16a34a; }
    .author-socials a.telegram { color: #0284c7; }
    .author-socials a.youtube { color: #dc2626; }
    .author-socials a.social-icon { color: #64748b; padding: 6px 10px; }
  </style>
</head>
<body>
<?php include __DIR__ . '/../../includes/nav.php'; ?>
<main class="main-content">
  <article class="blog-wrap">
    <header class="blog-header">
      <div class="blog-kicker"><?= htmlspecialchars($blogKicker) ?></div>
      <h1 class="blog-title"><?= htmlspecialchars(explode('|', $pageTitle ?? '')[0] ?? $pageTitle ?? '') ?></h1>
      <?php if (!empty($blogLead)): ?>
      <p class="blog-lead"><?= htmlspecialchars($blogLead) ?></p>
      <?php endif; ?>
    </header>
    <div class="blog-content">
