.grid {
    display: grid;
    grid-template-columns: auto auto auto auto auto auto;
    justify-items: start;
    grid-gap: 0;
}

.grid div {
/*  border: 1px solid #ccc;*/
  width: 100%;
  height: 390px;
  background-size: cover;
}

.grid > *:nth-child(6n-1) {
  justify-self: center;
  text-align: center;
}

.grid > *:nth-child(6n) {
  justify-self: end;
  text-align: right;
}

.grid > *:nth-child(6n-1):nth-last-of-type(1) {
  border-color: red;
  grid-column: span 6;
}

/*.grid > *:nth-child(6n-2):nth-last-of-type(1) {
  border-color: red;
  grid-column: span 6;
}*/

.grid .all-row {
  grid-column: span 6;
}

.grid .two-column {
  grid-column: span 2;
}

.grid .three-column {
  grid-column: span 3;
}

.grid .four-column {
  grid-column: span 4;
}

.grid .five-column {
  grid-column: span 5;
}

@media (max-width: 767px) {
  .grid .all-row {
    grid-column: span 6;
  }

  .grid .two-column {
    grid-column: span 6;
  }

  .grid .three-column {
    grid-column: span 6;
  }

  .grid .four-column {
    grid-column: span 6;
  }

  .grid .five-column {
    grid-column: span 6;
  }
}