/* Estilos para o componente Melhor Filtro do Mercado */
.filtro-diagram {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    padding: 0 15px;
}

.filtro-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    width: 30%;
    min-height: 200px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: visible; /* Alterado de hidden para visible para permitir que as setas apareçam */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(20px);
    margin-bottom: 10px;
}

/* Adicionar seta para a direita */
.filtro-step:not(:nth-child(3n)):after {
    content: "";
    position: absolute;
    top: 50%;
    right: -25px;
    width: 30px;
    height: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2371B923"><path d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
    transform: translateY(-50%);
    z-index: 10;
}

.filtro-step.appear {
    opacity: 1;
    transform: translateY(0);
}

.filtro-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.filtro-step.active {
    background-color: #ffffff;
    box-shadow: 0 8px 25px rgba(200, 210, 220, 0.3); /* Alterado para cinza azulado claro */
}

.filtro-step::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #98D442, #A9E525);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    border-top-left-radius: 12px;  /* Adicionando border-radius para combinar com o card */
    border-top-right-radius: 12px; /* Adicionando border-radius para combinar com o card */
}

.filtro-step.active::before {
    transform: scaleX(1);
}

.filtro-icon {
    background: linear-gradient(135deg, #98D442, #A9E525);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(200, 210, 220, 0.3); /* Alterado para cinza azulado claro */
}

.filtro-icon i {
    font-size: 24px;
}

.filtro-content {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Changed from space-between to flex-start */
    align-items: center;
}

.filtro-title {
    color: #00597C; /* Alterado de #71B923 para #00597C (azul) */
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.5;
}

.filtro-description {
    color: #00597C; /* Alterado de #71B923 para #00597C (azul) */
    font-size: 13px;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 4px;
    opacity: 0.9;
    transition: opacity 0.3s ease, transform 0.3s ease;
    line-height: 1.5;
}

/* Modificar para esconder todas as descrições inicialmente */
.filtro-description,
.filtro-multi-description {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.3s ease;
}

/* Mostrar descrições apenas quando o card estiver ativo */
.filtro-step.active .filtro-description {
    max-height: 200px;
    opacity: 1;
}

.filtro-step.active .filtro-multi-description {
    max-height: 200px;
    opacity: 1;
    color: #00597C !important; /* Usando !important para garantir que a cor seja aplicada */
}

.filtro-multi-description {
    color: #00597C !important; /* Usando !important para garantir que a cor seja aplicada */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

/* Keeping SAIBA MAIS with its original color */
.filtro-saiba-mais {
    font-size: 12px;
    color: #c3d0d4; /* Original color maintained */
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    margin: 5px 0;
    transition: opacity 0.3s ease;
}

/* Esconder o "SAIBA MAIS" quando o card estiver ativo */
.filtro-step.active .filtro-saiba-mais {
    display: none;
}

/* Ajuste para o título para manter o espaçamento correto */
.filtro-title {
    margin-bottom: 5px;
}

/* Renomear para evitar conflito */
.filtro-step .green-bar {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #98D442, #A9E525);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.filtro-step.active .green-bar {
    transform: scaleX(1);
}

/* Adicionar seta para baixo no mobile */
@media (max-width: 768px) {
    .filtro-step {
        width: 100%;
        margin-bottom: 40px;
    }
    
    /* Esconder setas horizontais */
    .filtro-step:not(:nth-child(3n)):after {
        display: none;
    }
    
    /* Adicionar seta para baixo */
    .filtro-step:not(:last-child):after {
        content: "";
        position: absolute;
        bottom: -30px;
        left: 50%;
        width: 30px;
        height: 30px;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2371B923"><path d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"/></svg>');
        background-repeat: no-repeat;
        background-size: contain;
        transform: translateX(-50%);
        z-index: 10;
        right: auto;
        top: auto;
        display: block; /* Garantir que a seta seja exibida */
    }
}

@media (max-width: 480px) {
    .filtro-diagram {
        gap: 40px; /* Aumentar o espaço entre os cards para as setas */
    }
    
    /* Garantir que a seta para baixo seja exibida em dispositivos menores */
    .filtro-step:not(:last-child):after {
        bottom: -35px;
        width: 35px;
        height: 35px;
    }
}
