/* ====== HEADER BASE ====== */
header {
  background: #111;
  padding: 10px 24px;
  display: flex;
  justify-content: center;
}

.header-container {
  width: 100%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* ====== LOGO ====== */
.logo img {
  height: 36px; /* ajuste principal — menor = 28px, maior = 40px */
  width: auto;
  transition: all 0.3s ease;
  display: block;
}

.logo img:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
}

/* Filter Section */
.filter-section {
  padding: 30px 20px;
  background-color: #fafafa;
  margin-bottom: 40px;
}

.filter-content {
  max-width: 1000px;
  margin: 0 auto;
}

.search-input {
  font-family: Arial, Helvetica, sans-serif;
  width: 100%;
  max-width: 600px;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: #333;
  box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.1);
}

/* Search input API */
.search-form {
  position: relative;
}

/* ====== DROPDOWN DE RESULTADOS ====== */
.search-results {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background: radial-gradient(circle at top left, #1c1c1c, #050505);
  border-radius: 12px;
  margin-top: 6px;
  padding: 10px 0;
  max-height: 360px;
  overflow-y: auto;
  display: none;
  z-index: 50;

  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.02);
}

/* se quiser um fade-in simples, mantém o display/block no JS,
   mas já deixo preparado para suavizar em caso de ajuste futuro */
.search-results.visible {
  display: block;
}

/* ====== GRUPOS (ARTIGOS, ETC.) ====== */
.search-group {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.search-group:last-of-type {
  border-bottom: none;
}

.search-group-title {
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.7;
  padding: 4px 16px;
  letter-spacing: 0.08em;
  color: #b0b0b0;
}

/* ====== ITENS ====== */
.search-result-item {
  display: block;
  padding: 10px 16px;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  color: #f9f9f9;

  display: flex;
  align-items: center;
  gap: 8px;
}

.search-result-item::before {
  content: "•";
  font-size: 18px;
  color: #10BC6B; /* cor de destaque */
  opacity: 0.9;
}

.search-result-item:hover {
  background: radial-gradient(circle at left, rgba(255, 179, 33, 0.18), rgba(255, 255, 255, 0.03));
  color: #ffffff;
}

/* se você tiver títulos e subtítulos dentro do item, pode usar algo assim:
.search-result-item-title {
  font-weight: 600;
}
.search-result-item-meta {
  font-size: 12px;
  opacity: 0.7;
}
*/

/* ====== LINK "VER TODOS" ====== */
.search-view-all {
  display: block;
  padding: 10px 16px 12px;
  font-size: 14px;
  text-align: right;
  text-decoration: none;
  font-weight: 600;
  color: #10BC6B;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.search-view-all:hover {
  background: rgba(255, 179, 33, 0.12);
  color: #10bc6c7b;
}



/* Adjust search input for header context on desktop */
header .search-input {
  width: 100%;
  max-width: 500px; /* aumenta largura */
  padding: 8px 16px; /* mais alto e espaçado */
  font-size: 1rem;
}

/* Posts Grid */
.blog-container {
  max-width: 1000px;
  margin: 0 auto;
}

.posts-section {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Faz a seção de posts crescer para preencher o espaço */
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

/* Post Card */
.post-card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: #999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.post-card-header {
  position: relative;
}

.post-card-header-content {
  padding: 0 24px;
  margin-top: 16px;
}

.post-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.post-card-title a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-card-title a:hover {
  color: #0066cc;
}

.post-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: #999;
}

.post-author,
.post-date {
  display: flex;
  align-items: center;
}


/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px;
  margin-bottom: 16px;
}

.tag {
  display: inline-block;
  background-color: #f0f0f0;
  color: #666;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  margin-top: 8px;
  margin-left: -15px;
}

.tag:hover {
  background-color: #e0e0e0;
  color: #333;
}


/* Post Footer */
.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 24px;
  border-top: 1px solid #f0f0f0;
}

.read-more {
  color: #0066cc;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.read-more:hover {
  color: #0052a3;
}

.reading-time {
  font-size: 0.85rem;
  color: #999;
}

/* No Posts */
.no-posts {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.no-posts p {
  font-size: 1.1rem;
}

.posts-header {
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 32px;
  font-weight: bold;
}

/* Header para a página de "Todos os artigos" */
.all-posts-header {
  text-align: center;
  font-size: 32px;
  font-weight: bold;
  align-self: center; /* Centraliza o próprio elemento no container flex */
  margin-bottom: 40px; /* Adiciona espaço antes da grade de posts */
}


/* Tag de categoria */
.categoria-tag {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  background-color: #09B665;
  color: #fff;
  padding: 6px 14px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 8px;
  max-width: fit-content;
}

/* Artigo individual */
.artigo {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 16px;
}

.artigo img {
  width: 120px !important;
  height: 70px !important;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  display: block;
}

.titulo {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
  margin: 0;
  flex: 1;
}

.ler-mais-wrapper {
  margin-top: 20px;
  text-align: left; /* ou center/right, como preferir */
}

.btn-ler-mais {
  color: gray;
  padding: 5px 10px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  transition: background 0.3s ease;
}

.btn-ler-mais:hover {
  background-color: #16AD62;
}




/* Pagination */
.pagination {
  margin-top: auto; /* Empurra a paginação para o final do contêiner flex */
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
}

.pagination-link {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #555;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination-link:hover {
  background-color: #f7f7f7;
  border-color: #0066cc;
}

.pagination-link.disabled {
  color: #aaa;
  pointer-events: none;
  opacity: .6;
}

.pagination-info {
  color: #777;
  font-size: 0.95rem;
}


/* Mobile specific adjustments for search input in header */
@media (max-width: 768px) {
  header .search-input {
    margin: 1rem 0; /* Add some vertical margin in mobile menu */
    max-width: none; /* Allow it to take full width in mobile menu */
  }
}
