.portfolio {
  margin-top: 55px;
  width: 100%;
}

@media screen and (max-width: 768px) {
  .portfolio {
    margin-top: 37px;
  }
}

.portfolio__cards {
  margin-top: 35px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(493px, 1fr));
  grid-gap: 20px;
}

@media screen and (max-width: 1540px) {
  .portfolio__cards {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 10px;
  }
}

@media screen and (max-width: 768px) {
  .portfolio__cards {
    margin-top: 51px;
  }
}

.porftolio__card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
}

.porftolio__card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  background-color: #ef4824;
  opacity: 0;
  transition: opacity 300ms ease-in-out;
}

.porftolio__card:hover::before {
  opacity: .3;
}

.porftolio__card > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  filter: brightness(90%);
  border-radius: 20px;
  object-fit: cover;
  object-position: center;
}

@media screen and (max-width: 500px) {
  .porftolio__card > img {
    height: 200px;
  }

  .porftolio__card .headline-h2 {
    font-size: 26px;
    line-height: 25px;
  }
}

.porftolio__card > div {
  position: absolute;
  z-index: 3;
  margin: auto;
  left: 0;
  right: 0;
  top: 45%;
  text-align: center;
  color: rgba(255, 255, 255, 1);
}

@media screen and (max-width: 1540px) {
  .porftolio__card > div {
    top: 43%;
  }
}

@media screen and (max-width: 1024px) {
  .porftolio__card > div {
    top: 50%;
  }
}
