.gazzeta-photo-16x9,
body.gazzeta-site .story-card > .story-image.gazzeta-photo-16x9 {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    align-self: start;
    overflow: hidden;
    isolation: isolate;
    background: transparent;
}

body.gazzeta-site :is(.front-page, .category-page, .latest-archive-grid) .story-card:not(.story-hero) > .story-image.gazzeta-photo-16x9 {
    --gazzeta-photo-fit: cover;
    --gazzeta-photo-backdrop-content: none;
    aspect-ratio: 21 / 20;
}

/* The shared ratio now reserves the space previously set by the mobile archive spacer. */
body.gazzeta-site .story-card > .story-image.gazzeta-photo-16x9::before {
    content: none;
}

.gazzeta-photo-16x9[data-photo-backdrop]::after {
    --gazzeta-photo-blur: clamp(8px, 1.6vw, 20px);
    position: absolute;
    inset: calc(-2 * var(--gazzeta-photo-blur));
    z-index: -1;
    content: var(--gazzeta-photo-backdrop-content, "");
    background: center / cover no-repeat var(--gazzeta-photo-backdrop);
    filter: blur(var(--gazzeta-photo-blur));
    pointer-events: none;
}

.gazzeta-photo-16x9 > picture {
    position: absolute;
    inset: 0;
    display: block;
}

.gazzeta-photo-16x9 > img,
.gazzeta-photo-16x9 > picture > img,
body.gazzeta-site .story-card > .story-image.gazzeta-photo-16x9 > img {
    position: absolute;
    inset: 0;
    display: block;
    /* Core Image blocks can set these properties inline. */
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    max-height: none;
    margin: 0;
    object-fit: var(--gazzeta-photo-fit, contain) !important;
    object-position: center;
    transform: none;
}

.gazzeta-photo-16x9 > .image-placeholder {
    position: absolute;
    inset: 0;
}
