.carousel-container {
    width: 100%;
    margin: 2rem 0;
    overflow: hidden;
    position: relative;
    padding: 0 1rem;
}

.carousel {
    display: flex;
    gap: 20px;
    align-items: stretch;
    /* animation slides the row to the left continuously; pause on hover */
    animation: slide 18s linear infinite;
}

.carousel:hover {
    animation-play-state: paused;
}

.carousel-card {
    flex: 0 0 calc(33.333% - 20px);
    padding: 1rem;
    box-sizing: border-box;
    background: var(--bg-color);
    border-radius: 15px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.carousel-card img {
    width: 100%;
    height: 160px; /* reduzido para melhor proporção */
    object-fit: cover;
    border-radius: 10px;
}

.carousel-card h3 {
    margin: 0.75rem 0 0.25rem;
    color: var(--font-color);
    font-size: 1.1rem;
}

.carousel-card p {
    color: var(--font-color-3);
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive: 2 per row on medium screens, 1 per row on small */
@media (max-width: 900px) {
    .carousel-card {
        flex: 0 0 calc(50% - 20px);
    }
}

@media (max-width: 600px) {
    .carousel-card {
        flex: 0 0 calc(100% - 20px);
    }
}

/* Move the row by 50% so it shows a continuous movement; with few cards this provides smooth slide */
@keyframes slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}