.carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius:20px;
}

.carousel-inner {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-item {
    flex: 0 0 100%; /* Ocupa 100% do carrossel */
    height: 100%;
    background-position: center;
    background-size: cover;
    opacity: 0;
    visibility: hidden; /* Esconde, mas mantém o espaço */
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.carousel-item.active {
    opacity: 1;
    visibility: visible;
    position: relative; /* Garante que o item ativo fique visível */
}


.carousel-controls {
position: absolute;
width: calc(100% - 20px); /* Reduz a largura para incluir o espaço de margem */
top: 50%;
display: flex;
justify-content: space-between;
transform: translateY(-50%);
padding: 0 10px; /* Adiciona espaço nas laterais */
}


.control {
    background-color: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.control:hover {
    background-color: rgba(0, 0, 0, 0.7);
}