<?php require_once __DIR__ . '/includes/bootstrap.php';
$pageTitle = 'News | Underground FX Radio';
$currentPage = basename(__FILE__);
include __DIR__ . '/includes/header.php';
?>
<section class="ugfx-page-hero">
  <div class="container-xxl">
    <div class="ugfx-kicker"><i class="bi bi-lightning-charge-fill"></i> Underground FX Radio</div>
    <h1 class="page-title">Station news</h1>
    <p class="page-copy">Station news, updates, announcements, and featured posts from Underground FX.</p>
  </div>
</section>

<section class="section-pad pt-3">
  <div class="container-xxl">
    <div class="ugfx-news-grid">
      <?php foreach (ugfx_get_news(12) as $item): ?>
      <article class="ugfx-card p-4">
        <div class="ugfx-micro-label mb-2"><?= htmlspecialchars($item['date'] ?? 'Station update') ?></div>
        <h3><?= htmlspecialchars($item['title'] ?? 'News item') ?></h3>
        <p class="text-secondary mb-3"><?= nl2br(htmlspecialchars($item['body'] ?? $item['content'] ?? '')) ?></p>
        <div class="text-secondary small">By <?= htmlspecialchars($item['author'] ?? 'Admin') ?></div>
      </article>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<?php include __DIR__ . '/includes/footer.php'; ?>
