#portfolio {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f4f4f4;
    text-align: center;
}

#portfolio h1 {
    font-size: 4rem;
    color: #4a4a8a;
}

#portfolio p {
    font-size: 2rem;
    color: #666;
    margin-bottom: 2rem;
}

#container-carrossel {
    overflow: hidden;
    width: 100%;
    max-width: calc(100% - 14rem); 
}

#carrossel-portfolio {
    display: flex;
    gap: 2rem;
    animation: scroll 30s linear infinite;
    width: 100%;
}

.portfolio-item {
    min-width: 25%;
    flex: 0 0 auto;
    position: relative;
    text-align: center;
    cursor: pointer; 
}

.portfolio-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
}

.portfolio-item h3 {
    margin-top: 0.5rem;
    color: #4a4a8a;
    font-size: 1.2rem;
    position: relative;
    z-index: 3; 
    margin-bottom: 0; 
}

.portfolio-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 2rem; 
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: opacity 0.3s ease;
    border-radius: 10px;
    z-index: 2; 
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-185%); }
}
