.projects-grid {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 1.5625rem;
  padding-bottom: 2rem;
}

.projects-grid__item {
  background: var(--almost-white);
  width: 31.7%;
  height: 40.5rem;
  border-radius: 0.625rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.projects-grid__item {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.4s ease;
}

.projects-grid__item.fade-out {
  opacity: 0;
  pointer-events: none;
}

.projects-grid__item.hidden {
  display: none;
}

.project-image__container {
  width: 100%;
  height: 22.1875rem;
  position: relative;
}

.project-image {
  height: 100%;
  width: auto;
  object-fit: cover;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.projects-grid__skills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin: 1rem 1rem 0;
  font-size: 0.75rem;
  font-weight: var(--font-medium);
}

.projects-grid__skill-item {
  padding: 0.125rem 0.625rem;
  color: var(--almost-white);
  border-radius: 0.625rem;
  transition:
    background-color 0.3s ease-in-out,
    color 0.3s ease-in-out;
}

.projects-grid--featured .projects-grid__skill-item {
  background: var(--rosa-escuro);
}

.projects-grid--creative .projects-grid__skill-item {
  background: var(--azul-escuro);
}

.projects-grid__skill-item:hover {
  background: transparent;
  color: var(--almost-black);
}

.projects-grid__item-title {
  margin: 1rem;
  font-weight: var(--font-semibold);
  font-size: 1.22rem;
}

.project-grid_title-link:hover {
  opacity: 0.7;
}

.projects-grid__item-description {
  color: var(--cinza);
  line-height: 1.125rem;
  text-align: justify;
  margin: 0 1rem 1.75rem;
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.projects-grid__buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: auto 1rem 1.5625rem;
}

.projects-grid__item-link {
  display: inline-flex;
  text-transform: uppercase;
  font-weight: var(--font-bold);
  color: var(--almost-white);
  padding: 0.625rem;
  border-radius: 0.3125rem;
  transition:
    background-color 0.3s ease-in-out,
    color 0.3s ease-in-out;
}

.projects-grid__item-link::after {
  content: "\f061";
  font-family: var(--font-awesome);
  font-weight: var(--solid-weight);
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    width 0.3s ease 0.1s,
    opacity 0.3s ease 0.1s,
    margin-left 0.3s ease 0.1s;
}

.projects-grid__item-link:hover::after {
  width: 0.9rem;
  margin-left: 0.4375rem;
  opacity: 1;
}

.projects-grid--creative .projects-grid__item-link {
  background: var(--azul-escuro);
}

.featured-projects__button {
  border: 0.0625rem solid var(--almost-white);
  text-transform: uppercase;
  font-weight: var(--font-bold);
  color: var(--almost-white);
  padding: 0.3125rem 0.625rem;
  border-radius: 0.3125rem;
}

.featured-projects__button:hover {
  background-color: var(--almost-white);
  color: var(--roxo);
}

.featured-projects__button:focus {
  outline: 0.125rem solid var(--lilas);
  outline-offset: 0.125rem;
}

.projects-grid--featured .projects-grid__item-link,
.featured-projects {
  background: var(--roxo);
}

.featured-projects__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0;
}

.featured-projects__title {
  font-family: var(--calistoga);
  font-size: 1.875rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  color: var(--almost-white);
}

.featured-projects__title::after {
  content: "";
  width: 1.875rem;
  height: 1.875rem;
  margin-left: 0.625rem;
  background-size: cover;
  background-image: var(--emoji-white);
}

.creative-projects {
  margin: 2rem 0 0;
}

.creative-projects .projects-grid__item.hidden {
  display: none !important;
}

.creative-projects__header {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.creative-projects__title {
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-family: var(--calistoga);
  font-size: 1.875rem;
  color: var(--azul-escuro);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.creative-projects__title::before,
.creative-projects__title::after {
  content: "";
  width: 1.875rem;
  height: 1.875rem;
  background-size: cover;
  background-image: var(--emoji-azul);
}

.creative-projects__title::before {
  margin-right: 1rem;
}

.creative-projects__title::after {
  margin-left: 1rem;
}

.creative-projects__filters {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.filter-button {
  cursor: pointer;
  text-transform: uppercase;
  padding: 0.5rem 0.625rem;
  border: none;
  background: var(--azul-escuro);
  color: var(--almost-white);
  font-size: 0.75rem;
  font-weight: var(--font-bold);
  border-radius: 0.3125rem;
}

.filter-button:hover {
  background: var(--azul-claro);
}

.creative_button {
  background: var(--branco);
  color: var(--azul-escuro);
  text-align: center;
}

.creative_button:hover {
  color: var(--almost-white);
}

.projects-grid__item-github {
  font-size: 2rem;
  color: var(--cinza);
  transition: color 0.1s ease-in-out;
}

.projects-grid__item-github:hover {
  color: var(--azul-escuro);
}

@media (min-width: 769px) and (max-width: 1024px) {
  .featured-projects__header {
    padding: 2rem;
  }

  .projects-grid {
    justify-content: center;
    gap: 1rem;
  }

  .projects-grid__item {
    width: 48%;
    height: 39.38rem;
  }

  .projects-grid__item:nth-child(3) {
    display: none;
  }

  .featured-projects__button,
  .filter-button {
    font-size: 1.1rem;
  }

  .projects-grid__item-description {
    font-size: 1.1rem;
    line-height: normal;
  }

  .projects-grid__item-title {
    font-size: 1.4rem;
  }
}

@media (max-width: 768px) {
  .projects-grid {
    flex-direction: column;
    align-items: center;
  }

  .projects-grid__item {
    width: 90%;
    height: auto;
  }

  .projects-grid__item-title {
    font-size: 1.3rem;
  }

  .featured-projects__header {
    flex-direction: column;
    padding-bottom: 0;
  }

  .featured-projects__title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .featured-projects__button {
    width: 80%;
    max-width: 15.625rem;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    text-align: center;
    margin: 0 auto 2.5rem;
    background-color: var(--almost-white);
    color: var(--roxo);
  }

  .featured-projects__button:focus {
    outline: 0.125rem solid var(--lilas);
    outline-offset: 0.125rem;
  }

  .creative-projects__title {
    font-size: 1.5rem;
  }

  .creative-projects__title::before {
    margin-right: 0.5rem;
  }

  .creative-projects__title::after {
    margin-left: 0.5rem;
  }

  .creative-projects__filters {
    width: 70%;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
  }

  .filter-button {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .project-image__container {
    /* height: auto; */
    height: 15rem;
    overflow: hidden;
  }

  .project-image {
    /* width: 100%;
    height: auto; */
    object-fit: cover;
    display: block;
    position: static;
    top: auto;
    left: auto;
    transform: none;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .projects-grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .projects-grid__item {
    width: 45%;
  }

  .projects-grid__item:last-child {
    width: 90%;
  }

  .project-image {
    width: 100%;
  }
}
