/* =============================================
   PORTAL NEXUS v5 — Mobile First
   ============================================= */

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* VARIÁVEIS */
:root {
  --azul:   #003882;
  --azul2:  #0050b3;
  --azul3:  #1a73e8;
  --azulbg: #e8f0fe;
  --verm:   #d32f2f;
  --preto:  #111;
  --c1:     #333;
  --c2:     #666;
  --c3:     #999;
  --borda:  #ddd;
  --fundo:  #f4f6f9;
  --branco: #fff;
  --titulo: 'Merriweather', Georgia, serif;
  --texto:  'Noto Sans', 'Segoe UI', Arial, sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--texto);
  background: var(--fundo);
  color: var(--preto);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

a { text-decoration: none; color: inherit; }

/* IMAGENS SEMPRE RESPONSIVAS */
img {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
}

/* CONTAINER */
.nx-wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ═══ BARRA TOPO ═══ */
.nx-topo {
  background: var(--azul);
  color: rgba(255,255,255,.8);
  font-size: .72rem;
  padding: 5px 0;
  overflow: hidden;
}
.nx-topo-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nx-topo .relogio { color: #fff; font-weight: 600; }
.nx-topo .data { display: none; }
.nx-redes { display: flex; gap: 5px; }
.nx-redes a {
  color: rgba(255,255,255,.7);
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 3px;
}
.nx-redes a:hover { color: #fff; background: rgba(255,255,255,.15); }

/* ═══ CABEÇALHO ═══ */
.nx-header {
  background: var(--branco);
  border-bottom: 3px solid var(--azul);
  padding: 12px 0;
}
.nx-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.nx-logo { line-height: 1; }
.nx-logo .nome {
  font-family: var(--titulo);
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--azul);
  letter-spacing: -1px;
  white-space: nowrap;
}
.nx-logo .nome span { color: var(--verm); }
.nx-logo .slogan {
  font-size: .6rem;
  color: var(--c3);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 2px;
}
.nx-busca {
  display: flex;
  border: 2px solid var(--azul);
  border-radius: 20px;
  overflow: hidden;
  flex: 1;
  max-width: 280px;
  min-width: 0;
}
.nx-busca input {
  border: none;
  outline: none;
  padding: 7px 12px;
  font-size: .85rem;
  width: 100%;
  min-width: 0;
  background: transparent;
}
.nx-busca button {
  background: var(--azul);
  border: none;
  color: #fff;
  padding: 7px 12px;
  cursor: pointer;
  flex-shrink: 0;
  font-size: .9rem;
}

/* ═══ FAIXA MANCHETES ═══ */
.nx-faixa {
  background: var(--verm);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 34px;
}
.nx-faixa-label {
  background: #b71c1c;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nx-faixa-label::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: piscar 1.2s infinite;
}
@keyframes piscar { 0%,100%{opacity:1} 50%{opacity:.2} }
.nx-faixa-wrap { flex: 1; overflow: hidden; }
.nx-faixa-scroll {
  display: flex;
  white-space: nowrap;
  animation: rolar 45s linear infinite;
}
.nx-faixa-scroll a { color: #fff; padding: 0 24px; }
.nx-faixa-scroll a::before { content: '▶ '; font-size: .55rem; opacity: .7; }
@keyframes rolar { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ═══ MENU ═══ */
.nx-menu {
  background: var(--branco);
  border-bottom: 1px solid var(--borda);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 6px rgba(0,0,0,.07);
}
.nx-hamburger {
  display: none;
  width: 100%;
  background: none;
  border: none;
  padding: 13px 16px;
  cursor: pointer;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--azul);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.nx-hamburger .hb-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}
.nx-hamburger .hb-lines span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--azul);
  border-radius: 2px;
  transition: all .3s;
}
.nx-hamburger.open .hb-lines span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nx-hamburger.open .hb-lines span:nth-child(2) { opacity: 0; }
.nx-hamburger.open .hb-lines span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nx-nav-list {
  list-style: none;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 8px;
}
.nx-nav-list::-webkit-scrollbar { display: none; }
.nx-nav-list li a {
  display: block;
  padding: 13px 12px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--c2);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  position: relative;
  transition: color .2s;
}
.nx-nav-list li a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--azul);
  transform: scaleX(0);
  transition: transform .2s;
}
.nx-nav-list li a:hover { color: var(--azul); }
.nx-nav-list li a:hover::after { transform: scaleX(1); }
.nx-nav-list li.ativo a { color: var(--azul); }
.nx-nav-list li.ativo a::after { transform: scaleX(1); }

.nx-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 150;
}
.nx-overlay.on { display: block; }

/* ═══ LAYOUT ═══ */
.nx-main { padding: 16px 0 40px; }
.nx-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
.nx-sep {
  border: none;
  border-top: 1px solid var(--borda);
  margin: 24px 0;
}
.nx-sec-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--azul);
}
.nx-sec-title h2 {
  font-family: var(--titulo);
  font-size: .95rem;
  font-weight: 900;
  color: var(--azul);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.nx-sec-title a { color: var(--azul); }
.nx-ver-mais {
  margin-left: auto;
  font-size: .72rem;
  color: var(--azul3);
  font-weight: 600;
  white-space: nowrap;
}
.nx-ver-mais:hover { text-decoration: underline; }

/* ETIQUETA */
.nx-tag {
  display: inline-block;
  background: var(--azul);
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
  margin-bottom: 6px;
}
.nx-tag:hover { background: var(--azul2); }

/* META */
.nx-meta { font-size: .7rem; color: var(--c3); margin-top: 8px; }
.nx-meta strong { color: var(--c2); font-weight: 600; }
.nx-tempo { color: var(--azul3); font-weight: 600; }

/* ═══ DESTAQUE PRINCIPAL ═══ */
.nx-destaque {
  display: block;
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 24px;
  transition: box-shadow .2s;
}
.nx-destaque:hover { box-shadow: 0 4px 20px rgba(0,56,130,.12); }
.nx-destaque-img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  display: block;
}
.nx-destaque-sem-img {
  width: 100%;
  aspect-ratio: 16/7;
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nx-destaque-sem-img span { color: rgba(255,255,255,.15); font-family: var(--titulo); font-size: 3rem; font-weight: 900; }
.nx-destaque-body { padding: 16px; }
.nx-destaque-body h2 {
  font-family: var(--titulo);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.3;
  color: var(--preto);
  margin: 6px 0 10px;
}
.nx-destaque-body p {
  font-size: .88rem;
  color: var(--c2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══ CARDS ═══ */
.nx-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.nx-card {
  display: block;
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.nx-card:hover { box-shadow: 0 4px 16px rgba(0,56,130,.1); transform: translateY(-2px); }
.nx-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.nx-card-sem-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--azulbg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nx-card-sem-img span { color: var(--azul); font-weight: 900; font-size: 1.5rem; }
.nx-card-body { padding: 12px 14px 14px; }
.nx-card-body h3 {
  font-family: var(--titulo);
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.38;
  color: var(--preto);
  margin: 4px 0 8px;
  transition: color .2s;
}
.nx-card:hover h3 { color: var(--azul); }
.nx-card-body p {
  font-size: .8rem;
  color: var(--c2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══ LISTA ═══ */
.nx-lista { display: flex; flex-direction: column; gap: 0; }
.nx-lista-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--borda);
  transition: background .15s;
}
.nx-lista-item:last-child { border-bottom: none; }
.nx-lista-item:hover { background: var(--azulbg); margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.nx-lista-img {
  width: 90px;
  height: 60px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  display: block;
}
.nx-lista-sem-img {
  width: 90px;
  height: 60px;
  background: var(--azulbg);
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nx-lista-sem-img span { color: var(--azul); font-weight: 900; font-size: .9rem; }
.nx-lista-body { flex: 1; min-width: 0; }
.nx-lista-body h4 {
  font-family: var(--titulo);
  font-size: .84rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--preto);
  transition: color .2s;
}
.nx-lista-item:hover h4 { color: var(--azul); }

/* ═══ SIDEBAR ═══ */
.nx-widget {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}
.nx-widget-title {
  background: var(--azul);
  color: #fff;
  font-family: var(--titulo);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 10px 14px;
}
.nx-widget-body { padding: 12px 14px; }

.nx-mais-lidas { list-style: none; }
.nx-mais-lidas li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borda); align-items: flex-start; }
.nx-mais-lidas li:last-child { border-bottom: none; }
.nx-mais-lidas .n { font-family: var(--titulo); font-size: 1.4rem; font-weight: 900; color: #d0d8e8; line-height: 1; flex-shrink: 0; width: 26px; text-align: center; }
.nx-mais-lidas h5 { font-family: var(--titulo); font-size: .8rem; font-weight: 700; line-height: 1.35; color: var(--preto); }
.nx-mais-lidas h5:hover { color: var(--azul); }

.nx-editorias { list-style: none; }
.nx-editorias li { border-bottom: 1px solid var(--borda); }
.nx-editorias li:last-child { border-bottom: none; }
.nx-editorias li a { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: .83rem; color: var(--preto); transition: color .2s; }
.nx-editorias li a:hover { color: var(--azul); }
.nx-editorias .qtd { background: var(--azulbg); color: var(--azul); font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; }

.nx-topicos { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-topicos a { background: var(--fundo); border: 1px solid var(--borda); font-size: .73rem; padding: 4px 10px; border-radius: 14px; color: var(--c2); transition: all .2s; }
.nx-topicos a:hover { background: var(--azul); color: #fff; border-color: var(--azul); }

.nx-newsletter input[type=email] { width: 100%; border: 1px solid var(--borda); border-radius: 4px; padding: 9px 12px; font-size: .84rem; margin-bottom: 10px; outline: none; }
.nx-newsletter input[type=email]:focus { border-color: var(--azul); }
.nx-newsletter button { width: 100%; background: var(--azul); color: #fff; border: none; padding: 10px; font-size: .84rem; font-weight: 700; cursor: pointer; border-radius: 4px; text-transform: uppercase; letter-spacing: .04em; }
.nx-newsletter button:hover { background: var(--azul2); }
.nx-newsletter p { font-size: .77rem; color: var(--c3); margin-bottom: 10px; line-height: 1.5; }

/* ═══ PAGINAÇÃO ═══ */
.nx-pag { display: flex; justify-content: center; gap: 5px; margin: 24px 0; flex-wrap: wrap; }
.nx-pag a, .nx-pag span { display: flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--borda); background: var(--branco); font-size: .83rem; font-weight: 600; color: var(--preto); border-radius: 4px; transition: all .2s; }
.nx-pag a:hover, .nx-pag span.current { background: var(--azul); color: #fff; border-color: var(--azul); }

/* ═══ SINGLE POST ═══ */
.nx-post-header { max-width: 800px; margin: 24px auto 0; padding: 0 16px; }
.nx-post-header h1 { font-family: var(--titulo); font-size: 1.6rem; font-weight: 900; line-height: 1.25; color: var(--preto); margin: 8px 0 14px; }
.nx-post-meta { font-size: .78rem; color: var(--c3); display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--borda); }
.nx-post-meta strong { color: var(--c2); }
.nx-post-foto { max-width: 900px; margin: 20px auto; padding: 0 16px; }
.nx-post-foto img { width: 100%; border-radius: 4px; height: auto; }
.nx-post-content { max-width: 800px; margin: 0 auto 40px; padding: 0 16px; font-size: 1rem; line-height: 1.8; color: #222; }
.nx-post-content p { margin-bottom: 1.4em; }
.nx-post-content h2 { font-family: var(--titulo); font-size: 1.3rem; font-weight: 900; color: var(--azul); margin: 1.8em 0 .6em; }
.nx-post-content h3 { font-family: var(--titulo); font-size: 1.1rem; font-weight: 700; margin: 1.4em 0 .5em; }
.nx-post-content blockquote { border-left: 4px solid var(--azul); margin: 1.5em 0; padding: 12px 18px; background: var(--azulbg); border-radius: 0 4px 4px 0; font-style: italic; color: var(--c2); }
.nx-post-content a { color: var(--azul3); text-decoration: underline; }
.nx-post-content img { border-radius: 4px; margin: 1.2em auto; width: 100%; height: auto; }

.nx-post-tags { max-width: 800px; margin: 0 auto 24px; padding: 0 16px; }
.nx-leia-mais { background: var(--fundo); border-top: 3px solid var(--azul); padding: 32px 0; margin-top: 40px; }
.nx-leia-mais-btn { display: inline-block; background: var(--azul); color: #fff; padding: 11px 28px; border-radius: 4px; font-weight: 700; font-size: .88rem; text-transform: uppercase; letter-spacing: .04em; margin-top: 24px; transition: background .2s; }
.nx-leia-mais-btn:hover { background: var(--azul2); color: #fff; }

/* ═══ ARQUIVO ═══ */
.nx-arquivo-header { padding: 20px 0 16px; }
.nx-arquivo-header h1 { font-family: var(--titulo); font-size: 1.4rem; font-weight: 900; color: var(--azul); }
.nx-arquivo-header p { font-size: .83rem; color: var(--c3); margin-top: 4px; }

/* ═══ RODAPÉ ═══ */
.nx-rodape { background: #001a4d; color: #8ca0c8; padding: 36px 0 0; margin-top: 40px; }
.nx-rodape-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px; }
.nx-rodape-nome { font-family: var(--titulo); font-weight: 900; font-size: 1.5rem; color: #fff; margin-bottom: 8px; }
.nx-rodape-nome span { color: #5b9af5; }
.nx-rodape p { font-size: .8rem; line-height: 1.6; color: #7a90b8; }
.nx-rodape-redes { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.nx-rodape-redes a { width: 32px; height: 32px; background: #002266; border: 1px solid #003399; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: .75rem; color: #8ca0c8; font-weight: 700; transition: all .2s; }
.nx-rodape-redes a:hover { background: var(--azul2); color: #fff; }
.nx-rodape-col h5 { color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #002266; }
.nx-rodape-col ul { list-style: none; }
.nx-rodape-col ul li { margin-bottom: 8px; font-size: .8rem; }
.nx-rodape-col ul li a:hover { color: #fff; }
.nx-form-rodape input[type=email] { width: 100%; border: 1px solid #002a66; background: #001a4d; border-radius: 4px; padding: 8px 10px; font-size: .82rem; margin-bottom: 8px; outline: none; color: #ccc; }
.nx-form-rodape input::placeholder { color: #556688; }
.nx-form-rodape button { width: 100%; background: var(--azul2); color: #fff; border: none; padding: 9px; font-size: .82rem; font-weight: 700; cursor: pointer; border-radius: 4px; }
.nx-rodape-baixo { border-top: 1px solid #002266; padding: 16px 0; margin-top: 4px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .73rem; }
.nx-rodape-baixo a:hover { color: #fff; }

/* ═══ RESPONSIVE ═══ */

/* Tablet */
@media (min-width: 640px) {
  .nx-logo .nome { font-size: 2.1rem; }
  .nx-topo .data { display: inline; }
  .nx-destaque-body h2 { font-size: 1.5rem; }
  .nx-post-header h1 { font-size: 1.9rem; }
}

/* Desktop */
@media (min-width: 960px) {
  .nx-wrap { padding: 0 20px; }
  .nx-hamburger { display: none !important; }
  .nx-nav-list { display: flex !important; }
  .nx-rodape-grade { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .nx-destaque-body h2 { font-size: 1.7rem; }
}

/* Mobile */
@media (max-width: 959px) {
  .nx-sidebar { display: none; }
  .nx-grid { grid-template-columns: 1fr; }
  .nx-hamburger { display: flex; }
  .nx-nav-list {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0; left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--branco);
    z-index: 300;
    padding: 60px 0 20px;
    box-shadow: 4px 0 20px rgba(0,0,0,.15);
    transition: left .3s ease;
    overflow-y: auto;
  }
  .nx-nav-list.open {
    display: flex;
    left: 0;
  }
  .nx-nav-list li a {
    padding: 14px 20px;
    border-bottom: 1px solid var(--borda);
    font-size: .9rem;
    color: var(--preto);
  }
  .nx-nav-list li a::after { display: none; }
  .nx-nav-list li a:hover { background: var(--azulbg); color: var(--azul); }
  .nx-fechar-menu {
    position: absolute;
    top: 12px; right: 12px;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--c2);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 600px) {
  .nx-logo .nome { font-size: 1.5rem; }
  .nx-header-inner { gap: 8px; }
  .nx-busca { max-width: 160px; }
  .nx-busca input { padding: 6px 8px; font-size: .78rem; }
  .nx-cards { grid-template-columns: 1fr; }
  .nx-rodape-grade { grid-template-columns: 1fr; }
  .nx-post-header h1 { font-size: 1.3rem; }
  .nx-post-content { font-size: .95rem; }
  .nx-destaque-body h2 { font-size: 1.1rem; }
}
