/* =========================================================
   CARD IMAGE WRAPPER (important glue)
   ========================================================= */

.card-img-wrapper {
  position: relative;
  overflow: hidden; /* keeps overlay clipped to image */
}

/* =========================================================
   INLINE OVERLAY (TOUCH FIRST)
   ========================================================= */

.inline-overlay {
  position: relative;
  width: 100%;
  height: 100%;
}

/* image must define the box */
.inline-overlay img {
  display: block;          /* removes inline gap */
  width: 100%;
  height: auto;
}

/* overlay panel */
.inline-overlay .overlay-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(6px);
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  z-index: 2;

  /* touch-first: visible by default */
  opacity: 1;
  transform: none;
}

/* =========================================================
   HOVER DEVICES ONLY
   ========================================================= */
/*only desktops/laptops get the hover animation*/
@media (hover: hover) and (pointer: fine) {
  .inline-overlay .overlay-panel {
    opacity: 0;
    transform: translateY(20%);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  .inline-overlay:hover .overlay-panel {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   OPTIONAL TEXT STYLING
   ========================================================= */

.overlay-text {
  text-align: center;
  font-size: 0.95rem;
}

.overlay-text a {
  color: #ffd27d;
  text-decoration: none;
}

.overlay-text a:hover {
  text-decoration: underline;
}
 
@media (max-width: 768px) {
  .inline-overlay .overlay-panel {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}