<!-- Swiper CSS -->

<div class="alumni-swiper-container" style="background: #0a4977; padding: 30px 0;">
    <div class="swiper alumni-swiper">
        <div class="swiper-wrapper">
            @foreach($alumni->images ?? [] as $img)
                <div class="swiper-slide alumni-slide">
                    <img src="{{ asset('storage/' . $img['image']) }}" alt="Alumni Member" class="alumni-img">
                </div>
            @endforeach
        </div>
    </div>
</div>

<!-- Swiper JS -->
<script>
    document.addEventListener('DOMContentLoaded', function () {
        new Swiper('.alumni-swiper', {
            slidesPerView: 5,
            spaceBetween: 30,
            loop: true,
            autoplay: {
                delay: 2500,
                disableOnInteraction: false,
            },
            breakpoints: {
                1024: { slidesPerView: 5 },
                768: { slidesPerView: 3 },
                480: { slidesPerView: 2 },
                0: { slidesPerView: 1 }
            }
        });
    });
</script>

<style>
.alumni-swiper-container {
    width: 100%;
    background: #0a4977;
}
.alumni-swiper {
    width: 90%;
    margin: 0 auto;
}
.alumni-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}
.alumni-img {
    width: 100%;
    max-width: 180px;
    height: 260px;
    object-fit: cover;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
/* Enhanced responsive styles */
@media (max-width: 1200px) {
    .alumni-swiper-container {
        padding: 25px 0;
    }
    .alumni-swiper {
        width: 92%;
    }
    .alumni-img {
        max-width: 160px;
        height: 240px;
    }
}

@media (max-width: 1024px) {
    .alumni-swiper-container {
        padding: 22px 0;
    }
    .alumni-swiper {
        width: 94%;
    }
    .alumni-img {
        max-width: 140px;
        height: 200px;
    }
}

@media (max-width: 900px) {
    .alumni-swiper-container {
        padding: 20px 0;
    }
    .alumni-swiper {
        width: 95%;
    }
    .alumni-img {
        max-width: 120px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .alumni-swiper-container {
        padding: 18px 0;
    }
    .alumni-swiper {
        width: 96%;
    }
    .alumni-img {
        max-width: 110px;
        height: 150px;
    }
}

@media (max-width: 600px) {
    .alumni-swiper-container {
        padding: 15px 0;
    }
    .alumni-swiper {
        width: 98%;
    }
    .alumni-img {
        max-width: 100px;
        height: 140px;
    }
}

@media (max-width: 480px) {
    .alumni-swiper-container {
        padding: 12px 0;
    }
    .alumni-swiper {
        width: 98%;
    }
    .alumni-img {
        max-width: 90px;
        height: 120px;
    }
}

@media (max-width: 360px) {
    .alumni-swiper-container {
        padding: 10px 0;
    }
    .alumni-swiper {
        width: 99%;
    }
    .alumni-img {
        max-width: 80px;
        height: 110px;
    }
}

/* Ensure proper spacing between slides on smaller screens */
@media (max-width: 480px) {
    .alumni-swiper .swiper-slide {
        padding: 0 5px;
    }
}

@media (max-width: 360px) {
    .alumni-swiper .swiper-slide {
        padding: 0 3px;
    }
}
</style>