.hover-cards{
  --minh: 380px;
  --img-height: 300px;
}

.hover-cards .hc-grid{
  display:grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: var(--gap);
}

@media (max-width:1024px){
  .hover-cards .hc-grid{ grid-template-columns: repeat(2,1fr); }
}

.hc-card{
  position:relative;
  overflow:hidden;
  border-radius: var(--radius);
  display:block;
  text-decoration:none;
  height: var(--img-height);
  min-height: 0;
}

.hc-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transform:none;
  transition:none;
  z-index: 1;
  display:block;
}

.hc-overlay{
  position:absolute;
  inset:0;
  background: var(--overlay);
  opacity:0;
  transition: opacity .25s ease;
  z-index: 2;
}


.hc-card:hover .hc-overlay{
  opacity: var(--overlay-hover-opacity, .92);
}
.hc-card.is-always .hc-overlay{
  opacity: var(--overlay-hover-opacity, .92);
}

.hc-content{
  position:absolute;
  inset:0;
  padding: clamp(18px,3vw,38px);
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:center;
  text-align:center;
  opacity:0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  z-index: 3;
}

.hc-card:hover .hc-content{
  opacity:1;
  transform: translateY(0);
}

.hc-card.is-always .hc-content{
  opacity:1;
  transform:none;
}

.hc-title{
  font-size:34px;
  font-weight:700;
  text-transform:uppercase;
  line-height:1.05;
  margin-bottom: 0;
}

.hc-text{
  font-size:16px;
  line-height:1.5;
  margin-bottom: 0;
}

.hc-btn-wrap{
  width:100%;
  text-align:center;
}

.hc-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 18px;
  max-width: 100%;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
}

.hc-image-badge{
  position:absolute;
  left:18px;
  right:18px;
  bottom:18px;
  z-index:11;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  pointer-events:none;
}

.hc-image-badge-title{
  color:#fff;
  font-size:16px;
  line-height:1.3;
  font-weight:500;
  text-shadow: 0 1px 8px rgba(0,0,0,.25);
}

.hc-image-badge-icon{
  width:34px;
  height:34px;
  min-width:34px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  color:#000;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}

.hc-image-badge-icon i,
.hc-image-badge-icon svg{
  width:14px;
  height:14px;
  display:block;
}

.hc-overlay{
  z-index: 2;
}

.hc-content{
  z-index: 3;
}

.hc-img{
  z-index: 1;
}

.hc-image-badge{
  z-index: 4;
}

.hc-card:hover .hc-image-badge{
  opacity: 0;
  transition: opacity .2s ease;
}

.hc-card .hc-image-badge{
  opacity: 1;
  transition: opacity .2s ease;
}

.hc-card.is-always .hc-image-badge{
  opacity: 0;
}

@media (max-width: 767px){

  .hover-cards .hc-grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0;
    overflow: visible;
  }

  .hc-card{
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 0;
    height: auto;
    border-radius: var(--radius);
  }

  .hc-img{
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius);
    z-index: 1;
  }

  .hc-overlay{
    display: none;
  }

  .hc-content{
    display: none;
  }

  .hc-title,
  .hc-text,
  .hc-btn-wrap{
    display: none;
  }

  .hc-image-badge{
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 4;
    opacity: 1 !important;
    transition: none !important;
  }

  .hc-card:hover .hc-image-badge,
  .hc-card.is-always .hc-image-badge{
    opacity: 1 !important;
  }

  .hc-dots{
    display: none;
  }
}

/* Builder Elementor uniquement */
.hover-cards.is-editor .hc-image-badge{
  opacity: 1 !important;
  transition: none !important;
}

.hover-cards.is-editor .hc-card:hover .hc-image-badge{
  opacity: 1 !important;
}