.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-container {
    position: relative;
    max-width: 450px;
    max-height: 80%;
    width: 90%;  /* Responsive width */
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .popup-container {
        max-width: 350px;  /* Smaller on mobile */
        max-height: 70%;
        width: 85%;
    }
    
    .popup-image {
        border-radius: 8px;
    }
}

.popup-overlay.active .popup-container {
    transform: scale(1);
}

.popup-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.popup-image:hover {
    transform: scale(1.02);
}

.close-button {
    position: absolute;
    top: -10px;
    right: -10px;
    background: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.close-button:hover {
    background: #f0f0f0;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .popup-container {
        max-width: 95%;
        max-height: 80%;
    }
    
    .popup-image {
        border-radius: 8px;
    }
}