/* Parent column → flex row so adjacent boxes share height and wrap on narrow screens */
.wpb_wrapper:has(> .cib-link),
.wpb_wrapper:has(> a.cib-link) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
}

.cib-link {
    text-decoration: none;
    display: flex;
    width: 100%;
}

.cib-box {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* cover image as its own layer so we can blur it without blurring the text */
.cib-cover-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: filter 0.3s ease;
    z-index: 0;
}

/* color overlay on top of cover image */
.cib-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--cib-overlay, transparent);
    transition: background-color 0.3s ease;
    z-index: 1;
}

/* content sits above cover + overlay */
.cib-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.cib-content img {
    max-width: 100%;
    height: auto;
}

.cib-heading {
    margin: 0 0 0.4em;
}

.cib-description {
    margin: 0;
    line-height: 1.4;
}

.cib-cta {
    display: inline-block;
    margin-top: 0.8em;
    padding: 0.5em 1.2em;
    border-radius: 9999px;
    font-weight: 600;
    line-height: 1.2;
    border: 2px solid transparent;
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cib-cta-filled {
    background-color: #1d4ed8;
    color: #fff;
}

.cib-cta-outline {
    background-color: transparent;
    border-color: currentColor;
    color: #1d4ed8;
}

.cib-link:hover .cib-cta {
    opacity: 0.9;
}

/* hover: blur cover, swap overlay color — no movement */
.cib-link:hover .cib-cover-bg {
    filter: blur(var(--cib-hover-blur, 0));
}

.cib-link:hover .cib-overlay {
    background-color: var(--cib-overlay-hover, var(--cib-overlay, transparent));
}
