/* =========================================================================
   كالنبتة — الدورات | أنماط الواجهة
   كل لون وخط يأتي من متغيّرات Elementor العامة للموقع، مع قيمة احتياطية
   مطابقة لما هو مضبوط فعلاً في Kit #7 — فتغيير الهوية من Site Settings
   ينعكس هنا تلقائياً.
   نقاط التوقّف مطابقة لإعداد الموقع: viewport_lg = 1025، viewport_md = 768.
   ====================================================================== */

.knb {
	--knb-green:      var(--e-global-color-el_color_1_4, #6F8756);
	--knb-accent:     var(--e-global-color-el_color_1,   #586D43);
	--knb-deep:       var(--e-global-color-el_color_1_2, #425232);
	--knb-ink:        var(--e-global-color-el_color_7,   #2C3722);
	--knb-body:       var(--e-global-color-el_color_7_1, #6C7863);
	--knb-muted:      var(--e-global-color-el_color_7_2, #A6AD9F);
	--knb-line:       var(--e-global-color-el_color_7_4, #E7E6E3);
	--knb-soft:       var(--e-global-color-el_color_7_6, #F3F4EF);
	--knb-white:      var(--e-global-color-el_color_0,   #ffffff);
	--knb-font:       var(--e-global-typography-el_content_1-font-family, "Thmanyah-Font-Family"), serif;

	direction: rtl;
	text-align: right;
	font-family: var(--knb-font);
	box-sizing: border-box;
	max-width: 100%;
}

.knb *,
.knb *::before,
.knb *::after { box-sizing: border-box; }

/* يمنع أي عنصر داخلي من تجاوز عرض أبيه (سبب التمرير الأفقي الشائع) */
.knb * { min-width: 0; max-width: 100%; }

.knb .knb-i {
	width: 1em;
	height: 1em;
	flex: none;
	color: var(--knb-accent);
}

/* ---------------------------------------------- شرائط بعرض الصفحة كاملة
   قوالب القالب تضع المحتوى داخل حاوية محدودة العرض؛ هذه الحيلة تُخرج
   الشريط من الحاوية ليمتدّ من حافة الشاشة إلى حافتها.
   ------------------------------------------------------------------ */

.knb-hero,
.knb-subscribe,
.elementor .knb-c-hero,
.elementor .knb-c-sub {
	max-width: none;
}

/* الحاويات الأب لا يجب أن تقصّ الشريط الممتد */
body.knb-course-page .site-content,
body.knb-course-page .content,
body.knb-course-page .wf-wrap,
body.knb-course-page .wf-container,
body.knb-course-page .elementor-location-archive,
body.knb-course-page .elementor-location-single {
	overflow: visible !important;
}

/* يمنع شريط تمرير أفقي ناتج عن 100vw مع وجود شريط تمرير رأسي */
body.knb-course-page { overflow-x: clip; }

/* ------------------------------------------------------------ الهيرو */

.knb-hero {
	background: var(--knb-green);
	color: var(--knb-white);
	text-align: center;
	padding: clamp(46px, 6vw, 82px) 20px;
}

.knb-hero__title {
	margin: 0;
	color: var(--knb-white);
	font-family: var(--e-global-typography-el_title_2-font-family, "Thmanyah-Font-Family"), serif;
	font-size: clamp(34px, 5vw, 54px);
	font-weight: 400;
	line-height: 1.2;
}

.knb-hero__sub {
	margin: 12px 0 0;
	color: rgba(255, 255, 255, .88);
	font-size: clamp(14px, 1.6vw, 17px);
	line-height: 1.6;
}

/* -------------------------------------------------------- مسار التصفح */

.knb-crumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	line-height: 1.8;
}

.knb-crumb a { color: var(--knb-accent); text-decoration: none; }
.knb-crumb a:hover { text-decoration: underline; }
.knb-crumb span[aria-hidden] { color: var(--knb-muted); }
.knb-crumb__current { color: var(--knb-muted); }

/* -------------------------------------------------------- حبّات الميتا */

.knb-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.knb-meta--card { justify-content: center; }
.knb-meta--single { justify-content: flex-start; gap: 10px; }
.knb-meta--single .knb-duration { margin-inline-start: auto; }

.knb-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--knb-soft);
	color: var(--knb-body);
	font-size: 12px;
	line-height: 1.4;
	padding: 7px 11px;
	border-radius: 6px;
}

.knb-pill.is-solid { background: var(--knb-deep); color: var(--knb-white); }
.knb-pill.is-solid .knb-i { color: var(--knb-white); }

.knb-duration {
	font-size: 12px;
	line-height: 1.4;
	color: var(--knb-muted);
}

/* ------------------------------- تخطيط الطبقة الاحتياطية (بلا Elementor) */

.knb-wrap {
	max-width: 1300px;
	margin-inline: auto;
	padding: 60px 20px;
}

.knb-archive-head { margin-bottom: 40px; }

.knb-archive-title {
	margin: 0 0 8px;
	font-size: 30px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--knb-ink);
}

.knb-archive-lede { margin: 0; font-size: 16px; line-height: 1.9; color: var(--knb-body); }

.knb-title {
	margin: 14px 0;
	font-size: 30px;
	font-weight: 500;
	line-height: 1.45;
	color: var(--knb-ink);
	overflow-wrap: anywhere;
}

.knb-body { font-size: 16px; line-height: 2.1; color: #3E4838; margin: 22px 0; }
.knb-body p { margin: 0 0 18px; }

.knb-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 44px;
	margin-top: 44px;
}

.knb-reviews { margin-top: 44px; padding-top: 40px; border-top: 1px solid var(--knb-line); }

.knb-fallback-note {
	max-width: 1300px;
	margin: 14px auto;
	padding: 12px 18px;
	background: #FFF6E5;
	border-inline-start: 3px solid #C08A2E;
	border-radius: 4px;
	font-size: 13px;
	color: #6B5320;
}

.knb-fallback-note a { color: #6B5320; text-decoration: underline; }

@media (max-width: 767px) {
	.knb-wrap { padding: 36px 18px; }
	.knb-cols { grid-template-columns: 1fr; gap: 40px; }
	.knb-title { text-align: center; }
}

/* ------------------------------------------------------------ الشبكة */

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

/* ---------------------------------------------------------- البطاقة */

.knb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	height: 100%;               /* تساوي ارتفاع البطاقات داخل الصف */
	background: var(--knb-white);
	border: 1px solid var(--knb-line);
	border-radius: 14px;
	box-shadow: 0 2px 12px rgba(44, 55, 34, .05);
	padding: 18px 22px 24px;
	text-align: center;
	transition: box-shadow .25s ease, transform .25s ease;
}

.knb-card:hover { box-shadow: 0 8px 24px rgba(44, 55, 34, .10); transform: translateY(-2px); }

/* رابط يغطّي البطاقة كاملة — مع إبقاء النص قابلاً للتحديد */
.knb-card__link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.knb-card > *:not(.knb-card__link) { position: relative; z-index: 1; }

.knb-card__top {
	width: 100%;
	display: flex;
	justify-content: flex-start;
	min-height: 1px;
}

.knb-badge {
	display: inline-block;
	background: var(--knb-green);
	color: var(--knb-white);
	font-size: 11px;
	font-weight: 500;
	line-height: 1;
	padding: 6px 12px;
	border-radius: 5px;
	white-space: nowrap;
}

.knb-badge.is-past { background: var(--knb-deep); }

.knb-visual {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 170px;
	overflow: hidden;
	border-radius: 8px;
}

.knb-visual img { width: 100%; height: 100%; object-fit: contain; }
.knb-visual.is-photo img { object-fit: cover; }
.knb-visual.is-empty { background: var(--knb-soft); }

.knb-card__title {
	margin: 6px 0 0;
	font-family: var(--e-global-typography-el_title_5-font-family, "Thmanyah-Font-Family"), serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--knb-ink);
	overflow-wrap: anywhere;
	transition: color .2s ease;
}

.knb-card:hover .knb-card__title { color: var(--knb-accent); }

.knb-card__desc {
	margin: 0;
	font-size: 14px;
	line-height: 2;
	color: var(--knb-body);
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	overflow: hidden;
}

.knb-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: auto;
	padding-top: 4px;
}

.knb-empty { text-align: center; color: var(--knb-muted); padding: 40px 0; }

/* ------------------------------------------------------- ترقيم الصفحات */

.knb-pagination { margin-top: 44px; }
.knb-pagination ul { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; margin: 0; padding: 0; }
.knb-pagination a,
.knb-pagination span {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border-radius: 6px;
	font-size: 14px;
	text-decoration: none;
	color: var(--knb-body);
	background: var(--knb-soft);
}
.knb-pagination .current { background: var(--knb-accent); color: var(--knb-white); }

/* ---------------------------------------------------- عناوين الأقسام */

.knb-block__title {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0 0 26px;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--knb-accent);
}

.knb-block__title .knb-i { width: 1.15em; height: 1.15em; }

/* --------------------------------------------------------- المحاضر */

.knb-instructor__row { display: flex; align-items: center; gap: 18px; }

.knb-avatar {
	width: 92px;
	height: 92px;
	border-radius: 50%;
	object-fit: cover;
	flex: none;
	background: #D9D9D9;
}

.knb-avatar--empty { display: block; }
.knb-instructor__body { display: flex; flex-direction: column; gap: 6px; }
.knb-instructor__name { font-size: 17px; font-weight: 500; color: var(--knb-ink); }
.knb-instructor__bio { font-size: 13.5px; line-height: 1.85; color: var(--knb-body); }

/* ---------------------------------------------------------- المعرض */

.knb-gallery__grid {
	display: grid;
	grid-template-columns: repeat(var(--knb-gcols, 3), minmax(0, 1fr));
	gap: 12px;
}

.knb-gallery.is-masonry .knb-gallery__grid {
	display: block;
	column-count: var(--knb-gcols, 3);
	column-gap: 12px;
}

.knb-gallery.is-masonry .knb-gallery__item {
	break-inside: avoid;
	margin-bottom: 12px;
	aspect-ratio: auto;
}

.knb-gallery__item {
	position: relative;
	margin: 0;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 8px;
	background: var(--knb-soft);
	cursor: zoom-in;
}

.knb-gallery__item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.knb-gallery.is-masonry .knb-gallery__item img { height: auto; object-fit: contain; }

.knb-gallery__item:hover img { transform: scale(1.04); }
.knb-gallery__item:focus-visible { outline: 2px solid var(--knb-accent); outline-offset: 3px; }

.knb-gallery__item figcaption {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: 22px 12px 9px;
	font-size: 12px;
	line-height: 1.5;
	color: #fff;
	background: linear-gradient(to top, rgba(20, 26, 16, .78), transparent);
	text-align: right;
}

/* --------------------------------------------------------- الآراء */

.knb-review + .knb-review { margin-top: 49px; }

.knb-review__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.knb-review__who {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 500;
	color: var(--knb-ink);
}

.knb-stars { display: inline-flex; gap: 2px; font-size: 17px; line-height: 1; }
.knb-star { color: #C6CFBB; }
.knb-star.is-on { color: var(--knb-green); }

.knb-review__text {
	background: var(--knb-soft);
	border-radius: 6px;
	padding: 20px 24px;
	font-size: 14px;
	line-height: 2.1;
	color: var(--knb-body);
	text-align: justify;
	overflow-wrap: anywhere;
}

.knb-review__text p { margin: 0 0 12px; }
.knb-review__text p:last-child { margin: 0; }

/* ------------------------------------------------------ زر التسجيل */

.knb-register {
	display: inline-block;
	background: var(--knb-accent);
	color: var(--knb-white);
	font-size: 15px;
	line-height: 1;
	padding: 15px 34px;
	border-radius: 6px;
	text-decoration: none;
	transition: background .2s ease;
}

.knb-register:hover { background: var(--knb-deep); color: var(--knb-white); }

/* -------------------------------------------------- شريط الإشعارات */

.knb-subscribe {
	background: #F1EEEE;
	text-align: center;
	padding: clamp(32px, 5vw, 56px) 20px;
}

.knb-subscribe {
	direction: rtl !important;
	text-align: center;
}

.knb-subscribe p {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 9px;
	margin: 0;
	direction: rtl;
}

/* الأيقونة على يسار النص عند اختيار ذلك من الإعدادات */
.knb-subscribe.is-icon-end p { flex-direction: row-reverse; }

/* زر إشعارات المتصفح */
.knb-push-btn {
	border: 0;
	background: var(--knb-accent);
	color: var(--knb-white);
	font: inherit;
	font-size: inherit;
	line-height: 1;
	padding: 14px 30px;
	border-radius: 6px;
	cursor: pointer;
	transition: background .2s ease;
}

.knb-push-btn:hover { background: var(--knb-deep); }
.knb-subscribe.is-push .knb-subscribe__cta { margin-top: 14px !important; }

.knb-subscribe__label { font-size: clamp(17px, 2vw, 21px); font-weight: 500; color: var(--knb-accent); }
.knb-subscribe__cta { margin-top: 18px !important; font-size: clamp(16px, 2.2vw, 22px); }

.knb-subscribe__cta a {
	color: var(--knb-accent);
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 1px;
}

/* ======================================================== Lightbox */

.knb-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	background: rgba(20, 26, 16, .94);
	direction: rtl;
	touch-action: pan-y;
}

.knb-lb.is-open { display: grid; place-items: center; }

.knb-lb__stage {
	display: grid;
	place-items: center;
	width: min(1200px, 94vw);
	max-height: 84vh;
	padding: 8px;
}

.knb-lb__stage img {
	max-width: 100%;
	max-height: 78vh;
	border-radius: 8px;
	user-select: none;
	-webkit-user-drag: none;
}

.knb-lb__cap {
	margin-top: 14px;
	color: rgba(255, 255, 255, .9);
	font-size: 14px;
	line-height: 1.7;
	text-align: center;
	max-width: 70ch;
}

.knb-lb__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
}

.knb-lb__btn:hover { background: rgba(255, 255, 255, .24); }
.knb-lb__btn .knb-i { width: 24px; height: 24px; color: #fff; }
.knb-lb__prev { inset-inline-end: 18px; }
.knb-lb__next { inset-inline-start: 18px; }

.knb-lb__close {
	position: absolute;
	top: 18px;
	inset-inline-start: 18px;
	transform: none;
}

.knb-lb__count {
	position: absolute;
	top: 26px;
	inset-inline-end: 24px;
	color: rgba(255, 255, 255, .75);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

/* ====================================================== الاستجابة
   Tablet ≤ 1024  ·  Mobile ≤ 767  (مطابقة لنقاط الموقع)
   =================================================================== */

@media (max-width: 1024px) {
	.knb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.knb-avatar { width: 78px; height: 78px; }
}

@media (max-width: 767px) {
	.knb-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }

	.knb-card { padding: 16px 18px 20px; }
	.knb-visual { height: 200px; }
	.knb-card__title { font-size: 19px; }

	/* أهم إصلاح للجوال: منع nowrap من دفع البطاقة خارج الشاشة */
	.knb-pill,
	.knb-duration,
	.knb-badge { white-space: normal; text-align: center; }

	.knb-meta--single { justify-content: center; }
	.knb-meta--single .knb-duration { margin-inline-start: 0; }
	.knb-crumb { justify-content: center; }

	.knb-instructor__row { flex-direction: column; align-items: center; text-align: center; gap: 12px; }

	.knb-review__head { flex-direction: column; align-items: flex-start; gap: 8px; }
	.knb-review__text { padding: 18px; text-align: right; }

	.knb-lb__btn { width: 44px; height: 44px; }
	.knb-lb__prev { inset-inline-end: 8px; }
	.knb-lb__next { inset-inline-start: 8px; }
}

@media (max-width: 400px) {
	.knb-meta { gap: 6px; }
	.knb-pill { font-size: 11.5px; padding: 6px 9px; }
	.knb-subscribe__cta { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.knb-card,
	.knb-gallery__item img { transition: none; }
	.knb-card:hover { transform: none; }
}

/* =========================================================================
   طبقة الودجات الأصلية (.knb-c-*)
   هذه قيم افتراضية فقط تُطابق التصميم؛ أي تعديل يعمله العميل من Elementor
   يُطبع بعدها في CSS الصفحة فيتفوّق عليها. لا تُقيّد أي شيء.
   ====================================================================== */

.elementor .knb-c-card { position: relative; transition: box-shadow .25s ease, transform .25s ease; }

/* طبقة الرابط: تغطّي البطاقة كاملة فتصبح كل مساحتها قابلة للنقر */
.elementor .knb-c-cardlink {
	position: absolute !important;
	inset: 0 !important;
	z-index: 9;
	margin: 0 !important;
	padding: 0 !important;
	width: auto !important;
}

.elementor .knb-c-cardlink .elementor-widget-container,
.knb-card-overlay {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

/* عناصر البطاقة تحت الطبقة، ما عدا ما يحتاج نقرة خاصة */
.elementor .knb-c-card > .elementor-element:not(.knb-c-cardlink) { position: relative; z-index: 1; }
.elementor .knb-c-card:hover { box-shadow: 0 8px 24px rgba(44, 55, 34, .10); transform: translateY(-2px); }

/* الصورة / الشعار داخل البطاقة */
.elementor .knb-c-img img {
	width: 100%;
	height: 170px;
	object-fit: contain;
	border-radius: 8px;
}

/* عنوان البطاقة */
.elementor .knb-c-title .elementor-heading-title {
	font-size: 20px;
	line-height: 1.5;
	font-weight: 400;
	overflow-wrap: anywhere;
}

/* وصف البطاقة */
.elementor .knb-c-desc { font-size: 14px; line-height: 2; }
.elementor .knb-c-desc p { margin: 0; }

/* حبّات المعلومات (Icon Box) — تخطيط فقط.
   الألوان والخلفية والحشو والاستدارة والخط كلها في إعدادات الودجت نفسها،
   حتى يتمكّن العميل من تغييرها من Elementor ويراها تُطبَّق فعلاً. */

.elementor .knb-c-pill { width: auto !important; }

.elementor .knb-c-pill .elementor-icon-box-wrapper { display: flex; align-items: center; }
.elementor .knb-c-pill .elementor-icon-box-icon { margin: 0 !important; flex: none; }
.elementor .knb-c-pill .elementor-icon-box-title { margin: 0; white-space: nowrap; }
.elementor .knb-c-pill .elementor-icon-box-description { display: none; }

/* سطر المدة */
.elementor .knb-c-dur .elementor-heading-title {
	font-size: 12px;
	line-height: 1.4;
	font-weight: 400;
	color: var(--e-global-color-el_color_7_2, #A6AD9F);
}

/* أسفل البطاقة يلتصق بالقاع فتتساوى ارتفاعات البطاقات */
.elementor .knb-c-foot { margin-top: auto !important; }

/* صف معلومات صفحة الدورة — المدة في أقصى اليسار */
.elementor .knb-c-metarow .knb-c-dur--end { margin-inline-start: auto; }

/* عناوين الأقسام (Icon Box) — تخطيط فقط، والألوان من إعدادات الودجت */
.elementor .knb-c-head .elementor-icon-box-wrapper { display: flex; align-items: center; }
.elementor .knb-c-head .elementor-icon-box-icon { margin: 0 !important; flex: none; }
.elementor .knb-c-head .elementor-icon-box-title { margin: 0; }
.elementor .knb-c-head .elementor-icon-box-description { display: none; }

/* المحاضر */
.elementor .knb-c-avatar img {
	width: 92px;
	height: 92px;
	border-radius: 50%;
	object-fit: cover;
}
.elementor .knb-c-iname .elementor-heading-title { font-size: 17px; font-weight: 500; line-height: 1.4; }
.elementor .knb-c-ibio { font-size: 13.5px; line-height: 1.85; }
.elementor .knb-c-ibio p { margin: 0; }

/* محتوى الدورة */
.elementor .knb-c-content { font-size: 16px; line-height: 2.1; }

/* شريط الإشعارات */
.elementor .knb-c-sub-label .elementor-icon-box-wrapper,
.elementor .knb-c-sub-cta .elementor-icon-box-wrapper { display: flex; align-items: center; gap: 9px; justify-content: center; }
.elementor .knb-c-sub-label .elementor-icon-box-icon,
.elementor .knb-c-sub-cta .elementor-icon-box-icon { margin: 0 !important; flex: none; }
.elementor .knb-c-sub-label .elementor-icon,
.elementor .knb-c-sub-cta .elementor-icon { color: var(--e-global-color-el_color_1, #586D43); }
.elementor .knb-c-sub-label .elementor-icon-box-title {
	margin: 0; font-size: 21px; font-weight: 500;
	color: var(--e-global-color-el_color_1, #586D43);
}
.elementor .knb-c-sub-cta .elementor-icon-box-title {
	margin: 0; font-size: 22px; font-weight: 400;
	color: var(--e-global-color-el_color_1, #586D43);
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 1px;
}

/* زر التسجيل */
.elementor .knb-c-btn .elementor-button { border-radius: 6px; padding: 15px 34px; font-size: 15px; }

@media (max-width: 1024px) {
	.elementor .knb-c-avatar img { width: 78px; height: 78px; }
}

@media (max-width: 767px) {
	.elementor .knb-c-img img { height: 200px; }
	.elementor .knb-c-title .elementor-heading-title { font-size: 19px; }
	.elementor .knb-c-pill .elementor-icon-box-title { white-space: normal; }
	.elementor .knb-c-metarow { justify-content: center; }
	.elementor .knb-c-metarow .knb-c-dur--end { margin-inline-start: 0; }
	.elementor .knb-c-instructor { flex-direction: column; text-align: center; }
	.elementor .knb-c-sub-label .elementor-icon-box-title { font-size: 18px; }
	.elementor .knb-c-sub-cta .elementor-icon-box-title { font-size: 16px; }
}


/* =========================================================================
   ملاءمة بنية الأقسام الكلاسيكية (section > column) المستخدمة في القوالب
   ====================================================================== */

/* صفوف أفقية داخل عمود Elementor (الأعمدة رأسية افتراضياً) */
.elementor .knb-c-metarow > .elementor-widget-wrap,
.elementor .knb-c-pills > .elementor-widget-wrap,
.elementor .knb-c-foot > .elementor-widget-wrap {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
}

/* الهيرو داخل قسم ممتد — مضبوط ليتّسع داخل شريط ١٥٠ بكسل */
.elementor .knb-c-hero .elementor-widget:not(:last-child) { margin-bottom: 0; }

.elementor .knb-c-hero .knb-c-hero-title .elementor-heading-title {
	font-size: clamp(28px, 3.4vw, 40px);
	font-weight: 400;
	line-height: 1.15;
	margin: 0;
}

.elementor .knb-c-hero .knb-c-hero-sub .elementor-heading-title {
	font-size: clamp(13px, 1.4vw, 16px);
	line-height: 1.5;
	margin: 6px 0 0;
	font-weight: 400;
}

@media (max-width: 767px) {
	.elementor .knb-c-hero .knb-c-hero-title .elementor-heading-title { font-size: 26px; }
	.elementor .knb-c-hero .knb-c-hero-sub .elementor-heading-title { font-size: 13px; }
}

/* ترويسة الأرشيف */
.elementor .knb-c-archtitle .elementor-heading-title { margin: 0 0 8px; }
.elementor .knb-c-archlede p { margin: 0; }

/* ترقيم الصفحات — بنفس روح القالب */
.elementor .knb-c-loop .elementor-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 44px;
	direction: rtl;
}

.elementor .knb-c-loop .elementor-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1;
	text-decoration: none;
	color: var(--e-global-color-el_color_7_1, #6C7863);
	background: var(--e-global-color-el_color_7_6, #F3F4EF);
	transition: background .2s ease, color .2s ease;
}

.elementor .knb-c-loop .elementor-pagination .page-numbers:hover {
	background: var(--e-global-color-el_color_1_4, #6F8756);
	color: #fff;
}

.elementor .knb-c-loop .elementor-pagination .page-numbers.current {
	background: var(--e-global-color-el_color_1, #586D43);
	color: #fff;
}

.elementor .knb-c-loop .elementor-pagination .page-numbers.dots {
	background: transparent;
	min-width: 24px;
	padding: 0;
}

/* ---------------------------------------------------- لوحة تشخيص المحرّر */

.knb-diag {
	position: fixed;
	inset-inline-end: 18px;
	inset-block-end: 18px;
	z-index: 9999;
	max-width: 340px;
	background: #FFFFFF;
	border: 1px solid #E3E6DC;
	border-inline-start: 4px solid #C7862F;
	border-radius: 10px;
	box-shadow: 0 12px 34px rgba(30, 40, 22, .18);
	padding: 16px 18px 18px;
	font-size: 13px;
	line-height: 1.7;
	color: #4A5341;
	direction: rtl;
	text-align: right;
}

.knb-diag__x {
	position: absolute;
	inset-inline-start: 8px;
	inset-block-start: 6px;
	background: none;
	border: 0;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: #9AA391;
	padding: 2px 6px;
}

.knb-diag__x:hover { color: #4A5341; }

.knb-diag__h {
	margin: 0 0 10px;
	font-weight: 600;
	font-size: 13.5px;
	color: #3F4A37;
}

.knb-diag__h span {
	display: block;
	font-weight: 400;
	font-size: 11.5px;
	color: #9AA391;
}

.knb-diag ul { margin: 0 0 12px; padding: 0; list-style: none; }
.knb-diag li { display: flex; align-items: baseline; gap: 7px; margin: 0 0 3px; }
.knb-diag li em { font-style: normal; color: #B4795B; font-size: 12px; }
.knb-diag__i { font-weight: 700; flex: none; }
.knb-diag .is-ok    { color: #4A5341; }
.knb-diag .is-ok    .knb-diag__i { color: #6F8756; }
.knb-diag .is-empty .knb-diag__i { color: #C0714E; }

.knb-diag__btn {
	display: block;
	text-align: center;
	background: #6F8756;
	color: #FFFFFF !important;
	text-decoration: none !important;
	border-radius: 7px;
	padding: 8px 12px;
	font-size: 12.5px;
	font-weight: 500;
}

.knb-diag__btn:hover { background: #5D7247; }

@media (max-width: 600px) {
	.knb-diag { inset-inline: 12px; max-width: none; }
}

/* ------------------------------------------------- انهيار العمود الوحيد
   قسم «المحاضرون | مواد مصورة» عمودان بنسبة ٥٠٪. حين يختفي أحدهما
   (لأن حقوله فارغة) كان النصف الآخر يترك فراغاً أبيض بلا معنى.
   :only-child يجعل العمود الباقي يملأ العرض كاملاً.
   ------------------------------------------------------------------ */

.elementor .elementor-container > .elementor-column.elementor-col-50:only-child {
	width: 100%;
}

/* --------------------------------------------------- خط فاصل واحد للآراء
   قسم الآراء يرسم فاصله مرتين: مرة من سكشن Elementor (قابل للتحرير من
   لوحة Elementor) ومرة من كتلة الآراء نفسها في الطبقة الاحتياطية.
   داخل Elementor نُلغي فاصل الكتلة ونُبقي فاصل السكشن وحده.
   ------------------------------------------------------------------- */

.elementor .knb-reviews {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

/* الفاصل الوحيد فوق قسم الآراء — يظل قابلاً للتجاوز من Elementor
   (قاعدة Elementor للعنصر أعلى أولويةً، فتعديل العميل يفوز دائماً). */
.elementor .knb-needs-reviews {
	border-top: 1px solid var(--e-global-color-el_color_7_4, #E7E6E3);
}
