/* Block: Card Image */

.block-card-image__card {
    background-color: var(--color-orange);
    border-radius: var(--border-radius-lg);
    padding: 15px;
    display: flex;
    gap: var(--spacing-gap-medium);
    align-items: flex-start;
    width: 100%;
}

/* The card-image frame is a bio-video-surface wrapper — shared positioning
   (absolute video under overlay image) lives in video-surface.css. We
   only own the block's sizing/border-radius/hover-scale here. */
.block-card-image__col-image {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    aspect-ratio: 1 / 1;
}

.block-card-image__image,
.block-card-image__video {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

/* When a video is active the <video> is absolutely positioned, so it
   needs to fill the wrapper — overrides the static height:auto above. */
.block-card-image__col-image.has-video .block-card-image__video {
    height: 100%;
}

.block-card-image__col-image:hover .block-card-image__image,
.block-card-image__col-image:hover .block-card-image__video {
    transform: scale(1.02);
}

/* Mode where the hover zoom would compete with video feedback */
.block-card-image__col-image[data-video-mode="hover"]:hover .block-card-image__video {
    transform: none;
}

.block-card-image__col-content {
    flex: 1 1 0;
    min-width: 0;
    align-self: stretch;
    display: flex;
    gap: var(--spacing-gap-small);
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 20px 20px 0;
    color: var(--color-sand);
}

.block-card-image__header {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.block-card-image__header .single-chips {
    color: var(--color-sand);
}

.block-card-image__title h2 {
    color: var(--color-sand);
}

.block-card-image__body {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-gap-medium);
}

.block-card-image__text {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.block-card-image__text p {
    margin: 0;
}

.block-card-image__text p:not(:first-child) {
    opacity: 0.8;
}

@container page-content (max-width: 1024px) {
    .block-card-image__card {
        flex-direction: column;
        gap: var(--spacing-gap-small);
        border-radius: var(--border-radius-md);
        padding: 10px;
    }
    /* width: 100% is required because the card keeps `align-items: flex-start`
       on the column flex layout (not stretch). Without video, the inline <img>
       gives the wrapper intrinsic width; with video (card-image uses
       overlay_image=false → no <img>, only absolutely-positioned <video>) the
       wrapper has no content to size itself by and would collapse to 0 width,
       which then collapses `aspect-ratio: 1/1` to 0 height → surface vanishes. */
    .block-card-image__col-image {
        min-width: unset;
        flex: unset;
        width: 100%;
    }

    .block-card-image__title br { display: none; }

    .block-card-image__title h2 { text-align: center; }
    .block-card-image__col-content {
        width: 100%;
        padding: 0 20px 15px 20px;
    }

    .block-card-image__text p { text-align: center; }
    .block-card-image__header { align-items: center; justify-content: center; }
    .block-card-image__card .buttons { justify-content: center; }


}

@container page-content (max-width: 768px) {
    .block-card-image__card {
        border-radius: var(--border-radius-sm);
    }

    .block-card-image { padding: 0 10px; }
}

