.fasul-news-document .header-content { position: relative; top: auto; }
body.fasul-news-document { height: auto; display: block; min-height: 100vh; }
.fasul-news-document main { height: auto; min-height: 0; }
/* Wrapper principal da página de notícias para evitar sobreposição com o footer */
.noticias-main {
    height: auto;
    min-height: 0;
    display: flow-root;
    padding-bottom: 3rem; /* Espaço extra antes do footer */
    position: relative;
    z-index: 10; /* garante que o conteúdo fique acima de qualquer overlay */
    background: #ffffff;
    margin-bottom: 4rem;
    overflow: clip; /* evita scroll interno duplicado */
    isolation: isolate; /* separa contexto de empilhamento */
}

/* Compensação do header na página de artigo */
.noticias-article { padding-top: 120px; }
/* Mobile: remover espaço extra no topo */
@media (max-width: 991px) {
    .noticias-article { padding-top: 0; }
}

/* Garante margem inferior suficiente nas seções de conteúdo das notícias */
.noticias-main > section.container {
    margin-bottom: 4rem !important;
}

/* Footer custom das notícias */
.noticias-footer {
    position: relative;
    clear: both;
    margin-top: 6rem;
    z-index: 0;
}
.noticias-footer .nt-white-background { background-color: #fff; padding: 12px 0; }
.noticias-footer .nt-blue-background { background-color: #051830; color: #fff; padding: 8px 0; }

/* Hardening contra regras globais (position fixed/absolute genéricas) */
.noticias-footer,
.noticias-footer .nt-white-background,
.noticias-footer .nt-blue-background {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
}

/* Espaço dedicado antes do footer nas páginas de notícias */
.footer-spacer {
    height: 120px;
}

.noticias-footer-spacer { height: 0; }

/* Ajuste extra de respiro para conteúdos longos */
@media (max-width: 991px) {
    .noticias-main { padding-bottom: 4rem; }
}
@media (min-width: 992px) {
    .noticias-main { padding-bottom: 5rem; }
}

/* Banner */
.banner-principal {
  background-image: url('../image/noticias.png');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  width: 100%;
  min-height: 450px;
}
@media (max-width: 575.98px) {
    .header-content{
        padding: 10px 0;
    }
  .banner-principal {
    background-image: url('../image/noticias-mb.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    min-height: 140px;
  }
}

/* Seção de Pesquisa e Artigos */
.section-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

/* Breadcrumb de notícias */
.breadcrumb-noticias { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; font-weight: 700; color: #1b1b1b; }
.breadcrumb-noticias a { color: #1b1b1b; text-decoration: none; }
.breadcrumb-noticias a:hover { text-decoration: underline; }
.breadcrumb-noticias .bc-current { font-weight: 700; color: #333; }
.breadcrumb-noticias .bc-sep { display: inline-flex; align-items: center; justify-content: center; }
.breadcrumb-noticias .bc-sep svg { width: 14px; height: 14px; fill: #666; }
@media (max-width: 575.98px) { .breadcrumb-noticias { gap: 4px; font-weight: 600; } }

/* Componente de Busca */
.search-component { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.search-component { flex-wrap: nowrap; }
.search-component .search-dropdown { width: 240px; }
.search-component .flex-grow-1 { flex: 1; }

.search-component .dropdown-toggle { border-right: 0; border-radius: 10px; }
.btn-buscar-categoria { height: 56px !important; padding: 0 16px !important; display: inline-flex; align-items: center; justify-content: center; }
.search-dropdown .dropdown-toggle.dropdown-toggle-split::after { border-top: .3em solid #04162C; border-right: .3em solid transparent; border-left: .3em solid transparent; }

/* Botão de busca à esquerda do input */
.search-input-group .btn-buscar-trigger { background: #fff !important; border: 1px solid #ced4da !important; border-radius: 10px 0 0 10px !important; width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; }

.btn-buscar-categoria {
    background-color: #FFD700;
    color: #04162C;
    font-weight: 700;
    border: none;
    height: 100%;
    border-radius: 10px 0 0 10px;
    text-transform: uppercase;
}
/* Hover/active do botão amarelo: permanece amarelo (sem branco) */
.btn-buscar-categoria:hover,
.btn-buscar-categoria:focus,
.btn-buscar-categoria:active,
.btn-check:checked + .btn-buscar-categoria,
.show > .btn-buscar-categoria.dropdown-toggle {
    background-color: #F2C500 !important; /* amarelo ligeiramente mais escuro */
    color: #04162C !important;
    border-color: #F2C500 !important;
}

.search-input-group .input-group-text { background: #fff !important; border: 1px solid #ced4da !important; border-radius: 10px 0 0 10px !important; }
.search-input-group .input-group-text { display: flex; align-items: center; justify-content: center; line-height: 1; }
.search-component .form-control { border: 1px solid #ced4da !important; border-radius: 0 10px 10px 0 !important; height: 56px !important; }
.search-component .input-busca { background: #fff !important; text-transform: uppercase; }
.search-component .input-busca::placeholder { text-transform: uppercase; letter-spacing: .04em; color: #7c7c7c; }

/* removido botão extra à direita do input */

/* Grupo do input com botão (overlay) */
.search-input-group { position: relative; width: 100%; }
.search-input-group .btn-buscar-submit {
    border: 1px solid #ced4da !important;
    background: #fff !important;
    display: inline-flex !important;
    align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 0 10px 10px 0 !important;
    cursor: pointer;
}

/* Desktop: duas colunas (botão + input) com ícone embutido no input */
@media (min-width: 576px) {
    .search-component { flex-direction: row !important; }
    /* Mostrar botão de buscar também no desktop */
    .search-input-group .btn-buscar-submit { display: inline-flex !important; }
    .btn-buscar-categoria.dropdown-toggle::after { border-top: .3em solid #04162C !important; border-right: .3em solid transparent; border-left: .3em solid transparent; }
    /* Dropdown com largura do botão e estilo mais visível */
    .search-dropdown .dropdown-menu { width: 100% !important; min-width: 240px; border: 1px solid #ced4da; border-radius: 10px; padding: 6px 0; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
    .search-dropdown .dropdown-item { font-weight: 700; color: #04162C; padding: 10px 16px; }
    .search-dropdown .dropdown-item:hover { background: #f8f9fa; }
}

/* Usabilidade no celular: empilhado, alvos grandes e margem lateral */
@media (max-width: 575.98px) {
    .search-component { flex-direction: column !important; align-items: stretch !important; padding: 12px !important; margin: 0 10px 24px !important; border: 1px solid #ced4da !important; border-radius: 12px !important; background: #fff !important; }
    .search-dropdown { width: 100% !important; }
    .search-component .dropdown-toggle { border-right: 0 !important; border-radius: 10px !important; width: 100% !important; height: 52px !important; }
    .btn-buscar-categoria { border-radius: 10px !important; width: 100% !important; height: 52px !important; }
    .search-input-group { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; width: 100% !important; }
    .search-input-group .btn-buscar-trigger { height: 52px !important; border-radius: 10px 0 0 10px !important; flex: 0 0 52px !important; }
    .search-component .form-control { width: auto !important; min-width: 0 !important; height: 52px !important; border-radius: 0 10px 10px 0 !important; flex: 1 1 0 !important; }

/* Resultados de busca (mock) */
/* Estilo similar ao buscador da home */
.autoBusca2 {
    max-width: 1315px;
    width: 100%;
    display: block;
    position: relative;
    background: #10409e;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 3px;
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 999;
}
.autoBusca2 p { cursor: pointer; padding: 10px 20px; margin: 0; border-bottom: dashed 1px #0b2f75; font-size: 15px; font-weight: 500; }
.autoBusca2 p:last-child { border-bottom: none; }
.autoBusca2 p:hover { background: rgba(255,255,255,0.08); }
    .search-component .dropdown-menu { width: 100% !important; max-height: 240px; overflow-y: auto; }
}

/* Forçar layout ideal dentro das páginas de notícias (maior especificidade) */
@media (min-width: 576px) {
  .noticias-main .search-component { border: 0 !important; background: transparent !important; box-shadow: none !important; height: 56px !important; }
}

/* Artigos por Categoria */
.category-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #002347; /* Cor azul escuro do print */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

.category-title-container h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: bold;
}
/* Seta ao lado do título da categoria */
.category-title-container .cat-arrow { display: inline-flex; align-items: center; justify-content: center; margin-left: 8px; }
.category-title-container .cat-arrow svg { width: 16px; height: 16px; }

/* Cards de Artigo */
.article-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.article-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.article-card img {
    width: 100%;
    height: auto;
}

.article-card .card-body {
    padding: 15px;
}

.article-card .card-tag {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 5px;
}

.article-card .card-date {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 10px;
    float: none !important; /* evita impacto no fluxo do card */
}

.article-card .card-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
    min-height: 60px; /* Para alinhar os botões */
}

/* Cabeçalho do card (tag + data) com layout estável */
.article-card .card-body .mb-2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Garante que grids de posts limpem qualquer float residual */
.posts-grid::after {
    content: '';
    display: block;
    clear: both;
}
.posts-grid { position: relative; z-index: 10; }

/* Slider de artigos (desktop e mobile) */
.article-slider { margin-bottom: 0px; }
.article-slider .slider-viewport { overflow: hidden; position: relative; padding-right: 56px; }
.article-slider .slider-track { display: flex; flex-wrap: nowrap; gap: 16px; transition: transform 0.4s ease; will-change: transform; }
@media (min-width: 992px) { .article-slider .slider-track > .col-md-3 { flex: 0 0 calc(25% - 12px); } }
@media (min-width: 576px) and (max-width: 991px) { .article-slider .slider-track > .col-md-3 { flex: 0 0 calc(50% - 12px); } }
@media (max-width: 575.98px) { .article-slider .slider-track > .col-md-3 { flex: 0 0 100%; } }
.article-slider .slider-dots { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 10px; }
.article-slider .slider-dot { width: 24px; height: 6px; background: #ddd; border-radius: 4px; cursor: pointer; }
.article-slider .slider-dot.active { background: #999; }
.category-title-container .next-slide { cursor: pointer; }

/* Botão circular de avanço sobre o último card (desktop) */
.article-slider .slider-next-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid #ced4da; background: #fff; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.1); cursor: pointer; z-index: 50; }
.article-slider .slider-next-btn svg { width: 20px; height: 20px; }
@media (min-width: 992px) { .article-slider .slider-next-btn { display: flex; } }
@media (max-width: 575.98px) {
  .article-slider .slider-next-btn { display: flex; }
  .article-slider .slider-prev-btn { display: none; }
  .article-slider .slider-dots { display: none; }
  .article-slider .slider-viewport { padding-right: 6px; }
  .nt-white-background { margin: 20px; }
}

/* Botão circular de retorno (prev) */
.article-slider .slider-prev-btn { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 1px solid #ced4da; background: #fff; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.1); cursor: pointer; z-index: 50; }
.article-slider .slider-prev-btn svg { width: 20px; height: 20px; transform: rotate(180deg); }

/* Mobile: transformar grid em carrossel horizontal tocável */
@media (max-width: 575.98px) {
    .posts-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding: 6px 10px 10px;
        margin: 0;
        scroll-snap-type: x mandatory;
    }
    .posts-grid > .col-md-3 {
        flex: 0 0 80% !important;
        max-width: 80% !important;
        scroll-snap-align: start;
    }
    .posts-grid::-webkit-scrollbar { height: 6px; }
    .posts-grid::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 3px; }
    /* Categoria: exibir grid "normal" com paginação (sem carrossel) */
    .categoria-grid { display: grid !important; grid-template-columns: 1fr !important; gap: 16px !important; overflow-x: visible !important; scroll-snap-type: none !important; padding: 0 !important; }
}

.article-card .btn-leia-mais {
    background-color: #8A2BE2; /* Roxo do print */
    color: white;
    font-weight: bold;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
}

.btn-ver-todos {
    background-color: #FFD700; /* Amarelo do print */
    color: #333;
    font-weight: bold;
    padding: 10px 30px;
    border: none;
    border-radius: 5px;
    display: block;
    margin: 20px auto 10px; /* respiro extra para não tocar o footer */
}

/* Paginação custom da categoria */
.nt-pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 20px 0 40px; }
.nt-pagination .nt-page-btn { background: #fff; color: #04162C; border: 1px solid #ced4da; border-radius: 8px; padding: 8px 12px; font-weight: 700; cursor: pointer; }
.nt-pagination .nt-page-btn:hover { background: #f8f9fa; }
.nt-pagination .nt-page-btn[disabled] { opacity: .5; cursor: not-allowed; }
.nt-pagination .nt-page-list { display: flex; gap: 8px; }
.nt-pagination .nt-page-num { background: #fff; color: #04162C; border: 1px solid #ced4da; border-radius: 8px; padding: 8px 12px; font-weight: 700; cursor: pointer; }
.nt-pagination .nt-page-num.active { background: #FFD700; color: #04162C; border-color: #FFD700; }

/* Grid da categoria: responsivo com até 5 colunas (desktop) */
.categoria-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.categoria-grid > .col-md-3 { width: auto !important; max-width: 100% !important; }
@media (max-width: 1399.98px) { .categoria-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 991.98px) { .categoria-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767.98px) { .categoria-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575.98px) { .categoria-grid { grid-template-columns: repeat(2, 1fr); } }
/* Hover/active do botão amarelo de "Ver todos": manter amarelo (não ficar branco) */
.btn-ver-todos:hover,
.btn-ver-todos:focus,
.btn-ver-todos:active,
.btn-check:checked + .btn-ver-todos,
.show > .btn-ver-todos.dropdown-toggle {
    background-color: #F2C500 !important; /* amarelo ligeiramente mais escuro */
    color: #333 !important;
    border-color: #F2C500 !important;
    text-decoration: none;
}


.noticias-main .search-component select { flex: 0 0 32%; text-align: left; }
.noticias-main .article-card .card-date { white-space: nowrap; }
.noticias-main .cat-arrow { color: white; font-size: 28px; line-height: 1; }
.noticias-main .slider-prev-btn, .noticias-main .slider-next-btn { font-size: 28px; justify-content: center; }
@media(max-width:575.98px){.noticias-main .search-component select { flex-basis: auto; width:100%; }}

/* Tabelas editoriais nao herdam o limite global de 71px por celula. */
.fasul-news--article h1 { font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.25; }
.fasul-news__content { min-width: 0; overflow-wrap: break-word; }
.fasul-news__table-scroll { width: 100%; max-width: 100%; overflow-x: auto; margin: 1.5rem 0; overscroll-behavior-x: contain; }
.fasul-news__table-scroll:focus-visible { outline: 2px solid #1955b7; outline-offset: 3px; }
.fasul-news__content table { width: 100%; min-width: 34rem; max-width: none; table-layout: auto; border-collapse: collapse; color: #26364a; font-size: .9375rem; line-height: 1.55; }
.fasul-news__content table td, .fasul-news__content table th { width: auto; min-width: 0; max-width: none; padding: .75rem .875rem; border: 1px solid #cbd5e1; text-align: left; vertical-align: top; font-size: inherit; line-height: inherit; color: inherit; overflow-wrap: break-word; }
.fasul-news__content table thead { background: #f1f5f9; }
.fasul-news__content table thead td, .fasul-news__content table th { font-weight: 700; }
.fasul-news__content table tbody tr:nth-child(even) { background: #f8fafc; }
.fasul-news__content table p { margin: 0 0 .5rem; }
.fasul-news__content table p:last-child { margin-bottom: 0; }
.fasul-news__content table span, .fasul-news__content table strong, .fasul-news__content table b { color: inherit; font-size: inherit; line-height: inherit; }
@media (max-width: 575.98px) { .fasul-news__content table { font-size: .875rem; } .fasul-news__content table td, .fasul-news__content table th { padding: .625rem .75rem; } }
