/* ========================================
   Event Gallery & Lightbox — Modern
   ======================================== */

.event-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.event-gallery img {
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-gallery img:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Lightbox Overlay */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox-overlay.open {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    font-size: 20px;
    transition: all 0.3s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-close {
    top: -12px;
    right: -12px;
    transform: none;
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.lightbox-prev {
    left: -56px;
}

.lightbox-next {
    right: -56px;
}

/* Carousel */
.event-carousel {
    position: relative;
    margin: 16px auto 0;
    max-width: 640px;
    width: 100%;
}

.carousel-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #f1f3f7;
    aspect-ratio: 16 / 9;
}

.event-carousel img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.event-carousel img.active {
    display: block;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    font-size: 18px;
    line-height: 1;
    transition: all 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.65);
    transform: translateY(-50%) scale(1.08);
}

.carousel-prev {
    left: 12px;
}

.carousel-next {
    right: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
    }

    .carousel-viewport {
        aspect-ratio: 4 / 3;
        border-radius: 8px;
    }

    .carousel-prev,
    .carousel-next {
        width: 36px;
        height: 36px;
    }

    .event-gallery {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }

    .event-gallery img {
        border-radius: 8px;
    }
}

@media (max-width: 576px) {
    .event-gallery {
        grid-template-columns: 1fr;
    }
}
