<div class="row">
    <?php 
        foreach ( $models as $model ) : 
            $modelTitle = $userProject['title'] ?? $project['title'];
    ?>
        <div class="col-12 col-md-6 col-lg-4 col-xl-3 mb-3">
            <div class="card text-center p-0" style="/*width:220px;*/width:100%;">
                <?php if ( $user['superAdmin'] ) : ?>
                    <div class="rounded-circle bg-danger position-absolute top-0 end-0 p-1" style="z-index:1;">
                        <button type="button" class="btn-close btbDeleteModel" aria-label="Close" data-id="<?php echo $model['id']; ?>" style="z-index:2;"></button>
                    </div>
                <?php endif; ?>
                <a href="https://sketchfab.com/models/<?php echo $model['sketchfabId']; ?>/embed?autostart=1&ui_animations=0&ui_infos=0&ui_inspector=0&ui_watermark_link=0&ui_watermark=0&ui_help=0&ui_settings=1&ui_vr=0&ui_theme=dark&ui_color=0d6efd&ui_stop=0&ui_ar=0&dnt=1&navigation=orbit" title="3D Model" data-fancybox data-type="iframe">
                    <img src="<?php echo URL_ASSETS; ?>/images/sketchfab-icon.png" class="card-img-top pt-2" style="width:200px;">
                </a>
                <div class="card-body text-truncate">
                    <a href="https://sketchfab.com/models/<?php echo $model['sketchfabId']; ?>/embed?autostart=1&ui_animations=0&ui_infos=0&ui_inspector=0&ui_watermark_link=0&ui_watermark=0&ui_help=0&ui_settings=1&ui_vr=0&ui_theme=dark&ui_color=0d6efd&ui_stop=0&ui_ar=0&dnt=1&navigation=orbit" data-fancybox data-type="iframe">
                        <span class="small text-muted"><?php echo $modelTitle.' - '.$model['createdAt']; ?></span>
                    </a>
                </div>
                <div class="card-footer p-0">
                    <a href="https://sketchfab.com/models/<?php echo $model['sketchfabId']; ?>/embed?autostart=1&ui_animations=0&ui_infos=0&ui_inspector=0&ui_watermark_link=0&ui_watermark=0&ui_help=0&ui_settings=1&ui_vr=0&ui_theme=dark&ui_color=0d6efd&ui_stop=0&ui_ar=0&dnt=1&navigation=orbit" data-fancybox data-type="iframe" type="button" class="btn btn-danger w-100" style="border-top-left-radius:0;border-top-right-radius:0;">
                        <small>View<i class="bi bi-arrow-up-right ms-1"></i></small>
                    </a>
                </div>
            </div>
        </div>
    <?php endforeach; ?>
</div>