/**
 * @file
 * image card layout
 */
.he-img-card-view {
  --ceh-card-gap: 1.5rem;
  --card-count: 4;
  --ceh-card-radius: 12px;
  --ceh-card-padding: 1.25rem;
  --ceh-border-color: #dfe3e8;
  --img-height: 150px;
  padding: 20px 0 20px;
}

.he-img-card-view .views-infinite-scroll-content-wrapper {
  display: grid;
  grid-template-columns: repeat(var(--card-count), 1fr);
  gap: var(--ceh-card-gap);
}

.he-img-card-view .views-row>div,
.he-img-card-view .views-row>div>span {
  height: 100%;
}

.he-img-dcs p:last-child {
  margin-bottom: 0;
}

.he-img-card {
  height: 100%;
  background: #fff;
  border: 1px solid var(--ceh-border-color);
  border-radius: var(--ceh-card-radius);
  padding: var(--ceh-card-padding);
  text-decoration: none;
  color: inherit;
  display: block;
}

.he-card-inner {
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 14px;
}

.he-img-more-btn {
  display: inline-block;
  color: #212529;
  font-size: 1.125rem;
  font-weight: 700;
  position: relative;
  margin-top: auto;
  z-index: 3;
  width: max-content;
}

.he-img-more-btn:before {
  content: "";
  background-color: #1cabe2;
  position: absolute;
  left: .5rem;
  bottom: -0.125rem;
  width: 100%;
  height: .188rem;
  z-index: -1;
  transition: all .3s ease-in-out;
}

.he-img-more-btn:after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  content: "";
}

.he-img-card:hover .he-img-more-btn::after,
.he-img-card:hover .he-img-more-btn::before {
  left: -0.313rem;
  bottom: -0.125rem;
  height: calc(100% + .25rem);
  width: calc(100% + .625rem);
}

.he-img-title,
.he-img-dcs {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.he-img-title {
  font-size: 1.25rem;
  line-height: 1.25;
  font-weight: 600;
  -webkit-line-clamp: 3;
}

.he-img-dcs {
  font-size: .875rem;
  -webkit-line-clamp: 4;
}

.he-img-card-view .views-infinite-scroll-content-wrapper::after {
  display: none;
}

.he-card-image img {
  height: var(--img-height);
  object-fit: cover;
  width: 100%;
}

.he-img-card-view .pager {
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
}

@media screen and (max-width: 991px) {
  .he-img-card-view {
    --card-count: 2;
  }
}

@media screen and (max-width: 500px) {
  .he-img-card-view {
    --card-count: 1;
  }
}
