/**
 * NIYAPRESS: Video Grid Layout
 * صوت وصورة - Grille 4x2 de vidéos
 */

/* Section Container */
.np-section--video-grid {
	background: #fff;
	padding: 40px 0;
	margin: 30px 0;
}

/* Header */
.np-video-grid-header {
	text-align: right;
	margin-bottom: 25px;
	padding-bottom: 15px;
	border-bottom: 3px solid #2c3e50;
}

.np-video-grid-title {
	margin: 0;
	font-size: 28px;
	font-weight: 800;
	color: #2c3e50;
	font-family: 'Tajawal', sans-serif;
}

/* Grid Layout - 4 columns x 2 rows */
.np-video-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

/* Grid Item */
.np-video-grid-item {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	background: #000;
}

.np-video-grid-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.np-video-grid-link {
	display: block;
	text-decoration: none;
	color: inherit;
	position: relative;
}

/* Thumbnail */
.np-video-grid-thumb {
	position: relative;
	width: 100%;
	height: 180px;
	overflow: hidden;
	background: #000;
}

.np-video-grid-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease, opacity 0.3s ease;
}

.np-video-grid-item:hover .np-video-grid-img {
	transform: scale(1.08);
	opacity: 0.85;
}

/* Play Button */
.np-video-play-btn {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 3;
	transition: transform 0.3s ease;
	filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.np-video-grid-item:hover .np-video-play-btn {
	transform: translate(-50%, -50%) scale(1.15);
}

.np-video-play-btn svg {
	display: block;
	width: 50px;
	height: 50px;
}

/* Timestamp (top-right corner) */
.np-video-timestamp {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(0, 0, 0, 0.85);
	color: #fff;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	z-index: 2;
	font-family: 'Tajawal', sans-serif;
}

/* Overlay with date and title */
.np-video-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
	padding: 15px 12px;
	color: #fff;
	direction: rtl;
	z-index: 2;
}

.np-video-date {
	display: block;
	font-size: 11px;
	color: rgba(255,255,255,0.85);
	margin-bottom: 6px;
	font-weight: 500;
}

.np-video-grid-title-text {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	color: #fff;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Responsive Design */
@media (max-width: 1200px) {
	.np-video-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 900px) {
	.np-video-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 15px;
	}
	
	.np-video-grid-thumb {
		height: 160px;
	}
	
	.np-video-grid-title {
		font-size: 24px;
	}
}

@media (max-width: 600px) {
	.np-video-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	
	.np-video-grid-thumb {
		height: 200px;
	}
	
	.np-video-grid-title {
		font-size: 22px;
	}
	
	.np-video-play-btn svg {
		width: 60px;
		height: 60px;
	}
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.np-section--video-grid {
		background: #1a1a1a;
	}
	
	.np-video-grid-header {
		border-bottom-color: #444;
	}
	
	.np-video-grid-title {
		color: #f8f9fa;
	}
}
