/*
 * Responsive Grid System (Native CSS Grid)
 */
.grid-container {
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

.site-header .header-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

/* Hub/Taxonomy Post Grid */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 2rem 1.5rem;
	margin-top: 2rem;
	margin-bottom: 2rem;
}

.post-card {
	background-color: var(--drawing-bg);
	border: 1px solid var(--border);
	border-radius: 0.5rem;
	overflow: hidden;
	transition: transform 0.2s;
}

.post-card a {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.post-card:hover {
	transform: translateY(-4px);
}

.post-card .thumbnail-wrapper {
	width: 100%;
	aspect-ratio: 210 / 297; /* Proporção exata de uma folha A4 (Retrato) */
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #ffffff; /* O fundo da imagem sempre será branco puro (papel) */
}

.post-card img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.post-card .entry-title {
	font-size: 1.1rem;
	margin: 1rem;
	color: var(--primary);
}

/* Modifier: Paper Stack Effect for homepage/hubs */
.post-card.paper-stack {
	position: relative;
	background-color: var(--card-bg);
	border-radius: 12px;
	border: 1px solid var(--border);
	margin-bottom: 8px; /* space for the stack */
	overflow: visible; /* so before/after can be seen */
}

.post-card.paper-stack > a {
	background-color: var(--drawing-bg);
	border-radius: 12px;
	position: relative;
	z-index: 2;
	overflow: hidden;
}

.post-card.paper-stack::before {
	content: '';
	position: absolute;
	left: 8px;
	right: 8px;
	bottom: -4px;
	height: 10px;
	background-color: var(--card-bg);
	border-radius: 12px;
	border: 1px solid var(--border);
	z-index: 1;
}

.post-card.paper-stack::after {
	content: '';
	position: absolute;
	left: 16px;
	right: 16px;
	bottom: -8px;
	height: 10px;
	background-color: var(--card-bg);
	border-radius: 12px;
	border: 1px solid var(--border);
	z-index: 0;
}

/* Badge modifiers */
.badge-trending {
	position: absolute;
	top: 10px;
	right: 10px;
	background-color: #ef4444; /* red */
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0.2rem 0.6rem;
	border-radius: 9999px;
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	z-index: 5;
}

/* Ads Container Constraint to prevent CLS */
.ad-container {
	min-height: 280px;
	width: 100%;
	background-color: transparent;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 2rem;
}
