<div class="page-banner">
    <div class="container">
        <h2><?= htmlspecialchars($article['title']) ?></h2>
        <div class="breadcrumb">
            <a href="/">Home</a>
            <span class="separator"><i class="fas fa-chevron-right"></i></span>
            <a href="/articles">Genomics Library</a>
            <span class="separator"><i class="fas fa-chevron-right"></i></span>
            <span><?= htmlspecialchars($article['title']) ?></span>
        </div>
    </div>
</div>

<div class="page-content">
    <div class="container">
        <div class="article-detail-content fade-in-up">
            <div class="article-detail-meta">
                <?php if (!empty($article['author'])): ?>
                <span><i class="fas fa-user"></i> <?= htmlspecialchars($article['author']) ?></span>
                <?php endif; ?>
                <?php if (!empty($article['created_at'])): ?>
                <span><i class="fas fa-calendar"></i> <?= date('F d, Y', strtotime($article['created_at'])) ?></span>
                <?php endif; ?>
                <?php if (!empty($article['category_name'])): ?>
                <span><i class="fas fa-folder"></i> <?= htmlspecialchars($article['category_name']) ?></span>
                <?php endif; ?>
                <?php if (isset($article['views'])): ?>
                <span><i class="fas fa-eye"></i> <?= htmlspecialchars($article['views']) ?> views</span>
                <?php endif; ?>
            </div>

            <?php if (!empty($article['image_url'])): ?>
            <div class="article-detail-image">
                <img src="<?= htmlspecialchars($article['image_url']) ?>" alt="<?= htmlspecialchars($article['title']) ?>">
            </div>
            <?php endif; ?>

            <div>
                <?= $article['content'] ?? '' ?>
            </div>

            <div style="margin-top: 48px;">
                <a href="/articles" class="btn btn-secondary"><i class="fas fa-arrow-left"></i> Back to Articles</a>
            </div>
        </div>
    </div>
</div>
