/* assets/css/archive.css */
/* ======================================================================  
   1. CONTAINER PRINCIPAL  
   ====================================================================== */
.archive-content.container {
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  padding: 2rem 1.5rem;
  margin-top: 2rem;
}

/* ======================================================================  
   2. CABEÇALHO DE ARQUIVO (VERSÃO SIMPLIFICADA)
   ====================================================================== */
.archive-header {
  margin-bottom: 2rem;           /* remove overflow e z-index complexos */
  text-align: center;
}

.archive-header-inner {
  /* degradê discreto por trás do texto */
  background: linear-gradient(135deg, #fafafa 0%, #e5e5e5 100%);
  padding: 3rem 1rem;
  border-radius: 8px;
  display: inline-block;         /* ajusta largura ao conteúdo */
  max-width: 100%;               /* garante que não ultrapasse a tela */
  box-sizing: border-box;        /* inclui padding no cálculo de largura */
}

/* título */
.archive-title {
  display: block;
  white-space: normal;           /* permite quebra de linha */
  word-break: break-word;        /* quebra palavras muito longas */
  overflow-wrap: break-word;     /* fallback para navegadores antigos */
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-heading);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
  position: relative;
  text-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* barra colorida abaixo do título */
.archive-title::after {
  content: '';
  display: block;
  width: 4rem;
  height: 4px;
  background: var(--color-link);
  margin: .75rem auto 0;
  border-radius: 2px;
  transition: width .3s ease;
}
.archive-title:hover::after {
  width: 6rem;
}

/* descrição */
.archive-description {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--color-text);
  max-width: 700px;
}

/* ======================================================================  
   3. GRID DE POSTS (CARDS)  
   ====================================================================== */
.posts-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.archive-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.archive-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}
.card-thumb img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
.card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 0 0 .5rem;
  line-height: 1.2;
  word-break: break-word;        /* impede overflow */
  overflow-wrap: break-word;
}
.card-title a {
  color: var(--color-heading);
  text-decoration: none;
  transition: color .3s;
}
.card-title a:hover {
  color: var(--color-link);
}
.card-meta {
  font-size: .875rem;
  color: var(--color-meta-alt);
  margin-bottom: 1rem;
}
.card-excerpt {
  flex: 1;
  font-size: 1rem;
  color: var(--color-text);
  line-height: var(--line-height);
  margin: 0 0 1rem;
}

/* ======================================================================  
   4. PAGINAÇÃO  
   ====================================================================== */
.pagination {
  text-align: center;
  margin-top: 2rem;
}
.pagination .page-numbers {
  display: inline-block;
  margin: 0 .25rem;
  padding: .5rem .75rem;
  border: 1px solid var(--color-border-dark);
  border-radius: 4px;
  color: var(--color-text);
  text-decoration: none;
  transition: background .3s, color .3s;
}
.pagination .page-numbers.current {
  background: var(--color-link);
  color: #fff;
  border-color: var(--color-link);
}
.pagination .page-numbers:hover {
  background: var(--color-link-hover);
  color: #fff;
}

/* ======================================================================  
   5. SEÇÃO “NENHUM CONTEÚDO”  
   ====================================================================== */
.no-posts {
  text-align: center;
  padding: 4rem 1rem;
}
.no-posts h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--color-heading);
  margin-bottom: 1rem;
}
.no-posts p {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 2rem;
}

/* ======================================================================  
   6. RESPONSIVIDADE  
   ====================================================================== */
@media (max-width: 768px) {
  .archive-content.container {
    padding: 1.5rem 1rem;
  }
  .archive-header-inner {
    display: block;             /* faz o header ocupar 100% no mobile */
  }
  .archive-title {
    font-size: 2.25rem;
  }
  .card-title {
    font-size: 1.25rem;
  }
  .posts-list-grid {
    gap: 1.5rem;
    grid-template-columns: 1fr;
  }
  .pagination {
    margin-top: 1.5rem;
  }
}
