@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Karla:ital,wght@0,200..800;1,200..800&family=Kumbh+Sans:wght@100..900&family=League+Spartan:wght@100..900&family=Lexend+Deca:wght@100..900&family=Manrope:wght@200..800&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Overpass:ital,wght@0,100..900;1,100..900&family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    background-color: rgb(222, 222, 247);
    font-size: 18px;
    font-family: "DM Sans", sans-serif;
    width: 100%;
    height: 100vh;
}

main {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 20px;
    min-height: 90vh;
    margin: auto auto;
    width: 90vw;
    padding: 20px;

}

div {
    background-color: rgb(255, 255, 255);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

div:nth-child(1) {
    grid-column: 1 / 2;
    grid-row: 1 / 4;
    background-color: hsl(31, 66%, 93%);
    display: block;
    /* padding: 20%; */
    font-weight: 700;
    font-size: 1.5rem;

}

div:nth-child(1) p {
    font-size: 1.5rem;
    font-weight: 600;
    margin-right: 30%;
}

span {
    color: hsl(256, 67%, 59%);
    font-style: italic;
}

div:nth-child(1) img {
    margin-top: 20%;
    max-width: 100%;
}

div:nth-child(2) {
    grid-column: 2 / 4;
    grid-row: 1 / 3;
    background-color: hsl(256, 67%, 59%);
    display: block;
    padding: 10% 20% 25%;
    color: hsl(31, 66%, 93%);
    font-size: 2.5rem;
    text-align: center;
    font-weight: 500;
    line-height: 90%;
    overflow: hidden;
}

.reviews {
    font-size: 0.8rem;
    font-weight: 100;
    margin-bottom: 5%;
}


div:nth-child(2) img {
    max-width: 50%;
}


div:nth-child(2) span {
    color: hsl(39, 100%, 71%);
    font-style: normal;
}



div:nth-child(3) {
    grid-column: 4 / 5;
    grid-row: 1 / 5;
    background-color: hsl(254, 88%, 90%);
    display: block;
    overflow: hidden;
    font-size: 1.5rem;
    font-weight: 500;
}

.schedule {
    margin: 0 20% 5% 20%;
    line-height: 85%;
}

div:nth-child(3) img {
    max-width: 100%;
    max-height: 100%;
    margin-left: 20%;
}

.optimize {
    font-size: 0.8rem;
    margin: 0 20% 5% 20%;
}

div:nth-child(4) {
    grid-column: 1 / 2;
    grid-row: 4 / 7;
    background-color: hsl(39, 100%, 71%);
    display: block;
    padding: 10%;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 80%;
    overflow: hidden;
}

div:nth-child(4) p {
    margin: 0 40% 2% 10%;
}

div:nth-child(4) img {
    max-width: 70%;
    min-height: 50%;
    margin: 0 20px;
}

div:nth-child(5) {
    grid-column: 2 / 3;
    grid-row: 3 / 5;
    background-color: hsl(0, 0%, 100%);
    display: block;
    overflow: hidden;
}

div:nth-child(5) img {
    max-width: 100%;
    margin-left: 20%;
}

div:nth-child(5) p {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 30% 0 20%;
    line-height: 90%;
}

div:nth-child(6) {
    grid-column: 3/4;
    grid-row: 3/5;
    background-color: hsl(39, 100%, 71%);
    display: block;
    padding: 10%;
    overflow: hidden;
}

div:nth-child(6) p {
    font-size: 1rem;
    margin-right: 50%;
    margin-bottom: 5px;
    font-weight: 600;
    line-height: 90%;
}


div:nth-child(6) img {
    max-width: 100%;
}



div:nth-child(7) {
    grid-column: 2/3;
    grid-row: 5/7;
    background-color: hsl(0, 0%, 100%);
    display: block;
    overflow: hidden;
    text-align: center;
}

div:nth-child(7) h2 {
    font-size: 3rem;
    font-weight: 600;
}

div:nth-child(7) p {
    margin: 5% 0;
    font-size: 0.9rem;
}

div:nth-child(7) img {
    max-width: 70%;
}


div:nth-child(8) {
    grid-column: 3/5;
    grid-row: 5/7;
    background-color: hsl(256, 67%, 59%);
    overflow: hidden;
    padding: 15% 5%;
}

div:nth-child(8) img {
    max-width: 30%;
    margin: 10% 0;
}

div:nth-child(8) p {
    font-size: 2rem;
    color: white;
    font-weight: 500;
    line-height: 85%;
    margin: 0 20px 0 60px;
}

@media (max-width: 486px) {
    main {
        display: flex;
        flex-direction: column;
    }
}