body {
  background-color: var(--color-background);
}

.main__wrapper {
  margin: 5rem 10rem;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(35rem, 1fr));
  grid-gap: 3rem;
  padding: 0 5rem;
}

.projects__card {
  position: relative;
  overflow: hidden;
  height: 40rem;
  border-radius: 10px;
  box-shadow: 0 1rem 4rem rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
}

.projects__card:hover {
  transform: scale(1.03);
}

.project__info {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.details__wrapper {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
  flex-wrap: nowrap;
}

.project__agency,
.project__timeline,
.project__funding {
  flex-direction: column;
  margin-bottom: 1rem;
  text-align: center;
  padding: 0.75rem;
}

.project__agency h3,
.project__timeline h3,
.project__funding h3 {
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid red;
  padding-bottom: 0.7rem;
}

.project__name h3 {
  font-size: 2.5rem;
  display: inline-block;
  margin-bottom: 2rem;
  border-bottom: 2px solid red;
}

.project__agency p,
.project__timeline p,
.project__funding p {
  font-size: 1.4rem;
}

.project__name p {
  font-size: 1.6rem;
}

.card_1 {
  background-image: linear-gradient(
      to bottom right,
      rgba(0, 0, 0, 0.3),
      rgba(255, 0, 0, 0.9)
    ),
    url("../img/Project-1.jpg");
}

.card_2 {
  background-image: linear-gradient(
      to bottom right,
      rgba(0, 0, 0, 0.3),
      rgba(255, 0, 0, 0.9)
    ),
    url("../img/Project-2.jpg");
}

.card_3 {
  background-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.3),
      rgba(0, 0, 0, 0.9)
    ),
    url("../img/Project-3.jpg");
}

.card_4 {
  background-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.3),
      rgba(0, 0, 0, 0.9)
    ),
    url("../img/Project-4.jpg");
}

.card_5 {
  background-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.3),
      rgba(0, 0, 0, 0.9)
    ),
    url("../img/Project-5.jpg");
}

.card_6 {
  background-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.3),
      rgba(0, 0, 0, 0.9)
    ),
    url("../img/Project-6.jpg");
}

@media only screen and (max-width: 71.725em) {
  .projects__card {
    height: 35rem;
  }

  .project__name h3 {
    font-size: 2rem;
  }

  .project__name p,
  .project__agency p,
  .project__timeline p,
  .project__funding p {
    font-size: 1.2rem;
  }
}

@media only screen and (max-width: 46.875em) {
  .main__wrapper {
    margin: 5rem 1rem;
  }
  .card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    width: 80vw;
    margin: 0 auto;
  }

  .projects__card {
    margin: 2rem 0;
    width: 100%;
  }
}

@media only screen and (max-width: 37.5em) {
  .projects__card {
    height: 40rem;
  }
  .details__wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .project__agency,
  .project__funding,
  .project__timeline {
    display: inline-block;
  }

  .project__name h3 {
    font-size: 1.8rem;
  }

  .project__name p {
    font-size: 1.5rem;
  }
}

@media only screen and (max-width: 25em) {
  .card-container .projects__card {
    height: 40rem;
  }

  .project__name h3 {
    font-size: 1.5rem;
  }

  .project__name p {
    font-size: 1.2rem;
  }
}
