.carousel {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden; /* Container esconde o que está fora, mas permite scroll interno */
    padding: 0 10px;
}

@media (max-width: 767px) {
    .carousel {
        overflow: hidden; /* Container esconde o que está fora */
        padding: 0 5px;
    }
}

@media (min-width: 768px) {
    .carousel {
        max-width: 1400px;
        padding: 0 20px;
    }
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
    gap: 1rem;
    padding: 0.5rem;
    overflow: visible; /* Permitir que slides sejam visíveis durante o arrasto */
    touch-action: pan-y pinch-zoom; /* Permitir scroll vertical mas controlar horizontal */
    will-change: transform; /* Otimização para animações */
}

@media (min-width: 768px) {
    .carousel-wrapper {
        gap: 2rem;
        padding: 1rem;
    }
}

.carousel-wrapper:active {
    cursor: grabbing;
}

.carousel-slide {
    flex: 0 0 calc(100% - 1rem);
    min-width: 0;
    user-select: none;
    opacity: 0.8;
    transform: scale(0.98);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
    .carousel-slide {
        flex: 0 0 calc(50% - 2rem);
    }
}

.carousel-slide.active {
    opacity: 1;
    transform: scale(1);
}

@media (min-width: 1024px) {
    .carousel-slide {
        flex: 0 0 calc(33.333% - 2rem);
    }
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: #166534;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    opacity: 0.9;
}

.carousel-nav:hover {
    background-color: #15803d;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 5px;
}

.carousel-next {
    right: 5px;
}

@media (min-width: 768px) {
    .carousel-prev {
        left: 20px;
    }
    
    .carousel-next {
        right: 20px;
    }
}

.solution-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Ícones do Font Awesome no lugar de imagens */
.solution-icon {
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    transition: all 0.5s ease;
}

.solution-icon i {
    font-size: 5rem;
    transition: transform 0.5s ease;
}

@media (max-width: 640px) {
    .solution-icon {
        height: 180px;
    }
    
    .solution-icon i {
        font-size: 3.5rem;
    }
}

.solution-card:hover .solution-icon {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.solution-card:hover .solution-icon i {
    transform: scale(1.1) rotate(5deg);
}

.solution-card h3 {
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.solution-card p {
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.625;
}

/* Adiciona indicadores de rolagem */
.carousel::before,
.carousel::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.carousel::before {
    left: 0;
    background: linear-gradient(to right, rgba(241, 245, 249, 0.9), transparent);
}

.carousel::after {
    right: 0;
    background: linear-gradient(to left, rgba(241, 245, 249, 0.9), transparent);
}

/* Prevenir overflow no mobile */
@media (max-width: 767px) {
    .carousel::before,
    .carousel::after {
        display: none;
    }
    
    .carousel-nav {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .carousel-prev {
        left: 5px;
    }
    
    .carousel-next {
        right: 5px;
    }
    
    .carousel {
        padding: 0 5px;
    }
    
    .carousel-wrapper {
        padding: 0.25rem;
        gap: 0.5rem;
        touch-action: pan-x; /* Permitir apenas pan horizontal no mobile */
        overflow: visible; /* Garantir que slides sejam visíveis durante navegação */
    }
    
    .carousel-slide {
        flex: 0 0 calc(100% - 0.5rem);
    }
}