section#works {
  height: 100%;
}

section#works .worksContainer {
  position: relative;
  left: 10%;
  width: 1100px;
  margin-top: 150px;
}

section#works .textContainer {
  position: relative;
  left: 0;
  width: 75%;
}

section#works .textContainer .textChild {
  margin: 0;
}

section#works .grid {
  display: flex;
  flex-wrap: wrap;
}

section#works .grid .item {
  flex: 0 420px;
  height: 230px;
  margin: 0 0 50px 0; /* (100-32*3)/2 */
  background-color: #000;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  filter: grayscale(100);
  opacity: 0.9;
}
section#works .grid .item:hover {
  filter: grayscale(0);
  opacity: 1;
}

section#works .grid .item:nth-of-type(odd) {
  margin: 0 30px 50px 0;
}
section#works .grid .item:nth-of-type(even) {
  margin: 0 0 50px 30px;
}

section#works .grid .item:nth-last-child(-n+5) {
  background: rgba(196,196,196,0.5);
}
section#works .grid .item:nth-last-child(-n+5):hover {
  opacity: 1;
}

section#works .grid .item:nth-last-child(-n+4) {
  background: linear-gradient(180deg, rgba(196,196,196,0.5) 0%, rgba(196,196,196,0.1) 100%);
}

section#works .grid .item:nth-last-child(-n+2) {
  background: linear-gradient(180deg, rgba(196,196,196,0.1) 0%, rgba(196,196,196,0) 60%);
}

section#works .textContainer .textChild h2 {
  text-align: left;
}


@media (min-width: 1441px) {
}

@media (min-width: 1025px) and (max-width: 1440px) {
  /* section#works,
  section#works .marbleBg {
    height: calc(1980px + (332px * 1));
  } */

  section#works .worksContainer {
    width: 800px;
  }
  
  section#works .grid .item { 
    flex: 0 332px;
    height: 212px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* section#works,
  section#works .marbleBg {
    height: 230vw;
  } */

  section#works .worksContainer {
    width: calc(75% - 40px);
  }

  section#works .grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  section#works .grid .item { 
    flex: 0 31vw;
    height: 20vw;
  }
}

@media (max-width: 768px) {
  /* section#works,
  section#works .marbleBg {
    height: 530vw;
  } */

  section#works .worksContainer {
    width: 85%;
    left: 0;
  }

  section#works .grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 10%;
  }

  section#works .grid .item { 
    flex: 0 100%;
    height: 30vw;
    margin-right: 0 !important;
    margin-left: 0 !important;
    margin-bottom: 6vw !important;
  }

  section#works .textContainer {
    width: 100%;
  }

  section#works .textContainer .textChild h2 {
    text-align: center;
  }  

  section#works .grid .item:nth-last-child(-n+4) {
    background: linear-gradient(180deg, rgba(196,196,196,0.5) 0%, rgba(196,196,196,0.1) 100%);
  }

  section#works .grid .item:nth-last-child(-n+3) {
    background: linear-gradient(180deg, rgba(196,196,196,0.1) 0%, rgba(196,196,196,0) 60%);
  }
  
  section#works .grid .item:nth-last-child(-n+2) {
    display: none;
  }
}
