#first_row {
    display: grid;
    grid-template-columns: calc(100% - 370px) 300px;
    gap: 40px;
}

@media screen and (max-width: 1000px) {
    #first_row {
        display: flex;
        flex-direction: column;
    }
}

@media screen and (max-width: 800px) {
    #first_row {
        grid-template-columns: calc(100% - 300px) 300px;
    }
}