/*
 * EchoBoomer — páginas de categoria (só is_category()).
 * Variáveis vindas do PHP em body.category: --eb-sec (cor da secção), --eb-cat-kicker, --eb-cat-count, --eb-cat-desc.
 * Prefixo "body.category .tdc-content-wrap" para vencer o CSS por bloco do Composer (.tdi_NN, com !important).
 * Larguras alinhadas com o resto do site: 1200px.
 */

/* ============ 1. Nome da secção: simples, numa linha (o H1 que o modelo escondia no desktop) ============ */
body.category .tdc-content-wrap .tdb-category-title{
  display:block!important;max-width:1200px;margin:26px auto 16px!important;padding:0 4px}
body.category .tdc-content-wrap .tdb-category-title .tdb-block-inner{
  display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px}
/* ponto "eco" na cor da secção (só gradientes: sem elementos extra) */
body.category .tdc-content-wrap .tdb-category-title .tdb-block-inner::before{
  content:"";flex:none;width:30px;height:30px;
  background:radial-gradient(circle at 15px 15px,var(--eb-sec) 0 5px,rgba(1,134,253,.22) 5.5px 10px,rgba(1,134,253,.09) 10.5px 15px,transparent 15.5px);
  background:radial-gradient(circle at 15px 15px,var(--eb-sec) 0 5px,color-mix(in srgb,var(--eb-sec) 22%,transparent) 5.5px 10px,color-mix(in srgb,var(--eb-sec) 9%,transparent) 10.5px 15px,transparent 15.5px)}
body.category .tdc-content-wrap .tdb-category-title .tdb-title-text{
  display:block;margin:0;text-transform:none!important;color:var(--eb-ink)!important;
  font-size:clamp(28px,3.6vw,40px)!important;line-height:1.1!important;font-weight:900!important;letter-spacing:-.025em!important}
body.category .tdc-content-wrap .tdb-category-title .tdb-block-inner>div:not(.tdb-title-line){display:none}
/* contagem em pílula, ao lado do nome */
body.category .tdc-content-wrap .tdb-category-title .tdb-title-line{
  display:block!important;height:auto!important;margin:0}
body.category .tdc-content-wrap .tdb-category-title .tdb-title-line::before{
  content:var(--eb-cat-count,"");display:inline-block;padding:6px 12px;border-radius:99px;background:#fff;
  font:700 12.5px/1 var(--td_default_google_font_2,'Roboto',sans-serif);color:var(--eb-muted);
  box-shadow:inset 0 0 0 1px var(--eb-line)}
body.category .tdc-content-wrap .tdb-category-title .tdb-title-line::after{content:none;display:none}

/* ============ 2. Hero (slider): cartão arredondado, mais baixo, sem o ecrã de 720px ============ */
body.category .tdc-content-wrap .td_block_slide{
  max-width:1200px;margin:0 auto!important;border-radius:22px;overflow:hidden;isolation:isolate}
body.category .tdc-content-wrap .td_block_slide .td_block_inner,
body.category .tdc-content-wrap .td_block_slide .td-theme-slider,
body.category .tdc-content-wrap .td_block_slide .td_module_slide{height:clamp(330px,40vw,500px)!important}
body.category .tdc-content-wrap .td_block_slide .td-image-gradient:before{
  background:linear-gradient(180deg,rgba(15,23,42,0) 30%,rgba(15,23,42,.35) 58%,rgba(15,23,42,.88))!important}
body.category .tdc-content-wrap .td_block_slide .td-slide-meta{
  max-width:860px!important;left:0;right:auto;bottom:0!important;margin:0;padding:0 44px 40px!important}
body.category .tdc-content-wrap .td_block_slide .td_module_slide .entry-title{
  font-size:clamp(24px,3.5vw,44px)!important;line-height:1.1!important;font-weight:800!important;
  letter-spacing:-.022em!important;margin:12px 0 0;text-wrap:balance;text-shadow:0 2px 24px rgba(0,0,0,.35)}
/* etiqueta: pílula na cor da secção do artigo */
body.category .tdc-content-wrap .td_block_slide .slide-meta-cat a{
  --eb-pill:var(--eb-sec,var(--eb-accent));
  display:inline-block;margin:0!important;padding:7px 13px!important;border-radius:99px;
  background:var(--eb-pill)!important;color:#fff!important;
  font-family:var(--td_default_google_font_2,'Roboto',sans-serif)!important;font-size:11px!important;font-weight:800!important;
  letter-spacing:.1em!important;line-height:1!important;text-transform:uppercase!important}
body.category .tdc-content-wrap .td_block_slide .slide-meta-cat a[href*="/tecnologia/"]{--eb-pill:var(--eb-c-tech)}
body.category .tdc-content-wrap .td_block_slide .slide-meta-cat a[href*="/cultura/"]{--eb-pill:var(--eb-c-cultura)}
body.category .tdc-content-wrap .td_block_slide .slide-meta-cat a[href*="/videojogos/"]{--eb-pill:var(--eb-c-jogos)}
body.category .tdc-content-wrap .td_block_slide .slide-meta-cat a[href*="/sociedade/"],
body.category .tdc-content-wrap .td_block_slide .slide-meta-cat a[href*="/na-mesa/"]{--eb-pill:var(--eb-c-mesa)}
body.category .tdc-content-wrap .td_block_slide .slide-meta-cat a[href*="/viagens/"]{--eb-pill:var(--eb-c-viagens)}
body.category .tdc-content-wrap .td_block_slide .td_module_slide .td-module-meta-info,
body.category .tdc-content-wrap .td_block_slide .td-post-author-name,
body.category .tdc-content-wrap .td_block_slide .td-post-author-name a{color:rgba(255,255,255,.88)!important;font-size:13px;font-weight:600}

/* ============ 3. Painel "Mais recentes": faixa por baixo do hero, sem sobreposição ============ */
body.category .tdc-content-wrap .vc_row_inner.absolute_inner{
  position:relative!important;top:auto!important;bottom:auto!important;transform:none!important;
  max-width:1200px;width:100%!important;margin:18px auto 0!important;padding:0!important}
body.category .tdc-content-wrap .vc_row_inner.absolute_inner .vc_column_inner{
  border-radius:20px;padding:22px 28px 26px!important;margin:0!important;width:auto!important}
body.category .tdc-content-wrap .vc_row_inner.absolute_inner .td-element-style{
  background:#fff!important;border-radius:20px;box-shadow:inset 0 0 0 1px var(--eb-line)}
body.category .tdc-content-wrap .vc_row_inner.absolute_inner .td-element-style-before{display:none!important}

/* ============ 4. Lista de artigos: grelha de 3 colunas, cartões limpos ============ */
body.category .tdc-content-wrap .vc_row:has(.tdb-category-loop-posts){
  padding-top:54px!important;padding-bottom:66px!important}
body.category .tdc-content-wrap .tdb-category-loop-posts .tdb-block-inner{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:44px 28px;margin:0!important}
body.category .tdc-content-wrap .tdb-category-loop-posts .td_module_wrap{
  width:auto!important;float:none!important;padding:0!important;margin:0!important;
  --eb-card:var(--eb-sec,var(--eb-accent))}
body.category .tdc-content-wrap .tdb-category-loop-posts .td_module_wrap:has(.td-post-category[href*="/tecnologia/"]){--eb-card:var(--eb-c-tech)}
body.category .tdc-content-wrap .tdb-category-loop-posts .td_module_wrap:has(.td-post-category[href*="/cultura/"]){--eb-card:var(--eb-c-cultura)}
body.category .tdc-content-wrap .tdb-category-loop-posts .td_module_wrap:has(.td-post-category[href*="/videojogos/"]){--eb-card:var(--eb-c-jogos)}
body.category .tdc-content-wrap .tdb-category-loop-posts .td_module_wrap:has(.td-post-category[href*="/sociedade/"]),
body.category .tdc-content-wrap .tdb-category-loop-posts .td_module_wrap:has(.td-post-category[href*="/na-mesa/"]){--eb-card:var(--eb-c-mesa)}
body.category .tdc-content-wrap .tdb-category-loop-posts .td_module_wrap:has(.td-post-category[href*="/viagens/"]){--eb-card:var(--eb-c-viagens)}
/* sem a linha divisória do modelo */
body.category .tdc-content-wrap .tdb-category-loop-posts .td-module-container:before{display:none!important}
body.category .tdc-content-wrap .tdb-category-loop-posts .td-image-wrap{padding-bottom:62%!important}
body.category .tdc-content-wrap .tdb-category-loop-posts .entry-thumb{
  border-radius:16px!important;box-shadow:0 6px 22px rgba(15,23,42,.10)!important;
  transition:transform .35s ease,box-shadow .35s ease}
body.category .tdc-content-wrap .tdb-category-loop-posts .td_module_wrap:hover .entry-thumb{
  transform:translateY(-3px);box-shadow:0 14px 32px rgba(15,23,42,.16)!important}
body.category .tdc-content-wrap .tdb-category-loop-posts .td-module-meta-info{padding:16px 2px 0!important}
body.category .tdc-content-wrap .tdb-category-loop-posts .entry-title{
  margin:0 0 9px!important;font-family:inherit!important;font-size:19px!important;line-height:1.22!important;font-weight:800!important;
  letter-spacing:-.012em;text-wrap:balance}
body.category .tdc-content-wrap .tdb-category-loop-posts .td-module-title a{color:var(--eb-ink)!important}
body.category .tdc-content-wrap .tdb-category-loop-posts .td_module_wrap:hover .td-module-title a{color:var(--eb-card)!important}
body.category .tdc-content-wrap .tdb-category-loop-posts .td-module-title a:focus-visible{
  outline:2px solid var(--eb-accent);outline-offset:3px;border-radius:4px}
body.category .tdc-content-wrap .tdb-category-loop-posts .td-excerpt{
  margin:0 0 12px!important;font-family:inherit!important;font-size:14px!important;line-height:1.55!important;font-weight:400!important;
  color:var(--eb-muted)!important;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
/* etiqueta na cor da secção do artigo; autor e data discretos */
body.category .tdc-content-wrap .tdb-category-loop-posts .td-post-category{
  margin:0 8px 0 0!important;padding:0!important;font-family:var(--td_default_google_font_2,'Roboto',sans-serif)!important;
  font-size:11px!important;font-weight:800!important;letter-spacing:.09em!important;text-transform:uppercase;
  color:var(--eb-card)!important;background:none!important}
body.category .tdc-content-wrap .tdb-category-loop-posts .td-editor-date,
body.category .tdc-content-wrap .tdb-category-loop-posts .td-author-date,
body.category .tdc-content-wrap .tdb-category-loop-posts .td-author-date .entry-date,
body.category .tdc-content-wrap .tdb-category-loop-posts .td-post-author-name a{
  font-family:var(--td_default_google_font_2,'Roboto',sans-serif)!important;font-size:12.5px!important;font-weight:600!important;
  letter-spacing:0!important;text-transform:none!important}
body.category .tdc-content-wrap .tdb-category-loop-posts .td-post-date,
body.category .tdc-content-wrap .tdb-category-loop-posts .td-post-author-name span{color:var(--eb-muted)!important}
body.category .tdc-content-wrap .tdb-category-loop-posts .td-post-author-name a{color:var(--eb-ink)!important}

/* ============ 5. Paginação (são centenas de páginas: botões grandes e legíveis) ============ */
body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav{
  display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;margin:58px 0 0!important;padding:0}
body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav .clearfix{display:none}
body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav a,
body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav span:not(.pages):not(.extend){
  float:none!important;display:inline-flex;align-items:center;justify-content:center;
  min-width:44px;height:44px;margin:0!important;padding:0 14px;border-radius:12px;
  background:#fff;color:var(--eb-ink);font:700 14px/1 var(--td_default_google_font_2,'Roboto',sans-serif);
  box-shadow:inset 0 0 0 1px var(--eb-line);transition:box-shadow .2s ease,color .2s ease,transform .2s ease}
body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav a:hover{
  color:var(--eb-sec);box-shadow:inset 0 0 0 2px var(--eb-sec);transform:translateY(-1px)}
body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav .current{
  background:var(--eb-sec);color:#fff;box-shadow:none}
body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav .extend{
  margin:0!important;padding:0 2px;color:var(--eb-muted);letter-spacing:.1em}
body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav .page-nav-icon{line-height:1;font-size:12px;position:static}
body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav a:focus-visible{outline:2px solid var(--eb-accent);outline-offset:2px}
body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav .pages{
  flex:1 0 100%;margin:10px 0 0!important;text-align:center;float:none!important;
  font:600 13px/1.4 var(--td_default_google_font_2,'Roboto',sans-serif);color:var(--eb-muted)}

/* ============ 6. Ecrãs pequenos ============ */
@media (max-width:1018px){
  body.category .tdc-content-wrap .tdb-category-loop-posts .tdb-block-inner{grid-template-columns:repeat(2,minmax(0,1fr));gap:36px 22px}
}
@media (max-width:767px){
  body.category .tdc-content-wrap .tdb-category-title{margin:18px auto 12px!important;padding:0 18px}
  body.category .tdc-content-wrap .td_block_slide{width:calc(100% - 32px)!important;border-radius:18px}
  body.category .tdc-content-wrap .td_block_slide .td-slide-meta{padding:0 20px 28px!important}
  body.category .tdc-content-wrap .vc_row_inner.absolute_inner{margin:14px auto 0!important;padding:0 16px!important;width:100%!important}
  body.category .tdc-content-wrap .vc_row_inner.absolute_inner .vc_column_inner{padding:16px 16px 18px!important}
  body.category .tdc-content-wrap .vc_row:has(.tdb-category-loop-posts){padding-top:36px!important;padding-bottom:48px!important}
  body.category .tdc-content-wrap .tdb-category-loop-posts .tdb-block-inner{grid-template-columns:1fr;gap:32px;padding:0 4px}
  body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav a,
  body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav span:not(.pages):not(.extend){min-width:40px;height:40px;padding:0 10px}
}
@media (prefers-reduced-motion:reduce){
  body.category .tdc-content-wrap .tdb-category-loop-posts .entry-thumb,
  body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav a{transition:none}
  body.category .tdc-content-wrap .tdb-category-loop-posts .td_module_wrap:hover .entry-thumb,
  body.category .tdc-content-wrap .tdb-category-loop-posts .page-nav a:hover{transform:none}
}
