/**
 * npocto Pro - Blog Overlay Grid Widget Styles
 * Matches media_1791442533303_dd3b51b5.png pixel-perfect:
 * 4 Square cards on the Right (2x2) and 2 Wide Rectangles on the Left (stacked)
 */

.npocto-overlay-grid-wrapper {
	width: 100%;
	position: relative;
	box-sizing: border-box;
}

.npocto-overlay-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 2.05fr !important;
	gap: 16px;
	width: 100%;
	direction: rtl;
	box-sizing: border-box;
}

/* In uniform layout override */
.npocto-layout-uniform .npocto-overlay-grid {
	grid-template-columns: repeat(3, 1fr) !important;
}

.npocto-overlay-card {
	position: relative;
	height: 235px;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	will-change: transform;
	background-color: #0f172a;
	text-decoration: none !important;
	display: block;
	box-sizing: border-box;
}



.npocto-overlay-card-link {
	position: absolute;
	inset: 0;
	z-index: 4;
	text-decoration: none;
}

.npocto-overlay-thumb {
	position: absolute;
	inset: 0;
	width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important; max-width: none !important;
	object-fit: cover;
	object-position: center;
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 1;
	display: block;
}



/* Gradient Overlay Scrim: Dark top & bottom for maximum readability */
.npocto-overlay-scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.25) 55%, rgba(0, 0, 0, 0.9) 100%);
	z-index: 2;
	transition: opacity 0.3s ease;
}



/* Date Badge on Top Left Corner with Calendar Icon */
.npocto-overlay-date-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	right: auto;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 96px;
	min-height: 24px;
	box-sizing: border-box;
	gap: 6px;
	color: #ffffff;
	font-size: 0.8rem;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 6px;
	background: rgba(15, 23, 42, 0.45);
	backdrop-filter: blur(4px);
	border: 1px solid rgba(255, 255, 255, 0.16);
	line-height: 1;
	letter-spacing: 0.3px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
	direction: rtl;
	pointer-events: none;
}

.npocto-overlay-date-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.npocto-overlay-date-icon svg,
.npocto-overlay-date-icon i {
	width: 13px;
	height: 13px;
	font-size: 13px;
	fill: currentColor;
	color: currentColor;
	flex-shrink: 0;
}

/* Bottom Content: Title (Right-aligned matching screenshot) */
.npocto-overlay-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 18px 20px;
	z-index: 3;
	text-align: right;
	box-sizing: border-box;
}

.npocto-overlay-title {
	color: #ffffff;
	font-size: 0.96rem;
	font-weight: 800;
	line-height: 1.6;
	margin: 0;
	text-align: right;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.88);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-word;
	transition: color 0.25s ease;
}

.npocto-overlay-card.npocto-card-wide .npocto-overlay-title {
	font-size: 1.08rem;
	line-height: 1.65;
	padding: 0 4px;
}

.npocto-overlay-card:hover .npocto-overlay-title {
	color: #f8fafc;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
	.npocto-overlay-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 14px;
	}
	.npocto-overlay-card {
		height: 220px;
	}
	.npocto-overlay-card.npocto-card-wide {
		grid-column: span 2;
	}
}

@media (max-width: 640px) {
	.npocto-overlay-grid {
		grid-template-columns: 1fr !important;
		gap: 12px;
	}
	.npocto-overlay-card {
		height: 205px;
	}
	.npocto-overlay-card.npocto-card-wide {
		grid-column: span 1;
	}
	.npocto-overlay-title {
		font-size: 0.92rem;
	}
}

