.fotosgeral {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.fotosevento {
    flex: 1 1 calc(33.333% - 24px);
    max-width: calc(33.333% - 24px);
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
}

.imgfotoevento {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    display: block;
}

.legfoto {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(0deg, #c149df 0%, #270963 100%);
    color: #fff;
    padding: 16px;
    font-size: 1.1em;
    box-sizing: border-box;
    border-radius: 0 0 8px 8px;
    opacity: 0.95;
}

#eventos {
    display: block;
    width: 100%;
    clear: both;
    margin-top: 20px;   /* opcional, para espaçamento superior */
}

/* Responsivo para celular */
@media (max-width: 640px) {
    .fotosgeral {
        flex-direction: column;
        gap: 16px;
    }
    .fotosevento {
        max-width: 100%;
        flex: 1 1 100%;
        flex-direction: row;
        height: 120px;
    }
     .fotosgal {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        width: 100%;
        height: 100%;
        text-decoration: none;
    }
    .fotosgal .imgfotoevento {
        width: 40%;
        max-width: 40%;
        min-width: 40%;
        height: 100%;
        border-radius: 8px 0 0 8px;
    }
    .fotosgal .legfoto {
        position: static;
        width: 60%;
        max-width: 60%;
        min-width: 0;
        padding: 12px;
        border-radius: 0 8px 8px 0;
        display: flex;
        align-items: center;
        background: linear-gradient(0deg, #c149df 0%, #270963 100%);
        opacity: 1;
        font-size: 1em;
    }
}