html {
    font-size: 10px;
    font-family: "Montserrat", Arial, Helvetica, sans-serif ;
}

body {
    font-size: 1.6rem;
}

.layout {
    width: 100%;
    height: 100%;
    position: absolute;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8rem;
}

.layout__article  {
    width: 40rem;
    height: 40rem;
    cursor: pointer;
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

.article__img {
    width: 100%;
    height: 100%;
    position: absolute;
    transition: all 300ms linear;
}

.article__overlay {
    color: #fff;
    text-align: center;
    width: 100%;
    height: 100%;
    background-color: #4953BA;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 300ms linear;
}

.article__title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.article__description {
    font-size: 1.5rem;
    font-weight: 500;
}

.layout__article--2 .article__overlay {
    height: 50%;
    background-color: #ED5051;
    position: relative;
    transform: translateY(40rem);
}

.layout__article--3 .article__overlay {
    background-color: #18A3A6;
}


.layout__article--1:hover .article__overlay {
    position: absolute;
    top: 0;
    animation: izquierda 2s;
}

@keyframes izquierda {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(0);
    }
}

.layout__article--2:hover .article__overlay {
    transform: translateY(20rem);
}

.layout__article--2:hover .article__img {
    transform: translateY(-20rem);
}

@keyframes abajo {
    0% {
        transform: translateY(100%);
    }

    100% {
        transform: translateX(0);
    }
}

.layout__article--3:hover .article__overlay {
    position: absolute;
    bottom: 0;
    animation: derecha 2s;
}

@keyframes derecha {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(0);
    }
}



