/* ===========================================================================
   GALLERIA A SCORRIMENTO AUTOMATICO — foto grandi, in movimento continuo,
   nessun click richiesto per vederle. Click facoltativo per ingrandire.
   =========================================================================== */

.gallery-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 2rem;
    /* effetto dissolvenza ai bordi */
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 4%, black 96%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, black 4%, black 96%, transparent 100%);
}

.gallery-carousel-track {
    display: flex;
    align-items: stretch;
    width: max-content;
    gap: 1.5rem;
    animation: gallery-scroll linear infinite;
    animation-duration: var(--gallery-duration, 40s);
    will-change: transform;
}

/* pausa piacevole quando l'utente si sofferma con il mouse */
.gallery-carousel-wrapper:hover .gallery-carousel-track {
    animation-play-state: paused;
}

@keyframes gallery-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.gallery-carousel-item {
    position: relative;
    flex: 0 0 auto;
    width: min(70vw, 520px);
    height: 380px;
    border-radius: var(--border-radius-lg, 16px);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    cursor: pointer;
}

.gallery-carousel-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-carousel-item:hover .gallery-carousel-photo {
    transform: scale(1.05);
}

.gallery-carousel-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 1.5rem;
}

.gallery-carousel-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 2.5rem 1.5rem 1.25rem;
    background: linear-gradient(to top, rgba(11, 43, 48, 0.85), transparent);
    color: white;
    pointer-events: none;
}

.gallery-carousel-caption h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.15rem;
}

.gallery-carousel-caption span {
    font-size: 0.8rem;
    opacity: 0.85;
}

@media (max-width: 768px) {
    .gallery-carousel-item {
        width: min(82vw, 360px);
        height: 280px;
    }
}

/* ===========================================================================
   LIGHTBOX — mostra la foto ingrandita al click (non solo il testo)
   =========================================================================== */
.lightbox-img-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 80vh;
    overflow: hidden;
    border-radius: var(--border-radius-lg, 16px);
    background: #0b2b30;
}

.lightbox-photo {
    display: block;
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 2.5rem 1.5rem 1.25rem;
    background: linear-gradient(to top, rgba(11, 43, 48, 0.9), transparent);
    color: white;
    text-align: center;
}