/* Section: Tópicos — Feed (sec_topic_feed) v1.0
   Baseado em sec-howto / sec-blog-feed
   Classes: .focofy-topicfeed (raiz), .focofy-topicfeed__* (elementos)
   Cards herdam focofy-postcard de components/post-card.css
*/

/* ── Raiz ────────────────────────────────────────────────────────── */
.focofy-topicfeed {
	display: flex;
	flex-direction: column;
	gap: var(--space-8);
}

/* ── Header ──────────────────────────────────────────────────────── */
.focofy-topicfeed__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-6);
	flex-wrap: wrap;
}

.focofy-topicfeed__header-content {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

.focofy-topicfeed__subtitle {
	font-size: var(--font-size-sm);
	font-weight: var(--fw-semibold);
	color: var(--color-accent);
	text-transform: uppercase;
	letter-spacing: .07em;
	margin: 0;
}

.focofy-topicfeed__title {
	font-size: clamp(var(--font-size-2xl), 3vw, var(--font-size-3xl));
	font-weight: var(--fw-semibold);
	color: var(--color-heading);
	margin: 0;
	line-height: var(--lh-tight);
}

/* ── Grid ────────────────────────────────────────────────────────── */
.focofy-topicfeed__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--space-6);
}

/* ── Badge de term_code no card ──────────────────────────────────── */
.focofy-topicfeed__badge {
	display: inline-flex;
	align-items: center;
	padding: 2px var(--space-3);
	background: var(--color-accent);
	color: var(--color-text-inverse);
	border-radius: var(--radius-full);
	font-size: var(--font-size-xs);
	font-weight: var(--fw-bold);
	letter-spacing: .07em;
	text-transform: uppercase;
	line-height: 1.6;
}

/* ── Estado vazio ─────────────────────────────────────────────────── */
.focofy-topicfeed__empty {
	color: var(--color-text-muted);
	font-size: var(--font-size-sm);
	text-align: center;
	padding: var(--space-10) 0;
}

/* ── Variantes de fundo ──────────────────────────────────────────── */
.focofy-topicfeed--bg-light  { background: var(--color-surface-1); }
.focofy-topicfeed--bg-dark   { background: var(--color-surface-dark); }
.focofy-topicfeed--bg-accent { background: var(--color-accent); }
.focofy-topicfeed--bg-gradient { background: var(--gradient-section-accent); }
.focofy-topicfeed--bg-primary  { background: var(--color-surface-2); }

/* ── Layout lista ─────────────────────────────────────────────────── */
.focofy-topicfeed--layout-list .focofy-topicfeed__grid {
	grid-template-columns: 1fr;
}

.focofy-topicfeed--layout-list .focofy-postcard {
	flex-direction: row;
	max-height: 180px;
}

.focofy-topicfeed--layout-list .focofy-postcard__thumb {
	width: 240px;
	flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {  /* --bp-tablet */
	.focofy-topicfeed__header {
		flex-direction: column;
		align-items: flex-start;
	}

	.focofy-topicfeed__grid {
		grid-template-columns: 1fr;
	}

	.focofy-topicfeed--layout-list .focofy-postcard {
		flex-direction: column;
		max-height: none;
	}

	.focofy-topicfeed--layout-list .focofy-postcard__thumb {
		width: 100%;
	}
}
