/* Reset Default Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Ensures padding & border don't affect width or height */ 
}

/* MOBILE ____________________________________________________________________________________________________________*/

/* New Default Styling */
body {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: League Spartan;
    background-color: hsl(0, 0%, 100%);
    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 center, bottom center;
    background-size: contain; /* image fully covers the area */
}

/* Main Styling */
main {
    /*outline: 2px solid hsla(0, 100%, 50%, 0.3); /* for testing purpose */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 0;
    height: auto;
    margin: 6rem 1.7rem;
}

.con.row1 {
    outline: 2px transparent cyan; /* for testing purpose */
}

.con.title {
    /*outline: 2px solid magenta; /* for testing purpose */
    display: flex;
    flex-direction: column;
    font-size: 2.4rem;
    gap: 0.5em;
    text-align: center;
}

h1 {
    color: hsl(300, 43%, 22%);
    font-weight: 700;
    font-size: 2.4rem;
}

p {
    font-weight: 400;
    font-size: 1.15rem;
    line-height: 1.3em;
}

.body.title {
    color: hsl(303, 10%, 53%);
}

.con.rating {
    /*outline: 2px solid black; /* for testing purpose */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 2.5rem 0rem 2.5rem; /* top horizontal bottom */ 
    row-gap: 1rem; /* can also use gap, same result */
}

.rating1,
.rating2,
.rating3 {
    background-color: hsl(300, 24%, 96%);
    font-weight: 500;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    gap: 1.2em;
    padding: 1.4em 0em; /* vertical horizontal */ 
    border-radius: 0.5rem;
}

.star-row {
    /*outline: 2px solid greenyellow; /* for testing purpose */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.rating.icon {
    width: 1.5em;
    height: auto;
}

.rating-category {
    /*outline: 2px solid greenyellow; /* for testing purpose */
    color: hsl(300, 43%, 22%);
}

.con.row2 {
    /*outline: 2px solid blue; /* for testing purpose */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    row-gap: 1rem;
}

.testimony1,
.testimony2,
.testimony3 {
    /*outline: 2px solid greenyellow; /* for testing purpose */
    background-color: hsl(300, 43%, 22%);
    color: hsl(300, 24%, 96%);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: left;
    font-size: 1.1rem;
    line-height: 0.5em;
    gap: 1.8em;
    padding: 1.8em;
}

.profile {
    /*outline: 2px solid greenyellow; /* for testing purpose */
    display: flex;
    flex-direction: row;
    justify-content: left;
    align-items: center;
    font-size: 1.1rem;
    gap: 1.5em;
}

.avatar {
    /*outline: 2px solid cyan; /* for testing purpose */
    border-radius: 50%;
    width: 13%;
    height: auto;
}

.name-label {
    /*outline: 2px solid magenta; /* for testing purpose */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: left;
    font-size: 0.71rem;
    line-height: 1.5em;
}

.name,
.label {
    display: block; /* removes inline baseline spacing */
    line-height: 1; /* keeps them snug, no extra gap */
}

.name {
    color: hsl(0, 0%, 100%);
}

.label {
    color: hsl(333, 80%, 67%);
    font-size: 1.1rem;
}

.testimony {
    font-size: 1.1rem;
}

.attribution {
    background-color: hsl(300, 43%, 22%);
    width: 100%;
    text-align: center;
    color: hsl(300, 24%, 96%);
    font-size: 1rem;
    padding: 1em 0em; /* vertical horizontal */
}

a {
    color: hsl(333, 80%, 67%);
}

/* TABLET MINI ____________________________________________________________________________________________________________*/

@media (min-width: 600px) and (max-width: 767px) {
    /*Default Styling */
    body {
        background-image: url(images/bg-pattern-top-desktop.svg), url(images/bg-pattern-bottom-desktop.svg);
        background-repeat: no-repeat, no-repeat;
        background-position: top left, bottom right;
        background-size: 60%, 100%;
    }

    .rating1,
    .rating2,
    .rating3 {
        text-align: center;
        display: flex;
        flex-direction: row; /**/
        justify-content: center;
        align-items: center;
        font-size: 0.75rem;
        gap: 2.5em; /**/
        padding: 1.5em 0em; /**/ 
    }

    .avatar {
        width: 10%; /**/
        height: auto;
    }
}

/* TABLET STANDARD ____________________________________________________________________________________________________________*/

@media (min-width: 768px) and (max-width: 1199px) {
    /* Default Styling */
    body {
        min-width: 100vw;
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* content full to the bottom of the page */
        align-items: center;
        background-image: url(images/bg-pattern-top-desktop.svg), url(images/bg-pattern-bottom-desktop.svg);
        background-repeat: no-repeat, no-repeat;
        background-position: top left, bottom right;
        background-size: 47%, 100%;
    }

    /* Main Styling */
    main {
        width: 100%;
        max-width: 90%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4rem;
    }

    .con.row1 {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: top;
        gap: 2rem;
    }

    .con.title, 
    .con.rating {
        flex: 1;
        min-width: 0; 
    }

    .con.title {
        text-align: left;
        display: flex;
        flex-direction: column;
        font-size: 2.4rem;
        gap: 0.9em;
    }

    h1 {
        font-size: clamp(2.4rem, 2.4rem + 2vw, 3.9rem); /* grow with viewport */
    }

    p {
        font-size: 1.25rem;
    }

    .con.rating {
        padding: 0.8rem 0rem 0.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
 
    .rating1,
    .rating2,
    .rating3 {
        width: 85%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        font-size: 0.7rem;
        padding: 1.4em 0em;
        gap: 0.85em;
    }

    .rating1 {
        align-self: flex-start;
    }

    .rating3 {
        align-self: flex-end;
    }

    .con.row2 {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 1rem;
    }

    .avatar {
        width: 18%;
        height: auto;
    }

    .testimony1 {
        margin-top: 0;
    }

    .testimony2 {
        margin-top: 2rem;
    }

    .testimony3 {
        margin-top: 4rem;
    }

    .testimony1,
    .testimony2,
    .testimony3 {
        font-size: clamp(0.3rem, 0.3rem + 1vw, 1.2rem);
    }
}

/* SMALL DESKTOP ____________________________________________________________________________________________________________*/

@media (min-width: 1200px) and (max-width: 1399px) {
    /* Default Styling */
    body {
        min-width: 100vw;
        height: auto;
        background-image: url(images/bg-pattern-top-desktop.svg), url(images/bg-pattern-bottom-desktop.svg);
        background-repeat: no-repeat, no-repeat;
        background-position: top left, bottom right;
        background-size: 40%, 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
    }

    /* Main Styling */
    main {
        width: 90%;
        justify-content: center;
        align-items: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5.5rem;
    }


    .con.row1 {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: top;
        gap: 0rem;
    }
    
    .con.title,
    .con.rating {
        flex: 1;
        min-width: 0;
    }

    .con.title {
        text-align: left;
        display: flex;
        flex-direction: column;
        font-size: 3rem;
        line-height: 1.2em;
        gap: 0.65em;
    }

    h1 {
        font-size: clamp(3rem, 3rem + 2vw, 3.9rem);
        padding-right: 3em; 
    }

    p {
        font-size: 1.4rem;
        line-height: 1.4em;
        padding-right: 3em;
    }  

    .con.rating {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        row-gap: 1rem;
        padding: 0;
        padding-top: 1rem;
    }

    .rating1,
    .rating2,
    .rating3 {
        width: 85%;
        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: left; /**/
        align-items: center;
        font-size: 0.84rem;
        padding: 1.8em 2.7em;
        gap: 2.8em;
    }

    .rating1 {
        align-self: flex-start;
    }

    .rating3 {
        align-self: flex-end;
    }

    .star-row {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 0.6rem;
    }

    .rating.icon {
        /* outline: 2px solid red; /* testing purpose */
        width: 1.45em;
        height: auto;
    }

    .con.row2 {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 1.8rem;
    }

    .testimony1,
    .testimony2,
    .testimony3 {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: left;
        font-size: 1.2rem;
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .testimony1 {
        margin: 0;
    }

    .testimony2 {
        margin-top: 2rem;
    }

    .testimony3 {
        margin-top: 4rem;
    }

    .testimony {
        font-size: 1.18rem;
        padding: 0;
    }
}


/* DESKTOP ____________________________________________________________________________________________________________*/

@media (min-width: 1400px) {
    /* Default Styling */
    body {
        min-width: 100vw;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        background-image: url(images/bg-pattern-top-desktop.svg), url(images/bg-pattern-bottom-desktop.svg);
        background-repeat: no-repeat, no-repeat;
        background-position: top left, bottom right;
        background-size: 38%, 82%;
    }

    /* Main Styling */
    main {
        width: 90%;
        max-width: 80.5rem;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5.5rem;
        margin: 6rem auto;
    }

    .con.row1 {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: top;
        gap: 0;
    }
    
    .con.title,
    .con.rating {
        flex: 1;
        min-width: 0;
    } 

    .con.title {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        font-size: 3.9rem;
        text-align: left;
    }

    h1 {
        font-size: 3.9rem;
        padding-right: 3em;
    }

    p {
        font-size: 1.4rem;
        padding-right: 4em;
    }

    .con.rating {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        padding: 0;
        padding-top: 1rem;
    }

    .rating1,
    .rating2,
    .rating3 {
        width: 80%;
        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: left;
        align-items: center;
        font-size: 0.84rem;
        padding: 1.8em 2.7em;
        gap: 2.8em;
    }

    .rating1 {
        align-self: flex-start;
        margin-left: 1.5rem;
    }

    .rating2 {
        margin-left: 2.8rem;
    }

    .rating3 {
        align-self: flex-end;
    }

    .star-row {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        column-gap: 0.6rem;
    }

    .rating.icon {
        /* outline: 2px solid red; /* testing purpose */
        width: 1.45em;
        height: auto;
    }

    .con.row2 {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 2.8rem;
    }

    .testimony1,
    .testimony2,
    .testimony3 {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: left;
        font-size: 1.7rem;
        gap: 1.5em;
        padding: 1.5em;
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .profile {
        display: flex;
        flex-direction: row;
        justify-content: left;
        align-items: center;
        font-size: 1.5rem;
        gap: 1.25em;
    }

    .name-label {
        justify-content: center;
    }

    .name {
        font-size: 1.2rem;
    }

    .label {
        font-size: 1.2rem;
    }

    .testimony1 {
        margin: 0;
    }

    .testimony2 {
        margin-top: 2rem;
    }

    .testimony3 {
        margin-top: 4rem;
    }

    .testimony {
        font-size: 1.18rem;
        padding: 0;
    }
}