.featured-projects {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 70px;
}

.project-link:nth-child(even) > .project-item {
  flex-direction: row-reverse;
}

.project-link {
  background: #e0e0e0;
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.project-item {
  display: flex;
}

.project-thumbnail {
  margin: 0;
  height: 450px;
  width: calc(100% - 450px);
  position: relative;

  img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

.project-thumbnail:after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: #212121;
  opacity: 0;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.project-details {
  width: 450px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.project-title {
  font-size: 20px;
  font-weight: 600;
  color: #212121;
  text-align: center;
  margin: 0;
  padding: 6% 8% 1%;
  width: 84%;
}

.project-description {
  font-size: 14px;
  color: #212121;
  text-align: center;
  margin: 0;
  padding: 1% 8% 6%;
  width: 84%;
}

.project-link:hover,
.project-link:focus,
.project-link:active {
  background: #212121;

  .project-thumbnail::after {
    background-color: #212121;
    opacity: 0.5;
  }

  .project-details {
    .project-title {
      color: white;
    }

    .project-description {
      color: white;
    }
  }
}

/* xs and sm devices or phones */
@media (max-width: 479px), (min-width: 480px) and (max-width: 767px) {
  .project-link > .project-item,
  .project-link:nth-child(even) > .project-item {
    flex-direction: column;
  }

  .project-thumbnail {
    height: initial;
    width: 100%;

    img {
      object-fit: cover;
      width: 100%;
      height: 100%;
    }
  }

  .project-details {
    width: 100%;
  }

  .project-title {
    font-size: 14px;
  }
}
