/* =========================================================
   NOTÍCIA INDIVIDUAL — cabeçalho editorial, capa, leitura, partilha
   ========================================================= */
.ns { padding-bottom: clamp(48px, 6vw, 80px); }
.ns-narrow { max-width: 860px; margin: 0 auto; padding: 0 var(--gutter, 20px); }

/* Cabeçalho do artigo (substitui a faixa verde com o caminho) */
.ns-head { padding: clamp(36px, 5vw, 64px) 0 clamp(26px, 3vw, 36px); background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }
.ns-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.ns-back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted) !important; }
.ns-back:hover { color: var(--accent) !important; }
.ns-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent) !important; font-family: var(--font-head); font-size: 12px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; transition: background .2s, color .2s; }
.ns-chip:hover { background: var(--accent); color: #fff !important; }
html[data-theme="dark"] .ns-chip { color: color-mix(in srgb, var(--accent) 40%, #a6e6c0) !important; }
html[data-theme="dark"] .ns-chip:hover { color: #fff !important; }
.ns-title { font-size: clamp(26px, 3.6vw, 42px); line-height: 1.2; letter-spacing: -.012em; text-transform: none; margin: 0 0 16px; color: var(--heading); overflow-wrap: anywhere; }
.ns-lead { font-size: 18px; line-height: 1.75; color: var(--text); margin: 0 0 18px; }
.ns-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; color: var(--muted); }
.ns-meta span { display: inline-flex; align-items: center; gap: 7px; }
.ns-meta svg { color: var(--accent-2); }

/* Capa */
.ns-cover { max-width: 1100px; margin: 0 auto; padding: 0 var(--gutter, 20px); }
.ns-cover img { width: 100%; max-height: 620px; object-fit: cover; border-radius: 18px; box-shadow: 0 26px 60px rgba(10, 30, 18, .16); background: var(--bg-alt); }

/* Corpo com barra de partilha ao lado */
.ns-layout { position: relative; max-width: 940px; margin: clamp(34px, 4vw, 54px) auto 0; padding: 0 var(--gutter, 20px); display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 34px; }
.ns-layout.no-cover { margin-top: 18px; }
.ns-rail { position: sticky; top: 96px; align-self: start; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ns-rail-label { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--font-head); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ns-rail-btn, .ns-share-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--input-border, var(--border)); background: var(--surface); color: var(--text) !important; cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .2s; padding: 0; }
.ns-rail-btn:hover, .ns-share-btn:hover { transform: translateY(-2px); color: #fff !important; background: var(--accent); border-color: var(--accent); }
.ns-whatsapp:hover { background: #25d366 !important; border-color: #25d366 !important; }
.ns-facebook:hover { background: #1877f2 !important; border-color: #1877f2 !important; }
.ns-linkedin:hover { background: #0a66c2 !important; border-color: #0a66c2 !important; }
.ns-twitter:hover { background: #111 !important; border-color: #111 !important; }

/* Tipografia de leitura */
.ns-body { min-width: 0; max-width: 760px; }
.ns-prose { font-size: 17px; line-height: 1.9; color: var(--text); }
.ns-prose > p:first-child { font-size: 18.5px; line-height: 1.8; color: var(--heading); }
.ns-prose p { margin: 0 0 1.25em; }
.ns-prose h2, .ns-prose h3, .ns-prose h4 { color: var(--heading); text-transform: none; letter-spacing: -.005em; line-height: 1.35; }
.ns-prose h2 { font-size: 24px; margin: 1.8em 0 .6em; }
.ns-prose h3 { font-size: 20px; margin: 1.6em 0 .5em; }
.ns-prose h4 { font-size: 17px; margin: 1.4em 0 .4em; }
.ns-prose strong { color: var(--heading); }
.ns-prose a { color: var(--accent); }
html[data-theme="dark"] .ns-prose a { color: color-mix(in srgb, var(--accent) 40%, #a6e6c0); }
.ns-prose img { border-radius: 12px; max-width: 100%; height: auto; }
.ns-prose figure { margin: 2em 0; }
.ns-prose figcaption { font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 10px; font-style: italic; }
.ns-prose blockquote { position: relative; margin: 2em 0; padding: 22px 26px 22px 30px; border: 0; border-left: 4px solid var(--accent-2); border-radius: 0 14px 14px 0; background: var(--bg-alt); font-size: 18px; font-style: normal; line-height: 1.7; color: var(--heading); }
.ns-prose ul, .ns-prose ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.ns-prose li { margin-bottom: .5em; padding-left: .2em; }
.ns-prose ul li::marker { color: var(--accent-2); }
.ns-prose hr { border: 0; height: 1px; background: var(--border); margin: 2.2em 0; }
.ns-prose div:empty { display: none; }

/* Rodapé do artigo */
.ns-foot { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 18px 30px; flex-wrap: wrap; }
.ns-tags { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ns-tags > span, .ns-share strong { font-family: var(--font-head); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--heading); }
.ns-share { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ns-share-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Anterior / seguinte */
.ns-pager { margin-top: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ns-pager-link { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--heading) !important; min-width: 0; transition: border-color .2s, box-shadow .2s, transform .2s; }
.ns-pager-link:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.ns-pager-link.next { flex-direction: row-reverse; text-align: right; }
.ns-pager-link img { width: 72px; height: 72px; flex-shrink: 0; border-radius: 10px; object-fit: cover; }
.ns-pager-link > span { min-width: 0; }
.ns-pager-link small { display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ns-pager-link.next small { justify-content: flex-end; }
.ns-pager-link strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; font-family: var(--font-head); font-size: 14.5px; line-height: 1.4; }
.ns-pager-link:hover strong { color: var(--accent); }

/* Apelo ao apoio */
.ns-cta { margin-top: 34px; display: flex; align-items: center; gap: 18px 22px; padding: 24px 26px; border-radius: 16px; background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border)); }
.ns-cta-ico { width: 52px; height: 52px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; background: var(--accent-2); color: #fff; }
.ns-cta > div { flex: 1; min-width: 0; }
.ns-cta strong { display: block; font-family: var(--font-head); font-size: 17px; color: var(--heading); margin-bottom: 3px; }
.ns-cta p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.ns-cta .btn { flex-shrink: 0; }

/* Relacionadas */
.ns-related-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 30px; flex-wrap: wrap; margin-bottom: 34px; }
.ns-related-head h2 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); text-transform: none; }
.ns-related-head .eyebrow { margin-bottom: 8px; }

/* Responsivo */
@media (max-width: 900px) {
    .ns-layout { grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 800px; }
    .ns-rail { display: none; }
    .ns-body { max-width: none; }
}
@media (max-width: 640px) {
    .ns-head { padding-top: 26px; }
    .ns-title { font-size: 25px; }
    .ns-lead { font-size: 16.5px; }
    .ns-cover { padding: 0; }
    .ns-cover img { border-radius: 0; max-height: 340px; box-shadow: none; }
    .ns-prose { font-size: 16px; }
    .ns-prose > p:first-child { font-size: 17px; }
    .ns-pager { grid-template-columns: 1fr; }
    .ns-pager-link.next { flex-direction: row; text-align: left; }
    .ns-pager-link.next small { justify-content: flex-start; }
    .ns-pager-link img { width: 60px; height: 60px; }
    .ns-cta { flex-direction: column; align-items: flex-start; padding: 22px 20px; }
    .ns-cta .btn { width: 100%; justify-content: center; }
    .ns-foot { flex-direction: column; align-items: flex-start; }
}

/* Barra de progresso de leitura */
.ns-progress { position: fixed; left: 0; right: 0; top: 0; z-index: 1200; height: 3px; pointer-events: none; }
.ns-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: left; }
.ns-meta-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted) !important; }
.ns-meta-link:hover { color: var(--accent) !important; }

/* Índice do artigo (só com 3 ou mais títulos) */
.ns-toc { margin: 0 0 30px; padding: 20px 22px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 0 14px 14px 0; background: var(--surface); }
.ns-toc strong { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--heading); margin-bottom: 10px; }
.ns-toc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.ns-toc li { font-size: 15px; line-height: 1.5; }
.ns-toc li::marker { color: var(--accent-2); font-weight: 700; }
.ns-toc li.lv-h3 { margin-left: 14px; font-size: 14px; }
.ns-toc a { color: var(--text) !important; }
.ns-toc a:hover { color: var(--accent) !important; }
.ns-prose h2[id], .ns-prose h3[id], #comentarios { scroll-margin-top: 110px; }

/* Caixa do autor */
.ns-author { margin-top: 30px; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 14px; background: var(--bg-alt); }
.ns-author-av { width: 54px; height: 54px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--font-head); font-size: 22px; font-weight: 800; }
.ns-author small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ns-author strong { display: block; font-family: var(--font-head); font-size: 16px; color: var(--heading); }
.ns-author p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }

/* Zona dos comentários (o conteúdo vem de partials/comments.php) */
.ns-comments { padding: 0 0 clamp(48px, 6vw, 72px); }
.ns-comments-inner { max-width: 940px; margin: 0 auto; padding: 0 var(--gutter, 20px) 0 calc(var(--gutter, 20px) + 98px); }
.ns-comments-inner:empty { display: none; }
@media (max-width: 900px) { .ns-comments-inner { max-width: 800px; padding-left: var(--gutter, 20px); } }
@media (prefers-reduced-motion: reduce) { .ns-progress { display: none; } }

/* =========================================================
   IMAGENS GRANDES, GALERIAS NO TEXTO E VISUALIZADOR
   O corpo é largo (~1000px); o texto fica a ~720px centrado e as imagens ocupam a largura toda.
   ========================================================= */
.ns-layout { max-width: 1160px; }
.ns-body { max-width: none; }
.ns-body > *, .ns-prose > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.ns-prose > .ns-fig, .ns-prose > .ns-gallery { max-width: none; }
.ns-comments-inner { max-width: 1160px; }
.ns-comments-inner > * { max-width: 720px; margin-left: auto; margin-right: auto; }

/* Imagem única: grande, centrada, sem cortar (fotos ao alto ficam num fundo neutro) */
.ns-fig { margin: 2.2em auto; }
.ns-fig-link { display: grid; place-items: center; border-radius: 16px; overflow: hidden; background: var(--bg-alt); cursor: zoom-in; }
.ns-fig-link img { display: block; width: 100%; height: auto; max-height: 760px; object-fit: contain; margin: 0 !important; border-radius: 0 !important; transition: transform .6s var(--ease, ease); }
.ns-fig-link:hover img { transform: scale(1.015); }
.ns-fig figcaption { max-width: 720px; margin: 12px auto 0; font-size: 14px; font-style: normal; color: var(--muted); text-align: center; }

/* Galerias dentro do texto: mosaico de 2 colunas com mosaicos grandes */
.ns-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 300px; gap: 10px; margin: 2.2em auto; }
.ns-gallery.count-2 { grid-auto-rows: 380px; }
.ns-gallery.count-3 { grid-auto-rows: 250px; }
.ns-gallery.count-3 .ns-g-item:first-child { grid-row: span 2; }
.ns-gallery.count-4 { grid-auto-rows: 300px; }
.ns-gallery.count-5 { grid-auto-rows: 260px; }
.ns-gallery.count-5 .ns-g-item:first-child { grid-column: span 2; grid-row: span 2; }
.ns-g-item { position: relative; display: block; overflow: hidden; border-radius: 14px; background: var(--bg-alt); cursor: zoom-in; }
.ns-g-item img { width: 100%; height: 100%; object-fit: cover; margin: 0 !important; border-radius: 0 !important; transition: transform .6s var(--ease, ease), filter .3s; }
.ns-g-item:hover img { transform: scale(1.05); filter: brightness(.92); }
.ns-g-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 20, 13, .58); color: #fff; font-family: var(--font-head); font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.01em; }
.ns-inline-img { cursor: zoom-in; border-radius: 12px; }

/* Visualizador */
html.ns-lb-open { overflow: hidden; }
.ns-lb { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; opacity: 0; transition: opacity .18s ease; }
.ns-lb[hidden] { display: none; }
.ns-lb.is-open { opacity: 1; }
.ns-lb-backdrop { position: absolute; inset: 0; background: rgba(6, 10, 8, .94); }
.ns-lb-stage { position: relative; z-index: 1; margin: 0; max-width: min(1400px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ns-lb-stage img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; border-radius: 6px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); transition: opacity .2s; }
.ns-lb.is-loading .ns-lb-stage img { opacity: .35; }
.ns-lb-stage figcaption { display: flex; gap: 16px; align-items: baseline; justify-content: center; flex-wrap: wrap; color: rgba(255, 255, 255, .85); font-size: 14px; text-align: center; }
.ns-lb-stage figcaption b { color: var(--accent-2); font-family: var(--font-head); font-size: 12.5px; letter-spacing: .06em; }
.ns-lb-btn { position: absolute; z-index: 2; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; transition: background .2s; padding: 0; }
.ns-lb-btn:hover, .ns-lb-btn:focus-visible { background: var(--accent); border-color: var(--accent); }
.ns-lb-close { top: 18px; right: 18px; }
.ns-lb-prev { left: clamp(8px, 2vw, 28px); top: 50%; margin-top: -26px; }
.ns-lb-next { right: clamp(8px, 2vw, 28px); top: 50%; margin-top: -26px; }
.ns-lb.single .ns-lb-prev, .ns-lb.single .ns-lb-next { display: none; }

@media (max-width: 900px) {
    .ns-body > *, .ns-prose > * { max-width: none; }
}
@media (max-width: 640px) {
    .ns-fig, .ns-gallery { margin-left: calc(-1 * var(--gutter, 20px)); margin-right: calc(-1 * var(--gutter, 20px)); }
    .ns-fig-link, .ns-g-item { border-radius: 0; }
    .ns-gallery { gap: 4px; grid-auto-rows: 180px !important; }
    .ns-gallery.count-2 { grid-auto-rows: 220px !important; }
    .ns-lb-btn { width: 44px; height: 44px; }
    .ns-lb-prev, .ns-lb-next { top: auto; bottom: 18px; margin-top: 0; background: rgba(0, 0, 0, .5); }
    .ns-lb-stage img { max-height: calc(100vh - 170px); }
}
.ns-body > .ns-prose { max-width: none; }
/* Texto centrado na coluna de leitura (as margens verticais dos parágrafos/títulos não podem anular o centro) */
.ns-prose > :not(.ns-fig):not(.ns-gallery) { margin-left: auto !important; margin-right: auto !important; }
.ns-prose > ul, .ns-prose > ol { padding-left: 1.3em; }

/* Aviso: artigo só em português */
.ns-lang-note { display: flex; align-items: center; gap: 10px; max-width: 720px; margin: 0 auto 26px; padding: 12px 16px; border-radius: 12px; border: 1px dashed var(--input-border, var(--border)); background: var(--bg-alt); color: var(--text); font-size: 14px; }
.ns-lang-note .ico { color: var(--accent); flex-shrink: 0; }
