/* Trilha B (30/09/2026): itens de includes/layout.php. Só carrega com um item ativo (td_layout_<item>) ou na prévia. */

/* ------------------------------------------------ selo da prévia */
.td-previa-selo {
	position: fixed;
	left: 50%;
	bottom: 14px;
	z-index: 99999;
	transform: translateX(-50%);
	padding: 0.4rem 1rem;
	border-radius: 999px;
	background: #b45309;
	color: #fff;
	font: 700 0.78rem/1.3 Inter, system-ui, sans-serif;
	letter-spacing: 0.06em;
	box-shadow: 0 6px 20px rgb(0 0 0 / 30%);
	pointer-events: none;
}

/* ------------------------------------------------ mosaico nas páginas de categoria */
/* A cor da editoria vem da classe td-ed--<cor> no body (mesma paleta das etiquetas da Home). */
body.td-cat-mosaico { --td-ed: #2563eb; }
body.td-ed--violeta { --td-ed: #7c3aed; }
body.td-ed--vermelho { --td-ed: #dc2626; }
body.td-ed--verde { --td-ed: #15803d; }
body.td-ed--ambar { --td-ed: #b45309; }
body.td-ed--ciano { --td-ed: #0e7490; }
body.td-ed--rosa { --td-ed: #be185d; }

/* Cabeçalho da editoria mais enxuto: barra na cor da editoria no lugar da caixa grande. */
.td-cat-mosaico .ast-archive-description {
	margin-bottom: 1.2rem !important;
	padding: 1.4rem 0 0.4rem 1.1rem !important;
	background: transparent !important;
	border-left: 5px solid var(--td-ed);
}
.td-cat-mosaico .ast-archive-description .ast-archive-title {
	margin: 0 0 0.3rem;
	font-size: clamp(1.8rem, 3.4vw, 2.6rem) !important;
	line-height: 1.1;
	color: inherit !important;
}
.td-cat-mosaico .ast-archive-description p { margin: 0; color: var(--td-muted); font-size: 1.02rem; }

.td-cat { margin-bottom: 2rem; }
.td-subeds { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.4rem; }
.td-subed {
	padding: 0.35rem 0.9rem;
	border: 1px solid rgb(148 163 184 / 40%);
	border-radius: 999px;
	font-size: 0.86rem;
	font-weight: 600;
	color: inherit !important;
	text-decoration: none !important;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}
.td-subed:hover { border-color: var(--td-ed); }
.td-subed.is-atual { background: var(--td-ed); border-color: var(--td-ed); color: #fff !important; }
.td-cat .tdh-mosaico { margin-bottom: 0.5rem; }
.td-cat-mais { margin-top: 2.2rem; }
/* Um artigo só: o destaque deitado (imagem à esquerda, texto à direita) em vez de uma coluna vazia ao lado. */
.td-cat-solo .tdh-card--grande { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
.td-cat-solo .tdh-card--grande .tdh-thumb { height: 100%; }
.td-cat-solo .tdh-card--grande .tdh-img { height: 100%; }
/* O Astra põe o laço numa grade de cards; o nosso bloco ocupa a linha inteira. */
.td-cat-mosaico #main { display: block !important; }
.td-cat-mosaico .ast-pagination { margin-top: 1rem; }
@media (max-width: 960px) {
	.td-cat-solo .tdh-card--grande { grid-template-columns: 1fr; }
}

/* ------------------------------------------------ rodapé de portal */
.td-rodape-news {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
	flex-wrap: wrap;
	margin: 0 0 2.6rem;
	padding: 1.3rem 1.6rem;
	border-radius: var(--td-radius);
	background: var(--td-gradient);
	color: #fff;
}
.td-rodape-news b { display: block; font: 700 1.25rem/1.25 "Space Grotesk", Inter, sans-serif; color: #fff; }
.td-rodape-news span { color: rgb(255 255 255 / 88%); font-size: 0.92rem; }
.td-rodape-news-botao {
	padding: 0.7rem 1.4rem;
	border-radius: 999px;
	background: #fff;
	color: #1d4ed8 !important;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
}
.td-footer--v2 { grid-template-columns: 1.3fr 0.9fr 1.3fr 1fr 1fr; }
.td-footer-ultimas .td-footer-links { gap: 0.8rem; }
.td-footer-ultimas a { display: block; line-height: 1.35; font-size: 0.9rem !important; color: #cbd5e1 !important; }
.td-footer-ultimas small { display: block; margin-top: 0.15rem; font-size: 0.75rem; color: #94a3b8; }
.td-redes { display: flex; gap: 0.6rem; margin-top: 1.1rem; }
.td-rede {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgb(148 163 184 / 14%);
	color: #e2e8f0 !important;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.td-rede--youtube:hover { background: #dc2626; color: #fff !important; }
.td-rede--linkedin:hover { background: #0a66c2; color: #fff !important; }
.td-rodape-empresa {
	margin: 2.4rem 0 0 !important;
	padding-top: 1.2rem;
	border-top: 1px solid rgb(148 163 184 / 12%);
	font-size: 0.8rem;
	color: #94a3b8;
	text-align: center;
}
@media (max-width: 1100px) {
	.td-footer--v2 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.td-footer--v2 .td-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
	.td-footer--v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.td-footer--v2 .td-footer-ultimas { grid-column: 1 / -1; }
	.td-rodape-news { padding: 1.1rem 1.2rem; }
	.td-rodape-news-botao { width: 100%; text-align: center; }
}

/* ------------------------------------------------ tema escuro: ajustes dos blocos novos e dos artigos */
/* Código: o fundo #0b1120 era igual ao da página no escuro, e o bloco sumia. */
html[data-theme="dark"] body.td-escuro-v2 .entry-content pre {
	background: #020617;
	border: 1px solid rgb(148 163 184 / 22%);
}
/* Tabela do editor: a borda padrão usa a cor do texto (branco no escuro). */
html[data-theme="dark"] body.td-escuro-v2 .entry-content .wp-block-table :is(table, thead, th, td) {
	border-color: rgb(148 163 184 / 25%) !important;
}
html[data-theme="dark"] body.td-escuro-v2 .entry-content .wp-block-table thead th { background: rgb(148 163 184 / 10%); }
/* Linha entre o artigo e a barra lateral. */
html[data-theme="dark"] body.td-escuro-v2 #secondary,
html[data-theme="dark"] body.td-escuro-v2.ast-right-sidebar #primary { border-color: rgb(148 163 184 / 14%) !important; }
/* Aviso de cookies (Complianz) acompanha o tema. */
html[data-theme="dark"] body.td-escuro-v2 .cmplz-cookiebanner {
	background: var(--td-surface) !important;
	color: var(--ast-global-color-3) !important;
	border: 1px solid rgb(148 163 184 / 22%);
}
html[data-theme="dark"] body.td-escuro-v2 .cmplz-cookiebanner :is(.cmplz-title, .cmplz-message, .cmplz-message p, .cmplz-close) { color: var(--ast-global-color-3) !important; }
html[data-theme="dark"] body.td-escuro-v2 .cmplz-cookiebanner .cmplz-btn.cmplz-deny,
html[data-theme="dark"] body.td-escuro-v2 .cmplz-cookiebanner .cmplz-btn.cmplz-view-preferences {
	background: transparent !important;
	color: var(--ast-global-color-2) !important;
	border-color: rgb(148 163 184 / 45%) !important;
}
html[data-theme="dark"] body.td-escuro-v2 .cmplz-cookiebanner .cmplz-links a { color: #60a5fa !important; }
/* "Em breve": respiro entre o cabeçalho da seção e o bloco. */
body.td-secao-em-breve .tdh-breve { padding-top: 2rem; }
/* Cards da Home no escuro: borda sutil para separar do fundo (só a sombra não aparecia). */
html[data-theme="dark"] body.td-escuro-v2 :is(.tdh-card, .tdh-barra-bloco, .tdh-yt-breve) { border: 1px solid rgb(148 163 184 / 14%); }

/* ------------------------------------------------ acessibilidade: área de toque mínima de 24 px (PageSpeed, 30/09) */
.tdh-chip { display: inline-flex; align-items: center; min-height: 24px; }
.tdh-card--lista .tdh-chip { min-height: 24px; }
.tdh-meta { min-height: 24px; }
