html, body {
    margin: 0;
}

body {
    --white: hsl(0, 0%, 100%);
    --usr-bg-color: hsl(300, 43%, 22%);
    --usr-verf-color: hsl(333, 80%, 67%);
    --txt-color: hsl(303, 10%, 53%);
    --usr-txt-color: hsl(300, 24%, 96%);

    margin: 0;
    display: flex;
    width: 100%;
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'League Spartan';
    font-size: 1.1em;
    font-weight: 500;
    background-image: url(images/bg-pattern-top-desktop.svg), url(images/bg-pattern-bottom-desktop.svg);
    background-repeat: no-repeat no-repeat;
    background-size: 100% 100%;
}

main {
    display: grid;
    max-width: 75vw;
    grid-template-columns: 1fr 2fr;

    gap: 3em;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    color: var(--txt-color);
    gap: 1em;
}

header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5lh);
    font-weight: 700;
    line-height: clamp(2rem, 3vw, 3.5rem);
    color: var(--usr-bg-color);
    margin: 0;
}

header p {
    margin-bottom: 0;
    line-height: 1.25em;
}

.raters {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 1em;
}

.raters__cont {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    align-items: center;
    min-height: 1.8em;
    min-width: 30rem;

    color: var(--usr-bg-color);
    background: var(--usr-txt-color);
    padding: 1em 0em;
    border-radius: .5em;

    font-size: .95rem;
}

.raters__cont:first-child {
    transform: translateX(-6em);
}

.raters__cont:nth-child(2) {
    transform: translateX(-3em);
}

.stars {
    display: flex;
    gap: .4em;
    margin-bottom: .2em;
    margin-left: 2em;
}

.raters__cont h3 {
    margin: 0;
    font-size: 1.1em;
}

.persons {
    display: flex;
    flex-direction: row;
    grid-column: 1 / 3;
    gap: 1.5rem;
}

.user__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1.5em;
    padding: 2em;
    color: var(--white);
    border-radius: .5em;
    background: var(--usr-bg-color);
}

.user__content:nth-child(2) {
    transform:translateY(1em);
}

.user__content:last-child {
    transform:translateY(2em);
}

.user__info {
    display: flex;
    align-items: center;
    flex-flow: row wrap;
    gap: 1.5em;
}

.fotoUser {
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
}

.user__name, .user__range {
    margin: 0;
    font-size: 1rem;
}

.user__name {
    color: var(--white);
    font-weight: 700;
}

.user__range {
    color: var(--usr-verf-color);
    font-weight: 400;
}

.user__text {
    font-weight: 400;
    font-size: 1lh;
    line-height: 1.3em;
    margin: 0;
}

@media (min-width: 981px) and (max-width: 1050px) {
    body {
        background-image: url(images/bg-pattern-top-mobile.svg), url(images/bg-pattern-bottom-mobile.svg);
        background-repeat: no-repeat no-repeat;
        background-size: 100% 100%;
    }
    
    main {
        grid-template-columns: 1fr;
        column-gap: 0;
        margin: 5em 0;
    }

    .raters {
        grid-row: 2;
        width: 100%;
    }

    .persons {
        grid-row: 3;
    }

    .raters__cont:first-child {
        transform: translateX(0);
        align-self: flex-start;
    }

    .raters__cont:nth-child(2) {
        transform: translateX(0);
        align-self: center;
    }
}

@media (max-width: 980px) {

    body {
        height: auto;
        width: 100%;
        box-sizing: border-box;
        background-image: url(images/bg-pattern-top-mobile.svg), url(images/bg-pattern-bottom-mobile.svg);
        background-repeat: no-repeat no-repeat;
        background-size: 100% 100%;
    }

    main {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        width: 90%;
        max-width: 100%;
        margin: 5rem;
    }

    header {
        text-align: center;
    }

    .raters {
        justify-content: center;
        align-items: center;
        width: auto;
    }

    .raters__cont {
        margin-block: 1em 0em;
        flex-direction: column;
        gap: 0;
        justify-content: center;
        width: 100%;
        min-width: auto;
    }

    .raters__cont:first-child {
        transform: translateX(0);
    }

    .raters__cont:nth-child(2) {
        transform: translateX(0);
    }
    
    .persons {
        display: flex;
        flex-direction: column;
        align-items: center;
        grid-column: auto;
        gap: .5rem;
        flex: 1;
    }

    .user__content {
        gap: 1.5em;
        padding: 2em;
    }
}

