/* Estilos exclusivos para single.php */

.rel-single-more {
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 100%;
    letter-spacing: 0;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 0.0625rem;
    color: #1B7727 !important;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow: none;
    outline: none;
    cursor: pointer;
    display: inline;
    transition: all 0.15s;
}

.h2 {
    font-family: 'Kanit', sans-serif !important;
    font-weight: 500;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0;
    color: #465564;
}

/* Isolamento: garantir que .rel-single-more não herde regras do style.css do tema */
.post-page .rel-single-more,
.news-single-aside .rel-single-more {
    all: unset;
    /* Re-declara propriedades necessárias explicitamente (usar !important para garantir sobreposição) */
    font-family: 'Kanit', sans-serif !important;
    font-weight: 500 !important;
    font-style: normal !important;
    font-size: 1rem !important;
    line-height: 100% !important;
    letter-spacing: 0 !important;
    text-decoration: underline !important;
    text-decoration-style: solid !important;
    text-decoration-thickness: 0.0625rem !important;
    color: #1B7727 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer !important;
    display: inline-block !important;
    transition: all 0.15s !important;
}

/* Interaction states for .rel-single-more */
.rel-single-more:hover {
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 100%;
    letter-spacing: 0;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 0.0625rem;
    color: #239832 !important;
    /* cor solicitada */
}

.rel-single-more:focus,
.rel-single-more:focus-visible {
    display: inline-block;
    /* permite width/height */
    width: 4rem;
    height: 1.25rem;
    transform: rotate(0deg);
    opacity: 1;
    border-radius: 0.25rem;
    outline: 0.125rem solid #545FFF !important;
    outline-offset: 0.125rem 0.125rem !important;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 100%;
    letter-spacing: 0;
    text-decoration: underline !important;
    text-decoration-style: solid;
    text-decoration-thickness: 0.0625rem;
    color: #155C1E !important;
    /* cor solicitada para foco */
}

.rel-single-more:active {
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 100%;
    letter-spacing: 0;
    text-decoration: underline !important;
    text-decoration-style: solid !important;
    text-decoration-thickness: 0.0625rem;
    color: #155C1E !important;
    /* cor solicitada para clique */
}


/* ===== Container geral ===== */
.post-page {
    color: #1f2937;
}

/* ===== Elementos do cabeçalho ===== */
.news-cat-tag {
    display: inline-flex;
    align-items: center;
    background: #1B7727;
    color: #FEFEFE;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 0.875rem;
    line-height: 1;
    letter-spacing: 0;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-thickness: auto;
    border-radius: 0.5rem;
    text-decoration-color: #FEFEFE;
    vertical-align: middle;
    padding: 0.1875rem 0.5rem;
    min-width: 0;
    width: fit-content;
    height: auto;
    box-sizing: border-box;
}

@media (min-width: 62rem) {
    .col-lg-8 {
        flex: 0 0 auto;
        width: 74.666667%;
    }
}

@media (min-width: 62rem) {
    .col-lg-4 {
        flex: 0 0 auto;
        width: 24.333333%;
    }
}

.news-meta a {
    color: inherit;
    text-decoration: none;
}

.post-wrap {
    display: block;
}

/* ===== Cabeçalho ===== */
.news-path {
    font-size: .9rem;
    color: #64748b;
    margin: 0.625rem 0;
}

.news-path a {
    color: #0a7c44;
    text-decoration: none
}

.news-path .sep {
    margin: 0 .4rem
}

/* Breadcrumb separator for cegov theme */
.cegov-breadcrumb li:not(:first-child)::before {
    content: '>';
    margin: 0 0.75rem;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    color: #465564;
    font-size: 0.875rem;
    vertical-align: middle;
}

.news-title {
    margin: 0.375rem 0 0.75rem;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-style: normal;
    font-size: 2.5rem;
    /* leading-trim: NONE; not widely supported */
    line-height: 103%;
    letter-spacing: 0;
    color: #465564;
}

.news-meta {
    color: #64748b;
    font-size: .95rem;
    margin-bottom: 2.5rem;
}


/* Datetime (publicação) */
.news-meta time {
    font-family: 'Kanit', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 1rem;
    line-height: 132%;
    letter-spacing: 0;
    color: #465564;
}


/* ===== Hero ===== */
.news-hero {
    margin: 0.5rem 0 1.125rem;
    border-radius: 0.75rem;
    overflow: hidden;
    width: 46.1875rem;
    height: 20.01rem;
    gap: 0.625rem;
    transform: rotate(0deg);
    opacity: 1;
    max-width: 100%;
}

.news-hero-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Grid (conteúdo + aside) ===== */
/* .news-grid removed: now using Bootstrap grid */
@media (max-width: 64rem) {
    .news-card {
        padding: 0.75rem 0.5rem;
        border-radius: 0.625rem;
    }
}

@media (max-width: 43.75rem) {
    .news-card {
        padding: 0.5rem 0.25rem;
        border-radius: 0.5rem;
    }
}

header.news-head {
    padding-bottom: 0.1875rem;
    padding-top: 0.3125rem;
}

/* Força aside com largura fixa quando necessário */
.news-single-aside {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ===== Card do conteúdo ===== */
.news-card {
    background: #fff;
    border: 0.0625rem solid #e5e9ee;
    border-radius: 0.5rem;
    padding: 1rem 0.5rem;
    min-width: 0; /* Garante que o card possa encolher se necessário */
}

@media (min-width: 418.75rem) {
    .news-card {
        border-radius: 0.625rem;
        padding: 1.5rem 1rem;
    }
}

@media (min-width: 64rem) {
    .news-card {
        border-radius: 0.75rem;
        padding: 1.25rem 1.25rem;
    }
}

.news-content {
    overflow-wrap: break-word; /* Quebra palavras longas */
    word-wrap: break-word;
    word-break: break-word;
    min-width: 0;
}

.news-content :where(p, ul, ol, blockquote, h2, h3, h4, h5, h6, figure) {
    margin: 0 0 0.875rem;
    color: #465564;
    font-family: 'Kanit', sans-serif;
}

.news-content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 0.75rem auto
}

.news-content a {
    color: #0a7c44;
    text-decoration: underline;
    text-underline-offset: 0.125rem
}

/* ===== Créditos + Share (mesma linha) ===== */
.news-credits-inline {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0 2rem;
    border-radius: 0.75rem;
}

.news-credits-inline>* {
    flex: 1 1 0;
    min-width: 0;
}

.news-credits-inline > :first-child {
    flex: 3 1 0;
}

@media (max-width: 25rem) {
    .news-credits-inline {
        gap: 0.5rem;
    }
}

.credits {
    display: flex;
    flex-direction: column;
    font-size: .95rem;
    color: #374151
}

.credit-label {
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 100%;
    letter-spacing: 0;
    color: #465564;
}

.credit-value {
    font-family: 'Kanit', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 1rem;
    line-height: 132%;
    letter-spacing: 0;
    color: #465564;
}

/* Share icons */
.share {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: end;
}

.share-label {
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 100%;
    letter-spacing: 0;
    color: #465564;
}

.share a {
    color: #0a7c44;
    text-decoration: none;
    font-size: 1.5rem;
    /* Tamanho dos ícones */
}

.news-tags-inline span {
    margin-right: 0.375rem;
    display: inline-block;
}

.news-tags-inline span:last-child {
    margin-right: 0;
}

.share a:hover {
    color: #1f2937;
}

@media (max-width: 47.98rem) {
    .news-credits-inline {
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 1rem;
        margin-top: 1.5rem !important;
        margin: 0rem;
    }

    .share {
        order: 1;
        flex: 0 0 auto;
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
    }

    .credits {
        order: 2;
        flex: 0 0 auto;
        width: 100%;
        margin-bottom: 2rem !important;
    }
}


/* ===== Aside (destaques) ===== */
.news-single-aside-card {
    border-radius: 1rem;
    padding: 0.5rem;
}

.aside-single-title {
    margin: 0.125rem 0 0.625rem;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 100%;
    letter-spacing: 0;
    color: #465564;
}

/* Força o estilo dos parágrafos nesta página */
.news-content p {
    font-family: 'Kanit', sans-serif !important;
    font-weight: 300 !important;
    font-style: normal !important;
    font-size: 1rem !important;
    line-height: 175% !important;
    letter-spacing: 0 !important;
    color: #465564 !important;
}

.rel-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem
}

.rel-single-item {
    margin: 0
}

.rel-single-link {
    display: grid;
    grid-template-columns: 7.25rem 1fr;
    gap: 0.75rem;
    align-items: start;
    text-decoration: none;
    color: #1f2937
}

.rel-single-media {
    width: 7.25rem
}

.rel-thumb {
    display: block;
    width: 14.75rem;
    height: 7.4525rem;
    object-fit: cover;
    border-radius: 0.5rem;
    transform: rotate(0deg);
    opacity: 1;
}

.rel-thumb--placeholder {
    width: 7.25rem;
    height: 4.875rem;
    border-radius: 0.5rem;
    background: #eef2f6
}

.rel-single-texts {
    display: flex;
    flex-direction: column;
    gap: 0.25rem
}

.rel-single-date {
    width: 14.75rem;
    height: 0.875rem;
    gap: 0.5rem;
    font-family: 'Kanit', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 0.875rem;
    line-height: 100%;
    letter-spacing: 0;
    color: #757575;
    transform: rotate(0deg);
    opacity: 1;
    margin-top: 0.5rem;
}

.rel-single-title {
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.2;
    letter-spacing: 0;
    color: #26323F;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    max-height: calc(1.2em * 3);
    margin: 1rem 0;
}

@media (min-width: 62rem) {

    /* Ajuste de layout desktop: imagem à esquerda (14.75rem) e conteúdo à direita (1fr) */
    .rel-single-link {
        display: grid;
        /* garante que seja um grid container no desktop */
        grid-template-columns: 14.75rem 1fr;
        align-items: start;
    }
}

/* .rel-single-more moved to top of this file (stateful styles: hover/focus/active) */

/* ===== Parágrafos e strong (página single) ===== */
.post-page p {
    font-family: 'Kanit', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 1rem;
    line-height: 175%;
    letter-spacing: 0;
    color: #465564;
}

.post-page strong {
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 100%;
    letter-spacing: 0;
    color: #465564;
}

/* ===== AJUSTE P/ SOBREPOR TEMA ===== */
.news-single-aside .rel-single-link {
    display: flex !important;
    /* Força o layout flex */
    flex-direction: column !important;
    /* Empilha os itens verticalmente */
    gap: 0.5rem !important;
    /* Espaço entre imagem e texto */
    background: none !important;
    /* Remove qualquer fundo no hover */
}

.news-single-aside .rel-single-link .rel-single-media,
.news-single-aside .rel-single-link .rel-thumb {
    width: 14.75rem !important;
    height: 7.4525rem !important;
    border-radius: 0.5rem !important;
    transform: rotate(0deg) !important;
    opacity: 1 !important;
}

.news-single-aside .rel-single-link .rel-single-texts {
    transform: none !important;
    /* Remove qualquer transformação (título de lado) */
    opacity: 1 !important;
    /* Garante que o texto esteja sempre visível */
    position: static !important;
    /* Reseta posicionamento */
    background: none !important;
}

/* Adicionado para garantir que o título seja visível */
.news-single-aside .rel-single-link .rel-single-title {
    opacity: 1 !important;
    transform: none !important;
    position: static !important;
    display: block !important;
    color: #1f2937 !important;
    text-indent: 0 !important;
    -webkit-writing-mode: initial !important;
    writing-mode: initial !important;
    margin: 1rem 0 1rem 0;
}

.news-single-aside .rel-single-link:hover {
    background: none !important;
    /* Garante que não haja mudança de fundo no hover */
}

/* Zerando padding de links de destaques apenas nesta página */
.post-page a.rel-single-link {
    padding: 0 !important;
}

@media (max-width: 43.75rem) {

    .news-hero,
    .news-hero-img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        border-radius: 0.5rem;
        display: block;
    }
}

@media (max-width: 43.75rem) {
    .rel-thumb {
        display: block;
        width: 24.875rem;
        max-width: 100%;
        height: 12.5625rem;
        object-fit: cover;
        border-radius: 0.5rem;
        transform: rotate(0deg);
        opacity: 1;
    }
}

@media (max-width: 56.25rem) {

    /* Forçar largura do título relacionado para corresponder à miniatura em mobile */
    .rel-single-title {
        width: 24.875rem;
        max-width: 100%;
        display: block;
        box-sizing: border-box;
    }
}

/* Remove o contorno de foco azul padrão do navegador */
a:focus,
a:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Alinhamento justificado para blocos */
.is-style-justified {
    text-align: justify !important;
}

/* ====== Alto Contraste (Acessibilidade) ====== */

body.body-contraste .post-page {
    background-color: #000 !important;
    color: #fff !important;
}

body.body-contraste .news-card {
    background-color: #000 !important;
    border-color: #fff !important;
    color: #fff !important;
}

body.body-contraste .news-title,
body.body-contraste .news-meta time,
body.body-contraste .news-meta span,
body.body-contraste .credit-label,
body.body-contraste .credit-value,
body.body-contraste .share-label,
body.body-contraste .news-content,
body.body-contraste .news-content p,
body.body-contraste .news-content h2,
body.body-contraste .news-content h3,
body.body-contraste .news-content h4,
body.body-contraste .news-content strong,
body.body-contraste .news-content li,
body.body-contraste .aside-single-title,
body.body-contraste .rel-single-date,
body.body-contraste .rel-single-title {
    color: #fff !important;
}

body.body-contraste .news-content a,
body.body-contraste .rel-single-more,
body.body-contraste .rel-single-more:hover,
body.body-contraste .news-tags-inline span {
    color: #fff !important;
    text-decoration: underline !important;
}

body.body-contraste .share a {
    color: #fff !important;
}

body.body-contraste .cegov-breadcrumb li::before,
body.body-contraste .cegov-breadcrumb li a {
    color: #fff !important;
}

body.body-contraste .news-cat-tag {
    background-color: #000 !important;
    border: 1px solid #fff !important;
    color: #fff !important;
}

body.body-contraste .news-hero,
body.body-contraste .rel-thumb {
    border: 1px solid #fff !important;
}