/* Filtro — mobile */
@media (max-width: 767px) {

    /* ---------- Cabeçalho FILTROS ---------- */
    .checkboxes-header {
        display: flex;
        align-items: center;
        justify-content: space-between; /* seta à direita; remove se a quiseres junto ao texto */
        gap: 8px;
        margin: 0 0 19px 0;
        cursor: pointer;
        color: #333;
        padding-top: 5px;
    }

    /* Seta indicadora (baixo = abrir, cima = fechar) */
    .checkboxes-header::after {
        content: "a";
        display: block;
        flex: 0 0 14px;
        width: 18px;
        height: 18px;
        background-color: currentColor;

        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
        -webkit-mask-size: contain;

        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
        mask-size: contain;

        transition: transform .3s ease, opacity .2s ease;
    }

    .checkboxes-header.is-open::after {
        transform: rotate(180deg);
    }

    .checkboxes-header:hover::after {
        opacity: .7;
    }

    /* FILTROS fechado: esconde só os blocos dos filtros */
    .checkboxes-header:not(.is-open) ~ .checkboxes-title,
    .checkboxes-header:not(.is-open) ~ #especialidades-checkbox-container,
    .checkboxes-header:not(.is-open) ~ #acordos-checkbox-container {
        display: none;
    }

    /* ---------- Títulos (ESPECIALIDADES / ACORDOS) ---------- */
    .checkboxes-title {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        cursor: pointer;
			justify-content: space-between;
    }

    .checkboxes-title::after {
        content: "";
        display: block;
        flex: 0 0 14px;
        width: 14px;
        height: 14px;
        background-color: currentColor;

        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
        -webkit-mask-size: contain;

        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
        mask-size: contain;

        transition: transform .3s ease, opacity .2s ease;
    }

    .checkboxes-title.is-open::after {
        transform: rotate(180deg);
    }

    .checkboxes-title:hover::after {
        opacity: .7;
    }

    .checkboxes-title:nth-of-type(4) {
        margin: -3px 0 0 0;
    }

    /* ---------- Containers ---------- */
    #especialidades-checkbox-container {
        padding: 0 0 10px 0;
    }

    /* Estado fechado */
    #especialidades-checkbox-container,
    #acordos-checkbox-container {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        visibility: hidden;
        margin-top: 0;
        transform: translateY(-8px);
        transition:
            max-height .45s cubic-bezier(.4, 0, .2, 1),
            opacity .3s ease,
            transform .35s ease,
            margin-top .35s ease,
            visibility 0s linear .45s; /* só fica hidden no fim do fecho */
    }

    /* Estado aberto */
    .checkboxes-title.is-open + #especialidades-checkbox-container,
    .checkboxes-title.is-open + #acordos-checkbox-container {
        max-height: 5000px;
        opacity: 1;
        visibility: visible;
        margin-top: 10px;
        transform: translateY(0);
        transition:
            max-height .6s ease-in-out,
            opacity .35s ease .05s,
            transform .35s ease,
            margin-top .35s ease,
            visibility 0s linear 0s; /* aparece logo ao abrir */
    }

    /* Respeita quem desativa animações no sistema */
    @media (prefers-reduced-motion: reduce) {
        #especialidades-checkbox-container,
        #acordos-checkbox-container,
        .checkboxes-header::after,
        .checkboxes-title::after {
            transition: none !important;
        }
    }
}


