/* نبراس — کارت مطالب */

.npc{
	--npc-cols:3;
	--npc-gap:24px;
	--npc-radius:16px;
	--npc-ratio:16 / 9;
	--npc-focus:40%;
	--npc-excerpt-lines:2;
	--npc-primary:#0b1f33;
	--npc-accent:#c59b27;
	--npc-ink:var(--nb-heading,#162949);
	--npc-text:var(--nb-muted,#64748b);
	--npc-card:#fff;
	--npc-line:var(--nb-border,#e2e8f0);
}

.npc-grid{
	display:grid;
	grid-template-columns:repeat(var(--npc-cols),minmax(0,1fr));
	gap:var(--npc-gap);
	align-items:stretch;
}

/* ---------- کارت */

.npc-card{
	position:relative;
	display:flex;
	flex-direction:column;
	background:var(--npc-card);
	border:1px solid var(--npc-line);
	border-radius:var(--npc-radius);
	overflow:hidden;
	transition:border-color .25s ease,box-shadow .25s ease,transform .25s ease;
}
.npc-card:hover,
.npc-card:focus-within{
	border-color:#cbd5e1;
	box-shadow:0 10px 28px rgba(11,31,51,.10);
}
/* فوکوس کیبورد روی لینک عنوان، دور کل کارت دیده شود */
.npc-card:has(.npc-title a:focus-visible){outline:2px solid var(--npc-accent);outline-offset:2px}

.npc-media{
	position:relative;
	aspect-ratio:var(--npc-ratio);
	overflow:hidden;
	background:var(--nb-border,#e2e8f0);
}
/* `.elementor img{height:auto}` قوی‌تر از یک کلاس است؛ پس سلکتور سه‌تایی و absolute */
.npc .npc-media .npc-img{
	position:absolute;
	inset:0;
	display:block;
	width:100%;
	height:100%;
	max-width:none;
	object-fit:cover;
	object-position:50% var(--npc-focus);
	transition:transform .5s cubic-bezier(.2,.65,.2,1);
}
.npc-card:hover .npc-img,
.npc-card:focus-within .npc-img{transform:scale(1.04)}

/* مطلب بی‌تصویر */
.npc-ph{
	position:absolute;
	inset:0;
	display:flex;
	align-items:center;
	justify-content:center;
	background:radial-gradient(120% 120% at 100% 0,#1b4d66 0,#0b1f33 55%,#061524 100%);
}
.npc-ph span{
	color:#fcd34d;
	font-size:15px;
	font-weight:700;
	padding:6px 16px;
	border:1px solid rgba(252,211,77,.35);
	border-radius:999px;
}

.npc-body{
	display:flex;
	flex-direction:column;
	align-items:flex-start;
	gap:10px;
	flex:1 1 auto;
	padding:20px 22px 18px;
}

/* ---------- برچسب دسته */

.npc-cat{
	display:inline-block;
	font-size:13px;
	font-weight:700;
	line-height:1.6;
	padding:3px 12px;
	border-radius:999px;
	background:#f1f5f9;
	color:var(--nb-text,#334155);
}
.npc-cat--sky{background:#e0f2fe;color:#0369a1}
.npc-cat--emerald{background:#dcfce7;color:#15803d}
.npc-cat--amber{background:#fef3c7;color:#b45309}
.npc-cat--rose{background:#ffe4e6;color:#be123c}
.npc-cat--violet{background:#ede9fe;color:#6d28d9}
.npc-cat--teal{background:#ccfbf1;color:#0f766e}

/* ---------- عنوان؛ کل کارت لینک است */

.npc-title{
	margin:0;
	width:100%;
	font-size:16px;
	font-weight:700;
	line-height:1.75;
	color:var(--npc-ink);
	display:-webkit-box;
	-webkit-box-orient:vertical;
	-webkit-line-clamp:2;
	overflow:hidden;
}
.npc-title a{color:inherit;text-decoration:none}
.npc-title a::after{content:"";position:absolute;inset:0;z-index:1}
.npc-title a:focus-visible{outline:none}
.npc-card:hover .npc-title{color:var(--npc-primary)}

.npc-excerpt{
	margin:0;
	width:100%;
	font-size:14.5px;
	font-weight:400;
	line-height:1.95;
	color:var(--npc-text);
	display:-webkit-box;
	-webkit-box-orient:vertical;
	-webkit-line-clamp:var(--npc-excerpt-lines);
	overflow:hidden;
}

/* ---------- پاورقی کارت */

.npc-foot{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:12px;
	width:100%;
	margin-top:auto;
	padding-top:14px;
	border-top:1px solid #f1f5f9;
}
.npc-time{
	display:inline-flex;
	align-items:center;
	gap:6px;
	font-size:13.5px;
	color:var(--nb-faint,#94a3b8);
}
.npc-time svg{width:15px;height:15px;flex:0 0 auto}
.npc-read{
	display:inline-flex;
	align-items:center;
	gap:4px;
	font-size:14px;
	font-weight:700;
	color:var(--npc-primary);
	transition:color .2s ease,gap .2s ease;
}
.npc-read svg{width:16px;height:16px;flex:0 0 auto}
.npc-card:hover .npc-read{color:var(--npc-accent);gap:8px}

/* ---------- لینک «همه» زیر کارت‌ها */

.npc-all-wrap{display:flex;justify-content:center;margin-top:28px}
.npc-all{
	display:inline-flex;
	align-items:center;
	gap:6px;
	font-size:14px;
	font-weight:700;
	color:var(--npc-primary);
	text-decoration:none;
}
.npc-all svg{width:16px;height:16px}
.npc-all:hover{color:var(--npc-accent)}

.npc-note{margin:0 0 20px;font-size:14px;color:var(--npc-text)}

/* ---------- دسته‌های بالای آرشیو */

.npc-cats{margin:0 0 28px}
.npc-cats ul{
	display:flex;
	gap:10px;
	margin:0;
	padding:2px;
	list-style:none;
	overflow-x:auto;
	scrollbar-width:none;
}
.npc-cats ul::-webkit-scrollbar{display:none}
.npc-cats li{flex:0 0 auto;display:flex}
.npc-chip{
	display:inline-flex;
	align-items:center;
	gap:8px;
	padding:8px 16px;
	font-size:14.5px;
	font-weight:500;
	line-height:1.5;
	color:var(--nb-text,#334155);
	background:#fff;
	border:1px solid var(--npc-line);
	border-radius:999px;
	text-decoration:none;
	white-space:nowrap;
	transition:border-color .2s ease,background-color .2s ease,color .2s ease;
}
.npc-chip::before{
	content:"";
	width:8px;
	height:8px;
	border-radius:50%;
	background:#cbd5e1;
	flex:0 0 auto;
}
.npc-chip--sky::before{background:#0ea5e9}
.npc-chip--emerald::before{background:#22c55e}
.npc-chip--amber::before{background:#f59e0b}
.npc-chip--rose::before{background:#f43f5e}
.npc-chip--violet::before{background:#8b5cf6}
.npc-chip--teal::before{background:#14b8a6}
.npc-chip:not(.npc-chip--sky):not(.npc-chip--emerald):not(.npc-chip--amber):not(.npc-chip--rose):not(.npc-chip--violet):not(.npc-chip--teal)::before{display:none}
.npc-chip:hover{border-color:var(--nb-faint,#94a3b8);color:var(--npc-primary)}
.npc-chip.is-active{background:var(--npc-primary);border-color:var(--npc-primary);color:#fff}
.npc-chip-n{
	font-size:12.5px;
	font-weight:700;
	min-width:22px;
	padding:1px 7px;
	border-radius:999px;
	background:#f1f5f9;
	color:var(--nb-muted,#64748b);
	text-align:center;
}
.npc-chip.is-active .npc-chip-n{background:rgba(255,255,255,.16);color:#fff}

/* ---------- صفحه‌بندی */

.npc-pager{margin-top:36px}
.npc-pager ul{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0;padding:0;list-style:none}
.npc-pager li{display:flex}
.npc-pager .page-numbers{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	gap:4px;
	min-width:42px;
	height:42px;
	padding:0 12px;
	font-size:14px;
	font-weight:600;
	color:var(--nb-text,#334155);
	background:#fff;
	border:1px solid var(--npc-line);
	border-radius:10px;
	text-decoration:none;
}
.npc-pager .page-numbers svg{width:16px;height:16px}
.npc-pager a.page-numbers:hover{border-color:var(--nb-faint,#94a3b8);color:var(--npc-primary)}
.npc-pager .page-numbers.current{background:var(--npc-primary);border-color:var(--npc-primary);color:#fff}
.npc-pager .page-numbers.dots{border-color:transparent;background:none}

@media (max-width:767px){
	.npc-body{padding:16px 16px 14px;gap:8px}
	.npc-title{font-size:15px}
	.npc-cats{margin-bottom:20px}
	.npc-pager-label{display:none}
}

@media (prefers-reduced-motion:reduce){
	.npc-card,.npc-img,.npc-read{transition:none}
	.npc-card:hover .npc-img,.npc-card:focus-within .npc-img{transform:none}
}
