#company {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

#company li {
  width: 25%;
  overflow: hidden;
  background: #000;
  position: relative;
  height: 100%;
  transition: all ease .5s;
  max-height: 82vh;
}

#company li:hover {
  background:#000;
}

#company li>img {
  opacity: 0.7;
  height: clamp(15rem, 4.5rem + 52.5vw, 47.5rem);
  width: 100%;
  object-fit: cover;
}

#company li>a {
  position: absolute;
  transition: all ease .5s;
  width: 100%;
  padding: 0 15%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  left: 0;
  right: 0;
  margin-top: 50px;
}

#company li>a img {
  width: clamp(4.625rem, 2.943rem + 8.41vw, 9.25rem);
  display: block;
  margin: 0 auto;
}

#company li>a h3 {
  color: #fff;
  font-size: clamp(1.25rem, 1.023rem + 1.14vw, 1.875rem);
  margin-top: 30px;
  margin-bottom: 15px;
  line-height: 1.2;
  word-break: break-all;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  text-align: center;
}

#company li>a p {
  text-align: center;
  word-break: break-all;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  color: #fff;
  font-family: arial;
  margin: 0;
  line-height: 1;
  color: #fff;
  font-size: 20px;
  margin-bottom: 25px;
  opacity: 0;
  transition: all ease 1s;
  text-align: center;
}

#company li:hover>a p {
  opacity: 1;
}

#company li>a span {
  color: #fff;
  font-size: 14px;
  bottom: 0;
  opacity: 0;
  transition: all ease 1.2s;
  text-align: center;
  display: block;
  word-break: break-all;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

#company li:hover>a {
  padding-bottom: 30px;
  margin-top: 0;
  transition: all ease 1.2s;
}

#company li:hover>a span {
  opacity: 1;
}

#company li.active1 {
  width: 40%;
}

@media screen and (max-width:768px) {
  #company {
    flex-direction: column;
  }

  #company li {
    width: 100%;
  }

  #company li.active1 {
    width: 100%;
  }

  #company li>a img {
    width: 80px;
  }

  #company li>a p {
    margin-bottom: 10px;
    font-size: 15px;
  }

  #company li>a span {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  #company li>a h3 {
    margin-top: 20px;
    margin-bottom: 10px;
  }
}