/* =========================================================
   Ofoq Spotlight Blocks - Frontend Styles
   ========================================================= */

.osb-wrap {
	--osb-primary: #c0392b;
	--osb-text: #1c1c1c;
	--osb-muted: #6b6b6b;
	--osb-border: #e8e8e8;
	--osb-bg-soft: #f7f7f8;
	--osb-radius: 14px;
	direction: rtl;
	max-width: 100%;
	margin: 0px 0px 28px 0px;
	font-family: inherit;
}

/* ---------- عنوان بخش ---------- */
.osb-heading {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 18px;
}

.osb-heading-line {
	flex: 1;
	height: 1px;
	background: linear-gradient(to left, var(--osb-border), transparent);
}

.osb-heading-line:first-child {
	background: linear-gradient(to right, var(--osb-border), transparent);
}

.osb-heading-title {
	font-size: 20px;
	font-weight: 800;
	color: var(--osb-text);
	white-space: nowrap;
	text-decoration: none;
	position: relative;
	padding-bottom: 2px;
}

.osb-heading-title::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: -3px;
	width: 32px;
	height: 3px;
	border-radius: 3px;
	background: var(--osb-primary);
}

a.osb-heading-title:hover {
	color: var(--osb-primary);
}

/* ---------- اسلایدر ---------- */
.osb-slider {
	position: relative;
	border-radius: var(--osb-radius);
	overflow: hidden;
	background: #000;
	margin-bottom: 22px;
	isolation: isolate;
}

.osb-slider-track {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
}

@media (max-width: 600px) {
	.osb-slider-track {
		aspect-ratio: 4 / 3.4;
	}
}

.osb-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease;
}

.osb-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.osb-slide-link {
	display: block;
	position: relative;
	width: 100%;
	height: 100%;
	text-decoration: none;
	color: #fff;
}

.osb-slide-media {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.osb-slide-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 6s ease;
}

.osb-slide.is-active .osb-slide-media img {
	transform: scale(1.06);
}

.osb-slide-media-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #3a3a3a, #1a1a1a);
}

.osb-slide-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.45) 45%, rgba(0,0,0,0.05) 75%);
}

.osb-slide-content {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	padding: 28px 28px 24px;
	z-index: 2;
}

@media (max-width: 600px) {
	.osb-slide-content {
		padding: 18px 16px 18px;
	}
}

.osb-kicker {
	display: inline-block;
	background: var(--osb-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 20px;
	margin-bottom: 10px;
}

.osb-slide-title {
	font-size: 24px;
	font-weight: 800;
	line-height: 1.5;
	margin: 0 0 8px;
	color: #fff;
	text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

@media (max-width: 600px) {
	.osb-slide-title {
		font-size: 17px;
		line-height: 1.6;
	}
}

.osb-slide-excerpt {
	font-size: 14px;
	line-height: 1.8;
	color: rgba(255,255,255,0.85);
	margin: 0;
	max-width: 720px;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (max-width: 600px) {
	.osb-slide-excerpt {
		display: none;
	}
}

/* ---------- دکمه‌های ناوبری اسلایدر ---------- */
.osb-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(255,255,255,0.15);
	backdrop-filter: blur(4px);
	border: 1px solid rgba(255,255,255,0.3);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 999;
	pointer-events: auto;
	transition: background 0.25s ease, transform 0.25s ease;
	padding: 0;
	margin: 0;
	line-height: 0;
	-webkit-appearance: none;
	appearance: none;
}

.osb-nav svg {
	pointer-events: none;
}

.osb-nav:hover {
	background: var(--osb-primary);
	border-color: var(--osb-primary);
}

.osb-nav-prev {
	right: 16px;
}

.osb-nav-next {
	left: 16px;
}

@media (max-width: 600px) {
	.osb-nav {
		width: 34px;
		height: 34px;
	}
	.osb-nav-prev { right: 10px; }
	.osb-nav-next { left: 10px; }
}

/* ---------- نقاط (dots) ---------- */
.osb-dots {
	position: absolute;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	z-index: 999;
	pointer-events: auto;
}

.osb-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255,255,255,0.45);
	border: none;
	cursor: pointer;
	padding: 0;
	margin: 0;
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	transition: all 0.25s ease;
}

.osb-dot.is-active {
	background: #fff;
	width: 22px;
	border-radius: 5px;
}

/* ---------- گرید پایین (همیشه ۲ ستونه در دسکتاپ، طبق طرح اصلی سایت) ---------- */
.osb-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px;
}

@media (max-width: 560px) {
	.osb-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}
}

.osb-grid-item {
	background: #fff;
	border: 1px solid var(--osb-border);
	border-radius: 12px;
	transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.osb-grid-item:hover {
	border-color: transparent;
	box-shadow: 0 10px 28px rgba(0,0,0,0.08);
	transform: translateY(-3px);
}

.osb-grid-link {
	display: block;
	padding: 18px;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

.osb-kicker-grid {
	background: var(--osb-bg-soft);
	color: var(--osb-primary);
	font-size: 11px;
}

.osb-grid-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.7;
	color: var(--osb-text);
	margin: 8px 0 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s ease;
}

.osb-grid-item:hover .osb-grid-title {
	color: var(--osb-primary);
}

.osb-grid-excerpt {
	font-size: 13px;
	line-height: 1.8;
	color: var(--osb-muted);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- دکمه مشاهده بیشتر ---------- */
.osb-more-wrap {
	display: flex;
	justify-content: flex-start;
	margin-top: 18px;
}

.osb-more-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--osb-text);
	text-decoration: none;
	padding: 9px 16px;
	border: 1px solid var(--osb-border);
	border-radius: 30px;
	transition: all 0.25s ease;
}

.osb-more-btn:hover {
	background: var(--osb-primary);
	border-color: var(--osb-primary);
	color: #fff;
}

.osb-more-btn svg {
	transition: transform 0.25s ease;
}

.osb-more-btn:hover svg {
	transform: translateX(-3px);
}

/* ---------- حالت تیره اختیاری (در صورت وجود data-ecs-scheme) ---------- */
html[data-ecs-scheme="alt"] .osb-grid-item {
	background: #1d1d1f;
	border-color: #2c2c2e;
}

html[data-ecs-scheme="alt"] .osb-grid-title {
	color: #f1f1f1;
}

html[data-ecs-scheme="alt"] .osb-grid-excerpt {
	color: #9a9a9a;
}

html[data-ecs-scheme="alt"] .osb-heading-title {
	color: #f1f1f1;
}

html[data-ecs-scheme="alt"] .osb-more-btn {
	color: #f1f1f1;
	border-color: #2c2c2e;
}
