:root{
  --primary-color:#2563eb; --primary-hover:#153fb4;
  --secondary-color:#64748b; --accent-color:#f59e0b;
  --text-primary:#1e293b; --text-secondary:#64748b; --text-muted:#94a3b8;
  --bg-primary:#fff; --bg-secondary:#f8fafc; --bg-tertiary:#f1f5f9; --border-color:#e2e8f0;
  --shadow-sm:0 1px 2px 0 rgb(0 0 0 / 0.05);
  --radius-sm:.375rem; --radius-md:.5rem; --radius-lg:.75rem;
}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;line-height:1.6;color:var(--text-primary);background:var(--bg-secondary);font-size:16px}
.container{max-width:1200px;margin:0 auto;padding:0 1rem}

/* Header */
.header{background:var(--bg-primary);border-bottom:1px solid var(--border-color);position:sticky;top:0;z-index:100;box-shadow:var(--shadow-sm)}
.header-top{display:flex;justify-content:space-between;align-items:center;padding:1rem 0}
.logo{display:flex;align-items:center;gap:.75rem;text-decoration:none;color:var(--text-primary)}
.logo img{height:40px;width:auto}
.logo-text{font-size:1.3rem;font-weight:600;color:var(--text-primary)}
.main-nav{ display:flex; align-items:center; gap:14px; }
.nav-check{
  position:absolute;
  opacity:0;
  pointer-events:none;
  width:0; height:0;
}
.main-nav a{text-decoration:none;color:var(--primary-color);font-size:.9rem;font-weight:500;padding:6px;border-bottom:2px solid transparent;transition:.2s}
.header-nav a:hover,.header-nav .active,.header-nav a.active{color:var(--primary-color);border-bottom:2px solid var(--primary-hover)}
.nav-link{text-decoration:none;padding:4px 6px}
.footer .container{text-align:center}

/* ===== Lista compacta de posts ===== */
.list-wrapper{padding:1rem 0 3rem}
.post-list{background:var(--bg-primary);border:1px solid var(--border-color);border-radius:var(--radius-lg);overflow:hidden}
.post-item{display:grid;grid-template-columns:120px 1fr;gap:12px;padding:12px 14px;border-bottom:1px solid var(--border-color)}
.post-item:last-child{border-bottom:none}
.post-thumb{width:120px;height:90px;border-radius:8px;object-fit:cover;background:#e2e8f0}

/* Categoria + tempo (compactos) */
.post-meta-compact{font-size:.72rem;color:var(--text-muted);text-transform:uppercase;letter-spacing:0}
.post-meta-compact .sep{margin:0 .35rem}

/* Headline – alinhada à esquerda e com linhas coladas */
.post-title{margin:.05rem 0 .1rem}
.post-item h2.post-title,
.headline{
  text-align:left !important;
  margin:0 0 .15rem 0 !important;
  line-height:0.9 !important;
  font-weight:800;
}
.post-item h2.post-title a,
.headline a{
  display:inline !important;
  line-height:0.9 !important;
  text-decoration:none;
  color:#151f37 !important;
}
.post-item h2.post-title a:hover,
.headline a:hover{color:var(--primary-color)}

/* Tamanho do título em lista/cards */
.post-title a{font-size:1.05rem}
.post-card h2.headline{font-size:1.12rem;margin:0 0 .25rem 0 !important}

/* Resumo menor e compacto */
.post-item .post-teaser,
.summary{
  font-size:.85rem !important;
  line-height:1.25 !important;
  color:var(--text-secondary);
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* Ações */
.post-actions{display:flex;gap:8px;margin-top:6px}
.post-actions a{width:22px;height:22px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:var(--bg-tertiary);color:var(--text-secondary);text-decoration:none}
.post-actions a:hover{background:var(--primary-color);color:#fff}

/* Estados */
.loading{display:flex;justify-content:center;align-items:center;padding:3rem;color:var(--text-muted)}
.empty-state{text-align:center;padding:3rem 1rem;color:var(--text-muted)}
.empty-state h3{font-size:1.25rem;margin-bottom:.5rem;color:var(--text-secondary)}

/* Espaçamentos internos ainda mais justos */
.post-content{gap:.5rem !important}
.post-item .post-meta-compact{margin-bottom:.2rem !important}
.post-item .post-teaser{margin-top:0 !important}


/* ===== Responsivo ===== */
@media (max-width:768px){
  .post-item{grid-template-columns:96px 1fr;padding:10px 12px}
  .post-thumb{width:96px;height:72px}
  .post-title a{font-size:1rem;color:#111827}
  .post-meta-compact{font-size:.68rem !important}
  .post-item .post-teaser,.summary{font-size:.8rem !important;line-height:1.2 !important}
}

/* ===== Menu Mobile ===== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--primary-color);
}

/* links visíveis no desktop */
.nav-links{
  display:flex;
  align-items:center;
  gap:14px;
}

@media (max-width:768px){
  .main-nav{ position:relative; }

  /* hamburger visível */
  .nav-toggle{
    display:inline-flex;
    align-items:center; justify-content:center;
    width:40px; height:40px;
    font-size:24px; line-height:1;
    background:none; border:none; cursor:pointer;
    color:var(--primary-color);
  }

  /* dropdown fechado por padrão */
  .nav-links{
    display:none;
    position:absolute; right:0; top:100%;
    flex-direction:column; gap:12px;
    background:var(--bg-primary);
    border:1px solid var(--border-color);
    border-radius:var(--radius-md);
    padding:10px;
    z-index:200;
    box-shadow:var(--shadow-sm);
  }

  /* abrir por CSS (checkbox) ou por JS (.open) */
  .nav-check:checked ~ .nav-links,
  .nav-links.open{
    display:flex;
  }
}

/* ===== Forçar tema claro no dark mode do sistema (opcional) ===== */
@media (prefers-color-scheme:dark){
  :root{
    --text-primary:#1e293b;
    --text-secondary:#64748b;
    --text-muted:#94a3b8;
    --bg-primary:#fff;
    --bg-secondary:#f8fafc;
    --bg-tertiary:#f1f5f9;
    --border-color:#e2e8f0;
  }
}

/* ===== Filtros de Busca - Horizontal em Desktop, 2 por Linha em Mobile ===== */
.filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 120px;
}

.filter-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
  min-width: 60px;
  text-align: left;
  margin-right: 0.5rem;
}

.date-input,
.select-input,
.search-input {
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  min-width: 120px;
  height: 32px;
  transition: border-color 0.2s;
}

.date-input:focus,
.select-input:focus,
.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Responsivo: 2 por linha em mobile */
@media (max-width: 768px) {
  .filter-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .filter-group {
    flex: 1;
    min-width: 100px;
  }

  .filter-label {
    text-align: left;
    min-width: auto;
    margin-bottom: 0.1rem;
    margin-right: 0;
  }

  .date-input,
  .select-input,
  .search-input {
    width: 100%;
    min-width: 100%;
  }
}