:root {
    /* colors */
    --dark-magenta: hsl(300, 43%, 22%);
    --soft-pink: hsl(333, 80%, 67%);
    --dark-gray-magenta: hsl(303, 10%, 53%);
    --light-gray-magenta: hsl(300, 24%, 96%);
    --white: #ffffff;

    --border-radius: 0.8rem;
    /* fonts */
    --fw400: 400;
    --fw500: 500;
    --fw700: 700;
}
*,
*::after,
*::before {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
html {
    font-size: 62.5%;
}
body {
    font-size: 1.5rem;
    font-family:'Spartan', sans-serif;
    background-image: url(./images/bg-pattern-bottom-desktop.svg),
    url(./images/bg-pattern-top-desktop.svg);
    background-position: right bottom, left top;
    background-repeat: no-repeat, no-repeat;
    /* overflow: hidden; */
}
.space > * + * {
    margin-left: var(--space, 2.5rem);
}
img {
    max-width: 100%;
    display: block;
}
.wrapper {
    max-width: 1440px;
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr repeat(6, 1fr) 1.1fr;
    grid-template-rows: 100px 1fr 0.8fr 120px;
    /* gap: 3%; */
}
.top {
    grid-column: 2/8;
    grid-row: 2/3;
    display: flex;
    align-items: center;
}
/* ! Users */
.users {
    flex: 1 1 50%;
}
.users h1 {
    color: var(--dark-magenta);
    font-weight: var(--fw700);
    font-size: 4rem;
    width: 70%;
}
.users p {
    color: var(--dark-gray-magenta);
    font-weight: var(--fw500);
    line-height: 2.2rem;
    font-size: 1.45rem;
    padding: 2rem 0 0 0;
    width: 85%;
}
/*! reviews */
.reviews {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
     justify-content: center;
}
.reviews .center {
    align-self: center;
}
.reviews .right {
    align-self: flex-end;
}
.star-card {
    display: flex;
    align-items: center;
    background-color: var(--light-gray-magenta);
    border-radius: var(--border-radius);
    padding: 1rem 0 1rem 0;
    margin: 1rem ;
    width: 75%;
}
.star {
    display: flex;
    padding: 0.8rem 2rem 0.8rem 2rem ;
}
.star img {
    padding-right: 0.6rem;
}
.star-card p {
    color: var(--dark-magenta);
    font-weight: var(--fw700);
    font-size: 1.3rem;
    line-height: 1.5rem;
    padding: 0.5rem 0;
}
/* ! Bottom */
.bottom {
    grid-column: 2/8;
    grid-row: 3/4;
    display: flex;
    padding: 1rem 0;
 
}
.cards {
    flex: 1 1 33.3%;
    height: 90%;
    min-width: 20rem;
    padding: 3.5rem 3rem;
    background-color: var(--dark-magenta);
    border-radius: var(--border-radius);
    color: var(--light-gray-magenta);
}
/* .cards + .cards {
    margin-left: 2.5rem;
} */
.top-card {
    display: flex;
    padding-bottom: 2rem;
    align-items: center;
}
.top-card img {
    width: 13%;
    height: 13%;
    border-radius: 50%;
    margin-right: 2.5rem;
}
.top-card-name p {
    font-weight: var(--fw700);
}
.top-card-name span {
    color: var(--soft-pink);
    font-size: 1.3rem;
}

.second {
    
    align-self: center;
}
.third {
    align-self: flex-end;
    margin-top: 2rem;
}

/* ! Media Query */
@media only screen and (max-width: 1024px) {
    .star-card {
        flex-direction: column;
      
    }
    .cards {
        align-items: center;
    }
    .cards + .cards {
        margin-left: 2rem;
        margin-top: 0;
        margin-bottom: 0;
    }
    .first, .second, .third {
        margin-top: 0;
        margin-bottom: 0;
        align-self: center;
    }
}


@media only screen and (max-width: 850px) {
    body {
        
        background-image: url(./images/bg-pattern-bottom-mobile.svg
        url(./images/bg-pattern-top-mobile.svg);
        background-position: bottom right, top left;
        background-repeat: no-repeat, no-repeat;
        background-size: max(50%, 400px);
        /* overflow: hidden; */
    }
    .wrapper {
        gap: 0;
        grid-template-rows: 50px 1fr 1fr 50px;
    }
    .top {
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
     
    }
    .users {
        width: 80%;
        text-align: center;
      
    }
    .users {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
    }
    .users h1 {
        width: 100%;
        font-size: 3rem;
        padding: 5rem 5rem 0 5rem;
    } 
    .users p {
        width: 100%;
        padding: 3rem 2rem 2rem 2rem;
    }
    .reviews {
        align-items: center;
        width: 100%;
        margin: 0.5rem 0 0 0;
    }
    .reviews .right {
        align-self: center;
    }
    .star-card {
        width: 100%;
        margin: 1rem 0;
    }
    /*  */
    .bottom {
        flex-direction: column;
        padding-bottom: 0rem;
    }
    .cards {
        width: 100%;  
       height: max-content;
    }
    .first,
    .second, 
    .third {
        margin:0; 
        align-self: center;
    }
    .cards + .cards {
        margin-left: 0;
        margin-top: 2rem;
    }
}
@media only screen and (max-width: 320px) {
   .top {
       align-items: flex-start;
   }
   .reviews {
       align-items: flex-start;
   }
   .reviews .right {
    align-self: flex-start;
}
   .reviews .center {
    align-self: flex-start;
}
    .star-card {
        width: 85%; 
        margin-left: 0;
    }
   
}