@import url('https://fonts.googleapis.com/css2?family=BioRhyme:wght@200..800&family=Bona+Nova+SC:ital,wght@0,400;0,700;1,400&family=Lora:ital,wght@0,400..700;1,400..700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Playwrite+GB+S:ital,wght@0,100..400;1,100..400&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Lora", serif;
}

html, body{
    width: 100%;
    height: 100%;
    background: #402E7A;
}

#main{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5rem;
    width: 100%;
    height: 100vh;
    perspective: 1000px;
    /* to make the 3d dimension */
}

.card{
    position: relative;
    width: 20rem;
    height: 28rem;
    transform: rotateY(0deg);
    transform-style: preserve-3d;
    transition: all cubic-bezier(0.19, 1, 0.22, 1) 1s;
    cursor: pointer;
}

.front, .back{
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg ,#4C3BCF, #4B70F5);
    color: #EBD3F8;
    display: flex;
    align-items: start;
    justify-content: space-between;
    flex-direction: column;
    text-align: center;
    padding: 1rem 1.2rem;
}

.back{
    transform: rotateY(180deg);
    backface-visibility: hidden;
    /* this propety hide the backside style of the card. so if we rotate the card 180deg then we see nothing. add it to any one of the div either front or back */
    background-image: url('https://i.pinimg.com/736x/3f/9f/2f/3f9f2fc5868d3322119fd26f0786054c.jpg');
    background-size: cover;
    background-position: center;
}

.card:nth-child(2) .back{
    background-image: url('https://i.pinimg.com/736x/49/75/fc/4975fc4a2407ff1659d987c0caf07d7c.jpg');
}

.card:nth-child(3) .back{
    background-image: url('https://i.pinimg.com/736x/5d/0f/92/5d0f92c6b846a0631cdcd24614c7cf0d.jpg');
}

.front h4{
    width: 100%;
    padding: 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 500;
}

.topText{
    border-bottom: 3px solid #EBD3F8; 
    text-align: left;
}
.bottomText{
    border-top: 3px solid #EBD3F8;
    text-align: right;
}

.front h1{
    font-size: 3rem;
    font-weight: 500;
}