* { box-sizing: border-box; margin: 0; padding: 0; }
/****body { font-family: sans-serif; background: #f4f4f4; padding: 20px; }****/
.section-title { text-align: center; margin: 20px 0; }

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto 40px;
    overflow: hidden;
    /*background: rgba(0,0,0,0.7);*/
    border-radius: 8px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
}

.carousel-img {
    width: 100%; 
    flex: 0 0 100%; /* Mobile: 1 por vez */
    cursor: zoom-in;
    object-fit: cover;
    padding: 10px;
}

/* DESKTOP: Força 3 itens e garante que as setas funcionem */
@media (min-width: 721px) {
    .carousel-img {
        flex: 0 0 33.333%;
        min-width: 33.333%;
    }
}

.nav-btn {
    position: absolute;
    top: 43%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
}
.prev { left: 0; }
.next { right: 0; }

/* MODAL / ZOOM */

#modalLegenda {
    position: absolute;
    bottom: 20px; /* Distância do rodapé */
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 5px;
    text-align: center;
    pointer-events: none; /* Garante que o clique passe pela legenda e feche o modal */
    max-width: 80%;
}


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 95%; /* Maior no mobile */
    max-height: 85%;
    object-fit: contain;
}

.close-modal { position: absolute; top: 20px; right: 30px; color: white; font-size: 40px; cursor: pointer; }
.modal-nav { background: none; border: none; color: white; font-size: 50px; cursor: pointer; position: absolute; }
.prev-modal { left: 10px; }
.next-modal { right: 10px; }
