/* =========================================================
   Comunidade — Comunicados e Campanhas (grade de publicações)
   ========================================================= */

.tsg-comunicados,
.tsg-campanhas {
	scroll-margin-top: calc(var(--tsg-altura-cabecalho) + var(--wp--preset--spacing--20));
}

.tsg-comunicados {
	background: var(--wp--preset--color--branco);
}

.tsg-campanhas {
	background: var(--wp--preset--color--fundo-neblina);
}

/* O texto introdutório já comunica "em breve"; sem posts, não sobra uma faixa vazia. */
.tsg-campanhas .tsg-secao-documental__corpo:not(:has(.tsg-campanhas__item)) {
	display: none;
}

.tsg-comunicados__grade,
.tsg-campanhas__grade {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2vw, 24px);
}

.tsg-comunicados__item,
.tsg-campanhas__item {
	display: flex;
	flex-direction: column;
	min-height: 280px;
	padding: clamp(24px, 4vw, 32px);
	border: 1px solid var(--wp--custom--linha);
	border-radius: calc(var(--wp--custom--raio) + 2px);
	background: var(--wp--preset--color--branco);
	box-shadow: 0 14px 50px color-mix(in srgb, var(--wp--preset--color--fundo-escuro) 7%, transparent);
	transition:
		transform 320ms var(--wp--custom--ease-out),
		box-shadow 320ms var(--wp--custom--ease-out);
}

@media (hover: hover) and (pointer: fine) {
	.tsg-comunicados__item:hover,
	.tsg-campanhas__item:hover {
		transform: translateY(-6px);
		box-shadow: var(--wp--custom--sombra);
	}
}

.tsg-comunicados__data,
.tsg-campanhas__data {
	margin: 0 0 var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--marca);
	font-family: var(--wp--preset--font-family--titulo);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tsg-comunicados__titulo,
.tsg-campanhas__titulo {
	margin: 0;
	line-height: 1.15;
}

.tsg-comunicados__titulo,
.tsg-comunicados__titulo a,
.tsg-campanhas__titulo,
.tsg-campanhas__titulo a {
	color: var(--wp--preset--color--fundo-escuro);
}

.tsg-comunicados__titulo a:hover,
.tsg-comunicados__titulo a:focus,
.tsg-campanhas__titulo a:hover,
.tsg-campanhas__titulo a:focus {
	color: var(--wp--preset--color--marca);
	text-decoration: none;
}

.tsg-comunicados__resumo,
.tsg-campanhas__resumo {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--30);
	color: var(--wp--custom--texto-suave);
	line-height: 1.55;
}

.tsg-comunicados__resumo p,
.tsg-campanhas__resumo p {
	margin: 0;
}

.tsg-comunicados__resumo .wp-block-post-excerpt__more-text,
.tsg-campanhas__resumo .wp-block-post-excerpt__more-text {
	margin-top: var(--wp--preset--spacing--20);
}

.tsg-comunicados__resumo .wp-block-post-excerpt__more-link,
.tsg-campanhas__resumo .wp-block-post-excerpt__more-link {
	color: var(--wp--preset--color--marca);
	font-family: var(--wp--preset--font-family--titulo);
	font-weight: 600;
}

@media (max-width: 899px) {
	.tsg-comunicados__grade,
	.tsg-campanhas__grade {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.tsg-comunicados__item,
	.tsg-campanhas__item {
		min-height: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tsg-comunicados__item,
	.tsg-campanhas__item {
		transition: none;
	}
}
