.photo-grid-title {
    color: var(--gray);
}

.photo-grid-image-slot {
    aspect-ratio: 1 / 1;
    container-type: size;
    display: grid;
    place-items: center;
    width: 100%;
}

.photo-grid-image-wrapper {
    background-color: var(--duotone-base);
    isolation: isolate;
    line-height: 0;
    overflow: hidden;
    position: relative;
}

.photo-grid-image-wrapper .photo-grid-image {
    aspect-ratio: auto;
    display: block;
    filter: grayscale(100%) contrast(1);
    height: auto;
    max-height: 100cqh;
    max-width: 100cqw;
    object-fit: initial;
    transition: filter 0.2s ease;
    width: auto;
}

.photo-grid-image-wrapper:has(.photo-grid-image-placeholder) {
    height: 100%;
    width: 100%;
}

.photo-grid-image-wrapper:has(.photo-grid-image-placeholder) .photo-grid-image {
    filter: none;
    height: 100%;
    max-height: none;
    max-width: none;
    width: 100%;
}

.photo-grid-image-wrapper:has(.photo-grid-image-placeholder)::before {
    display: none;
}

.photo-grid-image-wrapper::before {
    background-color: var(--duotone-foreground);
    bottom: 0;
    content: '';
    height: 100%;
    left: 0;
    mix-blend-mode: var(--duotone-blend);
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    transition: opacity 0.2s ease;
    width: 100%;
    z-index: 1;
}

.photo-grid-link:hover .photo-grid-image-wrapper::before {
    opacity: 0;
}

.photo-grid-link:hover .photo-grid-image-wrapper .photo-grid-image {
    filter: grayscale(0%);
}

.fondi-empty {
    margin: 48px var(--grid-margin) 0;
    color: var(--gray);
}
