/* =========================================================
 * NationVoice — Home Blog Section
 * Hero banner with overlapping post cards
 * Fully isolated under .nv-homeblog-wrapper
 * ========================================================= */

.nv-homeblog-wrapper {
	--nv-primary: #3c4d8c;
	--nv-accent: #ff6716;
	--nv-heading: #202428;
	--nv-text: #5e5e5e;
	--nv-text-soft: #7c7c7c;
	--nv-bg: #ffffff;

	--nv-radius-sm: 4px;
	--nv-radius-md: 12px;
	--nv-shadow-md: 0 8px 24px rgba(0,0,0,0.10);
	--nv-shadow-lg: 0 16px 40px rgba(0,0,0,0.18);

	--nv-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--nv-trans: 0.35s var(--nv-ease);

	--nv-font-body: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--nv-font-heading: Georgia, 'Times New Roman', serif;

	font-family: var(--nv-font-body);
	color: var(--nv-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.nv-homeblog-wrapper *,
.nv-homeblog-wrapper *::before,
.nv-homeblog-wrapper *::after {
	box-sizing: border-box;
}

.elementor-page .nv-homeblog-wrapper,
.e-con .nv-homeblog-wrapper,
.elementor-widget-container .nv-homeblog-wrapper {
	color: var(--nv-text) !important;
	font-family: var(--nv-font-body) !important;
}

/* =========================================================
 * SECTION FRAME
 * ========================================================= */
.nv-homeblog-wrapper .nv-homeblog {
	width: 100%;
	background-color: #ffffff;
	overflow: hidden;
}

/* =========================================================
 * HERO
 * ========================================================= */
.nv-homeblog-wrapper .nv-homeblog__hero {
	position: relative;
	width: 100%;
	padding: 120px 0 200px;
	background-color: var(--nv-primary);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	overflow: hidden;
}

.nv-homeblog-wrapper .nv-homeblog__hero-overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(60, 77, 140, 0.78);
	z-index: 1;
}

.nv-homeblog-wrapper .nv-homeblog__hero-inner {
	position: relative;
	z-index: 2;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 32px;
}

.nv-homeblog-wrapper .nv-homeblog__hero-content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	max-width: 720px;
}

.nv-homeblog-wrapper .nv-homeblog__eyebrow {
	margin: 0;
	font-family: var(--nv-font-body) !important;
	font-weight: 700;
	font-size: 20px;
	line-height: 1.3;
	letter-spacing: 0.3px;
	color: #ffffff !important;
}

.nv-homeblog-wrapper .nv-homeblog__desc {
	margin: 0;
	font-family: var(--nv-font-body) !important;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.88) !important;
	max-width: 52ch;
}

/* =========================================================
 * CARDS — overlapping the hero (negative margin-top)
 * ========================================================= */
.nv-homeblog-wrapper .nv-homeblog__cards {
	position: relative;
	z-index: 3;
	margin-top: -140px; /* pulls cards up into hero */
}

.nv-homeblog-wrapper .nv-homeblog__cards-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 32px;
}

.nv-homeblog-wrapper .nv-homeblog__grid {
	display: grid;
	gap: 24px;
}

.nv-homeblog-wrapper .nv-homeblog__grid--cols-1 { grid-template-columns: 1fr; }
.nv-homeblog-wrapper .nv-homeblog__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.nv-homeblog-wrapper .nv-homeblog__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.nv-homeblog-wrapper .nv-homeblog__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Card */
.nv-homeblog-wrapper .nv-homeblog__card {
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
	transition: transform var(--nv-trans), box-shadow var(--nv-trans);

	opacity: 0;
	transform: translateY(20px);
	animation: nv-homeblog-fade-up 0.7s var(--nv-ease) forwards;
	animation-delay: calc(var(--nv-anim-order, 0) * 120ms);
}

.nv-homeblog-wrapper .nv-homeblog__card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}

@keyframes nv-homeblog-fade-up {
	to { opacity: 1; transform: translateY(0); }
}

/* Image */
.nv-homeblog-wrapper .nv-homeblog__image-link {
	display: block;
	overflow: hidden;
	background-color: #f0f0f0;
	aspect-ratio: 4 / 3;
}

.nv-homeblog-wrapper .nv-homeblog__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform 0.6s var(--nv-ease);
}

.nv-homeblog-wrapper .nv-homeblog__card:hover .nv-homeblog__image {
	transform: scale(1.04);
}

/* Body */
.nv-homeblog-wrapper .nv-homeblog__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 18px 22px;
}

.nv-homeblog-wrapper .nv-homeblog__meta {
	font-family: var(--nv-font-body) !important;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.3px;
	color: var(--nv-text-soft) !important;
}

.nv-homeblog-wrapper .nv-homeblog__title {
	margin: 0;
	font-family: var(--nv-font-body) !important;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.35;
	color: var(--nv-heading) !important;
}

.nv-homeblog-wrapper .nv-homeblog__title a {
	color: inherit !important;
	text-decoration: none !important;
	transition: color var(--nv-trans);
}

.nv-homeblog-wrapper .nv-homeblog__title a:hover {
	color: var(--nv-primary) !important;
}

.nv-homeblog-wrapper .nv-homeblog__excerpt {
	margin: 4px 0 0;
	font-family: var(--nv-font-body) !important;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--nv-text) !important;
}

/* After-spacer */
.nv-homeblog-wrapper .nv-homeblog__after {
	width: 100%;
	height: 56px;
	background-color: #ffffff;
}

/* =========================================================
 * RESPONSIVE
 * ========================================================= */
@media (max-width: 1024px) {
	.nv-homeblog-wrapper .nv-homeblog__hero { padding: 96px 0 160px; }
	.nv-homeblog-wrapper .nv-homeblog__cards { margin-top: -100px; }
	.nv-homeblog-wrapper .nv-homeblog__hero-inner,
	.nv-homeblog-wrapper .nv-homeblog__cards-inner { padding: 0 24px; }
	.nv-homeblog-wrapper .nv-homeblog__grid { gap: 20px; }
}

@media (max-width: 768px) {
	.nv-homeblog-wrapper .nv-homeblog__hero { padding: 72px 0 100px; }
	.nv-homeblog-wrapper .nv-homeblog__cards { margin-top: -60px; }
	.nv-homeblog-wrapper .nv-homeblog__hero-inner,
	.nv-homeblog-wrapper .nv-homeblog__cards-inner { padding: 0 16px; }
	.nv-homeblog-wrapper .nv-homeblog__hero-content {
		align-items: center;
		text-align: center;
		max-width: 100%;
	}
	.nv-homeblog-wrapper .nv-homeblog__desc { max-width: 100%; }
	.nv-homeblog-wrapper .nv-homeblog__eyebrow { font-size: 22px; }

	.nv-homeblog-wrapper .nv-homeblog__grid--cols-2,
	.nv-homeblog-wrapper .nv-homeblog__grid--cols-3,
	.nv-homeblog-wrapper .nv-homeblog__grid--cols-4 {
		grid-template-columns: 1fr !important;
	}
	.nv-homeblog-wrapper .nv-homeblog__after { height: 40px; }
}

@media (max-width: 480px) {
	.nv-homeblog-wrapper .nv-homeblog__hero { padding: 56px 0 80px; }
	.nv-homeblog-wrapper .nv-homeblog__cards { margin-top: -48px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.nv-homeblog-wrapper *,
	.nv-homeblog-wrapper *::before,
	.nv-homeblog-wrapper *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
	.nv-homeblog-wrapper .nv-homeblog__card { opacity: 1 !important; transform: none !important; }
}
