.block-51-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-gap: 2rem;
}
@media (max-width: 1280px) {
  .block-51-grid {
    grid-gap: 1rem;
  }
}
@media (max-width: 768px) {
  .block-51-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.block-51-grid .grid__card {
  display: flex;
  flex-direction: column;
  grid-gap: 0.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--light-gray);
}
.block-51-grid .grid__card:hover .card__img img {
  transform: scale(1.1);
}
.block-51-grid .grid__card:hover .card__details .card__title {
  color: var(--theme-color) !important;
}
@media (max-width: 768px) {
  .block-51-grid .grid__card:nth-child(1), .block-51-grid .grid__card:nth-child(2), .block-51-grid .grid__card:nth-child(4), .block-51-grid .grid__card:nth-child(5) {
    grid-column: unset !important;
    grid-row: unset !important;
  }
}
.block-51-grid .grid__card:nth-child(1) {
  grid-column: 1/3;
  grid-row: 1;
}
.block-51-grid .grid__card:nth-child(2) {
  grid-column: 1/3;
  grid-row: 2;
}
.block-51-grid .grid__card:nth-child(3) {
  grid-column: 3/7;
  grid-row: span 2;
  padding-bottom: 0;
  position: relative;
}
@media (max-width: 768px) {
  .block-51-grid .grid__card:nth-child(3) {
    grid-column: span 2;
    grid-row: 1;
  }
}
.block-51-grid .grid__card:nth-child(3) .card__img {
  width: 100%;
  height: 100%;
  position: relative;
}
@media (max-width: 768px) {
  .block-51-grid .grid__card:nth-child(3) .card__img {
    height: 400px;
  }
}
@media (max-width: 600px) {
  .block-51-grid .grid__card:nth-child(3) .card__img {
    height: 350px;
  }
}
@media (max-width: 500px) {
  .block-51-grid .grid__card:nth-child(3) .card__img {
    height: 300px;
  }
}
@media (max-width: 400px) {
  .block-51-grid .grid__card:nth-child(3) .card__img {
    height: 250px;
  }
}
@media (max-width: 350px) {
  .block-51-grid .grid__card:nth-child(3) .card__img {
    height: 200px;
  }
}
.block-51-grid .grid__card:nth-child(3) .card__img a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  z-index: 5;
}
.block-51-grid .grid__card:nth-child(3) .card__img a img {
  width: 100%;
  height: 100%;
}
.block-51-grid .grid__card:nth-child(3) .card__details {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  z-index: 5;
}
@media (max-width: 550px) {
  .block-51-grid .grid__card:nth-child(3) .card__details {
    padding: 0.5rem;
  }
}
.block-51-grid .grid__card:nth-child(3) .card__details .card__title {
  color: white;
  font-size: 32px;
  text-align: center;
  line-height: 1.5;
  transition: all 300ms ease-in-out;
}
@media (max-width: 400px) {
  .block-51-grid .grid__card:nth-child(3) .card__details .card__title {
    font-size: 22px;
  }
}
.block-51-grid .grid__card:nth-child(4) {
  grid-column: 7/9;
  grid-row: 1;
}
.block-51-grid .grid__card:nth-child(5) {
  grid-column: 7/9;
  grid-row: 2;
}
.block-51-grid .grid__card .card__img {
  width: 100%;
  height: 160px;
  overflow: hidden;
}
@media (max-width: 1024px) {
  .block-51-grid .grid__card .card__img {
    height: 120px;
  }
}
@media (max-width: 768px) {
  .block-51-grid .grid__card .card__img {
    height: 160px;
  }
}
@media (max-width: 500px) {
  .block-51-grid .grid__card .card__img {
    height: 140px;
  }
}
@media (max-width: 400px) {
  .block-51-grid .grid__card .card__img {
    height: 120px;
  }
}
@media (max-width: 350px) {
  .block-51-grid .grid__card .card__img {
    height: 100px;
  }
}
.block-51-grid .grid__card .card__img img {
  transform: scale(1.01);
  transition: all 1s ease-in-out;
}
.block-51-grid .grid__card .card__details .card__title {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  transition: all 300ms ease-in-out;
}
