.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 2;
}

.bg-img {
    background-position: center;
    background-size: contain;
    width: 100%;
    height: 100%;
    background-repeat: repeat;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.main-img img {
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 30rem;
    height: 30rem;
}

@media(max-width: 768px) {
    .bg-img {
        background-size: cover;
    }

    .main-img img {
        width: calc(100% - 2rem);
        height: auto;
    }
}