@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');

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

:root {
    --purple100: hsl(254, 88%, 90%);
    --purple500: hsl(256, 67%, 59%);

    --yellow100: hsl(31, 66%, 93%);
    --yellow500: hsl(39, 100%, 71%);

    --whiteMain: hsl(0, 0%, 100%);
    --blackMain: hsl(0, 0%, 7%);

    --gap: 20px;
    --defaultHight: 330px;
    --bigPadding: 50px;
}

/* img reset code */
img {
    font-style: italic;

    background-repeat: no-repeat;
    background-size: cover;

    shape-margin: 1rem;

    max-width: 100%;
    height: auto;

    vertical-align: middle;
}

.container {
    max-width: 1440px;
    width: calc(100% - 2rem);
    margin-inline: auto;
}

section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, var(--defaultHight));
    column-gap: var(--gap);
    row-gap: var(--gap);
    margin-block: 32px;
}

section div {
    width: 100%;
}

.columnField {

}

.columnField:nth-child(1) {
    grid-row: span 3;

    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, 1fr);
    row-gap: var(--gap);
}

.columnField:nth-child(2) {
    grid-row: span 2;
    grid-column: span 2;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    column-gap: var(--gap);
    row-gap: var(--gap);
}

.columnField:nth-child(3) {
    grid-row: span 2;
}

.columnField:nth-child(4) {
    grid-column: span 3;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
    column-gap: var(--gap);
}

h2,
.purpleTxt {
    font-size: 2.2rem;
    font-weight: 500;
    color: var(--blackMain);
    line-height: 1;
}

.purpleTxt {
    color: var(--purple500);
    font-style: italic;
}
.box1,
.box2,
.box3,
.box4,
.box5,
.box6,
.box7,
.box8 {
    border-radius: 12px;
    box-shadow: 5px 10px 15px rgba(26, 26, 26, .1);
}


.box1 {
    background: var(--yellow100);
    padding-block: var(--bigPadding);
    padding-inline: 32px;
    height: calc(var(--defaultHight) + 80);
}

.box1 h2 {
    margin-bottom: 32px;
}

.box2 {
    background: var(--yellow500);
    padding-block: 1.6rem;
    padding-inline: 32px;
}

.box2 h2 {
    margin-bottom: 36px;
}

.box3 {
    background: var(--purple500);
    padding-block: var(--bigPadding);
    height: var(--defaultHight);
    grid-column: span 2;
}

.box3 h2,
.box3 span:nth-child(1),
.box3 span:nth-child(3) {
    color: var(--whiteMain);
    font-size: 2.6rem;
    text-align: center;
    margin-bottom: 32px;
}

.box3 span:nth-child(1) {
    color: var(--yellow500);
}

.box3 span:nth-child(3) {
    font-style: italic;
}

.box3 img {
    display: block;
    margin-left: 50%;
    transform: translateX(-50%);
    margin-bottom: 14px;
}

.box3 p {
    color: var(--purple100);
    text-align: center;
    font-size: .8rem;
}

.box4 {
    background: var(--whiteMain);
    padding: 1.6rem;
    position: relative;
    overflow: hidden;
    height: var(--defaultHight);
}

.box4 img {
    width: 350px;
    position: absolute;
    left: 10%;
}

.box4 h2 {
    margin-top: 4.8rem;
}

.box5 {
    padding: 1.6rem;
    background: var(--yellow500);
    position: relative;
    height: var(--defaultHight);
    overflow: hidden;
}

.box5 img {
    position: absolute;
    width: 80%;
    margin-top: 24px;
}

.box6 {
    background: var(--purple100);
    padding: 1.6rem;
    height: calc(var(--defaultHight) * (2.065));
    position: relative;
    overflow: hidden;
}

.box6 h2 {
    margin-bottom: 18px;
}

.box6 img {
    width: 100%;
    position: absolute;
}

.box6 p {
    margin-top: 320px;
    color: var(--blackMain);
    font-size: 1rem;
}

.box7 {
    background: var(--whiteMain);
    height: var(--defaultHight);
    padding: 32px;
}

.box7 h2 {
    font-size: 3.6rem;
    font-weight: 600;
    margin-bottom: 22px;
}

.box7 p {
    margin-bottom: 36px;
}

.box7 img {
    height: 80px;
}

.box8 {
    background: var(--purple500);
    height: var(--defaultHight);
    grid-column:  span 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px;
}

.box8 h2 {
    color: var(--whiteMain);
    margin-left: 32px;
}

.box8 img {
    height: calc(100% - 32px);
}

@media screen and (max-width:700px) {
    h2 {
        /* font-size: 2rem; */
    }
}

@media screen and (max-width: 1100px) {

    br {
        display: none;
    }

    h2 {
        font-size: 1.7rem;
        margin-inline: 0;
        padding-inline: 0;
    }

    .box5 h2 {
        
    }

    section {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .box1 {
        height: fit-content;
    }

    .columnField:nth-child(1),
    .columnField:nth-child(2),
    .columnField:nth-child(4)  {          
        display: flex;
        flex-direction: column;
        gap: var(--gap);
    }

    .columnField:nth-child(1) {
       order: 4;
    }

    .columnField:nth-child(2) {
        order: 1;
    }
    
    .columnField:nth-child(3) {
        order: 2;
    }

    .columnField:nth-child(4) {
        order: 3;
    }
  
    .box8 {
        display: flex;
        flex-direction: column;
        height: fit-content;
    }

    .box8 img {
        width: 100%;
        height: auto;
        margin-bottom: 26px;
    }

    .box1,
.box2,
.box3,
.box4,
.box5,
.box6,
.box7,
.box8 {
    height: fit-content;
    padding: 56px 22px;
}

.box5 {
    padding-bottom: 160px;
}
}