/* =====================================================================
   BLOG EM GRADE (06/10/2026)

   Carrega so na listagem (/blog/, categorias, tags) quando a camada
   Duplod_Blog esta ativa, que tambem troca o layout do Betheme de
   "classic" para "grid" de 3 colunas e poe .dd-blog-grid no body.

   Desenho: a referencia que o Daniel mandou. Destaque em 2 colunas ao
   lado de um cartao, depois 3 por linha. Cartao cinza claro, imagem no
   topo, categoria em caixa alta colorida, data, titulo, resumo, "Leia
   mais" em vinho.

   Esta folha nao conta com o duplod-v2.css (ele nao carrega no blog):
   cor em literal ou nos tokens --dd-* do style.css.
   ===================================================================== */

.dd-blog-grid {
	--bg-card: #F3F1F1;
	--bg-line: #E4DFDF;
	--bg-gap: 24px;
	--bg-radius: 8px;
	--bg-ink: var(--dd-ink, #2E2A2A);
	--bg-ink-2: var(--dd-ink-2, #544D4D);
	--bg-ink-3: var(--dd-ink-3, #726969);
	--bg-action: #A51D2B;
}


/* --- Grade ------------------------------------------------------------ */

html .dd-blog-grid .posts_group.grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--bg-gap);
	margin: 0;
	height: auto !important;
}

html .dd-blog-grid .posts_group.grid::before,
html .dd-blog-grid .posts_group.grid::after {
	content: none;
	display: none;
}

html .dd-blog-grid .posts_group.grid .post-item {
	position: static !important;
	float: none;
	width: auto !important;
	margin: 0 !important;
	transform: none !important;
	display: flex;
	flex-direction: column;
	background: var(--bg-card);
	border: 1px solid var(--bg-line);
	border-radius: var(--bg-radius);
	overflow: hidden;
	transition: border-color .2s ease, box-shadow .2s ease;
}

html .dd-blog-grid .posts_group.grid .post-item:hover {
	border-color: #D2CACA;
	box-shadow: 0 6px 18px rgba(46, 42, 42, .08);
}

/* Destaque: a primeira de cada pagina ocupa duas colunas. */
html .dd-blog-grid .posts_group.grid .post-item:first-child {
	grid-column: span 2;
}


/* --- Imagem ------------------------------------------------------------ */

html .dd-blog-grid .posts_group.grid .post-item .date_label,
html .dd-blog-grid .posts_group.grid .post-item .image_links,
html .dd-blog-grid .posts_group.grid .post-item .mask {
	display: none;
}

html .dd-blog-grid .posts_group.grid .post-photo-wrapper {
	width: 100%;
	margin: 0;
	border: 0;
	border-radius: 0;
	flex: none;
}

html .dd-blog-grid .posts_group.grid .post-photo-wrapper .image_wrapper {
	aspect-ratio: 16 / 10;
	background: #333333;
	overflow: hidden;
}

html .dd-blog-grid .posts_group.grid .post-item:first-child .post-photo-wrapper .image_wrapper {
	aspect-ratio: 16 / 9;
}

html .dd-blog-grid .posts_group.grid .post-photo-wrapper .image_wrapper > a {
	display: block;
	height: 100%;
}

html .dd-blog-grid .posts_group.grid .post-photo-wrapper img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform .4s ease;
}

html .dd-blog-grid .posts_group.grid .post-item:hover .post-photo-wrapper img {
	transform: scale(1.02);
}

/* Materia sem capa: o cartao comeca no texto, sem buraco. */
html .dd-blog-grid .posts_group.grid .post-item.no-img .post-photo-wrapper {
	display: none;
}


/* --- Texto ------------------------------------------------------------- */

html .dd-blog-grid .posts_group.grid .post-desc-wrapper {
	flex: 1;
	display: flex;
	background: none;
	padding: 0;
	margin: 0;
}

html .dd-blog-grid .posts_group.grid .post-desc {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 22px 24px 24px;
	background: none;
	border: 0;
}

html .dd-blog-grid .posts_group.grid .post-item:first-child .post-desc {
	padding: 26px 28px 28px;
}

/* Meta: categoria primeiro, depois a data, numa linha. */
html .dd-blog-grid .posts_group.grid .post-meta {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin: 0 0 12px;
	padding: 0;
	border: 0;
}

html .dd-blog-grid .posts_group.grid .post-meta .author-date {
	float: none;
	margin: 0;
	font-size: .8125rem;
	line-height: 1.4;
	color: var(--bg-ink-3);
}

html .dd-blog-grid .posts_group.grid .post-meta .author-date i {
	display: none;
}

html .dd-blog-grid .posts_group.grid .post-meta .category {
	order: -1;
	float: none;
	position: static;
	margin: 0;
}

html .dd-blog-grid .posts_group.grid .post-meta .cat-btn {
	display: none;
}

/* O tema mostra a lista de categorias num menu suspenso: aqui ela e o rotulo. */
html .dd-blog-grid .posts_group.grid .post-meta .cat-wrapper {
	display: block !important;
	position: static;
	width: auto;
	padding: 0;
	margin: 0;
	background: none;
	box-shadow: none;
	border: 0;
	opacity: 1;
	visibility: visible;
}

html .dd-blog-grid .posts_group.grid .post-meta .post-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	margin: 0;
	padding: 0;
	list-style: none;
	background: none;
	border: 0;
	box-shadow: none;
}

html .dd-blog-grid .posts_group.grid .post-meta .post-categories li {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

html .dd-blog-grid .posts_group.grid .post-meta .post-categories li::before,
html .dd-blog-grid .posts_group.grid .post-meta .post-categories li::after {
	content: none;
	display: none;
}

html .dd-blog-grid .posts_group.grid .post-meta .post-categories a {
	display: inline;
	padding: 0;
	background: none;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	line-height: 1.4;
	color: var(--cat, var(--bg-ink-3));
	text-decoration: none;
}

html .dd-blog-grid .posts_group.grid .post-meta .post-categories a:hover {
	text-decoration: underline;
	text-underline-offset: .2em;
}

/* Cor por grupo de categoria, nas tintas escuras das familias da v2
   (vermelho, ambar, azul, roxo). Sem verde, a pedido. Todas passam de
   7:1 sobre o cinza do cartao. */
html .dd-blog-grid .post-item:is(.category-5, .category-9, .category-10, .category-11) { --cat: hsl(4 52% 30%); }
html .dd-blog-grid .post-item.category-4 { --cat: hsl(34 60% 24%); }
html .dd-blog-grid .post-item.category-8 { --cat: hsl(214 52% 30%); }
html .dd-blog-grid .post-item.category-6 { --cat: hsl(262 40% 34%); }

html .dd-blog-grid .posts_group.grid .post-title {
	margin: 0 0 10px;
}

html .dd-blog-grid .posts_group.grid .post-title .entry-title {
	margin: 0;
	font-family: "Poppins", sans-serif;
	font-size: 1.1875rem;
	line-height: 1.32;
	font-weight: 600;
	letter-spacing: -.005em;
	text-wrap: balance;
}

html .dd-blog-grid .posts_group.grid .post-item:first-child .post-title .entry-title {
	font-size: clamp(1.5rem, 1.1rem + 1vw, 1.875rem);
	line-height: 1.25;
	letter-spacing: -.012em;
}

html .dd-blog-grid .posts_group.grid .post-title .entry-title a {
	color: var(--bg-ink);
	text-decoration: none;
}

html .dd-blog-grid .posts_group.grid .post-title .entry-title a:hover {
	color: var(--bg-action);
}

html .dd-blog-grid .posts_group.grid .post-excerpt {
	margin: 0 0 18px;
	font-size: .9375rem;
	line-height: 1.6;
	color: var(--bg-ink-2);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

html .dd-blog-grid .posts_group.grid .post-item:first-child .post-excerpt {
	font-size: 1rem;
	-webkit-line-clamp: 2;
}

/* "Leia mais" no pe do cartao, sempre na mesma altura da linha. */
/* O tema puxa o rodape do cartao 20px para a esquerda (margin-left:-20px). */
html .dd-blog-grid .posts_group.grid .post-footer {
	margin: auto 0 0;
	padding: 0;
	border: 0;
	background: none;
	display: block;
}

html .dd-blog-grid .posts_group.grid .post-footer .button-love,
html .dd-blog-grid .posts_group.grid .post-footer .read-more-icon {
	display: none;
}

html .dd-blog-grid .posts_group.grid .post-footer .post-links {
	float: none;
	margin: 0;
	padding: 0;
	border: 0;
}

html .dd-blog-grid .posts_group.grid .post-footer .post-more {
	display: inline-block;
	padding: 6px 0;
	font-size: .875rem;
	font-weight: 500;
	color: var(--bg-action);
	text-decoration: none;
}

html .dd-blog-grid .posts_group.grid .post-footer .post-more:hover {
	text-decoration: underline;
	text-underline-offset: .2em;
}

html .dd-blog-grid .posts_group.grid .post-item a:focus-visible {
	outline: 2px solid var(--bg-action);
	outline-offset: 2px;
	border-radius: 2px;
}


/* --- Home: 12 materias -----------------------------------------------
   Com o destaque de 2 colunas, 12 cartoes dariam 13 casas e o ultimo ficaria
   sozinho na linha. Na home o destaque ocupa 2 colunas e 2 linhas (dois
   cartoes empilhados ao lado), e 12 cartoes fecham 5 linhas sem buraco. */
@media (min-width: 1024px) {
	html .home.dd-blog-grid .posts_group.grid .post-item:first-child {
		grid-row: span 2;
	}

	html .home.dd-blog-grid .posts_group.grid .post-item:first-child .post-photo-wrapper .image_wrapper {
		aspect-ratio: 16 / 10;
	}

	html .home.dd-blog-grid .posts_group.grid .post-item:first-child .post-excerpt {
		-webkit-line-clamp: 5;
		font-size: 1.0625rem;
		line-height: 1.65;
	}
}


/* Tablet (2 colunas): destaque na linha inteira + 11 deixa o ultimo sozinho. */
@media (min-width: 768px) and (max-width: 1023px) {
	html .home.dd-blog-grid .posts_group.grid .post-item:last-child {
		grid-column: span 2;
	}
}


/* --- Responsivo -------------------------------------------------------- */

@media (max-width: 1023px) {
	html .dd-blog-grid .posts_group.grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	html .dd-blog-grid .posts_group.grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	html .dd-blog-grid .posts_group.grid .post-item:first-child {
		grid-column: auto;
	}

	html .dd-blog-grid .posts_group.grid .post-item:first-child .post-photo-wrapper .image_wrapper {
		aspect-ratio: 16 / 10;
	}

	html .dd-blog-grid .posts_group.grid .post-item:first-child .post-title .entry-title {
		font-size: 1.375rem;
	}

	html .dd-blog-grid .posts_group.grid .post-desc,
	html .dd-blog-grid .posts_group.grid .post-item:first-child .post-desc {
		padding: 18px 18px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html .dd-blog-grid .posts_group.grid .post-photo-wrapper img,
	html .dd-blog-grid .posts_group.grid .post-item {
		transition: none;
	}

	html .dd-blog-grid .posts_group.grid .post-item:hover .post-photo-wrapper img {
		transform: none;
	}
}
