.case-studies-cards {
  background-color: #000;
}

.case-studies-cards #posts-area {
  display: flex;
  flex-wrap: wrap;
  margin-top: -24px;
}

.case-studies-cards #posts-area .case-items {
  padding: 0 12px;
  padding-top: 24px;
  position: relative;
  z-index: 2;
}

.case-studies-cards #posts-area .case-items a.post-box {
  width: 100%;
  display: flex;
  background: #fff;
  flex-direction: column;
  border-radius: 0;
  text-decoration: none;
  color: #000;
  overflow: hidden;
  position: relative;
  border: 3px solid #000;
  min-height: 100%;
  transition: all .5s;
  min-height: 500px;
}

.case-studies-cards #posts-area .case-items .case-study-img {
  overflow: hidden;
  position: relative;
  z-index: 3;
  border-radius: 0;
  background: #000;
  flex: 1;
}

.case-studies-cards #posts-area .case-items .case-study-img:before {
  content: "";
  display: block;
  padding-top: 97%;
}

.case-studies-cards #posts-area .case-items .case-study-img > img {
  .case-studies-cards #posts-area .case-items .case-study-img: before; position: absolute;
  left: -2%;
  top: -2%;
  width: 104%;
  height: 104%;
  max-width: none;
  object-fit: cover;
  transition: transform .5s;
}

.case-studies-cards #posts-area .case-items .without-hover-logo {
  background: rgba(255, 0, 92, .85);
  border-radius: 16px;
  text-align: center;
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  height: 150px;
}

.case-studies-cards #posts-area .case-items .without-hover-logo img {
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.case-studies-cards #posts-area .case-items .on-hover {
  position: absolute;
  opacity: 0;
  transition: opacity .3s ease-in-out;
  overflow: hidden;
  flex: 1;
  z-index: 3;
  height: 100%;
  display: flex;
}

.case-studies-cards #posts-area .case-items .on-hover .text {
  padding: 24px;
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  background-color: rgba(35, 35, 35, .5);
  z-index: 1;
  position: relative;
  height: 100%;
  justify-content: flex-end;
}

.case-studies-cards #posts-area .case-items .on-hover .text .hover-logo {
  margin: 0 auto 20px;
}

.case-studies-cards #posts-area .case-items .on-hover .text h5 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .5s;
  margin: 0 0 24px;
  height: 115.2px;
  margin-bottom: 10px;
  color: #fff;
}

.case-studies-cards #posts-area .case-items .on-hover .btn-link {
  margin-top: 0;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  vertical-align: top;
  position: relative;
  font-size: 16px;
  font-weight: 600;
  transition: color .3s;
}

.case-studies-cards #posts-area .case-items a.post-box:hover .on-hover {
  opacity: 1;
}

.case-studies-cards #posts-area .case-items .on-hover .btn-link:after {
  content: "";
  display: inline-block;
  vertical-align: top;
  width: 28px;
  height: 17px;
  transition: all .3s;
  margin: 4px -16px 0 12px;
  background: url("data:image/svg+xml,%3Csvg width='41' height='17' viewBox='0 0 41 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.39985 8.28999H39.4202M39.4202 8.28999L32.2381 1.02881M39.4202 8.28999L32.2381 15.4998' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A") 100% 50% no-repeat;
  url(
  data:image/svg+xml,%3Csvg width='41' height='17' viewBox='0 0 41 17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.39985 8.28999H39.4202M39.4202 8.28999L32.2381 1.02881M39.4202 8.28999L32.2381 15.4998' stroke='%230077B5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A) 100% 50% no-repeat; filter: hue-rotate(495deg) brightness(110%) saturate(145%) contrast(100%);
}

.case-studies-cards #posts-area .case-items a.post-box:hover {
  text-decoration: none;
  color: #fff;
  background: #000;
  border-color: #fff;
}

.case-studies-cards #posts-area .case-items a.post-box:hover .case-study-img {
  opacity: .15;
}

.case-studies-cards #posts-area .case-items a.post-box:hover .case-study-img > img {
  transform: scale(1.05);
}

.case-studies-cards #posts-area .case-items .on-hover .btn-link:hover:after {
  width: 38px;
  margin: 4px -24px 0 12px;
}


@media (max-width:1919px) {

  .case-studies-cards #posts-area {
    margin-left: -12px;
    width: auto;
    margin-right: -12px;
  }

  .case-studies-cards #posts-area .case-items .on-hover .text h5 {
    height: 86.4px;
  }

}

@media (max-width:1600px) {

  .case-studies-cards #posts-area .case-items {
    padding-left: 8px;
    padding-right: 8px;
  }

  .case-studies-cards #posts-area {
    margin-left: -8px;
    margin-right: -8px;
  }


}

@media (max-width:1199px) {

  .case-studies-cards #posts-area .case-items {
    padding-top: 16px;
  }

  .case-studies-cards #posts-area {
    margin-top: -16px;
  }

  .case-studies-cards #posts-area .case-items .on-hover .text h5 {
    height: 72px;
  }

  .case-studies-cards #posts-area .case-items .on-hover .btn-link {
    font-size: 14px;
  }

  .case-studies-cards #posts-area .case-items .on-hover .btn-link:after {
    width: 24px;
    height: 14px;
    margin: 4px -16px 0 8px;
  }

}

@media (min-width: 1024px) and (max-height: 950px){

  .case-studies-cards #posts-area .case-items {
    padding-top: 16px;
  }

  .case-studies-cards #posts-area {
    margin-top: -16px;
  }

  .case-studies-cards #posts-area .case-items .on-hover .text h5 {
    height: 72px;
  }

  .case-studies-cards #posts-area .case-items .on-hover .btn-link {
    font-size: 14px;
  }

  .case-studies-cards #posts-area .case-items .on-hover .btn-link:after {
    width: 24px;
    height: 14px;
    margin: 4px -16px 0 8px;
  }

  .case-studies-cards #posts-area .case-items .on-hover .btn-link:hover:after {
    width: 32px;
    margin: 4px -24px 0 8px;
  }


}

@media (max-width:1024px) {

  .case-studies-cards #posts-area .span4.case-items {
    flex: 0 0 auto;
    width: 50%;
  }

}

@media (max-width:767px) {

  .case-studies-cards #posts-area .span4.case-items {
    flex: 0 0 auto;
    width: 100%;
  }

  .case-studies-cards #posts-area .case-items a.post-box {
    border-radius: 8px;
    border-width: 2px;
  }

  .case-studies-cards #posts-area .case-items .on-hover .text h5 {
    height: 64.8px;
  }

}
