.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex; 
    justify-content: flex-start; 
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
    overflow-x: auto;
    z-index: 99999;
}

.popup-content {
    margin-top: 100px; /* 원하는 높이만큼 떨어뜨림 */
    background: #fff;
    border-radius: 10px;
    text-align: center;
    max-width: 500px;
    max-height: 600px;
    overflow: auto;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out;
}

.popup-image-container {
    display: flex;
    flex-direction: column;
    /*align-items: center;*/
}

.popup-image {
    max-width: 100%;
    max-height: 400px;
}

.popup-footer {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 10px;
    background: #f8f8f8;
    box-sizing: border-box;
}

.popup-close, .popup-hide {
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 5px 15px;
    font-size: 14px;
    border-radius: 5px;
}

.popup-close:hover, .popup-hide:hover {
    background: #555;
}

@media screen and (max-width: 1300px) {
    .popup-overlay {
        display: flex;
        /*justify-content: center;
        align-items: center;*/
        flex-direction: column; 
        gap: 0; 
    }

    .popup-content {
        position: absolute; 
        top: 25%;
        left: 50%;
        transform: translate(-50%, -50%); 
        z-index: 99990; 
    }

    .popup-content:nth-child(2) {
        z-index: 99991; 
    }

    .popup-content:nth-child(3) {
        z-index: 99992; 
    }
    .popup-content:not(:first-child) {
        /*top: 45%;*/
        top: 15%;
    }
}

@media screen and (max-width: 430px) {
	.popup-content {
		width:90%;
    }
}
