/* أكاديمية خطاف — هوية khattaf.sa */

.khac-page,
.khac-dash,
.khac-auth,
.khac-checkout,
.khac-files,
.khac-lesson-wrap {
	--khac-cta: #ff6900;
	--khac-cta-dark: #e85f00;
	--khac-brand: #0c6caa;
	--khac-bright: #18a0f0;
	--khac-navy: #0b2239;
	--khac-navy-2: #062a44;
	--khac-tint: #eef8ff;
	--khac-line: #e2e8f0;
	--khac-text: #0b2239;
	--khac-muted: #5b7085;
	--khac-radius: 16px;

	font-family: Cairo, Tajawal, system-ui, sans-serif;
	color: var(--khac-text);
	line-height: 1.8;
}

.khac-dash,
.khac-auth,
.khac-checkout,
.khac-files,
.khac-lesson-wrap {
	max-width: 1140px;
	margin-inline: auto;
	padding-inline: 16px;
}

.khac-h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; line-height: 1.3; margin: 0 0 8px; }
.khac-h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin: 0 0 8px; }
.khac-h3 { font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.khac-muted { color: var(--khac-muted); }
.khac-small { font-size: 13px; }
.khac-eyebrow { color: var(--khac-bright); font-weight: 700; font-size: 14px; margin: 0 0 4px; }

/* أزرار ----------------------------------------------------------------- */

.khac-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 26px;
	border-radius: 12px;
	border: 1px solid transparent;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}

.khac-btn--cta { background: var(--khac-cta); color: #fff; box-shadow: 0 10px 24px -12px rgba(255, 105, 0, .7); }
.khac-btn--cta:hover { background: var(--khac-cta-dark); color: #fff; transform: translateY(-1px); }
.khac-btn--ghost { background: transparent; color: var(--khac-brand); border-color: var(--khac-line); }
.khac-btn--ghost:hover { border-color: var(--khac-brand); background: var(--khac-tint); }
.khac-btn--block { width: 100%; }
.khac-btn--sm { padding: 7px 16px; font-size: 14px; border-radius: 10px; }
.khac-btn[disabled] { opacity: .6; pointer-events: none; }

.khac-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }

/* بطاقات ---------------------------------------------------------------- */

.khac-card {
	background: #fff;
	border: 1px solid var(--khac-line);
	border-radius: var(--khac-radius);
	padding: 28px;
	box-shadow: 0 1px 2px rgba(11, 34, 57, .04);
}

.khac-card--center { text-align: center; max-width: 620px; margin: 40px auto; }

.khac-alert { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 15px; }
.khac-alert--info { background: var(--khac-tint); color: var(--khac-brand); }
.khac-alert--error { background: #fef2f2; color: #b91c1c; }
.khac-alert--success { background: #ecfdf5; color: #047857; }

/* نماذج ----------------------------------------------------------------- */

.khac-auth { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; margin: 40px auto; align-items: start; }
.khac-auth__aside { background: var(--khac-navy); color: #fff; border-radius: var(--khac-radius); padding: 28px; }
.khac-auth__aside .khac-h3 { color: #fff; }
.khac-auth__aside p { color: #cbd5e1; }
.khac-auth__aside .khac-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .3); }
.khac-auth__aside .khac-btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }

.khac-form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.khac-form--hidden { display: none; }

.khac-field { display: flex; flex-direction: column; gap: 6px; }
.khac-field > span { font-weight: 600; font-size: 15px; }
.khac-field input,
.khac-field select {
	font-family: inherit;
	font-size: 16px;
	padding: 12px 14px;
	border: 1px solid var(--khac-line);
	border-radius: 12px;
	background: #fff;
	color: var(--khac-text);
	width: 100%;
}
.khac-field input:focus { outline: 2px solid var(--khac-bright); outline-offset: 1px; border-color: var(--khac-bright); }

.khac-check { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.khac-links { margin-top: 16px; font-size: 15px; }
.khac-links a { color: var(--khac-brand); }
.khac-sep { color: var(--khac-line); margin-inline: 6px; }

.khac-form__message:empty { display: none; }
.khac-form__message { border-radius: 10px; padding: 10px 14px; font-size: 15px; }
.khac-form__message.is-error { background: #fef2f2; color: #b91c1c; }
.khac-form__message.is-success { background: #ecfdf5; color: #047857; }

/* غلاف صفحات الطالب ------------------------------------------------------
 * شريط القائمة في القالب ثابت فوق الصفحة (90px)، فتبدأ الصفحة تحته.
 */

.khac-page {
	background: #f4f8fb;
	padding: 128px 0 72px;
	min-height: 70vh;
}

/* بطاقات الرسائل (الشكر، طلب الدخول) تأتي بلا حاوية، فتلتصق بحافة الجوال */
@media (max-width: 767px) {
	.khac-page > .khac-card--center { margin-inline: 16px; }
}

/* الاشتراك -------------------------------------------------------------- */

.khac-checkout { margin: 0 auto; }

.khac-checkout__head { text-align: center; max-width: 640px; margin: 0 auto 28px; padding: 0; }
.khac-checkout__head .khac-h1 { margin-bottom: 6px; color: var(--khac-navy); }
.khac-checkout__head .khac-muted { margin: 0; font-size: 16px; }

.khac-checkout__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.khac-checkout__main { padding: 32px; box-shadow: 0 16px 40px -28px rgba(11, 34, 57, .35); }
.khac-checkout .khac-form { margin-top: 0; gap: 28px; }

/* القالب يضع على كل section حشوة 90px فوقه وتحته */
.khac-step { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; background: none; }
.khac-step__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; font-weight: 800; color: var(--khac-navy); }
.khac-step__num {
	flex: none;
	width: 28px; height: 28px;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--khac-brand);
	color: #fff;
	font-size: 14px; font-weight: 800; line-height: 1;
}

.khac-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }

/* القالب يفرض ارتفاعاً وهامشاً وظلاً على كل input */
.khac-checkout .khac-field input { height: auto; min-height: 50px; margin: 0; box-shadow: none; }
.khac-checkout .khac-field input::placeholder { color: #a0aec0; }

/* وسائل الدفع: بطاقة لكل وسيلة، والمختارة بإطار العلامة */
.khac-pay { display: flex; flex-direction: column; gap: 10px; }
.khac-pay__option {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	padding: 14px 16px;
	border: 1.5px solid var(--khac-line);
	border-radius: 14px;
	background: #fff;
	cursor: pointer;
	transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.khac-pay__option:hover { border-color: #b9d7ec; }
.khac-pay__option:has(input:checked) {
	border-color: var(--khac-brand);
	background: var(--khac-tint);
	box-shadow: 0 0 0 3px rgba(12, 108, 170, .12);
}
/* القالب يمدّ كل input بعرض كامل، فينضغط النص بجانب زر الاختيار */
.khac-pay__option input[type="radio"] {
	flex: none;
	width: 20px; height: 20px;
	min-height: 0;
	margin: 0; padding: 0;
	accent-color: var(--khac-brand);
	cursor: pointer;
}
.khac-pay__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.khac-pay__title { font-weight: 700; font-size: 16px; line-height: 1.5; color: var(--khac-navy); }
.khac-pay__desc { font-size: 13.5px; line-height: 1.6; color: var(--khac-muted); }
.khac-pay__logos { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 45%; }

.khac-logo {
	display: inline-flex; align-items: center;
	height: 26px; padding: 0 9px;
	border: 1px solid var(--khac-line); border-radius: 7px;
	background: #fff;
	font-size: 12px; font-weight: 800; line-height: 1;
	color: var(--khac-navy);
	white-space: nowrap;
}
.khac-logo--mada { color: #14804a; }
.khac-logo--visa { color: #1a1f71; font-style: italic; direction: ltr; }
.khac-logo--mc { color: #c2410c; direction: ltr; }
.khac-logo--apple { color: #111; direction: ltr; }
/* شعار تمارا الرسمي */
.khac-logo-img { display: block; flex: none; width: auto; height: 26px; max-width: none; margin: 0; }

.khac-bank { background: var(--khac-tint); border-radius: 12px; padding: 16px; }
.khac-bank pre { white-space: pre-wrap; font-family: inherit; margin: 8px 0; direction: ltr; text-align: start; }

/* المجموع والموافقة وزر الدفع */
.khac-checkout__pay { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--khac-line); padding-top: 22px; }
.khac-total { display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: 700; }
.khac-total strong { font-size: 26px; font-weight: 800; color: var(--khac-navy); }

.khac-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 14px;
	line-height: 1.8;
	color: var(--khac-muted);
	background: var(--khac-tint);
	border-radius: 12px;
	padding: 12px 14px;
}
.khac-consent input { margin-top: 5px; flex: none; width: 17px; height: 17px; min-height: 0; accent-color: var(--khac-brand); }
.khac-consent a { color: var(--khac-brand); text-decoration: underline; }
.khac-consent a:hover { color: var(--khac-cta); }

.khac-btn--lg { padding: 15px 26px; font-size: 17px; border-radius: 14px; }
.khac-secure { margin: 0; text-align: center; font-size: 13px; color: var(--khac-muted); }

/* ملخص الطلب */
.khac-summary {
	background: #fff;
	border: 1px solid var(--khac-line);
	border-radius: var(--khac-radius);
	padding: 26px;
	position: sticky;
	top: 120px;
}
.khac-summary > .khac-h3:first-child { margin-bottom: 14px; }
.khac-summary__course { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--khac-line); }
.khac-summary__badge {
	flex: none;
	width: 52px; height: 52px;
	display: grid; place-items: center;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--khac-navy) 0%, var(--khac-brand) 100%);
	color: #fff;
	font-size: 20px;
}
.khac-summary__course strong { display: block; font-size: 16px; line-height: 1.5; color: var(--khac-navy); }
.khac-summary__course span { font-size: 13.5px; color: var(--khac-muted); }

.khac-summary__rows { margin: 16px 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.khac-summary__rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.khac-summary__rows dt { margin: 0; color: var(--khac-muted); font-weight: 500; }
.khac-summary__rows dd { margin: 0; font-weight: 700; color: var(--khac-navy); }
.khac-summary__rows del { color: #94a3b8; font-weight: 500; }
.khac-summary__rows .is-save dd { color: #047857; }
.khac-summary__rows .is-total { margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--khac-line); }
.khac-summary__rows .is-total dt { color: var(--khac-navy); font-weight: 700; }
.khac-summary__rows .is-total dd { font-size: 24px; font-weight: 800; }

.khac-summary__tamara { display: flex; align-items: center; gap: 8px; margin: -6px 0 20px; font-size: 13.5px; line-height: 1.6; color: var(--khac-muted); }
.khac-summary__tamara img { flex: none; width: auto; height: 22px; max-width: none; margin: 0; }

.khac-summary .khac-ticks { margin: 12px 0 18px; font-size: 15px; }
.khac-summary__note { margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; background: #ecfdf5; color: #047857; font-size: 14px; line-height: 1.7; }
.khac-summary__help { margin: 0; font-size: 14px; color: var(--khac-muted); }
.khac-summary__help a { color: var(--khac-brand); font-weight: 700; }

.khac-ticks { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
.khac-ticks li { position: relative; padding-inline-start: 28px; }
.khac-ticks li::before {
	content: "✓";
	position: absolute;
	inset-inline-start: 0;
	width: 20px; height: 20px;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--khac-brand);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

@media (max-width: 880px) {
	.khac-summary { position: static; }
}

@media (max-width: 767px) {
	.khac-page { padding: 100px 0 48px; }
	.khac-checkout__head { margin-bottom: 20px; }
	.khac-checkout__head .khac-muted { font-size: 14.5px; }
	.khac-checkout__main { padding: 22px 16px; }
	.khac-checkout .khac-form { gap: 24px; }
	.khac-fields { grid-template-columns: 1fr; }

	/* الشعارات تنزل تحت النص بدل أن تضغطه */
	.khac-pay__option { flex-wrap: wrap; padding: 14px; row-gap: 10px; }
	.khac-pay__logos { max-width: none; width: 100%; justify-content: flex-start; padding-inline-start: 34px; }

	.khac-total strong { font-size: 24px; }
	.khac-summary { padding: 22px 16px; }
}

/* لوحة الطالب ----------------------------------------------------------- */

.khac-dash { margin: 32px auto 64px; }

.khac-dash__hero {
	background: linear-gradient(135deg, var(--khac-navy) 0%, var(--khac-brand) 100%);
	color: #fff;
	border-radius: 24px;
	padding: 36px;
}
.khac-dash__hero .khac-h1,
.khac-dash__hero .khac-eyebrow { color: #fff; }
.khac-dash__hero .khac-muted { color: #cbd5e1; }

.khac-progress { margin: 24px 0; }
.khac-progress__head { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 8px; }

.khac-bar { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.khac-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--khac-cta); transition: width .4s; }
.khac-bar--sm { height: 6px; background: #e8eef5; }
.khac-bar--sm > span { background: var(--khac-brand); }

.khac-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 24px 0 36px; }
.khac-stat { background: #fff; border: 1px solid var(--khac-line); border-radius: var(--khac-radius); padding: 20px; text-align: center; }
.khac-stat__value { display: block; font-size: 30px; font-weight: 800; color: var(--khac-navy); }
.khac-stat__label { display: block; font-size: 14px; color: var(--khac-muted); margin-top: 4px; }

.khac-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 16px 0 32px; align-items: start; }
.khac-levels__hint { margin: 0; color: var(--khac-muted); font-size: 14px; }
/* كل مستوى مطويّ افتراضياً: رأسه (العنوان والتقدم) ظاهر، ودروسه تحت السهم */
.khac-level { background: #fff; border: 1px solid var(--khac-line); border-radius: var(--khac-radius); transition: border-color .2s, box-shadow .2s; }
.khac-level[open] { border-color: #b9d7ec; box-shadow: 0 14px 32px -26px rgba(11, 34, 57, .5); }
.khac-level__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; cursor: pointer; list-style: none; }
.khac-level__head::-webkit-details-marker { display: none; }
.khac-level__head:focus-visible { outline: 2px solid var(--khac-bright); outline-offset: -2px; border-radius: var(--khac-radius); }
.khac-level__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.khac-level__title { font-size: 17px; font-weight: 700; line-height: 1.5; color: var(--khac-navy); unicode-bidi: isolate; }
.khac-level .khac-bar { display: block; }
.khac-level__body { padding: 0 20px 20px; }
.khac-level .khac-lessons { max-height: none; overflow: visible; }
.khac-level__num {
	flex: none;
	width: 34px; height: 34px;
	display: grid; place-items: center;
	border-radius: 10px;
	background: var(--khac-brand);
	color: #fff;
	font-weight: 800;
}
.khac-level__meta { display: flex; flex-wrap: wrap; gap: 2px 14px; color: var(--khac-muted); font-size: 14px; margin: 0; }
.khac-level__desc { font-size: 15px; color: var(--khac-muted); margin: 0 0 14px; }
.khac-level__count { font-size: 13px; color: var(--khac-muted); margin: 6px 0 14px; }

.khac-lessons { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.khac-lessons a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--khac-text); font-size: 15px; }
.khac-lessons a:hover { background: var(--khac-tint); }
.khac-lessons__tick { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--khac-line); }
.khac-lessons li.is-done .khac-lessons__tick { background: #10b981; border-color: #10b981; }
.khac-lessons__title { flex: 1; }
.khac-lessons__time { color: var(--khac-muted); font-size: 13px; }

.khac-dash__foot { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* المنهج في صفحة الهبوط -------------------------------------------------- */

.khac-curriculum { display: flex; flex-direction: column; gap: 10px; font-family: Cairo, Tajawal, system-ui, sans-serif; text-align: start; }

/* المنهج يُبنى من الدروس نفسها، بشكل أكورديون Elementor الذي كان مكانه */
.khac-acc { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.khac-acc summary {
	display: flex; align-items: center; gap: 14px;
	padding: 16px 20px;
	cursor: pointer; list-style: none;
	color: #0b2239; font-size: 17px; font-weight: 700; line-height: 1.6;
	transition: color .2s;
}
.khac-acc summary::-webkit-details-marker { display: none; }
.khac-acc summary:hover,
.khac-acc[open] summary { color: #0c6caa; }
.khac-acc summary:focus-visible { outline: 2px solid #18a0f0; outline-offset: -2px; }

/* سهم الطي: لأسفل والمستوى مطويّ، ولأعلى عند فتحه. ألوان ثابتة: صفحة الهبوط بلا متغيرات --khac */
.khac-chevron {
	flex: none;
	position: relative;
	width: 32px; height: 32px;
	border-radius: 50%;
	background: #eef8ff;
	transition: background-color .2s;
}
.khac-chevron::before {
	content: "";
	position: absolute; top: 50%; left: 50%;
	width: 8px; height: 8px;
	border-right: 2.5px solid #0c6caa;
	border-bottom: 2.5px solid #0c6caa;
	transform: translate(-50%, -70%) rotate(45deg);
	transition: transform .25s;
}
summary:hover .khac-chevron { background: #d8ecfb; }
details[open] > summary .khac-chevron::before { transform: translate(-50%, -30%) rotate(-135deg); }

.khac-acc__head { flex: 1; min-width: 0; }
/* عنوان ينتهي بنص لاتيني (Performance Max) كان يسحب رقم الدروس إلى جهته */
.khac-acc__title,
.khac-acc__meta { unicode-bidi: isolate; }
.khac-acc__meta { color: #94a3b8; font-weight: 500; font-size: 14px; white-space: nowrap; }

.khac-acc__body { padding: 0 20px 18px; }
.khac-acc__desc { color: #475569; margin: 0 0 10px; font-size: 15px; line-height: 1.8; }
.khac-acc__list { list-style: none; margin: 0; padding: 0; color: #334155; font-size: 15px; }
.khac-acc__list li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid #f1f5f9; margin: 0; }
.khac-acc__list li:last-child { border-bottom: 0; }
.khac-acc__lesson { flex: 1; min-width: 0; }
.khac-acc__time { flex: none; color: #94a3b8; font-size: 13px; }

@media (max-width: 767px) {
	.khac-acc summary { padding: 13px 14px; gap: 12px; font-size: 15px; }
	.khac-acc__meta { display: block; margin-top: 3px; font-size: 12px; }
	.khac-acc__body { padding: 0 14px 14px; }
	.khac-acc__desc { font-size: 14px; }
	.khac-acc__list { font-size: 14px; }
}

.khac-tag { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; }
.khac-tag--free { background: #fff4ec; color: #ff6900; text-decoration: none; }

.khac-pricing { font-family: Cairo, Tajawal, system-ui, sans-serif; text-align: center; }
.khac-badge { display: inline-block; background: #ff6900; color: #fff; border-radius: 99px; padding: 4px 14px; font-size: 13px; font-weight: 700; }
.khac-price { margin: 22px 0; display: flex; align-items: baseline; justify-content: center; gap: 12px; }
.khac-price del { color: #94a3b8; font-size: 18px; }
.khac-price strong { font-size: 44px; font-weight: 800; }
.khac-pricing .khac-ticks { text-align: start; max-width: 360px; margin-inline: auto; }

/* الملفات --------------------------------------------------------------- */

.khac-files { margin: 40px auto 64px; }
.khac-files__level { margin-top: 28px; }
.khac-files__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.khac-files__list li { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--khac-line); border-radius: 12px; padding: 12px 16px; }
.khac-files__name { font-weight: 600; flex: 1; }
.khac-files__lesson { color: var(--khac-muted); font-size: 14px; }

/* صفحة الدرس ------------------------------------------------------------ */

/* شريط القائمة في القالب ثابت فوق الصفحة (90px، وعلى الجوال 80px)، فيبدأ الدرس تحته. */
.khac-lesson-wrap { margin: 0 auto 64px; padding-top: 122px; }
/* سطر المستوى والمدة ينزل لسطر ثانٍ بدل أن ينضغط كل عنصر في سطرين. */
.khac-lesson__meta { flex-wrap: wrap; row-gap: 8px; }
.khac-lesson__meta > span:not(.khac-chip) { white-space: nowrap; }
@media (max-width: 767px) {
	.khac-lesson-wrap { padding-top: 100px; }
	/* القالب يضيف 60px فوق كل aside، والفاصل هنا من الشبكة نفسها. */
	.khac-lesson__side { margin-top: 0; }
}
.khac-breadcrumb { font-size: 14px; color: var(--khac-muted); margin-bottom: 16px; display: flex; gap: 8px; }
.khac-breadcrumb a { color: var(--khac-brand); text-decoration: none; }

.khac-lesson { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.khac-lesson__meta { display: flex; gap: 12px; align-items: center; color: var(--khac-muted); font-size: 14px; margin-bottom: 16px; }

.khac-player { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; }
.khac-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.khac-player--empty {
	display: grid; place-content: center; text-align: center;
	background: var(--khac-tint); color: var(--khac-brand); padding: 24px;
}
.khac-player--empty p { margin: 4px; }

.khac-lesson__content { margin-top: 24px; font-size: 16px; }

.khac-resources { margin-top: 28px; background: var(--khac-tint); border-radius: var(--khac-radius); padding: 20px; }
.khac-resources ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.khac-resources li { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-radius: 10px; padding: 10px 14px; }

.khac-lesson__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-top: 28px; }
.khac-lesson__nav { display: flex; gap: 8px; }

.khac-lesson__side { background: #fff; border: 1px solid var(--khac-line); border-radius: var(--khac-radius); padding: 20px; position: sticky; top: 24px; max-height: 80vh; overflow-y: auto; }
.khac-side-level summary { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; padding: 10px 0; list-style: none; font-size: 15px; }
.khac-side-level summary::-webkit-details-marker { display: none; }
.khac-side-level ul { list-style: none; margin: 0 0 10px; padding-inline-start: 40px; display: flex; flex-direction: column; gap: 4px; }
.khac-side-level a { color: var(--khac-text); text-decoration: none; font-size: 14px; display: block; padding: 4px 0; }
.khac-side-level a:hover { color: var(--khac-brand); }
.khac-side-level li.is-done a { color: #10b981; }
.khac-side-level li.is-current a { font-weight: 700; color: var(--khac-cta); }

/* شريط تقدّم أعلى الدرس */
.khac-lesson-progress { margin-bottom: 20px; }
.khac-lesson-progress__head { display: flex; justify-content: space-between; font-size: 14px; color: var(--khac-muted); margin-bottom: 6px; }

.khac-chip { background: var(--khac-tint); color: var(--khac-brand); border-radius: 99px; padding: 3px 12px; font-size: 13px; font-weight: 600; }
.khac-tag--done { background: #ecfdf5; color: #047857; }

/* المرفقات */
.khac-resources__count {
	display: inline-grid; place-items: center;
	min-width: 22px; height: 22px; padding: 0 6px;
	border-radius: 99px; background: var(--khac-brand); color: #fff;
	font-size: 12px; font-weight: 700; vertical-align: middle; margin-inline-start: 6px;
}
.khac-resources__meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.khac-resources__ext {
	flex: none; display: grid; place-items: center;
	width: 42px; height: 42px; border-radius: 10px;
	background: var(--khac-brand); color: #fff;
	font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.khac-resources__meta em { display: block; font-style: normal; font-size: 12px; color: var(--khac-muted); margin-top: 2px; }

/* الشريط الجانبي */
.khac-side-level summary { gap: 8px; }
.khac-side-level__title { flex: 1; }
.khac-side-level__count { font-size: 12px; color: var(--khac-muted); font-weight: 500; }
.khac-side-level__files { font-size: 12px; opacity: .65; margin-inline-start: 4px; }
.khac-side-level__foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--khac-line); }

/* التقييمات ------------------------------------------------------------- */

.khac-reviews { font-family: Cairo, Tajawal, system-ui, sans-serif; }
.khac-reviews__agg { text-align: center; color: #475569; font-size: 16px; margin: 0 0 24px; }
.khac-reviews__stars { color: #f59e0b; font-size: 20px; letter-spacing: 2px; margin-inline-end: 6px; }
.khac-reviews__agg strong { color: #0b2239; }

/* شريط التقييمات المتحرك — صف واحد يتقدّم كل 5 ثوانٍ */

.khac-slider { --khac-gap: 20px; --khac-per-view: 3; position: relative; }
.khac-slider__viewport { overflow: hidden; padding: 4px; margin: -4px; }
.khac-slider__track {
	display: flex;
	gap: var(--khac-gap);
	transition: transform .6s cubic-bezier(.4, 0, .2, 1);
	will-change: transform;
}
.khac-slider.is-static .khac-slider__track { transition: none; }

.khac-review {
	flex: 0 0 calc((100% - (var(--khac-per-view) - 1) * var(--khac-gap)) / var(--khac-per-view));
	display: flex; flex-direction: column; gap: 10px;
	margin: 0; padding: 22px;
	background: #fff; border: 1px solid #e2e8f0; border-radius: 16px;
	box-shadow: 0 2px 10px rgba(11, 34, 57, .05);
}
.khac-review__stars { color: #f59e0b; font-size: 16px; letter-spacing: 2px; }

/* النص عادي لا مائل — بعض القوالب تُميل blockquote افتراضياً */
.khac-review blockquote {
	margin: 0; padding: 0; border: 0;
	font-style: normal;
	font-size: 15px; line-height: 1.9; color: #0b2239;
	white-space: pre-line;
	quotes: none;
}
.khac-review blockquote::before,
.khac-review blockquote::after { content: none; }

/* القالب يحقن على figcaption خطاً مائلاً وحداً أيسر بـ5px وحشوة — نلغيها كلها هنا */
.khac-review figcaption {
	margin: auto 0 0;
	padding: 12px 0 0;
	border: 0;
	border-top: 1px solid #f1f5f9;
	text-align: start;
	font-style: normal;
	font-size: inherit;
	color: inherit;
}
.khac-review figcaption span { font-style: normal; }
.khac-review__name { display: block; font-weight: 700; font-size: 15px; color: #0b2239; font-style: normal; }
.khac-review__role { display: block; font-size: 13px; color: #94a3b8; margin-top: 2px; font-style: normal; }

/* أدوات التنقل */
.khac-slider__nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; }
.khac-slider__arrow {
	width: 38px; height: 38px; flex: none;
	display: grid; place-items: center;
	border: 1px solid #e2e8f0; border-radius: 50%;
	background: #fff; color: #0c6caa;
	font-size: 22px; line-height: 1; cursor: pointer;
	font-family: inherit;
	transition: background-color .2s, border-color .2s, color .2s;
}
.khac-slider__arrow:hover { background: #0c6caa; border-color: #0c6caa; color: #fff; }
.khac-slider__arrow:disabled { opacity: .35; cursor: default; }

.khac-slider__dots { display: flex; gap: 7px; }
.khac-slider__dots button {
	width: 8px; height: 8px; padding: 0;
	border: 0; border-radius: 99px; background: #cbd5e1;
	cursor: pointer; transition: width .25s, background-color .25s;
}
.khac-slider__dots button.is-active { width: 24px; background: #ff6900; }

@media (max-width: 1024px) { .khac-slider { --khac-per-view: 2; } }
@media (max-width: 680px) { .khac-slider { --khac-per-view: 1; } }

@media (prefers-reduced-motion: reduce) {
	.khac-slider__track { transition: none; }
}

/* بطاقة طلب التقييم */
.khac-review-ask {
	background: linear-gradient(135deg, #eef8ff 0%, #fff4ec 100%);
	border: 1px solid #cfe9fb;
	border-radius: var(--khac-radius, 16px);
	padding: 22px;
	margin: 24px 0;
	font-family: Cairo, Tajawal, system-ui, sans-serif;
}
.khac-review-ask__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.khac-review-ask__head h3 { margin: 0; }
.khac-review-ask__close {
	background: none; border: 0; cursor: pointer;
	color: #5b7085; font-family: inherit; font-size: 14px; text-decoration: underline;
}
.khac-review-ask .khac-form { margin-top: 14px; gap: 12px; }
.khac-review-ask textarea { font-family: inherit; font-size: 15px; padding: 12px 14px; border: 1px solid #cfe0ee; border-radius: 12px; width: 100%; }

/* النجوم القابلة للاختيار — ترتيب معكوس ليعمل التمرير في RTL */
.khac-stars { display: inline-flex; flex-direction: row; gap: 4px; }
.khac-stars__item { cursor: pointer; font-size: 30px; line-height: 1; color: #cbd5e1; transition: color .15s; }
.khac-stars__item input { position: absolute; opacity: 0; width: 0; height: 0; }
.khac-stars__item:hover,
.khac-stars__item:hover ~ .khac-stars__item,
.khac-stars__item:has(input:checked),
.khac-stars__item:has(input:checked) ~ .khac-stars__item { color: #f59e0b; }
.khac-stars__item:focus-within { outline: 2px solid var(--khac-bright, #18a0f0); outline-offset: 2px; border-radius: 4px; }
.khac-stars .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* الجوال ---------------------------------------------------------------- */

@media (max-width: 880px) {
	.khac-auth,
	.khac-checkout__grid,
	.khac-lesson { grid-template-columns: 1fr; }
	.khac-lesson__side { position: static; max-height: none; }
	.khac-dash__hero { padding: 24px; }
}

@media (max-width: 767px) {
	.khac-dash,
	.khac-auth,
	.khac-checkout,
	.khac-files,
	.khac-lesson-wrap { padding-inline: 16px; }

	.khac-card { padding: 20px 18px; }
	.khac-stat { padding: 16px 12px; }
	.khac-stat__value { font-size: 26px; }
	.khac-level__head { padding: 16px; }
	.khac-level__body { padding: 0 16px 16px; }
	.khac-level__title { font-size: 16px; }
	.khac-review { padding: 20px 18px; }

	.khac-lesson__actions { flex-direction: column; align-items: stretch; }
	.khac-lesson__actions .khac-btn { width: 100%; }
	/* زر واحد يملأ العرض، وزران ينقسمان مناصفة */
	.khac-lesson__nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
	.khac-lesson__nav .khac-btn { width: 100%; }

	.khac-resources li { flex-direction: column; align-items: stretch; gap: 10px; }
	.khac-resources li .khac-btn { width: 100%; }
	.khac-files__list li { flex-wrap: wrap; }
	.khac-files__lesson { width: 100%; order: 3; }
}

/* =======================================================================
 * صفحة الكورس على الجوال — القالب مصمَّم لعرض 1140px، فنُعيد ضبطه للشاشة الصغيرة.
 * القيم !important لأن Elementor يكتب تنسيقه في ملف الصفحة بخصوصية أعلى.
 * ==================================================================== */

@media (max-width: 767px) {

	/* --- العناوين --- */
	.khac-landing h1.elementor-heading-title {
		font-size: 27px !important;
		line-height: 1.38 !important;
	}
	.khac-landing h2.elementor-heading-title {
		font-size: 23px !important;
		line-height: 1.45 !important;
	}
	.khac-landing h3.elementor-heading-title { font-size: 19px !important; }
	.khac-landing .elementor-icon-box-title { font-size: 17px !important; }
	.khac-landing .elementor-icon-box-description { font-size: 14.5px !important; }

	/* --- فقرات التمهيد تحت العناوين --- */
	.khac-landing .elementor-widget-text-editor:not(#khac-hero-stats *):not(#khac-proof-bar *) {
		font-size: 15px !important;
		line-height: 1.85 !important;
	}

	/* --- أزرار الهيرو: الأساسي بعرض كامل والثانويان جنباً إلى جنب --- */
	#khac-hero-actions > .elementor-container { flex-wrap: wrap; gap: 10px; }
	#khac-hero-actions .elementor-column { width: calc(50% - 5px) !important; }
	#khac-hero-actions .elementor-column:first-child { width: 100% !important; }
	#khac-hero-actions .elementor-widget-button,
	#khac-hero-actions .elementor-button { width: 100%; }
	#khac-hero-actions .elementor-button {
		padding: 13px 10px !important;
		font-size: 15px !important;
	}

	/* --- إحصائيات الهيرو وشريط النتائج: شبكة 2×2 منتظمة --- */
	#khac-hero-stats > .elementor-container,
	#khac-proof-bar > .elementor-container { flex-wrap: wrap; row-gap: 18px; }
	#khac-hero-stats .elementor-column,
	#khac-proof-bar .elementor-column { width: 50% !important; }

	#khac-hero-stats .elementor-widget-wrap,
	#khac-proof-bar .elementor-widget-wrap { align-content: flex-start; }

	#khac-hero-stats .elementor-heading-title { font-size: 25px !important; }
	#khac-proof-bar .elementor-heading-title { font-size: 19px !important; }

	#khac-hero-stats .elementor-widget-text-editor,
	#khac-proof-bar .elementor-widget-text-editor {
		font-size: 12.5px !important;
		line-height: 1.5 !important;
	}
	/* سطران ثابتان للتسمية حتى تتحاذى الأعمدة مهما طال النص */
	#khac-hero-stats .elementor-widget-text-editor p,
	#khac-proof-bar .elementor-widget-text-editor p {
		min-height: 2.6em;
		margin: 0;
	}

	/* --- البطاقات --- */
	.khac-landing .khac-card-col > .elementor-element-populated {
		padding: 20px 18px !important;
	}

	/* --- أكورديون المنهج والأسئلة --- */
	.khac-landing .elementor-tab-title { padding: 13px 14px !important; }
	.khac-landing .elementor-toggle-title { font-size: 15px !important; line-height: 1.6 !important; }
	.khac-landing .elementor-toggle-title span {
		display: block;
		margin-top: 3px;
		font-size: 12px !important;
	}
	.khac-landing .elementor-tab-content { padding: 14px !important; font-size: 14px !important; }
	.khac-landing .elementor-tab-content li { font-size: 14px !important; }

	/* --- بطاقة السعر --- */
	#pricing .elementor-element-populated { padding: 26px 18px !important; }
	#pricing .elementor-heading-title span[style*="48px"] { font-size: 36px !important; }
	#pricing .elementor-heading-title span[style*="20px"] { font-size: 16px !important; }
	#pricing .elementor-icon-list-text { font-size: 14.5px !important; }

	/* --- قائمة إنجازات المدرب --- */
	.khac-landing .elementor-icon-list-text { font-size: 14.5px !important; line-height: 1.7 !important; }

	/* --- التقييمات --- */
	.khac-reviews__agg { font-size: 14.5px; }
	.khac-reviews__stars { font-size: 17px; }
	.khac-slider__nav { gap: 10px; margin-top: 18px; }
}

/* الشاشات الصغيرة جداً */
@media (max-width: 380px) {
	.khac-landing h1.elementor-heading-title { font-size: 25px !important; }
	.khac-landing h2.elementor-heading-title { font-size: 21px !important; }
	#khac-proof-bar .elementor-heading-title { font-size: 17px !important; }
	#khac-hero-actions .elementor-button { font-size: 14px !important; padding: 12px 8px !important; }
}

/* تقييم الدرس ------------------------------------------------------------
 * داخل الصفحة تحت الفيديو لا فوقها: لا يغطي شيئاً على الجوال. القالب يلوّن كل button،
 * فتُضبط الخلفيات والظلال هنا صراحةً.
 */

/* القالب يضيف حشوة 90px (50px على الجوال) لكل section. */
.khac-rate { margin: 10px 0 18px; padding: 0; }
.khac-rate button { box-shadow: none; text-transform: none; letter-spacing: 0; font-family: inherit; }
.khac-rate__open {
	display: inline-flex; align-items: center; gap: 6px;
	margin: 0; padding: 4px 0;
	border: 0; background: none;
	color: var(--khac-muted); font-size: 13.5px; font-weight: 600; line-height: 1.6;
	cursor: pointer;
}
.khac-rate__open:hover, .khac-rate__open:focus { color: var(--khac-brand); background: none; }

.khac-rate__card {
	position: relative;
	margin-top: 8px; padding: 16px 18px;
	border: 1px solid var(--khac-line); border-radius: 14px;
	background: #fff;
	box-shadow: 0 14px 34px -26px rgba(11, 34, 57, .55);
	animation: khac-rate-in .22s ease-out;
}
.khac-rate__card[hidden], .khac-rate [hidden] { display: none; }
@keyframes khac-rate-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.khac-rate__close {
	position: absolute; top: 6px; inset-inline-end: 6px;
	width: 36px; height: 36px; margin: 0; padding: 0;
	border: 0; border-radius: 50%; background: none;
	color: #94a3b8; font-size: 22px; line-height: 1;
	cursor: pointer;
}
.khac-rate__close:hover, .khac-rate__close:focus { background: #f1f5f9; color: var(--khac-navy); }

.khac-rate__q { margin: 0 0 12px; padding-inline-end: 36px; font-size: 16px; font-weight: 800; line-height: 1.6; color: var(--khac-navy); }

.khac-rate__faces { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; max-width: 430px; }
.khac-rate__face {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	min-height: 60px; margin: 0; padding: 6px 2px;
	border: 1.5px solid var(--khac-line); border-radius: 12px;
	background: #fff; color: var(--khac-navy);
	font-size: 24px; line-height: 1.15;
	cursor: pointer;
	transition: border-color .15s, background-color .15s, transform .15s;
}
.khac-rate__face small { font-size: 12px; font-weight: 700; color: var(--khac-muted); }
.khac-rate__face:hover, .khac-rate__face:focus { border-color: #b9d7ec; background: #fff; color: var(--khac-navy); transform: translateY(-1px); }
.khac-rate__face.is-on { border-color: var(--khac-brand); background: var(--khac-tint); }

.khac-rate__note {
	margin: 12px 0 0; padding: 0;
	border: 0; background: none;
	color: var(--khac-brand); font-size: 13.5px; text-decoration: underline;
	cursor: pointer;
}
.khac-rate__note:hover, .khac-rate__note:focus { background: none; color: var(--khac-cta); }

.khac-rate__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.khac-rate__chip {
	margin: 0; padding: 7px 12px;
	border: 1px solid var(--khac-line); border-radius: 999px;
	background: #fff; color: var(--khac-navy);
	font-size: 13.5px; line-height: 1.4;
	cursor: pointer;
}
.khac-rate__chip:hover, .khac-rate__chip:focus { background: #fff; color: var(--khac-navy); border-color: #b9d7ec; }
.khac-rate__chip[aria-pressed="true"] { border-color: var(--khac-brand); background: var(--khac-tint); font-weight: 700; }

.khac-rate textarea {
	display: block; width: 100%; height: auto; min-height: 92px;
	margin: 0; padding: 10px 12px;
	border: 1px solid var(--khac-line); border-radius: 12px;
	background: #fff; box-shadow: none;
	font: inherit; font-size: 15px; line-height: 1.7; color: var(--khac-text);
	resize: vertical;
}
.khac-rate textarea:focus { border-color: var(--khac-brand); outline: 2px solid rgba(12, 108, 170, .2); }

.khac-rate__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.khac-rate__msg { font-size: 13.5px; color: #b42318; }
.khac-rate__thanks { margin: 0; padding-inline-end: 36px; font-weight: 700; line-height: 1.7; color: #047857; }

@media (max-width: 767px) {
	.khac-rate__card { padding: 14px 12px; }
	.khac-rate__faces { max-width: none; gap: 6px; }
	.khac-rate__face { min-height: 58px; font-size: 22px; }
	.khac-rate__face small { font-size: 11px; }
	/* 16px يمنع آيفون من تكبير الصفحة عند الكتابة. */
	.khac-rate textarea { font-size: 16px; }
	.khac-rate__actions .khac-btn { flex: 1; }
}

/* فقاعة ترحيب مساعد دردش تغطي نص الصفحة على الجوال، وزر المحادثة نفسه يبقى. */
@media (max-width: 767px) {
	#dd-teaser { display: none !important; }
}

/* ------------------------------------------------------------------
 * برنامج المسوّقين — حقل الكود في الدفع، ولوحة المسوّق
 * --------------------------------------------------------------- */
.khac-refcode { margin: 0 0 16px; }
.khac-refcode .khac-field { margin-bottom: 6px; }
.khac-refcode__row { display: flex; gap: 8px; align-items: stretch; }
.khac-refcode__row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .04em; }
.khac-refcode__msg { margin: 6px 0 0; font-size: 14px; min-height: 1.2em; color: var(--khac-muted); }
.khac-refcode__msg.is-success { color: #0a7a3d; }
.khac-refcode__msg.is-error { color: #c0392b; }
[data-khac-ref-row][hidden] { display: none !important; }

.khac-aff { display: grid; gap: 20px; }
.khac-aff .khac-stats { margin: 0; }
.khac-aff__share { display: grid; gap: 14px; }
.khac-aff__copy { display: flex; gap: 8px; align-items: stretch; }
.khac-aff__copy input { flex: 1; min-width: 0; background: var(--khac-tint); }
.khac-aff__table { overflow-x: auto; }
.khac-aff__table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.khac-aff__table th, .khac-aff__table td { padding: 10px 8px; border-bottom: 1px solid var(--khac-line); text-align: start; white-space: nowrap; }
.khac-aff__table th { color: var(--khac-muted); font-weight: 600; }
.khac-refcode__row input,
.khac-field textarea {
	font-family: inherit;
	font-size: 16px;
	padding: 12px 14px;
	border: 1px solid var(--khac-line);
	border-radius: 12px;
	background: #fff;
	color: var(--khac-text);
	width: 100%;
	height: auto;
	min-height: 50px;
	margin: 0;
	box-shadow: none;
}
.khac-field textarea { resize: vertical; line-height: 1.6; }
.khac-refcode__row input:focus,
.khac-field textarea:focus { outline: 2px solid var(--khac-bright); outline-offset: 1px; border-color: var(--khac-bright); }
.khac-aff .khac-field input { height: auto; min-height: 50px; margin: 0; box-shadow: none; }
.khac-aff .khac-fields .khac-field:has(textarea) { grid-column: 1 / -1; }
@media (max-width: 680px) {
	.khac-aff__copy { flex-direction: column; }
}
