/* Click Image Gallery Styles */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50vw;
    height: 80vh;
    background: white;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    z-index: 1000;
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}

.modal-info {
    width: 100%;
    text-align: left;
    margin-bottom: 13px;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 15px;
    overflow: hidden;
}

#modalGallery {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: calc(100% - 60px);
    /* Adjust height considering modal header */
    padding: 15px;
    overflow: hidden;
    border-radius: 12px;
}

#modalGallery img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.3s ease-in-out;
}

/* Fade-in animation for images */
.fade-in {
    opacity: 0;
    animation: fade 0.5s forwards;
}

@keyframes fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: #333;
    transition: color 0.3s;
    color: #ff4d4d;
}

.close-btn:hover {
    color: #9b0202;
}

/* Navigation Buttons */
.prev-btn,
.next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease, transform 0.2s;
    width: 48px;
    text-align: center;
    z-index: 2;
}

.prev-btn {
    left: 15px;
    display: none;
}

.next-btn {
    right: 15px;
    display: none;
}

.prev-btn:hover,
.next-btn:hover {
    background: #f1f1f1;
    transform: translateY(-50%) scale(1.1);
}

/* Modal Overlay */
#galleryModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal {
        width: 90vw;
        height: 70vh;
    }

    .modal-content {
        padding: 15px;
    }

    .prev-btn,
    .next-btn {
        padding: 8px;
        font-size: 16px;
    }
}