.voluntarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: 220px;
    margin-top: 0%;
    padding-top: 0%;
    gap: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    white-space: nowrap;
}

.voluntario {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    color: white;
    font-weight: bold;
    text-align: center;
    border-radius: 0px;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding-top: 15px;
}

.voluntario .foto {     
        display: contents;
        justify-content: center;
        align-items: center;
        object-fit: contain;
  
}

/* imagem */
.voluntario .foto img {
    width: 105px;
    height: 105px;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* bloco de textos (nome e cargo) */
.voluntario .info {
    padding: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 70px;
}

/* nome do voluntário */
.voluntario .nome {
    font-size: clamp(0.9rem, 2vw, 1.1rem); /* se adapta à largura */
    font-weight: 700;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    -webkit-line-clamp: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* cargo do voluntário */
.voluntario .cargo {
    font-size: clamp(0.75rem, 1.8vw, 0.9rem);
    margin-top: 0;
    font-weight: 500;
    opacity: 0.95;
    margin-top: 4px;
    white-space: normal;
    word-break: break-word;
}

/* 🔹 Cores por ordem */
.voluntario-1 { background: orange; }
.voluntario-2 { background: hotpink; }
.voluntario-3 { background: green; }
.voluntario-4 { background: turquoise; }
.voluntario-5 { background: red; }

/* 🔹 Ajuste responsivo - MOBILE */
@media (max-width: 767px) {
    .voluntarios-grid {
        grid-auto-columns: 150px;
        height: auto;
    }

    .voluntario {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        color: white;
        font-weight: bold;
        text-align: center;
        border-radius: 0px;
        overflow: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
        padding-top: 15px;
    }

    .voluntario .foto {
        width: 100px;
        height: 100px;   
        overflow: hidden;         
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .voluntario .foto img {
        border-radius: 50%;
        object-fit: contain;
        display: block;
    }
}

/* 🔹 Ajuste responsivo - TABLET */
@media (min-width: 768px) and (max-width: 1024px) {
    .voluntarios-grid {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }

    .voluntario-card:nth-child(4n+2),
    .voluntario-card:nth-child(4n+3){
        background: var(--card-b);
    }
}