.first, .second, .third,.fourth {
    margin-bottom: 20px;
}

.first-grid, .second-grid {
    grid-template-columns: 1fr ;
}

.fourth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 10px;
}

.first-grid a, .second-grid a, .third-grid a, .fourth-grid a{
    width: 100%;
    object-fit: cover;
}

.first-grid a img, .second-grid a img{
    max-width: 100%;
}

.third-grid a img, .fourth-grid a img{
    width: 100%;
}

.first-grid a:nth-child(1) img, .second-grid a:nth-child(1) img, .third-grid a:nth-child(1) img, .fourth-grid a:nth-child(1) img{
   border-radius: 5px 0px 0px 5px;
}

.first-grid a:nth-child(2) img, .second-grid a:nth-child(2) img, .third-grid a:nth-child(2) img, .fourth-grid a:nth-child(2) img{
    border-radius: 0px 5px 5px 0px;
 }

 @media only screen and (min-width: 601px) and (max-width: 800px) {
    .first-grid, .second-grid, .third-grid, .fourth-grid {
        grid-template-columns: 1fr;
    }

    .first-grid a:nth-child(1) img, .second-grid a:nth-child(1) img, .third-grid a:nth-child(1) img, .fourth-grid a:nth-child(1) img{
        border-radius: 5px;
     }
     
     .first-grid a:nth-child(2) img, .second-grid a:nth-child(2) img, .third-grid a:nth-child(2) img, .fourth-grid a:nth-child(2) img{
         border-radius: 5px;
      }

     .fourth-grid a{
        height: 250px;
    }
    
  .fourth-grid a img{
        height: 250px;
    }
 }

 @media only screen and (min-width: 461px) and (max-width: 600px) {
    .first-grid, .second-grid, .third-grid, .fourth-grid {
        grid-template-columns: 1fr;
    }

    .first-grid a:nth-child(1) img, .second-grid a:nth-child(1) img, .third-grid a:nth-child(1) img, .fourth-grid a:nth-child(1) img{
        border-radius: 5px;
     }
     
     .first-grid a:nth-child(2) img, .second-grid a:nth-child(2) img, .third-grid a:nth-child(2) img, .fourth-grid a:nth-child(2) img{
         border-radius: 5px;
      }

    .fourth-grid a{
        height: 200px;
    }
    
    .fourth-grid a img{
        height: 200px;
    }
 }

 
 @media only screen and (min-width: 355px) and (max-width: 460px) {
    .first-grid, .second-grid, .third-grid, .fourth-grid {
        grid-template-columns: 1fr;
    }

    .first-grid a:nth-child(1) img, .second-grid a:nth-child(1) img, .third-grid a:nth-child(1) img, .fourth-grid a:nth-child(1) img{
        border-radius: 5px;
     }
     
     .first-grid a:nth-child(2) img, .second-grid a:nth-child(2) img, .third-grid a:nth-child(2) img, .fourth-grid a:nth-child(2) img{
         border-radius: 5px;
      }

      .fourth-grid a{
        height: 160px;
    }
    
    .fourth-grid a img{
        height: 160px;
    }
 }

 @media only screen and (max-width: 354px) {
    .first-grid, .second-grid, .third-grid, .fourth-grid {
        grid-template-columns: 1fr;
    }

    .first-grid a:nth-child(1) img, .second-grid a:nth-child(1) img, .third-grid a:nth-child(1) img, .fourth-grid a:nth-child(1) img{
        border-radius: 5px;
     }
     
     .first-grid a:nth-child(2) img, .second-grid a:nth-child(2) img, .third-grid a:nth-child(2) img, .fourth-grid a:nth-child(2) img{
         border-radius: 5px;
      }

     .fourth-grid a{
        height: 130px;
    }
    
    .fourth-grid a img{
        height: 130px;
    }
 }