/* Image Zoom Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-in;
}

.image-modal.active {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.image-modal-content {
    position: relative;
    width: 100%;
    height: 100vh;
    display: block;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    text-align: center;
}

.image-modal-img {
    height: 100vh;
    width: auto;
    max-width: none;
    display: inline-block;
    vertical-align: middle;
    animation: zoomIn 0.3s ease-in;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Close button */
.image-modal-close {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
    transition: background 0.3s ease;
    background-color: rgba(10, 10, 10, 0.6);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.7);
    padding: 18px 40px;
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: auto !important;
    touch-action: none;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #fff;
    background-color: rgba(10, 10, 10, 0.9);
}

/* Hide navigation buttons and counter */
.image-modal-nav,
.image-modal-counter {
    display: none !important;
}

/* Clickable images */
.clickable-image {
    cursor: zoom-in;
}
