.projects {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0 3rem;

  h2 {
    width: 75%;
    color: #3b4c6b;
    font-weight: 900;
    margin-bottom: 0;
  }

  .card_block {
    display: flex;
    justify-content: space-between;
    width: 75%;
    margin-top: 2rem;
  }
}

.card {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.4s ease;
  cursor: pointer;
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.5s ease;
}

.card .info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  color: #333;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: justify;
  text-align: center;
  font-size: 18px;
  transition: opacity 0.5s ease;
}

.card:hover img {
  opacity: 0;
}

.card:hover .info {
  opacity: 1;
}

@media (max-width: 1537px) {
  .projects {
    h2 {
      width: 90%;
      font-size: 1.3rem;
    }

    .card_block {
      width: 90%;

      .card {
        width: 275px;
        height: 275px;
      }
    }
  }
}

@media (max-width: 480px) {
  .projects {
    h2 {
      width: 90%;
      text-align: center;
    }

    .card_block {
      width: 90%;
      flex-direction: column;
      align-items: center;

      .card:not(:last-child) {
        margin-bottom: 2rem;
      }
    }
  }
}
