/* HTS: Latest Posts cards on the front page */
.front-page .post-content .wp-block-latest-posts,
.home .post-content .wp-block-latest-posts,
.blog .post-content .wp-block-latest-posts {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.front-page .post-content .wp-block-latest-posts > li,
.home .post-content .wp-block-latest-posts > li,
.blog .post-content .wp-block-latest-posts > li {
  list-style: none;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 6px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid #e8e8e8;
}

.front-page .post-content .wp-block-latest-posts > li > *:not(.wp-block-latest-posts__featured-image),
.home .post-content .wp-block-latest-posts > li > *:not(.wp-block-latest-posts__featured-image),
.blog .post-content .wp-block-latest-posts > li > *:not(.wp-block-latest-posts__featured-image) {
  grid-column: 2;
}

.front-page .post-content .wp-block-latest-posts__featured-image,
.home .post-content .wp-block-latest-posts__featured-image,
.blog .post-content .wp-block-latest-posts__featured-image {
  grid-column: 1;
  grid-row: 1 / span 10;
  margin: 0;
}

.front-page .post-content .wp-block-latest-posts__featured-image a,
.home .post-content .wp-block-latest-posts__featured-image a,
.blog .post-content .wp-block-latest-posts__featured-image a {
  display: block;
}

.front-page .post-content .wp-block-latest-posts__featured-image img,
.home .post-content .wp-block-latest-posts__featured-image img,
.blog .post-content .wp-block-latest-posts__featured-image img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.front-page .post-content .wp-block-latest-posts__post-title,
.home .post-content .wp-block-latest-posts__post-title,
.blog .post-content .wp-block-latest-posts__post-title {
  margin: 0;
}

.front-page .post-content .wp-block-latest-posts__post-author,
.front-page .post-content .wp-block-latest-posts__post-date,
.front-page .post-content .wp-block-latest-posts__post-excerpt,
.home .post-content .wp-block-latest-posts__post-author,
.home .post-content .wp-block-latest-posts__post-date,
.home .post-content .wp-block-latest-posts__post-excerpt,
.blog .post-content .wp-block-latest-posts__post-author,
.blog .post-content .wp-block-latest-posts__post-date,
.blog .post-content .wp-block-latest-posts__post-excerpt {
  margin: 0;
}

@media (max-width: 768px) {
  .front-page .post-content .wp-block-latest-posts > li,
  .home .post-content .wp-block-latest-posts > li,
  .blog .post-content .wp-block-latest-posts > li {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .front-page .post-content .wp-block-latest-posts > li > *,
  .home .post-content .wp-block-latest-posts > li > *,
  .blog .post-content .wp-block-latest-posts > li > * {
    grid-column: 1;
  }

  .front-page .post-content .wp-block-latest-posts__featured-image,
  .home .post-content .wp-block-latest-posts__featured-image,
  .blog .post-content .wp-block-latest-posts__featured-image {
    grid-row: auto;
  }

  .front-page .post-content .wp-block-latest-posts__featured-image img,
  .home .post-content .wp-block-latest-posts__featured-image img,
  .blog .post-content .wp-block-latest-posts__featured-image img {
    height: auto;
  }
}

/* HTS: Recent Posts Extended widget (Latest News) */
.widget_ct_mission_news_post_list .post-item.has-image .top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.widget_ct_mission_news_post_list .post-item.has-image .featured-image {
  flex: 0 0 160px;
  margin: 0;
}

.widget_ct_mission_news_post_list .post-item.has-image .featured-image a {
  display: block;
  font-size: 0;
  line-height: 0;
}

.widget_ct_mission_news_post_list .post-item.has-image .featured-image img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.widget_ct_mission_news_post_list .post-item.has-image .top-inner {
  flex: 1 1 auto;
}

@media (max-width: 768px) {
  .widget_ct_mission_news_post_list .post-item.has-image .top {
    flex-direction: column;
  }

  .widget_ct_mission_news_post_list .post-item.has-image .featured-image {
    flex: 0 0 auto;
    width: 100%;
  }

  .widget_ct_mission_news_post_list .post-item.has-image .featured-image img {
    height: auto;
  }
}

/* HTS: Archive cards (categorias/arquivo) */
.archive .post > article,
.blog .post > article,
.search .post > article {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 6px;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid #e8e8e8;
}

.archive .post .featured-image,
.blog .post .featured-image,
.search .post .featured-image {
  grid-column: 1;
  grid-row: 1 / span 10;
  margin: 0;
}

.archive .post .featured-image a,
.blog .post .featured-image a,
.search .post .featured-image a {
  display: block;
  font-size: 0;
  line-height: 0;
}

.archive .post .featured-image img,
.blog .post .featured-image img,
.search .post .featured-image img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.archive .post .post-header,
.archive .post .post-content,
.blog .post .post-header,
.blog .post .post-content,
.search .post .post-header,
.search .post .post-content {
  grid-column: 2;
}

.archive .post .post-header,
.blog .post .post-header,
.search .post .post-header {
  margin: 0;
  align-self: start;
}

.archive .post .post-title,
.blog .post .post-title,
.search .post .post-title {
  margin: 0;
}

.archive .post .post-content p,
.blog .post .post-content p,
.search .post .post-content p {
  margin-top: 6px;
}

@media (max-width: 768px) {
  .archive .post > article,
  .blog .post > article,
  .search .post > article {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .archive .post .featured-image,
  .blog .post .featured-image,
  .search .post .featured-image {
    grid-row: auto;
  }

  .archive .post .post-header,
  .archive .post .post-content,
  .blog .post .post-header,
  .blog .post .post-content,
  .search .post .post-header,
  .search .post .post-content {
    grid-column: 1;
  }

  .archive .post .featured-image img,
  .blog .post .featured-image img,
  .search .post .featured-image img {
    height: auto;
  }
}

/* HTS: Remover descrição dos cards em páginas de categoria/arquivo/tag/busca */
.category .post .post-content,
.archive .post .post-content,
.tag .post .post-content,
.search .post .post-content {
  display: none;
}

/* HTS: Centralizar paginação */
.pagination {
  text-align: center;
}
