.f-carousel {
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 40px auto;
    --f-carousel-spacing: 5px;
}

.f-carousel__slide {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: zoom-in;
    max-height: 100%;
}

/* Corregido de 500% a 100% para evitar deformaciones futuras */
.f-carousel__slide img {
    height: 100%;
    max-height: 110%;
    border-radius: 4px;
    object-fit: grid;
}

.f-carousel.has-dots {
    --f-carousel-dots-height: 15px;
}

.obras-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 5 columnas que se reparten el 100% del ancho */
    gap: 10px;
    /* Espacio entre las imágenes */
    width: 100%;
    max-height: 50%;
    
    /* Fuerza a ocupar todo el ancho del contenedor de Bootstrap */
}

.obras-gallery a {
    display: block;
    width: 100%;
    cursor: zoom-in;
}

.obras-gallery img {
    width: 100%;
    /* Ocupa todo el ancho de su celda */
    height: 50%;
    max-height: 50%;
    /* Altura fija para que queden alineadas (ajustá este valor a tu gusto) */
    object-fit: cover;
    /* Recorta la imagen para que llene el espacio sin deformarse */
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.obras-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fancybox__caption {
    color: white;
    font-family: "Libre Baskerville", serif;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 310px;
    max-height: 1080px;

    position: absolute;
    left: 4%;
    top: 50%;
    transform: translateY(-50%);

    text-align: left;

   
    
}

@media (max-width: 768px) {
    .fancybox__caption {
        left: 0;
        transform: translateY(-100%);
        max-height: none;
        border-radius: 0;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 6px;
    }
}