@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root{
    --Purple100: hsl(254, 88%, 90%);
    --Purple500: hsl(256, 67%, 59%);
    --Yellow100: hsl(31, 66%, 93%);
    --Yellow500: hsl(39, 100%, 71%);
    --White: hsl(0, 0%, 100%);
    --Black: hsl(0, 0%, 7%);
}

*{
    padding: 0px;
    margin: 0px;
    box-sizing: border-box;
    font-family: "DM Sans", serif;
    font-weight: 400;
    font-size: 18px;
}

.main{
    max-width: 100vw;
    min-height: 100vh;
    padding: 6rem;
    background-color: rgb(245, 245, 245);
    display: flex;
    align-items: center;
    justify-content: center;
}

.section{
    display: grid;
    grid-template-columns: repeat(4,1fr);
    grid-template-rows: repeat(6,1fr);
    gap: 1.5rem;
    width: 1100px;
}

.grid{
    display: flex;
    flex-direction: column  ;
    border-radius: 8px;
    padding: 1.5rem;
}



#first{
    grid-area: 1/1/4/2;
    background-color: var(--Yellow100);
    padding: 1.5rem;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.first-text{
    font-size: 2rem;
    line-height: 2rem;
    font-weight: 500;
}

.first-blue{
    font-size: 2rem;
    color: var(--Purple500);
    font-weight: 500;
}

.first-image{
    width:100%;
}



#second{
    grid-area: 1/2/3/4;
    background-color: var(--Purple500);
    padding: 3rem 2rem;
    justify-content: center;
    align-items: center;
    gap: 0.2rem;
}

.second-text{
    font-size: 3rem;
    text-align: center;
    line-height: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--White);
}

.second-yellow{
    font-size: 3rem;
    color: var(--Yellow500);
    font-weight: 500;
}

.second-small{
    color: var(--White);
}

.second-image{
    width:40%;
}


#third{
    grid-area: 1/4/5/5;
    background-color: var(--Purple100);
    align-items: center;
    justify-content: center;
    gap: 1rem;
    overflow: hidden;
}

.image-container{
    position: relative;
    height: 50%;
}

.third-image{
    position: absolute;
    height: 100%;
    left: -100px;
}

.third-text{
    font-size: 1.5rem;
    line-height: 1.5rem;
    font-weight: 500;
}


#fourth{
    grid-area: 4/1/7/2;
    background-color: var(--Yellow500);
    gap: 2rem;
    align-items:center;
}

.fourth-text{
    font-size: 2rem;
    line-height: 1.9rem;
    font-weight: 500;
}

.fourth-image{
    width:100%;
}



#fifth{
    grid-area: 3/2/5/3;
    background-color: var(--White);
    gap: 1rem;
    overflow: hidden;
}

.fifth-image-container{
    width: 100%;
    position: relative;
    height: 30%;
}

.fifth-image{
    width:150%;
    position: absolute;
}

.fifth-text{
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.5rem;
}



#sixth{
    grid-area: 3/3/5/4;
    background-color: var(--Yellow500);
    gap: 1rem;
    overflow: hidden;
    position: relative;
    align-items: center;
}

.sixth-text{
    font-size: 1.5rem;
    line-height: 1.5rem;
    font-weight: 500;
}

.sixth-image-container{
    width: 100%;
    height: 50%;
}

.sixth-image{
    width: 80%;
    position: absolute;
}



#seventh{
    grid-area: 5/3/7/5;
    background-color: var(--Purple500);
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
}

.seventh-text{
    font-size: 1.8rem;
    line-height: 1.8rem;
    color: var(--White);
    font-weight: 500;
}

.seventh-image{   
    width: 50%;
}



#eighth{
    grid-area: 5/2/7/3;
    background-color: var(--White);
    gap: 1rem;
}

.eighth-text{
    font-size: 3rem;
}

.eighth-image{
    width: 90%;
    align-self: center;
}



@media (max-width:1150px){

    .main{
        padding: 2rem;
    }

    .section{
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 2.5rem;
    }

    #second{

    }

    #fifth{
        align-items: center;
    }

    .fifth-text{
        font-size: 2rem;
        line-height: 1.9rem;
    }

    .fifth-image-container{
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .fifth-image{
        position: relative;
        width: 70%;
    }

    #sixth{
        align-items: flex-start;
    }

    .sixth-image-container{
        height: 200px;
    }
    
    .sixth-image{
        width: 60%;
    }

    #third{
       justify-content: center;
       gap: 2rem;
    }

    .image-container{
        display: flex;
        justify-content: center;
    }

    .third-text{
        font-size: 1.7rem;
    }

    .third-small{
        text-align: center;
        font-size: 1.1rem;
    }

    .third-image{
        position: relative;
        width: 90%;
        left: 0px;
    }

    #seventh{
        flex-direction: column;
        gap: 2rem;
    }

    .seventh-text{
        text-align: center;
    }

    .seventh-image{
        width: 70%;
    }

    #eighth{
        gap: 1rem;
    }

    .eighth-image{
        width: 60%;
        align-self: flex-start;
    }

    .eighth-small{
        font-size: 1.1rem;
    }

    #first{
        align-items: flex-start;
    }

    .first-image{
        width: 60%;
    }

    #fourth{
        align-items: flex-start;
    }

    .fourth-image{
        width: 70%;
    }
}