@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

:root {
    --main-font: 'Bebas Neue', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    width: 100%;
    
    padding: 20px;

    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.title-h1 {
    text-align: center;
    padding: 10px;
    font-family: var(--main-font);
    letter-spacing: 2px;
    background-color: black;
    color: #ccc;
}


/* Card 1 */

.container1 {
    background-color: aqua;

}

.card1 {
    flex-grow: 1;

    height: 300px;
    width: 300px;
    cursor: pointer;
    transition: all 0.6s;
    position: relative;
    font-family: var(--main-font);
    font-size: 2rem;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    -webkit-box-shadow: 5px 5px 15px 5px #000000;
    box-shadow: 5px 5px 15px 5px #000000;

    & i {
        opacity: 0;
        position: absolute;
        bottom: 10px;
        right: 10px;
        font-size: 40px;
    }

    & .text {
        transition: all 0.6s ease;
        width: 500px;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    & p {
        transition: all 0.6s ease;
        opacity: 0;
        color: #ccc;
        font-size: 2rem;
        max-width: 100%;
        text-align: center;
    }

}

.card1:hover {
    flex-grow: 2;
    background-color: #111;

    & i {
        opacity: 1;
        color: aqua;
    }

    & .text {
        transform: scale(1.5);
    }

    & h2 {
        color: aqua;
    }

    & p {
        opacity: 1;
        font-size: 1.4rem;
    }
}

/* Card2 */

.container2 {
    background-color: tomato;
    justify-content: space-around;
}

.card2 {
    -webkit-box-shadow: 5px 5px 15px 5px #000000;
    box-shadow: 5px 5px 15px 5px #000000;
    width: 500px;
    height: 300px;
    cursor: pointer;
    position: relative;
    transition: all 0.6s ease;

    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--main-font);

    & .link {
        position: absolute;
        bottom: 10px;
        right: 40px;
        font-size: 2.5rem;
        opacity: 0;
        transition: all 0.6s ease;
        color: tomato;
    }

    & h2 {
        font-size: 4rem;
        transition: all 0.6s ease;
    }

    & .texto {
        position: absolute;
        top: 10px;
        left: 10px;
        color: tomato;
        line-height: 0.9;
        opacity: 0;
        transition: all 0.6s ease;

        & .title {
            font-size: 3rem;
            letter-spacing: 3px;
        }

        & p {
            font-size: 1.5rem;
        }
    }
}

.card2:hover {
    background-color: #111;

    & .link {
        opacity: 1;
        right: 20px;
    }

    & .texto {
        opacity: 1;
    }

    & .title {
        opacity: 0;
    }
}


/* Card 3 */

.container3 {
    background-color: violet;
    justify-content: space-evenly;
}

.card3 {
    width: 500px;
    height: 300px;
    -webkit-box-shadow: 5px 5px 15px 5px #000000;
    box-shadow: 5px 5px 15px 5px #000000;
    font-family: var(--main-font);
    font-size: 3rem;
    position: relative;
    cursor: pointer;
    transition: all 0.6s ease;
    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    & .link {
        position: absolute;
        left: 20px;
        bottom: 10px;
        transition: all 0.6s ease;
        color: black;
    }
}

.card3:hover {
    background-color: #111;
    color: violet;

    & .link {
        left: 85%;
        color: violet;
    }
}

/* Card 4 */

.container4 {
    background-color: steelblue;
    justify-content: space-evenly;
}

.card4 {
    width: 500px;
    height: 300px;
    -webkit-box-shadow: 5px 5px 15px 5px #000000;
    box-shadow: 5px 5px 15px 5px #000000;
    font-family: var(--main-font);
    font-size: 3rem;
    position: relative;
    transition: all 0.6s ease;
    cursor: pointer;
    text-decoration: none;
    color: black;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    & .title,
    .description {
        transition: all 0.6s ease;
    }

    & .animated-border {
        width: 100%;
        height: 100%;
        transform: scale(0);
        position: absolute;
        top: 0;
        left: 0;
        transition: all 0.6s ease;
    }

}

.card4:hover {
    background-color: #111;

    & .title,
    .description {
        color: steelblue;
    }

    & .animated-border {
        transform: scale(1);
        border: solid 10px steelblue;
    }
}

/* Card 5 */

.container5 {
    background-color: antiquewhite;
    justify-content: space-evenly;
    align-items: center;
}

.card5 {
    width: 300px;
    height: 400px;
    /* border: solid 2px white; */
    position: relative;
    cursor: pointer;

    & .card5front,
    .card5back {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        font-family: var(--main-font);
        font-size: 2.5rem;
        padding: 10px;

        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
    }

    & .card5front {
        background-color: antiquewhite;
        z-index: 2;
        opacity: 0;
        transition: all 0.6s ease;
        -webkit-box-shadow: 5px 5px 15px 5px #000000;
        box-shadow: 5px 5px 15px 5px #000000;

        & a {
            color: white;

        }
    }

    & .card5back {
        border: solid 2px black;
        z-index: 1;
        transition: all 0.6s ease;
        background-color: black;
        color: white;
    }
}

.card5front:hover {
    transform: rotate(-10deg) scale(1.1);

    opacity: 1;
    background-color: black;
    color: white;

    &~.card5back {
        opacity: 0.5;
        background-color: antiquewhite;
    }
}