/**
 * NIYAPRESS: World-Tech-Culture TRIO - ELEGANT VERSION
 * Design élégant harmonisé avec le projet
 * Badge seulement (sans image) + Articles avec miniatures
 */

/* ========================================
   SECTION CONTAINER
   ======================================== */

.np-trio-section {
	background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
	padding: 50px 0;
	margin: 0;
	position: relative;
}

.np-trio-section::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #1e88e5 0%, #00897b 50%, #8e24aa 100%);
}

/* ========================================
   3 COLUMN GRID
   ======================================== */

.np-trio-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	direction: rtl;
}

.np-trio-column {
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	transition: all 0.3s ease;
	border: 1px solid #e5e7eb;
}

.np-trio-column:hover {
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
	transform: translateY(-5px);
}

/* ========================================
   CATEGORY BADGE HEADER - ELEGANT
   ======================================== */

.np-trio-header {
	position: relative;
	padding: 0;
	margin: 0;
}

.np-trio-category-badge {
	background: #1e88e5;
	color: #ffffff;
	font-size: 22px;
	font-weight: 900;
	font-family: 'Tajawal', sans-serif;
	text-align: center;
	padding: 20px;
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 1px;
	position: relative;
	overflow: hidden;
}

.np-trio-category-badge::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
	transition: left 0.5s ease;
}

.np-trio-column:hover .np-trio-category-badge::before {
	left: 100%;
}

/* ========================================
   ARTICLES LIST WITH THUMBNAILS
   ======================================== */

.np-trio-articles {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.np-trio-item {
	background: #f9fafb;
	border-radius: 12px;
	overflow: hidden;
	transition: all 0.3s ease;
	border: 1px solid #e5e7eb;
}

.np-trio-item:hover {
	background: #ffffff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	transform: translateX(-3px);
}

.np-trio-item-link {
	display: flex;
	gap: 12px;
	text-decoration: none;
	color: inherit;
	padding: 12px;
	direction: rtl;
	align-items: center;
}

/* Article Thumbnail */
.np-trio-item-thumb {
	width: 80px;
	height: 80px;
	flex-shrink: 0;
	border-radius: 8px;
	overflow: hidden;
	background: #e5e7eb;
	position: relative;
}

.np-trio-item-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
	display: block;
}

.np-trio-item:hover .np-trio-item-img {
	transform: scale(1.15);
}

/* Article Content */
.np-trio-item-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	direction: rtl;
	text-align: right;
}

.np-trio-item-title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
	color: #1a1a1a;
	font-family: 'Tajawal', sans-serif;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	transition: color 0.3s ease;
}

.np-trio-item:hover .np-trio-item-title {
	color: #1e88e5;
}

.np-trio-item-date {
	font-size: 12px;
	color: #9ca3af;
	font-family: 'Tajawal', sans-serif;
	font-weight: 500;
}

/* ========================================
   FOOTER - VIEW MORE LINK
   ======================================== */

.np-trio-footer {
	padding: 15px 20px;
	border-top: 2px solid #f3f4f6;
	background: #fafbfc;
	text-align: center;
}

.np-trio-more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 700;
	font-family: 'Tajawal', sans-serif;
	text-decoration: none;
	color: #1e88e5;
	transition: all 0.3s ease;
	padding: 8px 20px;
	border-radius: 25px;
	background: transparent;
	direction: rtl;
}

.np-trio-more:hover {
	background: rgba(30, 136, 229, 0.1);
	transform: translateX(-5px);
}

.np-trio-more svg {
	transition: transform 0.3s ease;
}

.np-trio-more:hover svg {
	transform: translateX(-3px);
}

/* ========================================
   COLUMN SPECIFIC COLORS
   ======================================== */

/* Column 1: Blue (حول العالم) */
.np-trio-column:nth-child(1) .np-trio-category-badge {
	background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
}

.np-trio-column:nth-child(1) .np-trio-item:hover {
	border-color: #1e88e5;
}

.np-trio-column:nth-child(1) .np-trio-item:hover .np-trio-item-title {
	color: #1e88e5;
}

/* Column 2: Teal (تقنية) */
.np-trio-column:nth-child(2) .np-trio-category-badge {
	background: linear-gradient(135deg, #00897b 0%, #00695c 100%);
}

.np-trio-column:nth-child(2) .np-trio-item:hover {
	border-color: #00897b;
}

.np-trio-column:nth-child(2) .np-trio-item:hover .np-trio-item-title {
	color: #00897b;
}

.np-trio-column:nth-child(2) .np-trio-more {
	color: #00897b;
}

.np-trio-column:nth-child(2) .np-trio-more:hover {
	background: rgba(0, 137, 123, 0.1);
}

/* Column 3: Purple (ثقافة) */
.np-trio-column:nth-child(3) .np-trio-category-badge {
	background: linear-gradient(135deg, #8e24aa 0%, #6a1b9a 100%);
}

.np-trio-column:nth-child(3) .np-trio-item:hover {
	border-color: #8e24aa;
}

.np-trio-column:nth-child(3) .np-trio-item:hover .np-trio-item-title {
	color: #8e24aa;
}

.np-trio-column:nth-child(3) .np-trio-more {
	color: #8e24aa;
}

.np-trio-column:nth-child(3) .np-trio-more:hover {
	background: rgba(142, 36, 170, 0.1);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.np-trio-column {
	animation: fadeInUp 0.6s ease-out;
}

.np-trio-column:nth-child(1) {
	animation-delay: 0s;
}

.np-trio-column:nth-child(2) {
	animation-delay: 0.1s;
}

.np-trio-column:nth-child(3) {
	animation-delay: 0.2s;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
	.np-trio-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 25px;
	}
	
	.np-trio-column:nth-child(3) {
		grid-column: 1 / -1;
		max-width: 600px;
		margin: 0 auto;
	}
	
	.np-trio-category-badge {
		font-size: 20px;
		padding: 18px;
	}
	
	.np-trio-item-title {
		font-size: 14px;
	}
}

@media (max-width: 768px) {
	.np-trio-section {
		padding: 30px 0;
	}
	
	.np-trio-grid {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 0 15px;
	}
	
	.np-trio-column:nth-child(3) {
		grid-column: auto;
		max-width: none;
	}
	
	.np-trio-category-badge {
		font-size: 18px;
		padding: 15px;
	}
	
	.np-trio-articles {
		padding: 15px;
		gap: 12px;
	}
	
	.np-trio-item-thumb {
		width: 70px;
		height: 70px;
	}
	
	.np-trio-item-link {
		padding: 10px;
	}
	
	.np-trio-item-title {
		font-size: 14px;
	}
	
	.np-trio-item-date {
		font-size: 11px;
	}
	
	.np-trio-footer {
		padding: 12px 15px;
	}
	
	.np-trio-more {
		font-size: 14px;
		padding: 6px 16px;
	}
}

@media (max-width: 480px) {
	.np-trio-section {
		padding: 20px 0;
	}
	
	.np-trio-item-thumb {
		width: 60px;
		height: 60px;
	}
	
	.np-trio-item-title {
		font-size: 13px;
		-webkit-line-clamp: 2;
		line-clamp: 2;
	}
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
	.np-trio-section {
		background: white !important;
		padding: 20px 0 !important;
	}
	
	.np-trio-section::before {
		display: none;
	}
	
	.np-trio-column {
		box-shadow: none !important;
		border: 1px solid #ddd !important;
		break-inside: avoid;
	}
	
	.np-trio-item {
		box-shadow: none !important;
	}
	
	.np-trio-footer {
		display: none;
	}
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

body.dark-mode .np-trio-section {
	background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
}

body.dark-mode .np-trio-column {
	background: #2a2a2a;
	border-color: #333;
}

body.dark-mode .np-trio-item {
	background: #1a1a1a;
	border-color: #333;
}

body.dark-mode .np-trio-item:hover {
	background: #2a2a2a;
}

body.dark-mode .np-trio-item-title {
	color: #ffffff;
}

body.dark-mode .np-trio-footer {
	background: #1a1a1a;
	border-top-color: #333;
}
