.bpw-ns {
	--bpw-ns-h: 480px;
	--bpw-ns-accent: #c8102e;
	--bpw-ns-radius: 10px;
	--bpw-ns-side-bg: #ffffff;
	--bpw-ns-text: #1a1a1a;
	--bpw-ns-muted: #6b6b6b;
	--bpw-ns-line: #e8e8e8;
	direction: rtl;
	text-align: right;
}
.bpw-ns *,
.bpw-ns *::before,
.bpw-ns *::after { box-sizing: border-box; }

/* شريط العنوان */
.bpw-ns__head {
	display: flex;
	align-items: flex-end;
	border-bottom: 2px solid var(--bpw-ns-accent);
	margin-bottom: 14px;
}
.bpw-ns__head { justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.bpw-ns__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-bottom: 8px;
	margin-inline-start: auto;
}
.bpw-ns .bpw-ns__tab {
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
	border: 0;
	border-radius: 20px;
	padding: 5px 16px;
	min-height: 32px;
	background: #f1efeb;
	color: var(--bpw-ns-text);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	box-shadow: none;
	transition: background .2s ease, color .2s ease;
}
.bpw-ns .bpw-ns__tab:hover,
.bpw-ns .bpw-ns__tab:focus { background: #e4e1dc; color: var(--bpw-ns-text); outline: none; }
.bpw-ns .bpw-ns__tab:focus-visible { outline: 2px solid var(--bpw-ns-accent); outline-offset: 2px; }
.bpw-ns .bpw-ns__tab.is-active { background: #1a1a1a; color: #fff; }
.bpw-ns__item.is-filtered { display: none; }
.bpw-ns__label {
	display: inline-block;
	background: var(--bpw-ns-accent);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.4;
	padding: 7px 18px;
	border-radius: var(--bpw-ns-radius) var(--bpw-ns-radius) 0 0;
}

/* التخطيط */
.bpw-ns__body {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 16px;
	height: var(--bpw-ns-h);
}
.bpw-ns--no-side .bpw-ns__body { grid-template-columns: minmax(0, 1fr); }

/* الخبر الرئيسي */
.bpw-ns__main {
	position: relative;
	height: 100%;
	overflow: hidden;
	border-radius: var(--bpw-ns-radius);
	background: #151515;
}
.bpw-ns__slides { position: absolute; inset: 0; }
.bpw-ns__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .6s ease, visibility .6s ease;
}
.bpw-ns__slide.is-active { opacity: 1; visibility: visible; z-index: 1; }

.bpw-ns__media { position: absolute; inset: 0; display: block; overflow: hidden; }
.bpw-ns__media img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	display: block;
	transform: scale(1.06);
	transition: transform 7s ease-out;
}
.bpw-ns__slide.is-active .bpw-ns__media img { transform: scale(1); }
.bpw-ns__noimg {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #2a2a2a, #4a4a4a);
}

.bpw-ns__overlay {
	position: absolute;
	inset: auto 0 0 0;
	z-index: 2;
	padding: 60px 28px 30px;
	color: #fff;
	background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.55) 55%, rgba(0,0,0,0) 100%);
}
.bpw-ns__cat {
	display: inline-block;
	background: var(--bpw-ns-accent);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
	padding: 3px 10px;
	border-radius: 3px;
	margin-bottom: 10px;
}
.bpw-ns .bpw-ns__title {
	margin: 0 0 8px;
	font-size: clamp(20px, 2.3vw, 30px);
	line-height: 1.45;
	font-weight: 700;
	color: #fff;
}
.bpw-ns .bpw-ns__title a { color: #fff; text-decoration: none; }
.bpw-ns .bpw-ns__title a:hover,
.bpw-ns .bpw-ns__title a:focus { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.bpw-ns__excerpt { margin: 0 0 10px; font-size: 15px; line-height: 1.75; color: rgba(255,255,255,.9); }
.bpw-ns__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 13px; color: rgba(255,255,255,.85); }
.bpw-ns .bpw-ns__more {
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	border-bottom: 2px solid var(--bpw-ns-accent);
	padding-bottom: 1px;
}
.bpw-ns .bpw-ns__more:hover { color: #fff; border-bottom-color: #fff; }

/* الأسهم */
.bpw-ns__nav {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 3;
	display: flex;
	gap: 6px;
}
.bpw-ns .bpw-ns__arrow {
	appearance: none;
	-webkit-appearance: none;
	width: 38px;
	height: 38px;
	padding: 0;
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: rgba(0,0,0,.45);
	color: #fff;
	cursor: pointer;
	transition: background .2s ease;
	box-shadow: none;
}
.bpw-ns .bpw-ns__arrow:hover,
.bpw-ns .bpw-ns__arrow:focus-visible { background: var(--bpw-ns-accent); color: #fff; }
.bpw-ns .bpw-ns__arrow:focus { outline: none; }
.bpw-ns .bpw-ns__arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* شريط التقدم */
.bpw-ns__progress {
	position: absolute;
	inset: auto 0 0 0;
	height: 3px;
	z-index: 3;
	background: rgba(255,255,255,.18);
}
.bpw-ns__progress span { display: block; height: 100%; width: 0; background: var(--bpw-ns-accent); margin-inline-start: 0; }

/* القائمة الجانبية */
.bpw-ns__list {
	list-style: none;
	margin: 0;
	padding: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--bpw-ns-side-bg);
	border: 1px solid var(--bpw-ns-line);
	border-radius: var(--bpw-ns-radius);
}
.bpw-ns__item {
	flex: 1 1 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border-bottom: 1px solid var(--bpw-ns-line);
}
.bpw-ns__item:last-child { border-bottom: 0; }

.bpw-ns .bpw-ns__item-btn {
	appearance: none;
	-webkit-appearance: none;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 8px 12px;
	border: 0;
	border-inline-start: 4px solid transparent;
	border-radius: 0;
	background: transparent;
	color: var(--bpw-ns-text);
	font: inherit;
	text-align: right;
	white-space: normal;
	cursor: pointer;
	box-shadow: none;
	transition: background .2s ease, border-color .2s ease;
}
.bpw-ns .bpw-ns__item-btn:hover,
.bpw-ns .bpw-ns__item-btn:focus { background: rgba(0,0,0,.035); color: var(--bpw-ns-text); outline: none; }
.bpw-ns .bpw-ns__item-btn:focus-visible { outline: 2px solid var(--bpw-ns-accent); outline-offset: -2px; }
.bpw-ns .bpw-ns__item.is-active .bpw-ns__item-btn {
	background: rgba(0,0,0,.05);
	border-inline-start-color: var(--bpw-ns-accent);
}

.bpw-ns__thumb {
	flex: 0 0 92px;
	width: 92px;
	height: 64px;
	border-radius: 6px;
	overflow: hidden;
	background: linear-gradient(135deg, #d9d9d9, #efefef);
}
.bpw-ns__thumb img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }

.bpw-ns__item-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bpw-ns__item-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bpw-ns__item.is-active .bpw-ns__item-title { color: var(--bpw-ns-accent); }
.bpw-ns__item-date { font-size: 12px; color: var(--bpw-ns-muted); }

.bpw-ns-empty {
	padding: 24px;
	border: 1px dashed #bbb;
	text-align: center;
	color: #666;
}

/* تابلت وموبايل */
@media (max-width: 1024px) {
	.bpw-ns__thumb { flex-basis: 76px; width: 76px; height: 56px; }
	.bpw-ns__item-title { font-size: 13px; }
}
@media (max-width: 767px) {
	.bpw-ns__body { grid-template-columns: minmax(0, 1fr); height: auto; gap: 12px; }
	.bpw-ns__main { height: var(--bpw-ns-h); }
	.bpw-ns__overlay { padding: 50px 18px 22px; }
	.bpw-ns__list {
		height: auto;
		flex-direction: row;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.bpw-ns__list::-webkit-scrollbar { display: none; }
	.bpw-ns__item {
		flex: 0 0 78%;
		border-bottom: 0;
		border-inline-start: 1px solid var(--bpw-ns-line);
		scroll-snap-align: start;
	}
	.bpw-ns__item:first-child { border-inline-start: 0; }
	.bpw-ns .bpw-ns__item-btn { padding: 10px; border-inline-start-width: 0; border-bottom: 3px solid transparent; }
	.bpw-ns .bpw-ns__item.is-active .bpw-ns__item-btn { border-bottom-color: var(--bpw-ns-accent); }
}

@media (prefers-reduced-motion: reduce) {
	.bpw-ns__slide,
	.bpw-ns__media img,
	.bpw-ns .bpw-ns__item-btn { transition: none; }
	.bpw-ns__media img { transform: none; }
}
