/* Hover Grid widget styles */
.ehlg-grid{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
}

@media (max-width: 1024px){
  .ehlg-grid{ grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px){
  .ehlg-grid{ grid-template-columns: repeat(2, 1fr); }
}

.ehlg-item{
  position: relative;
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  background: transparent;
}

.ehlg-media{
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.ehlg-media > img{
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  display: block;
  z-index: 0;
}

.ehlg-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity .25s ease, background-color .25s ease;
  color: #fff;
  font-weight: 600;
  z-index: 1;
}

.ehlg-overlay .ehlg-caption{
  margin: 0;
  padding: 0;
  line-height: 1.3;
  font-weight: 300;
  color: #fff;
  text-transform: none;
  text-align: center;
}

.ehlg-item:hover .ehlg-overlay{ opacity: 1; }

.ehlg-caption-mobile{
  display: none;
  margin: 0;
  padding: 14px 12px 0;
  line-height: 1.3;
  font-weight: 300;
  color: #fff;
  text-transform: none;
  text-align: center;
}

.ehlg-mobile-text{
  display: none;
}

.ehlg-badge{
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0,0,0,.5);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
}

.ehlg-badge-mobile{
  display: none;
}

@supports not (aspect-ratio: 1 / 1) {
  .ehlg-media::before { content:""; display:block; padding-top:100%; }
  .ehlg-media > *     { position:absolute; inset:0; }
}

@media (max-width: 1024px){
  .ehlg-grid{
    row-gap: 18px;
  }

  .ehlg-item{
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .ehlg-mobile-text{
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0 12px 20px;
    text-align: center;
  }

  .ehlg-overlay{
    opacity: 0;
    background: transparent !important;
    transition: none;
  }

  .ehlg-item:hover .ehlg-overlay,
  .ehlg-item:active .ehlg-overlay,
  .ehlg-item:focus .ehlg-overlay,
  .ehlg-item:focus-visible .ehlg-overlay{
    opacity: 0;
    background: transparent !important;
  }

  .ehlg-overlay .ehlg-caption{
    display: none;
  }

  .ehlg-caption-mobile{
    display: block;
    width: 100%;
    color: #111;
    padding: 14px 0 0;
  }

  .ehlg-item:active .ehlg-caption-mobile{
    color: #FF2D7A;
  }

  .ehlg-badge{
    display: none;
  }

  .ehlg-badge-mobile{
    display: inline-block;
    margin-top: 10px;
    background: rgba(0,0,0,.08);
    color: #111;
    padding: 4px 8px;
    font-size: 12px;
  }
}
