<?php require __DIR__ . '/../layouts/header.php'; ?>

<section class="hero-section p-5 mb-4 rounded-4 shadow-sm">
    <h1 class="display-6 fw-bold mb-2"><?= e(trans('conference_proceedings')) ?></h1>
    <p class="lead mb-0"><?= e(current_lang() === 'ar' ? (string) $conference['title_ar'] : (string) $conference['title_en']) ?></p>
</section>

<div class="card border-0 shadow-sm rounded-4">
    <div class="card-body">
        <?php if (!empty($papers)): ?>
            <div class="row g-4">
                <?php foreach ($papers as $paper): ?>
                    <div class="col-md-6">
                        <div class="border rounded-4 p-3 h-100">
                            <h3 class="h5 fw-bold"><?= e((string) $paper['submission_title']) ?></h3>
                            <div class="small text-muted mb-2"><?= e((string) $paper['submission_no']) ?></div>
                            <div class="small mb-2"><strong><?= e(trans('doi')) ?>:</strong> <?= e((string) ($paper['doi'] ?? '')) ?></div>
                            <div class="small mb-3"><strong><?= e(trans('published_at')) ?>:</strong> <?= e((string) ($paper['published_at'] ?? '')) ?></div>
                            <a href="<?= e(base_path('paper?id=' . (int) $paper['paper_id'])) ?>" class="btn btn-outline-primary rounded-3 btn-sm"><?= e(trans('paper_page')) ?></a>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>
        <?php else: ?>
            <div class="alert alert-info rounded-4 mb-0"><?= e(trans('no_data')) ?></div>
        <?php endif; ?>
    </div>
</div>

<?php require __DIR__ . '/../layouts/footer.php'; ?>
