html{
    font-size: 62.5%;
    font-family: "Open Sans", sans-serif;
}
.main{
    width: 100vw;
    height: 94vh;
    display: grid;
    place-content: center;
}
.gallery{
    width: 400px;
    height: 400px;
    background-color: rebeccapurple;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}
.gallery__content{
    position: absolute;
    padding: 5px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, 194px);
    gap: 5px;
    box-shadow: 2px 2px 4px 0 rgba(20, 20, 20, 0.3);
    z-index: 2;
    background-color: white;
    .gallery__img{
        width: 100%;
        height: 100%;
        cursor: pointer;
        position: relative;
        transition: all 3000000ms ease-in-out;
        img{
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        &:hover:after{
            content: "+";
            position: absolute;
            background-color: #EC6565;
            width: 50px;
            height: 50px;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            margin: auto;
            border-radius: 50%;
            color: white;
            display: grid;
            place-content: center;
            font-size: 3rem;
            font-weight: 900;
            
        }
    }
}

.open-img{
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    .open-img__wallpaper{
        height: 45%;
        width: 100%;

        transform: translateY(-250px);

        background-image: url("https://img-database.jeferssonvm97.com/gallery/img0.jpg");
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: center;
        position: relative;
        animation: openTop 3s linear;

        .open-img__img{
            width: 96px;
            height: 96px;
            left: 0;
            right: 0;
            bottom: -48px;
            margin: auto; 
            position: absolute;
            border-radius: 50%;
            overflow: hidden;
            border: 2px solid white;
            img{
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }
        .close{
            position: absolute;
            top: 30px;
            right: 30px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: #EC6565;
            border: none;
            cursor: pointer;
            color: white;
            font-size: 3rem;
            display: grid;
            place-items: center;
            line-height: 0;
            &:hover{
                background-color: white;
                color: #EC6565;
            }
        }
    }

    .open-img__info{
        width: 100%;
        height: 55%;
        transform: translateY(250px);

        background-color: #EC6565;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        color: white;
        .open-img__info--svg{
            width: 100%;
            display: flex;
            justify-content: space-around;
            cursor: pointer;
            
            svg{
                width: 45px;
                height: 45px;
                fill: white;
                border: 1px solid white;
                border-radius: 50%;
                padding: 8px;
                cursor: pointer;
                &:hover{
                    background-color: white;
                    fill: #EC6565;
                }
            }
        }
    }

}

.open-img--active{
    display: block;
    z-index: 3;
    .open-img__wallpaper{
        animation: closeTop 3s linear ;
        transform: translateY(0px);
        z-index: 3;
        .open-img__img{
            animation: closeTop 3s linear ;

        }
    }.open-img__info{
        animation: closeBottom 3s linear;
        transform: translateY(0px);
    }
}
.open-img--close{
    display: block;
    z-index: 3;
    .open-img__wallpaper{
        animation: openTop 3s linear ;
        transform: translateY(0px);
        z-index: 3;
        .open-img__img{
            animation: openTop 3s linear ;

        }
    }.open-img__info{
        animation: openBottom 3s linear;
        transform: translateY(0px);
    }
}


@keyframes closeTop{
    from{
        transform: translateY(-250px);

    }
    to{
        transform: translateY(0px);
    }
}

@keyframes closeBottom{
    from{
        transform: translateY(250px);
    }
    to{
        transform: translateY(0px);
    }
}
@keyframes openTop {
    from{
        transform: translateY(0px);
    }
    to{
        transform: translateY(-250px);
    }
}
@keyframes openBottom {
    from{
        transform: translateY(0px);

    }
    to{
        transform: translateY(250px);

    }
}