<div class="container py-4">
    <nav aria-label="breadcrumb" class="mb-4">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="<?= APP_URL ?>/universities" class="text-decoration-none">Discovery Center</a></li>
            <li class="breadcrumb-item"><a href="<?= APP_URL ?>/universities/<?= $university['slug'] ?>" class="text-decoration-none"><?= htmlspecialchars($university['name']) ?></a></li>
            <li class="breadcrumb-item active" aria-current="page">Scholarships</li>
        </ol>
    </nav>

    <div class="card border-0 shadow-sm p-4">
        <h3 class="fw-bold font-outfit text-dark mb-4 border-bottom pb-2">Scholarships for <?= htmlspecialchars($university['name']) ?></h3>
        <?php if (!empty($scholarships)): ?>
            <div class="row g-3">
                <?php foreach ($scholarships as $sch): ?>
                    <div class="col-md-6">
                        <div class="border rounded p-3 h-100 bg-light-subtle d-flex flex-column">
                            <span class="badge bg-success-subtle text-success text-uppercase align-self-start mb-2 text-2xs"><?= htmlspecialchars($sch['scholarship_type']) ?></span>
                            <h6 class="fw-bold text-dark mb-2"><?= htmlspecialchars($sch['name']) ?></h6>
                            <p class="text-xs text-muted mb-3">Coverage: <?= htmlspecialchars($sch['coverage']) ?></p>
                            <div class="mt-auto d-flex justify-content-between align-items-center text-xs border-top pt-2">
                                <span class="text-danger fw-semibold">Deadline: <?= formatDate($sch['application_deadline']) ?></span>
                                <a href="<?= APP_URL ?>/scholarships/<?= htmlspecialchars($sch['slug']) ?>" class="btn btn-xs btn-outline-success rounded-pill px-2">Details</a>
                            </div>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>
        <?php else: ?>
            <div class="text-center py-5 text-muted">
                <p>No scholarships linked directly to this university yet.</p>
            </div>
        <?php endif; ?>
    </div>
</div>
