/**
 * Categories Section — Hover Image (v2)
 * Secondary image cross-fades inside card bounds on hover.
 *
 * Task: https://app.clickup.com/t/86ex329kh
 *
 * @package Kajal_Naina
 * @since   1.0.0
 */

/* Clip overflow so secondary image never escapes card bounds */
.blz-discover-by-category .blz-img-group {
    position: relative;
    overflow: hidden;
}

/* Primary image: visible by default, fades out on hover */
.blz-discover-by-category .blz-img-group .blz-hovered-img {
    position: relative;
    z-index: 1;
    transition: opacity 0.35s ease;
}
.blz-discover-by-category .blz-img-group:hover .blz-hovered-img {
    opacity: 0;
}

/* Secondary image: hidden by default, fades in on hover */
/* display:block !important overrides homepage.css @media (min-width:768px) { .blz-hover-img { display:none !important } } */
/* padding:0 !important clears GreenShift-generated 16px bottom padding that shrinks the content area */
/* bottom/height intentionally NOT set — JS sets height to match .blz-hovered-img so h6 title is not covered */
.blz-discover-by-category .blz-img-group .blz-hover-img {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    padding: 0 !important;
    overflow: hidden;
}
.blz-discover-by-category .blz-img-group:hover .blz-hover-img {
    opacity: 1;
    pointer-events: auto;
}

/* Keep secondary image filling the card */
/* The GreenShift block wraps img in <a> — must be block+full-height so height:100% on img resolves correctly */
.blz-discover-by-category .blz-img-group .blz-hover-img a {
    display: block;
    width: 100%;
    height: 100%;
}
/* GreenShift generates #gspb_image-id-* img { height: auto } with ID specificity — override with !important */
.blz-discover-by-category .blz-img-group .blz-hover-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Mobile: disable hover effect (cards scroll, tap = click) */
@media (max-width: 767px) {
    .blz-discover-by-category .blz-img-group .blz-hover-img {
        display: none !important;
    }
    .blz-discover-by-category .blz-img-group:hover .blz-hovered-img {
        opacity: 1;
    }
}
