/**
 * Nexus WP - Estilos da Home, Feeds e Arquivos.
 *
 * @package Nexus_WP
 */

/* 1. Construtor e Seções da Home */
.nexus-home-section {
	margin-bottom: 56px;
}

.nexus-section-header-bar {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 24px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--nexus-border);
	position: relative;
}

.nexus-section-header-bar::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 48px;
	height: 2px;
	background-color: var(--nexus-primary);
}

.nexus-section-heading {
	font-size: 24px;
	font-weight: 800;
	margin: 0;
	color: var(--nexus-text-main);
	letter-spacing: -0.5px;
}

.nexus-view-all-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--nexus-primary);
}

.nexus-view-all-link:hover {
	color: var(--nexus-primary-hover);
}

/* 2. Grade de Cards (Grid) */
.nexus-posts-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

@media (max-width: 960px) {
	.nexus-posts-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
}

@media (max-width: 600px) {
	.nexus-posts-grid {
		grid-template-columns: 1fr;
	}
}

/* Card Individual em Grade */
.nexus-post-card {
	display: flex;
	flex-direction: column;
	background-color: var(--nexus-bg-card);
	border: 1px solid var(--nexus-border);
	border-radius: var(--nexus-radius);
	overflow: hidden;
	box-shadow: var(--nexus-shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nexus-post-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--nexus-shadow-md);
	border-color: rgba(var(--nexus-primary-rgb), 0.3);
}

.nexus-card-thumb-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background-color: var(--nexus-border);
}

.nexus-card-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.nexus-post-card:hover .nexus-card-thumb {
	transform: scale(1.04);
}

.nexus-card-category-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	background-color: var(--nexus-primary);
	color: #ffffff !important;
	font-size: 12px;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 9999px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	transition: background-color 0.15s ease, transform 0.15s ease;
	line-height: 1.2;
	letter-spacing: 0.02em;
	display: inline-flex;
	align-items: center;
	z-index: 2;
}

.nexus-card-category-badge:hover {
	background-color: var(--nexus-primary-hover);
	transform: translateY(-1px);
	color: #ffffff !important;
}

.nexus-card-no-thumb-badge {
	margin-bottom: 12px;
}

.nexus-card-category-pill {
	display: inline-flex;
	align-items: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--nexus-primary);
	background-color: rgba(var(--nexus-primary-rgb), 0.1);
	padding: 4px 10px;
	border-radius: 9999px;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.nexus-card-category-pill:hover {
	background-color: var(--nexus-primary);
	color: #ffffff;
}

.nexus-card-content {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.nexus-card-title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 10px 0;
}

.nexus-card-title a {
	color: var(--nexus-text-main);
}

.nexus-card-title a:hover {
	color: var(--nexus-primary);
}

.nexus-card-excerpt {
	font-size: 14px;
	color: var(--nexus-text-muted);
	line-height: 1.6;
	margin-bottom: 16px;
}

.nexus-card-excerpt p {
	margin: 0;
}

.nexus-card-meta {
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--nexus-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px 12px;
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--nexus-text-muted);
}

.nexus-card-meta-author-wrap {
	display: inline-flex;
	align-items: center;
	font-weight: 600;
	color: var(--nexus-text-main);
	white-space: nowrap;
}

.nexus-card-meta-info-wrap {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.nexus-card-author-name,
.nexus-card-date,
.nexus-card-reading-time {
	white-space: nowrap;
}

.nexus-card-sep {
	color: var(--nexus-border);
	opacity: 0.9;
}

/* 3. Lista Horizontal (List) */
.nexus-posts-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.nexus-post-row {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 20px;
	background-color: var(--nexus-bg-card);
	border: 1px solid var(--nexus-border);
	border-radius: var(--nexus-radius);
	overflow: hidden;
	box-shadow: var(--nexus-shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 640px) {
	.nexus-post-row {
		grid-template-columns: 1fr;
	}
}

.nexus-post-row:hover {
	transform: translateY(-2px);
	box-shadow: var(--nexus-shadow-md);
}

.nexus-row-thumb-wrap {
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.nexus-row-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.nexus-post-row:hover .nexus-row-thumb {
	transform: scale(1.04);
}

.nexus-row-content {
	padding: 20px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.nexus-row-category-badge {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	color: var(--nexus-primary);
	margin-bottom: 6px;
}

.nexus-row-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 8px 0;
}

.nexus-row-title a {
	color: var(--nexus-text-main);
}

.nexus-row-title a:hover {
	color: var(--nexus-primary);
}

.nexus-row-excerpt {
	font-size: 14px;
	color: var(--nexus-text-muted);
	margin-bottom: 12px;
}

.nexus-row-excerpt p {
	margin: 0;
}

.nexus-row-meta {
	font-size: 12.5px;
	color: var(--nexus-text-muted);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 12px;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid var(--nexus-border);
}

.nexus-row-meta-author-wrap {
	display: inline-flex;
	align-items: center;
	font-weight: 600;
	color: var(--nexus-text-main);
	white-space: nowrap;
}

.nexus-row-meta-info-wrap {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

/* 4. Cabeçalho de Arquivos */
.nexus-archive-header {
	margin-bottom: 32px;
	padding-bottom: 20px;
	border-bottom: 2px solid var(--nexus-border);
}

.nexus-archive-title {
	font-size: 32px;
	font-weight: 800;
	margin: 8px 0;
	color: var(--nexus-text-main);
}

.nexus-archive-description {
	font-size: 15px;
	color: var(--nexus-text-muted);
}

/* 5. Página 404 */
.nexus-404-main {
	padding: 60px 0;
	text-align: center;
}

.nexus-404-content {
	max-width: 560px;
	margin: 0 auto;
}

.nexus-404-number {
	font-size: 96px;
	font-weight: 900;
	color: var(--nexus-primary);
	line-height: 1;
	display: block;
	margin-bottom: 16px;
	letter-spacing: -2px;
}

.nexus-404-title {
	font-size: 28px;
	font-weight: 800;
	margin-bottom: 12px;
}

.nexus-404-desc {
	font-size: 16px;
	color: var(--nexus-text-muted);
	margin-bottom: 28px;
}

.nexus-404-search {
	margin-bottom: 28px;
}


/* Lists keep content in a flexible column, including posts without an image. */
.nexus-post-row{grid-template-columns:minmax(140px,30%) minmax(0,1fr);gap:0;min-width:0}.nexus-row-content{min-width:0;gap:10px}.nexus-row-title{overflow-wrap:anywhere;line-height:1.35}.nexus-row-thumb-wrap{height:100%;min-height:180px;aspect-ratio:auto}.nexus-row-thumb-link{display:block;width:100%;height:100%}.nexus-row-meta-info-wrap{flex-wrap:wrap;white-space:normal}.nexus-row-no-thumb{grid-template-columns:minmax(0,1fr)}.nexus-row-no-thumb .nexus-row-content{grid-column:1/-1}.nexus-posts-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.nexus-post-card{min-width:0}.nexus-cols-1{grid-template-columns:minmax(0,1fr)}.nexus-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.nexus-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:960px){.nexus-posts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.nexus-cols-1{grid-template-columns:minmax(0,1fr)}}
@media(max-width:640px){.nexus-post-row{grid-template-columns:minmax(0,1fr)}.nexus-row-thumb-wrap{aspect-ratio:16/10;height:auto;min-height:0}.nexus-posts-grid{grid-template-columns:minmax(0,1fr)}}
