.sub-work-title {
  margin-bottom: 3rem;
  font-weight: bold;
  margin-left: 3rem;
}

.image-grid {
  column-count: 2;
  column-gap: 6rem;
  padding: 0 3rem;
}

.image-grid img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.image-grid a {
  display: inline-block;
}

.image-wrapper {
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.image-wrapper img {
  /* position: absolute; */
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
  z-index: 0;
}

.sub-work-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.4s ease;
  z-index: 1;
  /* pointer-events: none; */
}

.sub-work-img h2 {
  text-align: center;
  font-size: 2rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-wrapper {
  text-align: center;
}

.back-btn {
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  margin-top: 0.5rem;
}

@media (hover: hover) {
  .image-wrapper:hover img {
    transform: scale(1.05);
  }
  .image-wrapper:hover .sub-work-img {
    background-color: rgba(0, 0, 0, 0.4);
  }
  .image-wrapper:hover .sub-work-img h2 {
    opacity: 1;
  }
}

@media (max-width: 1026px) {
  .sub-work-title {
    text-align: center;
    margin: auto 1rem 2rem 1rem;
    font-size: 1.5rem;
  }

  /* .sub-work-img {
    background-color: rgba(0, 0, 0, 0.3);
  }

  .sub-work-img h2 {
    opacity: 1;
  } */

  .image-grid {
    column-count: 1;
    column-gap: 1rem;
    padding: 0 1rem;
  }

  .image-wrapper {
    margin-bottom: 2rem;
  }
}
