/* Central do Cidadão (inc/central-cidadao.php, assets/js/central-cidadao.js).
   Linguagem do resto da capa (colunas por editoria, Opinião): sem caixas por item, títulos em serifa, fios finos, rótulos em caixa alta. */

/* Cartão e cabeçalho no padrão de Opinião, Placar e Loterias */
.ct-comunidade-section.ct-cc { margin: 24px 0 20px; }
.ct-cc-cartao { background: #fff; border: 1px solid #eceff3; border-radius: var(--ct-img-radius, 8px); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); padding: 14px 20px 16px; }
.ct-cc-cab { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 0; border: 0; }
.ct-cc-cab::after { content: ""; display: block; flex: 1; height: 1px; background: #e2e8f0; order: 1; }
.ct-cc-cab .ct-section-heading-title { margin: 0 0 4px; font-size: 22px; font-weight: 700; letter-spacing: -.04em; color: #17191d; }
.ct-cc-cab > .ct-patrocinio, .ct-cc-cab > .ct-cc-enviar { order: 2; margin: 0; padding: 0; border: 0; white-space: nowrap; }
.ct-cc-enviar { font-size: 13px; font-weight: 700; color: #3d4551; text-decoration: none; }
.ct-cc-enviar:hover { color: #c0261c; text-decoration: underline; }
.ct-cc-enviar i { font-size: 11px; margin-left: 3px; }
.ct-cc-cab .ct-patrocinio-logo { max-height: 30px; max-width: 150px; }
.ct-cc-cab .ct-patrocinio-nome { font-size: 15px; }

/* Abas em texto, como o menu do portal; "Ver todos" à direita */
.ct-cc-barra { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #e2e5ea; }
.ct-cc-abas { display: flex; flex: 1; min-width: 0; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.ct-cc-abas::-webkit-scrollbar { display: none; }
.ct-cc-aba { flex: none; display: inline-flex; align-items: baseline; gap: 6px; padding: 9px 0 8px; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: 15px; font-weight: 700; color: #6b7280; cursor: pointer; white-space: nowrap; }
.ct-cc-aba i { display: none; }
.ct-cc-aba:hover { color: #17191d; }
.ct-cc-aba[aria-selected="true"] { color: #17191d; border-bottom-color: #17191d; }
.ct-cc-aba:focus-visible { outline: 2px solid #17191d; outline-offset: 2px; }
.ct-cc-conta { font-size: 12px; font-weight: 600; color: #9aa1ac; font-variant-numeric: tabular-nums; }
.ct-cc-aba[aria-selected="true"] .ct-cc-conta { color: #6b7280; }
.ct-cc-todos { flex: none; padding: 6px 2px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: #3d4551; cursor: pointer; white-space: nowrap; }
.ct-cc-todos[hidden] { display: none; }
.ct-cc-todos:hover { color: #c0261c; }
.ct-cc-todos i { font-size: 11px; margin-left: 3px; transition: transform .2s; }
.ct-cc-todos.is-aberto i { transform: rotate(90deg); }
.ct-cc-todos:focus-visible { outline: 2px solid #17191d; outline-offset: 2px; }

.ct-cc .ct-patrocinio--inline { margin: 0; padding: 0; border: 0; }
.ct-cc-aba-painel > .ct-patrocinio--inline { padding: 10px 0 0; }
.ct-cc-nota { margin: 0; padding: 10px 0 0; font-size: 13.5px; font-weight: 600; color: #6b7280; }

/* Colunas separadas por fio vertical, sem caixa */
.ct-cc2-grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; margin-top: 6px; }
.ct-cc2-card { min-width: 0; padding: 16px 22px 16px; border-left: 1px solid #e6e9ee; border-bottom: 1px solid #eef0f3; }
.ct-cc2-card:nth-child(4n+1) { border-left: 0; padding-left: 0; }
.ct-cc2-card:nth-child(4n) { padding-right: 0; }
.ct-cc2-card.is-oculto { display: none; }

.ct-cc2-foto { height: 120px; overflow: hidden; margin: 0 0 12px; border-radius: var(--ct-img-radius, 8px); background: #eef1f5; }
.ct-cc2-foto img, .ct-cc-foto { display: block; width: 100%; height: 100%; object-fit: cover; }
.ct-cc2-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
.ct-cc2-kicker { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #6b7280; }
.ct-cc2-kicker.is-data { color: #c0261c; }
.ct-cc2-selo { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; }
.ct-cc2-selo.is-alerta { color: #c0261c; }
.ct-cc2-selo.is-nova { color: #0369a1; }
.ct-cc2-titulo { margin: 0 0 8px; font-family: var(--font-serif, Georgia, serif); font-size: 19px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; color: #17191d; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ct-cc2-situacao { margin: 0 0 8px; }
.ct-cc2-situacao .ct-farm-status { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; border-radius: 0; background: none; font-size: 13.5px; font-weight: 700; text-transform: none; letter-spacing: 0; color: #15803d; }
.ct-cc2-situacao .ct-farm-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.ct-cc2-situacao .ct-farm-status.is-fechada { color: #6b7280; }
.ct-cc2-resumo { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ct-cc2-resumo li { display: flex; align-items: flex-start; gap: 7px; font-size: 14px; line-height: 1.4; color: #4b5563; }
.ct-cc2-resumo li i { flex: none; width: 13px; margin-top: 3px; font-size: 12px; text-align: center; color: #9aa1ac; }
.ct-cc2-resumo li span { min-width: 0; overflow-wrap: anywhere; }
.ct-cc2-resumo li.is-forte { color: #17191d; font-weight: 700; }

/* Ações: só ícones (WhatsApp, mapa, compartilhar), linhas finas como os ícones do cabeçalho */
.ct-cc2-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ct-cc2-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid #d5d9df; border-radius: 50%; background: #fff; color: #17191d; font-size: 14px; text-decoration: none; transition: color .15s, border-color .15s; }
.ct-cc2-ico:hover { color: #c0261c; border-color: #c0261c; }
.ct-cc2-ico:focus-visible { outline: 2px solid #17191d; outline-offset: 2px; }
.ct-cc2-ico i { font-size: 15px; line-height: 1; }
.ct-cc2-resumo li a { color: inherit; text-decoration: none; border-bottom: 1px solid #cfd4db; }
.ct-cc2-resumo li a:hover { color: #c0261c; border-bottom-color: #c0261c; }

/* Mais detalhes: abre dentro da coluna */
.ct-cc2-mais { margin-top: 12px; }
.ct-cc2-mais summary { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #17191d; cursor: pointer; list-style: none; }
.ct-cc2-mais summary::-webkit-details-marker { display: none; }
.ct-cc2-mais summary::after { content: "+"; font-size: 16px; font-weight: 600; line-height: 1; color: #6b7280; }
.ct-cc2-mais[open] summary::after { content: "−"; }
.ct-cc2-mais summary:hover { color: #c0261c; }
.ct-cc2-mais summary:focus-visible { outline: 2px solid #17191d; outline-offset: 3px; }
.ct-cc2-mais-corpo { margin-top: 10px; padding-top: 4px; border-top: 1px solid #e2e5ea; }

.ct-cc-fatos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin: 0 0 12px; }
.ct-cc-fatos > div { padding: 8px 0; border-bottom: 1px solid #eef0f3; min-width: 0; }
.ct-cc-fatos dt { margin: 0 0 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; }
.ct-cc-fatos dd { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.35; color: #17191d; overflow-wrap: anywhere; }
.ct-cc-tabela { width: 100%; margin: 0 0 12px; border-collapse: collapse; font-size: 13.5px; }
.ct-cc-tabela caption { padding: 4px 0; text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; }
.ct-cc-tabela th, .ct-cc-tabela td { padding: 6px 0; border-bottom: 1px solid #eef0f3; text-align: left; vertical-align: top; }
.ct-cc-tabela th { width: 46%; font-weight: 600; color: #6b7280; }
.ct-cc-tabela td { font-weight: 600; color: #17191d; }
.ct-cc-texto { margin: 0 0 12px; font-size: 14.5px; line-height: 1.55; color: #2b2f36; }
.ct-cc-texto > :first-child { margin-top: 0; }
.ct-cc-texto > :last-child { margin-bottom: 0; }
.ct-cc-aviso { margin: 0 0 10px; padding: 9px 0 9px 12px; border-left: 2px solid #cfd4db; font-size: 13px; line-height: 1.45; color: #5b6472; }
.ct-cc-aviso--forte { color: #17191d; font-weight: 600; }
.ct-cc-rodape { margin: 8px 0 0; font-size: 12px; color: #8a93a0; }

.ct-cc-convite { margin: 14px 0 0; font-size: 13px; }
.ct-cc-convite a { font-weight: 700; color: #17191d; text-decoration: underline; text-underline-offset: 3px; }
.ct-cc-convite a:hover { color: #c0261c; }

/* Sem JS: tudo aberto, empilhado */
.ct-cc:not(.is-js) .ct-cc-barra { display: none; }
.ct-cc:not(.is-js) .ct-cc-aba-painel + .ct-cc-aba-painel { margin-top: 18px; padding-top: 14px; border-top: 1px solid #e2e5ea; }

/* Telas médias: menos colunas (o fio vertical acompanha) */
@media (max-width: 1100px) {
    .ct-cc2-grade { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ct-cc2-card:nth-child(n) { border-left: 1px solid #e6e9ee; padding-left: 22px; padding-right: 22px; }
    .ct-cc2-card:nth-child(3n+1) { border-left: 0; padding-left: 0; }
    .ct-cc2-card:nth-child(3n) { padding-right: 0; }
}
@media (max-width: 860px) {
    .ct-cc2-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ct-cc2-card:nth-child(n) { border-left: 1px solid #e6e9ee; padding-left: 22px; padding-right: 22px; }
    .ct-cc2-card:nth-child(2n+1) { border-left: 0; padding-left: 0; }
    .ct-cc2-card:nth-child(2n) { padding-right: 0; }
}

/* Celular: título numa linha e colunas que deslizam; "Ver todos" vira lista */
@media (max-width: 700px) {
    .ct-cc-cartao { padding: 12px 14px 14px; }
    .ct-cc-cab { flex-wrap: wrap; gap: 2px 10px; }
    .ct-cc-cab::after { display: none; }
    .ct-cc-cab .ct-section-heading-title { white-space: nowrap; }
    .ct-cc-cab > .ct-patrocinio, .ct-cc-cab > .ct-cc-enviar { flex-basis: 100%; margin: 0 0 6px; }
    .ct-cc-barra { flex-wrap: wrap; gap: 0 12px; border-bottom: 0; }
    .ct-cc-abas { flex: 1 1 100%; gap: 18px; border-bottom: 1px solid #e2e5ea; }
    .ct-cc-todos { margin-left: auto; padding: 8px 0 0; }
    .ct-cc2-grade { display: flex; margin: 8px -14px 0; padding: 0 14px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 14px; scrollbar-width: none; overscroll-behavior-x: contain; }
    .ct-cc2-grade::-webkit-scrollbar { display: none; }
    .ct-cc2-card:nth-child(n) { flex: 0 0 78%; scroll-snap-align: start; border-left: 1px solid #e6e9ee; border-bottom: 0; padding: 12px 16px 12px; }
    .ct-cc2-card:first-child { border-left: 0; padding-left: 0; }
    .ct-cc2-grade.is-lista { flex-direction: column; overflow: visible; margin: 8px 0 0; padding: 0; }
    .ct-cc2-grade.is-lista .ct-cc2-card:nth-child(n) { flex: 0 0 auto; border-left: 0; padding: 14px 0; border-bottom: 1px solid #eef0f3; }
}

@media (prefers-reduced-motion: reduce) {
    .ct-cc-todos i { transition: none; }
}
