.ws-hover-usp-wrap {
    width: 100%;
    background-repeat: no-repeat;
    background-color: transparent;
}

.ws-hover-usp-grid {
    display: grid;
    grid-template-columns: repeat(var(--ws-hover-columns, 3), minmax(0, 1fr));
    gap: var(--ws-hover-gap, 24px);
}

.ws-hover-usp-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--ws-hover-radius, 24px);
    background: transparent;
    text-decoration: none !important;
    isolation: isolate;
}

/* Automatisch: de standaard afbeelding bepaalt de hoogte van de kaart. */
.ws-height-auto .ws-hover-usp-card {
    min-height: 0;
    aspect-ratio: auto;
}

/* Vaste modi: de kaart krijgt exact de gekozen hoogte. */
.ws-height-fixed_400 .ws-hover-usp-card,
.ws-height-fixed_500 .ws-hover-usp-card,
.ws-height-custom .ws-hover-usp-card {
    height: var(--ws-hover-height, 400px);
}

.ws-hover-usp-img {
    transition: opacity .35s ease, transform .45s ease;
    z-index: 1;
}

/* Default image in auto mode creates the card height. */
.ws-height-auto .ws-hover-usp-img-default {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* Hover image overlays the default image. */
.ws-height-auto .ws-hover-usp-img-hover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-position: center;
}

/* If no default image exists, keep a usable preview height. */
.ws-height-auto .ws-hover-usp-card:not(:has(.ws-hover-usp-img-default)) {
    min-height: 320px;
}

/* Fixed height modes. */
.ws-height-fixed_400 .ws-hover-usp-img,
.ws-height-fixed_500 .ws-hover-usp-img,
.ws-height-custom .ws-hover-usp-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-position: center;
}

/* Afbeeldingsschaal opties. */
.ws-scale-contain .ws-hover-usp-img {
    object-fit: contain;
}

.ws-scale-cover .ws-hover-usp-img {
    object-fit: cover;
}

.ws-scale-original .ws-hover-usp-img {
    object-fit: none;
}

.ws-hover-usp-img-hover {
    opacity: 0;
}

.ws-hover-usp-card:hover .ws-hover-usp-img-default,
.ws-hover-usp-card:focus-visible .ws-hover-usp-img-default {
    opacity: 0;
}

.ws-hover-usp-card:hover .ws-hover-usp-img-hover,
.ws-hover-usp-card:focus-visible .ws-hover-usp-img-hover {
    opacity: 1;
    transform: scale(1.03);
}

.ws-hover-usp-text {
    position: absolute;
    z-index: 2;
    max-width: 86%;
    line-height: 1.15;
    font-weight: 700;
    transform: translate(-50%, -50%);
    transition: opacity .3s ease, transform .35s ease;
    font-family: inherit;
    pointer-events: none;
}

.ws-hover-usp-text.has-shadow {
    text-shadow: 0 2px 12px rgba(0,0,0,.45);
}

.ws-hover-usp-text-hover {
    opacity: 0;
    transform: translate(-50%, -42%);
}

.ws-hover-usp-card:hover .ws-hover-usp-text-default,
.ws-hover-usp-card:focus-visible .ws-hover-usp-text-default {
    opacity: 0;
    transform: translate(-50%, -58%);
}

.ws-hover-usp-card:hover .ws-hover-usp-text-hover,
.ws-hover-usp-card:focus-visible .ws-hover-usp-text-hover {
    opacity: 1;
    transform: translate(-50%, -50%);
}

@media (max-width: 767px) {
    .ws-hover-usp-grid {
        grid-template-columns: 1fr;
    }
}
