

<?php $__env->startSection('title', 'Video Edukasi - PilahPintar'); ?>

<?php $__env->startSection('content'); ?>
<div class="container">
    <div class="text-center mb-5">
        <span class="badge bg-success bg-opacity-10 text-success font-heading px-3 py-2 rounded-pill mb-2">Media Pembelajaran</span>
        <h2 class="fw-bold font-heading text-success">Galeri Video Edukasi Sampah 🎬</h2>
        <p class="text-muted col-lg-8 mx-auto">Tonton animasi dan tutorial video kreatif mengenai pemilahan, daur ulang, dan pengolahan sampah.</p>
    </div>

    <div class="row gy-4 mb-5">
        <?php $__empty_1 = true; $__currentLoopData = $videos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $video): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
        <div class="col-md-6 col-lg-4">
            <div class="card card-eco h-100">
                <div class="ratio ratio-16x9 rounded-top-4 overflow-hidden">
                    <iframe src="https://www.youtube.com/embed/<?php echo e($video->youtube_id); ?>" title="<?php echo e($video->title); ?>" allowfullscreen></iframe>
                </div>
                <div class="card-body d-flex flex-column">
                    <span class="badge bg-warning text-dark mb-2 align-self-start"><?php echo e($video->category); ?></span>
                    <h6 class="fw-bold text-dark mb-2"><?php echo e($video->title); ?></h6>
                    <p class="text-muted small mb-3 flex-grow-1"><?php echo e($video->description); ?></p>
                    <a href="<?php echo e($video->youtube_url); ?>" target="_blank" class="btn btn-outline-danger btn-sm rounded-pill align-self-start mt-auto">
                        <i class="fa-brands fa-youtube me-1"></i> Tonton di YouTube <i class="fa-solid fa-arrow-up-right-from-square ms-1" style="font-size: 0.75rem;"></i>
                    </a>
                </div>
            </div>
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
        <div class="col-12 text-center py-5">
            <div class="p-4 bg-white rounded-4 shadow-sm">
                <span class="fs-1">🎬</span>
                <h5 class="fw-bold mt-2">Belum Ada Video</h5>
                <p class="text-muted">Video edukasi akan segera ditambahkan oleh Admin.</p>
            </div>
        </div>
        <?php endif; ?>
    </div>

    <div class="d-flex justify-content-center">
        <?php echo e($videos->links()); ?>

    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\ProkerKKN\resources\views/videos/index.blade.php ENDPATH**/ ?>