/* Popup Modal Styles */
.popup-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.popup-content {
    position: relative;
    background-color: #fff;
    padding: 0;
    border-radius: 0px;
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.4s ease-out;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-close {
    position: absolute;
    top: -7px;
    right: -7px;
    color: #000;
    background-color: rgba(255, 255, 255, 0.5);
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.3s ease;
}

.popup-close:hover,
.popup-close:focus {
    transform: rotate(90deg);
}

#popupImage {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0px;
    max-height: 80vh;
    object-fit: contain;
    transition: opacity 0.5s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .popup-content {
        max-width: 95%;
        max-height: 85%;
    }

    .popup-close {
        top: -5px;
        right: -7px;
        font-size: 28px;
        width: 35px;
        height: 35px;
    }

    #popupImage {
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .popup-content {
        max-width: 98%;
        border-radius: 0px;
    }

    #popupImage {
        border-radius: 0px;
    }
}