/* === Container da lista de posts === */
.category-posts {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 20px 0; /* deixa o espaçamento vertical, mas herda largura */
}

/* Titulo da categoria */
.category-header .category-title {
  font-weight: 700;
  font-size: 3rem;
  line-height: 1.2em;
  margin-bottom: 8px; /* igual ao título do post */
}

/* Descricão da categoria */
.category-header .taxonomy-description {
  line-height: 1.6;
  color: #444;
  margin-top: 12px;
  margin-bottom: 20px;
}

/* === Cada card de post === */
.category-card {
  display: flex;
  flex-direction: row;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s ease-in-out;
  align-items: stretch; /* Garante que imagem e conteúdo fiquem com a mesma altura */
}

.category-card:hover {
  transform: translateY(-2px);
}

/* === Imagem do post === */
.category-card-image {
  flex: 0 0 40%;
  max-width: 40%;
  display: flex;
  align-items: stretch;
}

.category-card-image a {
  display: flex;
  flex: 1;
}

.category-card-image .category-thumbnail {
  flex: 1;
  display: flex;
  width: 100%;
}

.category-card-image picture {
  flex: 1;
  display: flex;
  width: 100%;
}

.category-card-image picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* === Conteúdo do post === */
.category-card-content {
  flex: 1;
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Categoria */
.category-card-category {
  font-size: 0.875rem;
  font-weight: bold;
  color: #222222; /* Cor padrão */
  margin-bottom: 5px;
  text-decoration: none;
}

.category-card-category a {
  color: inherit; /* Mantém a cor do .category-card-category */
  text-decoration: none;
  transition: color 0.3s ease;
}


.category-card-category a:hover {
  color: #000000; /* Hover mais escuro */
  text-decoration: underline;
}

/* Título */
.category-card-title {
  font-size: 1.4rem;
  font-weight: bold;
  color: #222222; /* ✅ Cor ajustada */
  margin-bottom: 8px;
  line-height: 1.4;
}

.category-card-title a {
  color: inherit;
  text-decoration: none;
}

.category-card-title a:hover {
  text-decoration: underline; /* ✅ Sublinhado apenas no hover */
}

/* Descrição */
.category-card-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 12px;
}

/* Meta + botão juntos na base */
.category-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Autor */
.card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #333;
}

.card-author img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.card-author-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.author-name {
  font-weight: 600;
  color: #1e1e1e;
}

.author-date {
  font-size: 0.75rem;
  color: #666;
  margin-top: 2px;
}

/* Botão */
.category-card-button {
  font-size: 0.875rem;
  font-weight: 500;
  color: #000;
  border: 1px solid #000;
  padding: 4px 12px;
  border-radius: 20px;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
}

.category-card-button:hover {
  background: #000;
  color: #fff;
  text-decoration: none;
}

/* Paginacão */
.category-pagination {
  text-align: center;
  margin-top: 30px;
}

.category-pagination .page-numbers {
  display: inline-block;
  margin: 0 5px;
  padding: 8px 12px;
  background: #f1f1f1;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
}

.category-pagination .current {
  background: #000;
  color: #fff;
  font-weight: bold;
}


/* Mobile */
@media (max-width: 768px) {
  .category-card {
    flex-direction: column;
  }

  .category-card-image {
    width: 100%;
    max-width: 100%;
    flex: none;
  }

  .category-card-image picture {
    width: 100%;
    height: auto;
    display: block;
  }

  .category-card-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
  }

  .category-card-footer {
    flex-direction: row;        /* ✅ Deixa autor + botão na mesma linha */
    align-items: center;        /* ✅ Alinha verticalmente */
    justify-content: space-between; /* ✅ Espaço entre os dois */
    gap: 0;                     /* ✅ Remove espaçamento vertical */
  }

  .category-card-button {
    align-self: auto;           /* ✅ Não força o botão pra baixo */
  }
}
