:root{
  --primary:#22c55e;
  --dark-bg:#0b1220;
  --card-bg:#ffffff;
  --text:#ffffff;
  --muted:#cbd5e1;
  --muted2:#94a3b8;
  --gray:#64748b;
  --title:#0f172a;
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background:var(--dark-bg);
  color:var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Topbar */
.topbar{
  position:sticky;
  top:0;
  background:var(--dark-bg);
  padding:12px 20px;
  border-bottom:1px solid rgba(255,255,255,.1);
  z-index:100;
}

.container-top{
  max-width:1200px;
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:20px;
}

.brand a{
  color:#fff;
  text-decoration:none;
  font-weight:900;
}

.search-box{ flex:1; }
.search-box input{
  width:100%;
  padding:10px 15px;
  border-radius:20px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.2);
  color:#fff;
  outline:none;
}

.btn-menu{
  background:var(--primary);
  color:#fff;
  border:none;
  padding:10px 20px;
  border-radius:20px;
  cursor:pointer;
  font-weight:800;
}

/* Layout */
.main-wrap{
  max-width:1200px;
  margin:30px auto;
  padding:0 15px;
  display:grid;
  grid-template-columns: 1fr 320px;
  gap:30px;
}

@media (max-width:900px){
  .main-wrap{ grid-template-columns:1fr; }
}

/* Cards do feed */
.post-card{
  background:var(--card-bg);
  color:#1e293b;
  padding:25px;
  border-radius:12px;
  margin-bottom:20px;
  box-shadow: 0 10px 26px rgba(0,0,0,.12);
}

.post-card a{
  color:var(--title);
  text-decoration:none;
  font-size:22px;
  font-weight:900;
  display:block;
  margin:10px 0;
}

.post-card a:hover{ text-decoration:underline; }

/* ✅ Thumb no feed */
.post-thumb{
  width:100%;
  max-height:220px;
  object-fit:cover;
  border-radius:12px;
  margin:12px 0;
  display:block;
}

/* opcional: quando existe thumb, deixa o título “colar” melhor */
.post-card .post-thumb + a{ margin-top:6px; }

.post-desc{
  color:var(--gray);
  margin:0;
  font-size:15px;
  line-height:1.55;
}

.post-date{
  color:var(--muted2);
  display:block;
  margin-top:10px;
  font-size:13px;
}

/* Pill */
.pill{
  background:#fee2e2;
  color:#991b1b;
  padding:4px 12px;
  border-radius:15px;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  display:inline-block;
}

/* ✅ NOVO: pill clicável (keyword) */
.pill-link{
  text-decoration:none;
  cursor:pointer;
}
.pill-link:hover{
  text-decoration:underline;
  filter:brightness(.97);
}

/* Paginação */
.pagination{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:20px;
  flex-wrap:wrap;
}

.pagination a{
  padding:10px 16px;
  background:#fff;
  color:var(--title);
  text-decoration:none;
  border-radius:8px;
  font-weight:900;
}

.pagination a.active{
  background:var(--primary);
  color:#fff;
}

/* Artigo */
.article-view{
  background:#fff;
  color:#1e293b;
  padding:40px;
  border-radius:15px;
  line-height:1.85;
  font-size:19px;
  box-shadow: 0 10px 26px rgba(0,0,0,.12);
}

.article-title{
  color:var(--title);
  margin:18px 0 25px;
  line-height:1.2;
  font-weight:1000;
}

.featured-image{
  width:100%;
  max-height:500px;
  object-fit:cover;
  border-radius:12px;
  margin:20px 0;
  display:block;
}

.content-body p{ margin-bottom:1.6rem; }

.title-h2{
  color:var(--title);
  margin:35px 0 15px;
  font-size:26px;
  border-left:5px solid var(--primary);
  padding-left:15px;
  font-weight:900;
}

.title-h3{
  color:var(--title);
  margin:25px 0 10px;
  font-size:22px;
  font-weight:900;
}

.back-link{
  color:var(--primary);
  font-weight:900;
  text-decoration:none;
}

.back-link:hover{ text-decoration:underline; }

/* Sidebar direita (caixa destaque) */
.side-card{
  background:rgba(255,255,255,.05);
  padding:20px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.1);
}

.side-card h3{
  margin:0 0 8px;
  color:var(--primary);
}

.side-card p{
  font-size:14px;
  color:var(--muted);
  margin:0;
}

/* ===== Drawer corrigido (Categorias) ===== */
#categoriesDrawer{
  position:fixed;
  top:0;
  right:0;
  height:100vh;
  width:min(320px, 92vw);
  background:var(--dark-bg);
  z-index:201;
  padding:25px;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;

  transform:translateX(100%);
  transition:transform .22s ease;

  box-shadow:-20px 0 40px rgba(0,0,0,.35);
}

#categoriesDrawer.open{ transform:translateX(0); }

#drawerOverlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.7);
  z-index:200;
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
}

#drawerOverlay.open{
  opacity:1;
  pointer-events:auto;
}

body.drawer-open{ overflow:hidden; }

.drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.drawer-title{
  color:var(--primary);
  margin:0;
}

.drawer-close{
  background:rgba(255,255,255,.08);
  color:#fff;
  border:1px solid rgba(255,255,255,.18);
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
  font-weight:900;
}

.drawer-close:hover{ background:rgba(255,255,255,.12); }

.cat-link{
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  padding:12px;
  text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.05);
  border-radius:10px;
}

.cat-link:hover{ background:rgba(255,255,255,.05); }