<?php
declare(strict_types=1);

$base = dirname(__DIR__);
require_once $base . '/includes/functions.php';

$page_title = 'Fkbae - Practical Insights for Discreet Dating';
$meta_description = 'Fkbae offers candid articles on privacy, communication, and mobile dating etiquette. Authored guidance for navigating modern connections with discretion.';
$canonical_path = 'blog/';

$categories = blog_categories();
$posts = blog_posts();

$canonical = site_url($canonical_path);
$crumbs = [
  ['label' => 'Home', 'href' => '/'],
  ['label' => 'Blog', 'href' => ''],
];
$schema_jsonld = array_values(array_filter([
  breadcrumbs_schema($crumbs, $canonical),
]));

require_once $base . '/includes/header.php';

?>

<div class="ua933ca7f_wth7ea809ed__container">
  <?php echo render_breadcrumbs($crumbs); ?>

  <header class="ua933ca7f_wth7ea809ed__page-head">
    <h1>Fkbae Editorial</h1>
    <p class="ua933ca7f_wth7ea809ed__lead">
      Straightforward perspectives on privacy, communication, and navigating mobile dating. Our contributors provide practical insights for modern, discreet connections.
    </p>
    <p class="ua933ca7f_wth7ea809ed__muted" style="margin-top:10px">
      <strong>Contributors:</strong>
      <?php
        $ap = [];
        foreach (authors_data() as $as => $au) {
          $ap[] = '<a href="' . h(author_url($as)) . '">' . h((string)($au['name'] ?? $as)) . '</a>';
        }
        echo implode(' · ', $ap);
      ?>
      - <a class="ua933ca7f_wth7ea809ed__text-link" href="<?php echo h(site_url('creators/')); ?>">Overview</a>
    </p>
  </header>

  <section class="ua933ca7f_wth7ea809ed__section">
    <h2 class="ua933ca7f_wth7ea809ed__section-title">Explore by Topic</h2>
    <div class="ua933ca7f_wth7ea809ed__category-grid">
      <?php foreach ($categories as $cat): ?>
        <a class="ua933ca7f_wth7ea809ed__category-card" href="<?php echo h(blog_category_url((string)$cat['slug'])); ?>">
          <?php image_slot((string)($cat['image_slot'] ?? 'hero'), (string)$cat['title']); ?>
          <div class="ua933ca7f_wth7ea809ed__pad">
            <h3><?php echo h((string)$cat['title']); ?></h3>
            <p class="ua933ca7f_wth7ea809ed__muted"><?php echo h((string)$cat['description']); ?></p>
          </div>
        </a>
      <?php endforeach; ?>
    </div>
  </section>

  <section class="ua933ca7f_wth7ea809ed__section">
    <div class="ua933ca7f_wth7ea809ed__section-head">
      <h2 class="ua933ca7f_wth7ea809ed__section-title">Latest Articles</h2>
      <a class="ua933ca7f_wth7ea809ed__text-link" href="<?php echo h(site_url('online-dating-safety.php')); ?>">Safety guide</a>
    </div>

    <div class="ua933ca7f_wth7ea809ed__blog-cards">
      <?php foreach (array_slice($posts, 0, 12) as $post): ?>
        <?php $cat = find_blog_category((string)($post['category'] ?? '')); ?>
        <a class="ua933ca7f_wth7ea809ed__blog-card" href="<?php echo h(blog_post_url((string)$post['slug'])); ?>">
          <?php image_slot(post_card_image_slot($post), (string)$post['title']); ?>
          <div class="ua933ca7f_wth7ea809ed__pad">
            <div class="ua933ca7f_wth7ea809ed__meta-row">
              <span class="ua933ca7f_wth7ea809ed__badge"><?php echo h((string)($cat['title'] ?? 'Blog')); ?></span>
              <span class="ua933ca7f_wth7ea809ed__muted"><?php echo h(iso_date((string)($post['date'] ?? ''))); ?></span>
              <span class="ua933ca7f_wth7ea809ed__muted">•</span>
              <span class="ua933ca7f_wth7ea809ed__muted"><?php echo h((string)($post['reading_minutes'] ?? 6)); ?> min read</span>
            </div>
            <h3><?php echo h((string)$post['title']); ?></h3>
            <p class="ua933ca7f_wth7ea809ed__muted ua933ca7f_wth7ea809ed__blog-card-excerpt"><?php echo h(post_card_excerpt($post, 280)); ?></p>
          </div>
        </a>
      <?php endforeach; ?>
    </div>
  </section>
</div>

<?php require_once $base . '/includes/footer.php'; ?>