.custom-flex-box h2{
    font-size: 28px;
  }
.industry-cards-wrapper {
  display: flex;
  flex-wrap: wrap;
  margin: -8px;
}

.industry-card-wrap {
  width:25%;
  padding: 8px;
  box-sizing: border-box;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 220px;
  background: #111;
  cursor: pointer;
}

.custom-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease, filter 0.45s ease;
  filter: brightness(0.55);
}

.industry-card-wrap:hover .custom-card img {
  transform: scale(1.06);
  filter: brightness(0.3);
}

.overlay-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
}

.overlay-content h3 {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  transition: transform 0.4s ease;
}

.industry-card-wrap:hover .overlay-content h3 {
  transform: translateY(-4px);
}

.overlay-content p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.35s ease 0.05s;
}

.industry-card-wrap:hover .overlay-content p {
  max-height: 140px;
  opacity: 1;
}

.overlay-content .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #2563eb;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
}

/* Responsive */
@media (max-width: 991px) {
  .industry-card-wrap { width: 50%; }
  .industry-card-wrap:hover { width: 100%; }
}

@media (max-width: 575px) {
  .industry-card-wrap { width: 100%; }
  .industry-card-wrap:hover { width: 100%; }
}

.industry-card-wrap.is-hovered .custom-card img {
  transform: scale(1.06);
  filter: brightness(0.3);
}
.industry-card-wrap.is-hovered .overlay-content p {
  max-height: 140px;
  opacity: 1;
}
.industry-card-wrap.is-hovered .overlay-content h3 {
  transform: translateY(-4px);
}

/* Transition must be on flex, not width */
@media(min-width: 768px) and (max-width:991px){
  .industry-card-wrap {
    flex: 0 0 50%;
    transition: flex 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    /* remove: width: 25%; */
  }
}
@media(min-width: 992px){
  .industry-card-wrap {
    flex: 0 0 25%;
    transition: flex 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    /* remove: width: 25%; */
  }
   .custom-flex-box h2{
    max-width: 800px;
    line-height: 38px;
  }
  .custom-flex-box .box-caption{
    max-width: 1000px;
    line-height: 28px;
  }
}
@media(max-width: 767px){
  .custom-flex-box h2{
    font-size:18px;
    line-height:28px;
  }
}
