﻿/* ==========================================================================
   1. GALLERY CONTAINER & SWIPER WRAPPER
   ========================================================================== */
#customGallery {
    padding: 20px 0;
    overflow: hidden;
}

    #customGallery .cardSwiper {
        padding: 60px 20px;
    }

    /* ==========================================================================
   2. INDIVIDUAL EVENT CARDS (Floating Image Style)
   ========================================================================== */
    #customGallery .gal-card {
        width: 100%;
       height:200px;
        padding: 10px; /* Padding kam ki taaki image badi dikhe */
        box-shadow: 0 10px 30px rgba(0,0,0,0.12);
        transition: all 0.4s ease-in-out;
        border: none;
        background: #fff;
        position: relative;
        display: flex;
        flex-direction: column;
        border-radius: 12px;
    }

/* Desktop Hover: Card expands to show title */
@media (min-width: 992px) {
    #customGallery .gal-card:hover {
        height: 250px;
    }
}

/* Image Container (Thumbnail Box) */
#customGallery .gal-imgContainer {
    width: 100%; /* Full width for better clarity */
    height: 180px; /* Fixed height for alignment */
    position: relative;
    top: -45px; /* Floating effect */
    margin: 0 auto;
    background: #f8f9fa; /* Light background for transparent images */
    z-index: 5;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: 0.4s ease-in-out;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

    /* Thumbnail Image Clarity Fix */
    #customGallery .gal-imgContainer img {
        width: 100%;
        height: 100%;
        /* CHANGE: 'contain' use karein posters/text images ke liye taaki wo blurry na ho */
        object-fit: contain;
        background-color: #fff;
        display: block;
        /* Sharpness fixes */
        image-rendering: -webkit-optimize-contrast;
        image-rendering: high-quality;
        will-change: transform;
    }

/* Card Content (Title/Text) */
#customGallery .gal-content {
    position: relative;
    margin-top: -100px; /* Image ke piche se start hoga */
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    transition: 0.3s ease-in-out;
    color: #333;
}

    #customGallery .gal-content h2 {
        font-size: 1.2rem;
        font-weight: 700;
        margin-bottom: 5px;
        color: #000;
    }

    #customGallery .gal-content p {
        font-size: 0.9rem;
        color: #666;
    }

/* Hover par content dikhayein */
@media (min-width: 992px) {
    #customGallery .gal-card:hover .gal-content {
        visibility: visible;
        opacity: 1;
        margin-top: -20px;
    }
}

/* ==========================================================================
   3. MOBILE & TABLET ADAPTATIONS
   ========================================================================== */
@media (max-width: 991px) {
    #customGallery .gal-card {
        margin-top: 
            0px;
        padding-bottom: 20px;
    }

    #customGallery .gal-content {
        visibility: visible;
        opacity: 1;
        margin-top: -30px;
    }

    #customGallery .gal-imgContainer {
        width: 90%;
        height: 170px;
        top: -40px;
    }

    #customGallery .main-next, #customGallery .main-prev {
        display: none;
    }
}

/* ==========================================================================
   4. MODAL & ENLARGED VIEW (Popup Fixes)
   ========================================================================== */
.gal-modal .modal-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.gal-modal .modal-dialog {
    max-width: 95%;
    margin: 1rem auto;
}

/* Container for the popup slider */
.gal-modal-swiper {
    width: 100%;
    height: 75vh;
    background: #000;
    border: 5px solid #fff;
    border-radius: 12px;
    overflow: hidden;
    pointer-events: auto !important; 
    cursor: pointer;
}

@media (min-width: 768px) {
    .gal-modal-swiper {
        height: 85vh;
        border: 12px solid #fff;
    }
}

/* Modal slides centering */
.gal-modal-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: #000;
}

    /* FULL IMAGE DISPLAY: Half-image issue fix */
    .gal-modal-swiper .swiper-slide img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain; /* Pura image bina kate dikhega */
        pointer-events: none;
    }

/* Close button style fix for visibility */
.gal-modal .btn-close {
    background-color: #fff;
    opacity: 1;
    border-radius: 50%;
    padding: 10px;
    margin-bottom: 10px;
}

.gal-modal-swiper .swiper-button-next,
.gal-modal-swiper .swiper-button-prev {
    color: #fff;
}
