.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: auto;
    justify-items: center;
}

.card {
    aspect-ratio: 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 250px;
    position: relative;
    cursor: pointer;
    text-align: center;
    border-radius: 8px;
}

.card .titulo {
    width: 100%;
    position: absolute;
    text-align: center;
    bottom: 0px;
    color: white;
    font-size: 15px;
    z-index: 2;
}

.card .titulo h3 {
    margin: 0;
    padding: 10px
}

.card .imagem {
    position: absolute;
    width: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
}

.card img {
    display: block;
    width: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
    filter: brightness(70%);
}

.card img:hover {
    display: block;
    z-index: 0;
    border-radius: 8px;
    transform: scale(1.03);
    filter: brightness(55%);
}


/* MODAL */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-content {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    height: fit-content;
    width: fit-content;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
}

.modal img {
    max-width: 80%;
    max-height: 80vh;
}

.fechar {
    margin: 10px;
    position: absolute;
    top: -80px;
    right: -20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
    padding: 20px;
}

.prev,
.next {    
    background: none;
    color: white;
    font-size: 40px;
    border: none;
    cursor: pointer;
    z-index: 98;
    position: absolute;    
}

.prev
{
    padding: 100px 100px 100px 10px;
    left: 0;
} 

.next
{
    padding: 100px 10px 100px 100px;
    right: 0;
} 