@media (max-width: 1300px) {

.all-post-item {
    flex: 0 0 calc(100% / 4 - 15px);
}
    
}

@media (max-width: 1024px) {

.all-post-item {
    flex: 0 0 calc(100% / 3 - 14px);
}

.gallery-buttons button {
   flex: 0 0 calc(100% / 5 - 10px);
}
    
}

@media (max-width:640px) {

.case-studies-view-all-button {
    padding-bottom: 50px;
    display: flex;
    justify-content: center;
}

.gallery-buttons button {
   flex: 0 0 calc(100% / 3 - 8px);
   font-size: 17px;
}

   .all-post-item {
      flex:0 0 calc(100% / 2 - 10px);
   }

.all-post-item.active.hidden {
    display: none;
}
   
}

@media (max-width: 540px) {

.all-post-item {
    flex: 0 0 calc(100% / 1);
}

   .all-post-item img {
    width: 100%;
}
    
}

@media (max-width: 400px) {
   
   .gallery-buttons button {
      flex: 0 0 calc(100% / 2 - 6px);
}
}