/* =========================================================
 * NationVoice — Campaigns Widget
 * Image cards with bottom gradient overlay + title
 * ========================================================= */

.nv-cp-wrapper {
	--nv-primary: #3c4d8c;
	--nv-heading: #202428;
	--nv-text: #5e5e5e;
	--nv-bg: #ffffff;
	--nv-font-body: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--nv-font-heading: Georgia, 'Times New Roman', serif;
	--nv-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--nv-trans: 0.4s var(--nv-ease);

	font-family: var(--nv-font-body);
	color: var(--nv-text);
}

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

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

.nv-cp-wrapper .nv-cp { width: 100%; background-color: var(--nv-bg); }

.nv-cp-wrapper .nv-cp__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 56px 32px;
}

/* Header */
.nv-cp-wrapper .nv-cp__header {
	margin-bottom: 32px;
	text-align: left;
}

.nv-cp-wrapper .nv-cp__heading {
	margin: 0;
	font-family: var(--nv-font-heading) !important;
	font-weight: 600;
	font-size: 26px;
	color: var(--nv-heading) !important;
	line-height: 1.3;
}

/* Grid */
.nv-cp-wrapper .nv-cp__grid {
	display: grid;
	gap: 20px;
}

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

/* Card */
.nv-cp-wrapper .nv-cp__card {
	position: relative;
	display: block;
	min-height: 320px;
	border-radius: 8px;
	overflow: hidden;
	color: #ffffff !important;
	text-decoration: none !important;
	transition: transform var(--nv-trans), box-shadow var(--nv-trans);
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

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

.nv-cp-wrapper .nv-cp__card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

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

.nv-cp-wrapper .nv-cp__image {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	transition: transform 0.7s var(--nv-ease);
	z-index: 1;
}

.nv-cp-wrapper .nv-cp__card:hover .nv-cp__image {
	transform: scale(1.05);
}

.nv-cp-wrapper .nv-cp__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		var(--nv-cp-ov1, rgba(0,0,0,0)) 0%,
		var(--nv-cp-ov1, rgba(0,0,0,0)) 50%,
		var(--nv-cp-ov2, rgba(60, 77, 140, 0.85)) 100%
	);
	z-index: 2;
	pointer-events: none;
	transition: background var(--nv-trans);
}

.nv-cp-wrapper .nv-cp__title-wrap {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	padding: 20px;
}

.nv-cp-wrapper .nv-cp__title {
	font-family: var(--nv-font-body) !important;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.4;
	color: #ffffff !important;
}

/* Divider */
.nv-cp-wrapper .nv-cp__divider {
	height: 1px;
	background-color: rgba(0, 0, 0, 0.10);
	margin-top: 40px;
}

/* Responsive */
@media (max-width: 1024px) {
	.nv-cp-wrapper .nv-cp__container { padding: 48px 24px; }
	.nv-cp-wrapper .nv-cp__heading { font-size: 22px; }
}

@media (max-width: 768px) {
	.nv-cp-wrapper .nv-cp__container { padding: 40px 16px; }
	.nv-cp-wrapper .nv-cp__heading { font-size: 20px; }
	.nv-cp-wrapper .nv-cp__grid--cols-2,
	.nv-cp-wrapper .nv-cp__grid--cols-3,
	.nv-cp-wrapper .nv-cp__grid--cols-4 {
		grid-template-columns: 1fr !important;
	}
	.nv-cp-wrapper .nv-cp__card { min-height: 260px; }
	.nv-cp-wrapper .nv-cp__title { font-size: 14px; }
	.nv-cp-wrapper .nv-cp__divider { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
	.nv-cp-wrapper .nv-cp__card { opacity: 1 !important; transform: none !important; }
	.nv-cp-wrapper * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
