.noticias-publicas,
.noticias-publicas * {
    box-sizing: border-box;
}

.noticias-publicas {
    width: 100%;
    padding: 72px 24px;
    background: #f2f5f6;
    color: #111827;
}

.noticias-publicas-container {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.noticias-publicas__header {
    max-width: 660px;
    margin-bottom: 28px;
}

.noticias-publicas__pill {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    margin-bottom: 13px;
    padding: 0 17px;
    border-radius: 999px;
    background: #e8f0ff;
    color: #5b7cff;
    font-size: 10px;
    font-weight: 700;
}

.noticias-publicas__title {
    margin: 0 0 13px;
    color: #0f172a;
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.noticias-publicas__title span {
    color: #4f67ff;
}

.noticias-publicas__subtitle {
    max-width: 610px;
    margin: 0;
    color: #6f7b92;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.45;
}

.noticias-publicas__grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.42fr)
        minmax(440px, 1fr);
    gap: 28px;
    align-items: start;
}

.noticias-publicas__left,
.noticias-publicas__right {
    min-width: 0;
}

/* Destaque */
.noticias-destaque {
    position: relative;
    height: 460px;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
    background: #e9edf3;
    box-shadow: none;
}

.noticias-destaque__media,
.noticias-destaque__media picture,
.noticias-destaque__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.noticias-destaque__media img {
    display: block;
    object-fit: cover;
}

.noticias-destaque__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to top,
            rgba(7, 13, 29, 0.9) 0%,
            rgba(7, 13, 29, 0.66) 26%,
            rgba(7, 13, 29, 0.25) 54%,
            rgba(7, 13, 29, 0) 82%
        );
    pointer-events: none;
}

.noticias-destaque__content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    padding: 60px;
}

.noticias-destaque__content h3 {
    max-width: 620px;
    margin: 0 0 9px;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.12;
}

.noticias-destaque__content h3 a {
    color: #fff;
    text-decoration: none;
}

.noticias-destaque__content p {
    display: -webkit-box;
    max-width: 560px;
    margin: 0;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Rodapé abaixo do destaque */
.noticias-publicas__left-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 66px;
    margin-top: 12px;
}

.noticias-destaque__dots {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-self: start;
    gap: 12px;
}

.noticias-destaque__dots button {
    width: 34px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #d5d8df;
    cursor: pointer;
}

.noticias-destaque__dots button.active {
    background: #1668e8;
}

.noticias-publicas__older {
    grid-column: 2;
    justify-self: center;
}

.noticias-publicas__older a {
    display: inline-flex;
    min-width: 220px;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border-radius: 5px;
    background: #1668e8;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

/* Busca */
.noticias-publicas__search {
    display: flex;
    width: 100%;
    min-height: 68px;
    align-items: center;
    margin-bottom: 18px;
    padding: 0 14px 0 40px;
    border: 1px solid #dfe4ed;
    border-radius: 9px;
    background: #fff;
    box-shadow: none;
}

.noticias-publicas__search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #374151;
    font: inherit;
    font-size: 14px;
}

.noticias-publicas__search input::placeholder {
    color: #6b7280;
    opacity: 1;
}

.noticias-publicas__search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
}

.noticias-publicas__search .limpar {
    width: 30px;
    height: 30px;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
}

.noticias-publicas__search .buscar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    margin-left: 10px;
    border-radius: 3px;
    background: #d8e6ff;
    color: #fff;
    font-size: 18px;
}

.noticias-publicas__search .buscar img {
    display: block;
    width: 22px;
    height: 22px;
}

/* Lista da direita */
.noticias-publicas__list {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 12px;
}

.noticias-publicas__item {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 15px;
    width: 100%;
    min-height: 104px;
    align-items: center;
    padding: 12px 15px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    cursor: pointer;
    outline: none;
}

.noticias-publicas__item:hover,
.noticias-publicas__item:focus-visible {
    background: #fbfcff;
}

.noticias-publicas__item-thumb {
    width: 86px;
    height: 80px;
    overflow: hidden;
    border-radius: 7px;
    background: #eef1f5;
}

.noticias-publicas__item-thumb picture,
.noticias-publicas__item-thumb img {
    display: block;
    width: 100%;
    height: 100%;
}

.noticias-publicas__item-thumb img {
    object-fit: cover;
}

.noticias-publicas__item-body {
    min-width: 0;
}

.noticias-publicas__item-body h4 {
    display: -webkit-box;
    margin: 0 0 11px;
    overflow: hidden;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.noticias-publicas__item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.noticias-publicas__item-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #858b98;
    font-size: 11px;
    white-space: nowrap;
}

.noticias-publicas__item-date-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    background: #c9c9c9;
    -webkit-mask:
        url("/img/noticias-publico/data-noticia.svg")
        center / contain no-repeat;
    mask:
        url("/img/noticias-publico/data-noticia.svg")
        center / contain no-repeat;
}

.noticias-publicas__item-tag {
    display: inline-flex;
    min-width: 76px;
    min-height: 26px;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    border-radius: 999px;
    background:
        color-mix(
            in srgb,
            var(--categoria-cor, #7b5cf5) 17%,
            #fff);
    color: var(--categoria-cor, #7b5cf5);
    font-size: 10px;
    font-weight: 800;
}

/* Paginação */
.noticias-publicas__pagination {
    display: flex;
    width: 100%;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 0 16px;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background:
        linear-gradient(90deg, #b7bdc8 55%, transparent 0)
            top / 18px 2px repeat-x,
        linear-gradient(90deg, #b7bdc8 55%, transparent 0)
            bottom / 18px 2px repeat-x,
        linear-gradient(0deg, #b7bdc8 55%, transparent 0)
            left / 2px 18px repeat-y,
        linear-gradient(0deg, #b7bdc8 55%, transparent 0)
            right / 2px 18px repeat-y,
        #fff;
    box-shadow: none;
}

.noticias-publicas__pagination > span {
    color: #5b7cff;
    font-size: 14px;
    font-weight: 600;
}

.noticias-publicas__pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.noticias-publicas__pagination-controls button {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d9dee7;
    border-radius: 50%;
    background: #fff;
    color: #7f8794;
    font-size: 19px;
    cursor: pointer;
}

.noticias-publicas__pagination-controls button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.noticias-publicas__pagination-controls span {
    min-width: 46px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}

/* Estados */
.noticias-publicas-estado {
    display: grid;
    min-height: 220px;
    place-items: center;
    padding: 28px;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    text-align: center;
}

.noticias-publicas-estado.interno {
    min-height: 330px;
}

.noticias-publicas-estado.erro {
    color: #b91c1c;
}

@media (max-width: 1050px) {
    .noticias-publicas__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .noticias-publicas__right {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .noticias-publicas {
        padding: 28px 0 46px;
    }

    .noticias-publicas-container {
        width: min(calc(100% - 70px), 320px);
    }

    .noticias-publicas__header {
        max-width: 292px;
        margin: 0 auto 20px;
        text-align: center;
    }

    .noticias-publicas__pill {
        display: none;
    }

    .noticias-publicas__title {
        margin-bottom: 9px;
        font-size: 21px;
        letter-spacing: -0.025em;
        line-height: 1.15;
    }

    .noticias-publicas__subtitle {
        margin: 0 auto;
        font-size: 11px;
        font-weight: 500;
        line-height: 1.4;
    }

    /*
     * O desktop é composto por duas colunas. No mobile,
     * display: contents permite ordenar cada bloco sem
     * duplicar marcação nem alterar a lógica do componente.
     */
    .noticias-publicas__grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .noticias-publicas__left,
    .noticias-publicas__right,
    .noticias-publicas__left-footer {
        display: contents;
    }

    .noticias-publicas__search {
        order: 1;
        min-height: 48px;
        margin: 0 0 16px;
        padding: 0 10px 0 16px;
        border-radius: 2px;
    }

    .noticias-publicas__search input {
        font-size: 11px;
    }

    .noticias-publicas__search .limpar {
        width: 26px;
        height: 26px;
        font-size: 15px;
    }

    .noticias-publicas__search .buscar {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        margin-left: 6px;
        border-radius: 2px;
        background: #d8e6ff;
        font-size: 14px;
    }

    .noticias-publicas__search .buscar img {
        width: 17px;
        height: 17px;
    }

    .noticias-destaque {
        order: 2;
        width: 100%;
        height: auto;
        min-height: 202px;
        aspect-ratio: 1.35 / 1;
        border-radius: 8px;
    }

    .noticias-destaque__content {
        padding: 0 18px 20px;
    }

    .noticias-destaque__content h3 {
        margin-bottom: 7px;
        font-size: 14px;
        line-height: 1.2;
    }

    .noticias-destaque__content p {
        font-size: 10px;
        line-height: 1.4;
        -webkit-line-clamp: 3;
    }

    .noticias-destaque__dots {
        order: 3;
        grid-column: auto;
        justify-self: center;
        gap: 10px;
        margin: 14px 0 30px;
    }

    .noticias-destaque__dots button {
        width: 22px;
        height: 4px;
        background: #999da4;
    }

    .noticias-destaque__dots button.active {
        background: #5b7cff;
    }

    .noticias-publicas__list {
        order: 4;
        gap: 12px;
    }

    .noticias-publicas__item {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 12px;
        min-height: 74px;
        padding: 10px 12px;
        border: 1px solid transparent;
        border-radius: 6px;
    }

    .noticias-publicas__item:first-child {
        border-color: #5b7cff;
    }

    .noticias-publicas__item-thumb {
        width: 58px;
        height: 54px;
        border-radius: 6px;
    }

    .noticias-publicas__item-body h4 {
        margin-bottom: 6px;
        font-size: 10px;
        line-height: 1.3;
        -webkit-line-clamp: 2;
    }

    .noticias-publicas__item-meta {
        gap: 7px;
    }

    .noticias-publicas__item-date {
        gap: 4px;
        font-size: 8px;
    }

    .noticias-publicas__item-date-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

    .noticias-publicas__item-tag {
        min-width: 50px;
        min-height: 18px;
        padding: 0 8px;
        font-size: 7px;
    }

    .noticias-publicas-estado.interno {
        order: 4;
        min-height: 246px;
        font-size: 12px;
    }

    .noticias-publicas__pagination {
        order: 5;
        min-height: 48px;
        align-items: center;
        flex-direction: row;
        gap: 8px;
        margin-top: 26px;
        padding: 0 12px;
        border-radius: 6px;
        background:
            linear-gradient(90deg, #c4c8cf 55%, transparent 0)
                top / 10px 1px repeat-x,
            linear-gradient(90deg, #c4c8cf 55%, transparent 0)
                bottom / 10px 1px repeat-x,
            linear-gradient(0deg, #c4c8cf 55%, transparent 0)
                left / 1px 10px repeat-y,
            linear-gradient(0deg, #c4c8cf 55%, transparent 0)
                right / 1px 10px repeat-y,
            #fff;
    }

    .noticias-publicas__pagination > span {
        font-size: 10px;
        white-space: nowrap;
    }

    .noticias-publicas__pagination-controls {
        gap: 7px;
    }

    .noticias-publicas__pagination-controls button {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .noticias-publicas__pagination-controls span {
        min-width: 34px;
        font-size: 10px;
    }

    .noticias-publicas__older {
        order: 6;
        grid-column: auto;
        justify-self: center;
        margin-top: 26px;
    }

    .noticias-publicas__older a {
        min-width: 134px;
        min-height: 38px;
        padding: 0 18px;
        border-radius: 2px;
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .noticias-publicas-container {
        width: min(calc(100% - 44px), 320px);
    }

    .noticias-publicas__pagination {
        padding-inline: 9px;
    }

    .noticias-publicas__pagination-controls {
        gap: 5px;
    }
}
