<?php $pageTitle='Friends — Almost Heaven Radio'; include __DIR__ . '/header.php'; include __DIR__ . '/menu.php'; require_once __DIR__ . '/includes/media_helpers.php'; $items=file_exists(__DIR__.'/data/friends.json')?json_decode((string)file_get_contents(__DIR__.'/data/friends.json'),true):[]; if(!is_array($items)) $items=[]; ?>
<main class="content-area"><div class="content-wrapper page-shell"><section class="content-card"><h1>🤝 Friends of the Station</h1><p>Partners, supporters, and communities connected to Almost Heaven Radio.</p></section><div class="cards-grid"><?php foreach($items as $item): ?><article class="friend-card"><div class="friend-top"><?php if(!empty($item['image'])): ?><div class="friend-image"><img src="<?= htmlspecialchars(ah_media_src((string)$item['image'], 'img/friends')) ?>" alt="<?= htmlspecialchars($item['name'] ?? 'Friend') ?>"></div><?php endif; ?><div class="friend-meta"><h3 class="friend-name"><?= htmlspecialchars($item['name'] ?? 'Friend') ?></h3><p class="friend-desc"><?= nl2br(htmlspecialchars($item['description'] ?? '')) ?></p><?php if(!empty($item['url'])): ?><p class="feature-link-row"><a href="<?= htmlspecialchars($item['url']) ?>" target="_blank" rel="noopener">Visit link →</a></p><?php endif; ?></div></div></article><?php endforeach; if(!$items): ?><section class="content-card"><p>No friends listed yet.</p></section><?php endif; ?></div></div></main>
<?php include __DIR__ . '/footer.php'; ?>