/* Pesquisa */
.pesquisa {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pesquisa form {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    border-radius: 15px;

    transition: var(--delay-default);
}

.filtros {
    height: 100%;
    opacity: 0;
    display: none;
}

.pesquisa input {
    width: 100%;

    padding-block: 8px;
    padding-inline: 15px;
    border-radius: 15px;
    border: none;
    border: #ffffff;
    box-shadow: 0px 4px 8px 0px #00000040;

    transition: calc(3*var(--delay-default));

}

.campo-pesquisa {
    position: relative;
    display: flex;
    align-items: center;
}

.botoes-pesquisa {
    position: relative;
    width: 40%;
}

.campo-pesquisa button {
    position: absolute;
    right: 0;

    border: none;
    background: unset;
    color: #666;
    padding-inline: 15px;
    height: 100%;
    border-radius: 0px 15px 15px 0px;
    border: transparent 1px solid;
    border-left: #ccc 1px solid;

    &:disabled {
        cursor: not-allowed;
        background-color: #e9ecef;
        border: #ccc 1px solid;
    }
}

.pesquisa .botao-filtro {
    position: absolute;
    right: -150px;
    top: 0;
    box-shadow: 0px 4px 8px 0px #00000040;

    padding-block: 8px;
    padding-inline: 15px;
    margin: 0;
    border: none;
    border: #ffffff;
    border-radius: 15px;

    background-color: white;
    transition: var(--delay-default);
}

.botoes-filtrar {
    display: none;

    justify-content: flex-end;
    gap: 10px;
    width: 100%;
    transition: var(--delay-default);
}

.pesquisa button,
.pesquisa a,
.pesquisa .botoes-filtrar button,
.pesquisa .botoes-filtrar a {
    &:focus {
        border-color: #86b7fe;
        outline: 0;
        box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
    }
}

.disappear {
    animation: disappear-animation var(--delay-default) ease-in-out forwards;
}


/* Pesquisa expandiada */
.appear {
    animation: appear-animation var(--delay-default) ease-in-out forwards;
}

.botoes-filtrar.appear {
    animation: appear-animation calc(3*var(--delay-default)) ease-in-out forwards;
}

.pesquisa .expanded {
    flex-direction: column;
    align-items: center;

    animation: expasion-animation var(--delay-default) ease-in-out forwards;
}

.pesquisa .collapsed {
    animation: collapse-animation var(--delay-default) ease-in-out forwards;
}

.expanded .botoes-pesquisa {
    width: 40%;
}

.pesquisa .expanded input,
.pesquisa .expanded .botao-filtro {
    box-shadow: none;
    border: #ccc 1px solid;
    padding-block: 8px;

    &:focus {
        border-color: #86b7fe;
        outline: 0;
        box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
    }
}

.expanded .filtros {
    min-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;

}

.filtro-item {
    display: flex;
    flex-direction: column;
    position: relative;

    .icone-loading-filtro {
        width: 20px;
        height: 20px;
        shape-rendering: auto;
        display: block;
        background: transparent;
        position: absolute;
        top: 50%;
        right: 12px;
        transform: translateY(-50%);
    }
}

.filtro-item label {
    padding-inline: 20px;
}

.filtro-item select {
    width: 100%;
    padding-block: 8px;
    padding-left: 15px;
    padding-right: 60px;


    color: rgb(44, 44, 44);
    border: #ccc 1px solid;
    border-radius: 15px;

    cursor: pointer;

    overflow: hidden;
    text-overflow: ellipsis;

    /* <option> colors */
    option {
        color: inherit;
        background-color: var(--option-bg);
        border-radius: 15px;
        overflow: hidden;
        box-shadow: 0px 0px 10px 0px #00000040;
    }
}

.expanded .botao-limpar-pesquisa {
    all: unset;
    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 15px;
    border: 1px solid #D33C43;
    background-color: #fff7f7;
    padding: 8px 15px;

    text-decoration: none;
    color: #666;
    cursor: pointer;

    transition: var(--delay-default);

    &:hover {
        border-color: #911b21;
    }

    &:disabled {
        background-color: #e9ecef;
        border: #ccc 1px solid;
    }

}

/* FIM Pesquisa-Expandiada END */
/* FIM Pesquisa END */

/* Indicadores */
.indicadores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.indicadores .indicador {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 0 25px -7px #00000040;
    padding: 20px;

    width: 100%;

    p {
        margin: 0;
        font-size: 1.2rem;
        text-align: center;
    }
}

.indicadores i {
    padding-right: 5px;
}

/* FIM Indicadores END */


/* Projetos */

.container .nenhum-projeto {
    margin: 5rem 0px;
    text-align: center;
    width: 100%;
    font-size: 1.8rem;
    font-weight: 500;
    color: #666;
}

.box {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 40px;
}

.card {
    border-radius: 15px;
    overflow: hidden;
    text-align: left;

    position: relative;
    top: 0px;
    left: 0px;

    height: 100%;
    width: 100%;

    transition: var(--delay-default);

    animation: card-appear 1ms ease-in-out;
    animation-timeline: view(block);
    animation-range: entry 0% contain 0%;

    &:hover,
    &:focus {
        position: relative;
        top: -6px;
        left: 6px;
        box-shadow: -6px 6px 0px 0px var(--card-color-shadow);
    }

    &:focus {
        outline: none;
    }

    &:focus-within .nome-eixo {
        animation: aparecer-nome-eixo-animacao calc(2 * var(--delay-default)) ease-in-out forwards;
    }

}

.card .destaque {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 56px;
    filter: drop-shadow(0px 2px 12px #b6b6b6);
}

.card img {
    width: 100%;
    min-height: 160px;
    max-height: 160px;
    height: 100%;
    object-fit: cover;
}

.card .progresso {
    width: 100%;
    margin: 0;
    margin-top: auto;

    display: flex;
    align-items: center;
    justify-content: start;
    gap: 5px;

    font-size: 1rem;

    .barra-progresso {
        position: relative;
        display: inline-block;

        width: 100%;
        height: 16px;
        margin-top: 4px;

        background-color: #F1F1F1;
        border-radius: 15px;
        overflow: hidden;

        &::before {
            content: "";
            width: var(--card-progresso, 0%); /* Vindo do js*/

            position: absolute;
            left: 0px;
            top: 0px;
            height: 16px;

            display: flex;
            justify-content: center;
            align-items: center;

            border-radius: 0 10px 10px 0;
            background-color: var(--card-progresso-cor, #f06767);/* Vindo do js*/
        }

         &::after {
            content: attr(data-progresso); /* Vindo do js*/
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            top: 0;
            height: 16px;

            font-size: 0.675rem;
            font-weight: 600;
            text-shadow: 0px 0px 0.8px rgb(196, 196, 196);

            color: #2b2b2b;
            background-color: transparent;
        }
    }
}

.descricao-projeto {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;

    height: 100%;
}

.nome-acao {
    font-size: 1.2rem;
    font-weight: normal;
    margin: 0;
}

.descricao-acao {
    font-size: 1rem;
    margin: 0;
    color: #666;

    display: -webkit-box;
    -webkit-line-clamp: 4;
    /* Limita a 3 linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;

}

.situacao {
    font-size: 1rem;
    margin: 0;

    margin-top: auto;
}

.situacao i {
    margin-left: 5px;
}

/* Selo */

.selos {
    display: unset;
    z-index: 4;
    position: absolute;
    padding: 10px 10px 0 10px;

    width: 100%;
}

.selos .selo {
    display: flex;
    justify-content: center;
    align-items: center;

    position: absolute;
    top: 10px;

    height: 64px;
    width: 64px;

    font-size: 1.5rem;
    color: white;
    border-radius: 50px;

    z-index: 4;
}

.nome-eixo {
    visibility: hidden;

    display: flex;
    align-items: center;

    padding-block: 10px;
    padding-left: 54px;
    padding-right: 10px;
    border-radius: 50px;

    height: 64px;

    background-color: #333333b3;
    backdrop-filter: blur(2px);

    color: white;

    overflow: hidden;
}

.nome-eixo p {
    margin: 0;
    font-size: 0.8rem;
    min-width: 165px;
    width: 100%;
}


.nome-eixo.eixo-expanded {
    animation: aparecer-nome-eixo-animacao calc(2 * var(--delay-default)) ease-in-out forwards;
}

.nome-eixo.eixo-collapsed {
    animation: esconder-nome-eixo-animacao calc(2 * var(--delay-default)) ease-in-out forwards;
}

ul.pagination li.ellipsis {
    display: none;
}

/* FIM Selo END */
/* FIM Projetos END */

/* Animacoes */

@keyframes aparecer-nome-eixo-animacao {
    0% {
        opacity: 0;
        width: 0%;
        color: transparent;
    }

    50% {
        opacity: 1;
        width: 100%;

        padding-left: 80px;
        padding-right: 10px;
        color: transparent;
    }

    100% {
        padding-left: 80px;
        padding-right: 10px;
        color: white;
        visibility: visible;
    }
}

@keyframes esconder-nome-eixo-animacao {
    0% {
        visibility: visible;
        color: white;

        padding-left: 80px;
        padding-right: 10px;
    }

    50% {
        color: transparent;
        width: 100%;
        opacity: 1;
        padding-left: 80px;
        padding-right: 10px;
    }

    100% {
        color: transparent;
        padding-left: 64px;
        padding-right: 0px;

        width: 0%;
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes expasion-animation {
    from {
        gap: 0px;
        padding: 0px;
        background-color: transparent;
        box-shadow: none;
    }

    to {
        gap: 20px;
        padding: 10px;
        background-color: white;
        box-shadow: 0px 4px 8px 0px #00000040;
    }
}


@keyframes collapse-animation {
    from {
        gap: 20px;
        padding: 10px;
        background-color: white;
        box-shadow: 0px 4px 8px 0px #00000040;
    }

    to {
        gap: 0px;
        padding: 0px;
        background-color: transparent;
        box-shadow: none;
    }

}

@keyframes appear-animation {
    from {
        opacity: 0;
        max-height: 0px;
    }

    to {
        opacity: 1;
        max-height: 400px;
    }
}


@keyframes disappear-animation {
    from {
        opacity: 1;
        max-height: 400px;
    }

    to {
        opacity: 0;
        max-height: 0px;
    }
}

@keyframes card-appear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0px);
    }

}

/* FIM Animacoes END */

/* Responsividade */

@media (max-width:767px) {
    .pesquisa .botoes-pesquisa {
        display: flex;
        flex-direction: column;
        gap: 10px;

        width: 50%;
        min-width: 258px;
    }

    .pesquisa .botao-filtro {
        position: unset;
        right: unset;
        top: unset;

        display: flex;
        justify-content: center;
        align-items: center;

        width: 100%;
        gap: 10px;
    }

    .expanded .filtros {
        min-width: auto;
        grid-template-columns: minmax(100%, 255px);
        gap: 10px;
    }

    .pesquisa .botoes-filtrar {
        max-width: 255px;
    }

    .botao-limpar-pesquisa {
        width: 100%;
    }

    .contador {
        display: flex;
        justify-content: center;
    }

    .indicadores {
        display: grid;
        grid-template-columns: 1fr;

        border-radius: 15px;
    }

    .indicadores p {
        padding: 8px 15px;
        background-color: transparent;
        box-shadow: none;
    }

    @keyframes appear-animation {
        from {
            opacity: 0;
            max-height: 0px;
        }

        to {
            opacity: 1;
            max-height: 200px;
        }
    }


    @keyframes disappear-animation {
        from {
            opacity: 1;
            max-height: 200px;
        }

        to {
            opacity: 0;
            max-height: 0px;
        }
    }
}

@media (max-width:512px) {
    .pesquisa form {
        width: 100%;
    }

    .pagination li {
        width: 50px;
        height: 50px;
        padding: 0.4rem;
    }

    .pagination li a {
        border-radius: 12px;
    }
}

@media (max-width:375px) {
    .indicadores {
        justify-content: unset;
        min-width: 258px;
    }

    .indicadores .indicador p {
        font-size: 1rem;
    }

    .pagination li {
        width: 40px;
        height: 40px;
        padding: 0.4rem;
    }

    .pagination li a {
        border-radius: 9px;
    }
}

/* FIM Responsividade END */