<div class="page-heading compact">
    <div>
        <span>Модул 5</span>
        <h1>Institution Database</h1>
        <p>Контакти, портали, работно време, отговорности, срокове и карта на институциите.</p>
    </div>
</div>

<section class="institution-grid">
    <?php foreach ($institutions as $institution): ?>
        <article class="panel institution-card">
            <div class="institution-icon"><i class="bi bi-bank"></i></div>
            <div>
                <small><?= e($institution['type']) ?></small>
                <h2><?= e($institution['name']) ?></h2>
                <p><?= e($institution['responsibilities']) ?></p>
            </div>
            <dl>
                <div><dt>Email</dt><dd><?= e($institution['email']) ?></dd></div>
                <div><dt>Телефон</dt><dd><?= e($institution['phone']) ?></dd></div>
                <div><dt>Срок</dt><dd><?= e($institution['deadline_days']) ?> дни</dd></div>
                <div><dt>Адрес</dt><dd><?= e($institution['address']) ?></dd></div>
            </dl>
            <div class="action-row">
                <a class="btn btn-outline-dark" href="<?= e($institution['website']) ?>" target="_blank" rel="noopener"><i class="bi bi-globe2"></i> Сайт</a>
                <a class="btn btn-success" href="<?= e($institution['portal']) ?>" target="_blank" rel="noopener"><i class="bi bi-box-arrow-up-right"></i> Портал</a>
            </div>
        </article>
    <?php endforeach; ?>
</section>
