.folderGallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--fg-card-min, 240px)), 1fr));
    gap: var(--fg-gap, 15px);
    padding: 0;
    margin: 0 0 20px;
    list-style: none !important;
}

.folderGallery__item {
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.folderGallery__link {
    position: relative;
    display: block;
    overflow: hidden;
    border: none;
    background: #fff;
    box-shadow: none;
    text-decoration: none;
}

.folderGallery__link img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: var(--fg-ratio, 3 / 2);
    object-fit: var(--fg-fit, cover);
    background: #fff;
    transition: transform 0.25s ease;
}

.folderGallery__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.folderGallery__zoomIcon {
    width: 58px;
    height: 58px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.folderGallery__link:hover .folderGallery__overlay,
.folderGallery__link:focus-visible .folderGallery__overlay {
    opacity: 1;
}

.folderGallery__link:hover img,
.folderGallery__link:focus-visible img {
    transform: scale(1.025);
}

.folderGallery__link:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 2px;
}

.folderGalleryError {
    margin: 10px 0;
    padding: 15px;
    border: 1px solid #ffe69c;
    border-radius: 4px;
    background: #fff3cd;
    color: #664d03;
}

.folderGalleryCaption__article,
.folderGalleryCaption__file {
    display: block;
}

.folderGalleryCaption__article {
    font-size: 1.05em;
    font-weight: 600;
}

.folderGalleryCaption__file {
    margin-top: 0.2rem;
    font-size: 0.88em;
    opacity: 0.8;
}

.fancybox-share__button--wa {
    background: #25d366;
}

.folderGalleryShareNative {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 105px;
    height: 36px;
    margin: 0 4px;
    padding: 0 14px;
    border: 0;
    border-radius: 3px;
    background: #555;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.folderGalleryShareNative:hover,
.folderGalleryShareNative:focus {
    background: #333;
    color: #fff;
}

@media (hover: none) {
    .folderGallery__overlay {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .folderGallery__link img,
    .folderGallery__overlay {
        transition: none;
    }
}
