:root{
    /*Primary colors*/
    --very-dark-magenta: hsl(300, 43%, 22%);
    --soft-pink: hsl(333, 80%, 67%);

    /*Neutral colors*/
    --ratings-bg: hsl(303, 10%, 53%);
    --light-grayish-magenta: hsl(300, 24%, 96%);

    --space: 1rem;
    --rounded-corners: 10px;

    /*Font weights*/
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-bold: 700;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img,
svg{
    display: block;
    max-width: 100%;
}

ul{
    list-style: none;
}

html,
body{
    min-height: 100%;
}

body{
    font-family: 'League Spartan', sans-serif;
    font-size: 15px;
    min-height: 100vh;
    display: grid;
    
    line-height: 1.5;
    background-image: url(images/bg-pattern-top-mobile.svg), url(images/bg-pattern-bottom-mobile.svg);
    background-repeat: no-repeat, no-repeat;
    background-position: top left, bottom right;
    background-size: 100% auto, 100% auto;
}

main{
    padding: 4rem 1rem;
    display: grid;
    place-items: center;
    gap: 2rem;
}

.hero{
    display: grid;
    gap: 2rem;
}

.hero__text{
    text-align: center;
    display: grid;
    justify-items: center;
    gap: var(--space);
}

.hero__text h1{
    color: var(--very-dark-magenta);
    font-size: 3rem;
    font-weight: var(--fw-bold);
    line-height: 0.8;
}

.hero__text p {
    color: var(--ratings-bg);
    font-size: 1.3rem;
}

.ratings__container{
    display: grid;
    gap: var(--space);
}

.ratings{
    background-color: var(--light-grayish-magenta);
    border-radius: var(--rounded-corners);
    text-align: center;
    padding: 0.5rem;
    display: grid;
    gap: 0.6rem;
}

.ratings p{
    color: var(--very-dark-magenta);
    font-weight: var(--fw-bold);
}

.stars__container{
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.testimonies__container{
    display: grid;
    gap: var(--space);
}

.testimony{
    background-color: var(--very-dark-magenta);
    color: var(--light-grayish-magenta);
    padding: 1.5rem;
    border-radius: var(--rounded-corners);
    display: grid;
    gap: 1.5rem;
}

.testimony__header{
    display: flex;
    gap: 1rem;
    align-items: center;
    line-height: 1.2;
}

.testimony__header img{
    border-radius: 50%;
    width: 30px;
}

.name{
    font-weight: var(--fw-bold);
}

.role{
    font-weight: var(--fw-medium);
    color: var(--soft-pink);
}

@media (min-width: 600px){
    body{
        background-image: url(images/bg-pattern-top-desktop.svg), url(images/bg-pattern-bottom-desktop.svg);
        background-size: auto, auto;
    }

    main{
        max-width: 80%;
        margin-inline: auto;
        gap: 4rem;
    }
     
    .hero{
        grid-template-columns: repeat(2, 1fr);
        justify-content: space-between;
    }

    .hero__text{
        text-align: left;
    }

    .hero__text h1{
        font-size: 4rem;
    }

    .ratings{
        display: flex;
        align-items: center;
        gap: 2rem;
        padding-inline: 2rem;
    }

    .ratings img{
        width: 20px;
    }

    .ratings:nth-child(1){
        justify-self: start;
    }

    .ratings:nth-child(2){
        justify-self: center;
    }

    .ratings:nth-child(3){
        justify-self: end;
    }

    .testimonies__container{
        grid-template-columns: repeat(3, 1fr);
        height: 250px;
        gap: 1.5rem;
    }


    .testimonies__container li:nth-child(1){
        align-self: start;
    }

    .testimonies__container li:nth-child(2){
        align-self: center;
    }

    .testimonies__container li:nth-child(3){
        align-self: end;
    }
}