/* =========================
   NOTÍCIAS — estilo moderno
   ========================= */
:root {
    --news-bg: #0b1220;
    /*--news-surface: url("/background.png") center;*/
    --news-surface: #101827;
    --news-text: #e8edf7;
    --news-muted: #9aa3b2;
    --news-primary: #4da3ff;
    --news-border: #1f2a3b;
    --news-ring: rgba(77, 163, 255, .2);
    --news-shadow: 0 2px 10px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Color Emoji", "Apple Color Emoji", sans-serif;
  background: var(--news-bg);
  color: #e8edf7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ====== Header + Menu ====== */
.news-header-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  /*background: url("/background.png") center;*/
  background: linear-gradient(180deg, var(--news-bg), color-mix(in oklab, var(--news-bg) 70%, transparent));
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid var(--news-border);
}

.news-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px 10px;
}

.news-h1 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: .2px;
}

.news-menu {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 14px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.news-menu::-webkit-scrollbar { height: 8px; }
.news-menu::-webkit-scrollbar-thumb { background: var(--news-border); border-radius: 999px; }

.news-menu a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--news-surface) 85%, var(--news-bg));
  color: white;
  border: 1px solid var(--news-border);
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease, transform .06s ease;
  white-space: nowrap;
}
.news-menu a:hover { background: color-mix(in oklab, var(--news-surface) 95%, var(--news-bg)); }
.news-menu a:active { transform: translateY(1px); }
.news-menu a.news-active {
  background: var(--news-primary);
  color: #fff;
  border-color: var(--news-primary);
  box-shadow: 0 0 0 4px var(--news-ring);
}

/* ====== Meta ====== */
.news-meta {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 12px;
  color: var(--news-muted);
  font-size: 13px;
}
.news-meta code {
  background: color-mix(in oklab, var(--news-surface) 75%, var(--news-bg));
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--news-border);
}

/* ====== Grid ====== */
.news-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px 28px;
}

.news-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .news-grid { grid-template-columns: repeat(4, 1fr); } }

/* ====== Card (altura uniforme) ====== */
.news-card {
  display: flex;
  flex-direction: column;
  background: var(--news-surface);
  border: 1px solid var(--news-border);
  border-radius: 12px;
  box-shadow: var(--news-shadow);
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  min-height: 100%;
}
.news-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--news-primary) 30%, var(--news-border));
  box-shadow: 0 10px 20px -10px rgba(2,12,27,.25);
}

/* imagem com ratio fixo (uniforme) */
.news-card .news-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: color-mix(in oklab, var(--news-surface) 70%, var(--news-bg));
  overflow: hidden;
}
.news-card .news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* conteúdo flex: ocupa o restante e alinha rodapé */
.news-card .news-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  flex: 1;
}

.news-card h2 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 680;
  display: -webkit-box;
  /*-webkit-line-clamp: 3;*/
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card h2 a {
  color: white;
  text-decoration: none;
}
.news-card h2 a:hover { text-decoration: underline; }

/* Fonte/rodapé do card */
.news-card .news-source {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--news-muted);
}

/* estados */
.news-empty, .news-error {
  padding: 18px;
  color: var(--news-muted);
  text-align: center;
}
.news-error { color: #b00020; }

/* pequenas animações */
@keyframes fadeIn {
  from { opacity: .6; transform: translateY(4px); }
  to   { opacity: 1;  transform: translateY(0); }
}
.news-card { animation: fadeIn .25s ease both; }
/* Isola as imagens das notícias de qualquer CSS global dos parceiros */
#news-root .news-img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  opacity: 1 !important;
  visibility: visible !important;
  max-width: none !important; /* anula resets tipo img{max-width:100%} que bagunçam ratio fixo */
}

.news-btn-more{
  margin-top: 20px;
  padding:10px 16px; 
  border-radius:10px; 
  border:1px solid var(--news-border); 
  background:var(--news-surface); 
  color: white;
  cursor:pointer;
}