.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-color: rgba(0, 0, 0, 0.85);
}

.popup-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.popup-container {
    position: relative;
    background: url('../../assets/images/pc/popup/BG.png') no-repeat center center / cover;
    background-size: 100% 100%;
    max-width: 900px;
    width: auto;
    max-height: 90vh;
    overflow-y: auto;
    padding: 10px 30px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.popup-overlay.active .popup-container {
    transform: scale(1);
}

.popup-close {
    max-width: 52px;
    max-height: 52px;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 10;
}

.popup-close:hover {
    transform: scale(1.1);
}

.popup-title {
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: bold;
    color: #bc7f3d;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 15px 0 10px;
}

.popup-divider {
    width: 60%;
    height: auto;
    margin: 0 auto;
    display: block;
}

.popup-step {
    margin-top: 10px;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 5px;
}

.step-number {
    background-color: #bc7f3d;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    padding: 8px 20px;
    text-transform: uppercase;
    white-space: nowrap;
}

.step-description {
    color: black;
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    line-height: 1.6;
    flex: 1;
}

.step-description span {
    font-weight: bold;
}

.step-images {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.step-image-wrapper {
    align-self: flex-start;
    flex: 1;
    min-width: 150px;
    max-width: 200px;
}

.step-image {
    max-width: 316px;
    max-height: 305px;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.step-arrow {
    max-width: 19px;
    max-height: 34px;
    align-self: center;
    height: 100%;
    flex-shrink: 0;
    transform: translateY(-28px);
}

.step-center-image {
    display: flex;
    justify-content: center;
    cursor: pointer;
}

.step-center-image img {
    max-width: 210px;
    max-height: 70px;
    width: 100%;
    height: 100%;
}

.step-center-image img:hover {
    transform: scale(1.05);
}

.popup-footer {
    text-align: center;
    font-size: clamp(0.5rem, 1vw, 0.65rem);
    font-weight: bold;
    margin-bottom: 10px;
}

.popup-container::-webkit-scrollbar {
    width: 8px;
}

.popup-container::-webkit-scrollbar-track {
    background: #1a0f0f;
}

@media (max-width: 768px) {
    .popup-container {
        width: 85%;
        padding: 15px;
        background: url('../../assets/images/mobile/popup/BG.png') no-repeat center center / cover;
        background-size: 100% 100%;
    }

    .popup-close {
        width: 28px;
        height: 28px;
        top: 10px;
        right: 10px;
    }

    .popup-title {
        font-size: 1.2rem;
        letter-spacing: 1px;
        margin: 10px 0 8px;
    }

    .popup-divider {
        width: 80%;
    }

    .popup-step {
        margin-top: 15px;
    }

    .step-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
    }

    .step-number {
        font-size: 0.8rem;
        padding: 6px 12px;
        flex-shrink: 0;
    }

    .step-description {
        font-size: 0.75rem;
        line-height: 1.5;
        flex: 1;
    }

    .step-images {
        align-items: flex-start 
    }

    .step-image-wrapper img,
    .step-arrow {
        align-self: start 
    }

    .step-images {
        display: grid ;
        grid-template-columns: 1fr auto 1fr ;
        grid-template-rows: auto auto ;
        gap: 10px ;
        margin-top: 15px;
        width: 100%;
        flex-wrap: unset ;
    }

    .step-image-wrapper {
        place-self: center;
        width: 100% ;
        flex: unset ;
        align-self: unset ;
    }

    .step-image-wrapper:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }
    
    .step-arrow-1 {
        transform: translateY(-40px);
    }

    .step-arrow-3 {
        transform: translateY(-30px);
    }

    .step-arrow:nth-child(2) {
        grid-column: 2 ;
        grid-row: 1 ;
        width: 12px ;
        height: auto ;
        align-self: center ;
    }

    .step-image-wrapper:nth-child(3) {
        grid-column: 3;
        grid-row: 1;
    }

    .step-arrow:nth-child(4) {
        display: none ;
    }

    .step-image-wrapper:nth-child(5) {
        grid-column: 1;
        grid-row: 2;
    }

    .step-arrow:nth-child(6) {
        grid-column: 2 ;
        grid-row: 2 ;
        width: 12px ;
        height: auto ;
        align-self: center ;
    }

    .step-image-wrapper:nth-child(7) {
        grid-column: 3;
        grid-row: 2;
    }

    .popup-footer {
        font-size: 0.6rem;
        margin-top: 15px;
        margin-bottom: 10px;
    }
}

@media (max-width: 640px) {
    .popup-close {
        width: 28px;
        height: 28px;
        top: 10px;
        right: 10px;
    }

    .popup-title {
        font-size: 1.2rem;
        letter-spacing: 1px;
        margin: 6px 0 8px;
    }

    .step-images {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 10px;
        margin-top: 15px;
        width: 100%;
    }

    .step-image-wrapper {
        width: 100%;
    }

    .step-image-wrapper:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    .step-arrow:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
        width: 12px;
        height: 12px;
        align-self: center;
    }

    .step-image-wrapper:nth-child(3) {
        grid-column: 3;
        grid-row: 1;
    }

    .step-arrow:nth-child(4) {
        display: none;
    }

    .step-image-wrapper:nth-child(5) {
        grid-column: 1;
        grid-row: 2;
    }

    .step-arrow:nth-child(6) {
        grid-column: 2;
        grid-row: 2;
        width: 12px;
        height: 12px;
        align-self: center;
    }

    .step-image-wrapper:nth-child(7) {
        grid-column: 3;
        grid-row: 2;
    }

    .step-center-image img {
        max-width: 140px;
    }

    .popup-footer {
        font-size: 0.6rem;
        margin-bottom: 0px;
    }
}

@media (max-width: 480px) {
    .popup-container {
        padding: 10px;
    }

    .popup-title {
        font-size: 1rem;
    }

    .step-number {
        font-size: 0.7rem;
        padding: 5px 10px;
    }

    .step-description {
        font-size: 0.6rem;
    }

    .step-images {
        gap: 8px;
    }

    .step-arrow-1 {
        transform: translateY(-20px);
    }

    .step-arrow-3 {
        transform: translateY(-15px);
    }

    .step-arrow:nth-child(2),
    .step-arrow:nth-child(6) {
        width: 12px;
    }

    .step-arrow:nth-child(4) {
        display: none;
    }

    .step-center-image img {
        max-width: 180px;
    }

    .popup-footer {
        margin-top: 5px;
        font-size: 0.55rem;
    }

    .popup-step {
        margin-top: 5px;
    }
}