/* ==========================================================
   منصة عمّار للقدرات — أنماط الهوية (الإصدار ٢: GeneratePress + LearnDash)
   المرجع: ملف «الهوية المعتمدة»
   منقول من القالب الفرعي السابق (توتر) بعد حذف كل ما يخص توتر.
   أنماط LearnDash (وضع التركيز والفهرس) تُضاف في قسم خاص عند تثبيته.
   ========================================================== */

/* ---------- ١) ألوان الهوية ---------- */
:root {
	--am-ink: #1F3A6E;        /* كحلي الحبر: النصوص والحدود */
	--am-ink-dark: #16294F;   /* درجة أغمق للتمرير */
	--am-yellow: #FFD43B;     /* أصفر الفسفوري: الإبراز والأزرار */
	--am-red: #E5482F;        /* أحمر التصحيح: التنبيه بقلّة */
	--am-paper: #FBFBF7;      /* ورق الدفتر: الخلفية */
	--am-grid: #DCE6F2;       /* خطوط المربعات */
	--am-ink-soft: #4A6390;   /* كحلي فاتح: النصوص الثانوية */
	--am-green: #2E8B57;      /* أخضر التحقق: الإكمال والنجاح */
	--am-radius: 12px;
	--am-shadow: 3px 3px 0 var(--am-ink);
}

/* ---------- ٢) ورق الدفتر والخط الأساسي ---------- */
body {
	background-color: var(--am-paper);
	background-image:
		linear-gradient(var(--am-grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--am-grid) 1px, transparent 1px);
	background-size: 28px 28px;
	color: var(--am-ink);
}

/* Readex Pro لكل النصوص، مع استثناء أيقونات الخطوط
   (:where يجعل أولوية القاعدة منخفضة، فتغلبها قاعدة الرقعة للعناوين) */
body,
body :where(*:not([class*="icon"]):not(i):not(.dashicons):not(.ab-icon)) {
	font-family: "Readex Pro", system-ui, sans-serif !important;
}

/* Aref Ruqaa للعناوين الرئيسية فقط */
h1,
h2,
.entry-title,
.page-title,
.ammar-ruqaa {
	font-family: "Aref Ruqaa", "Readex Pro", serif !important;
	font-weight: 700;
	color: var(--am-ink);
	line-height: 1.5;
}

/* Baloo Bhaijaan 2 لمحتوى الحلول (نستخدمه داخل الدروس عند الحاجة) */
.ammar-solution,
.ammar-solution * {
	font-family: "Baloo Bhaijaan 2", "Readex Pro", sans-serif !important;
}

a { color: var(--am-ink); }
a:hover { color: var(--am-ink-dark); }

::selection {
	background: var(--am-yellow);
	color: var(--am-ink);
}

/* ---------- ٣) الأزرار: أصفر بحبر سميك وظل حاد ---------- */
.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wp-element-button,
.wp-block-button__link,
.wc-block-components-button:not(.is-link),
input[type="submit"],
button[type="submit"] {
	background: var(--am-yellow) !important;
	color: var(--am-ink) !important;
	border: 2px solid var(--am-ink) !important;
	border-radius: var(--am-radius) !important;
	box-shadow: var(--am-shadow) !important;
	font-weight: 700 !important;
	transition: transform .12s ease, box-shadow .12s ease;
}
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.wp-element-button:hover,
.wp-block-button__link:hover,
.wc-block-components-button:not(.is-link):hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
	transform: translate(-1px, -1px);
	box-shadow: 4px 4px 0 var(--am-ink) !important;
	background: var(--am-yellow) !important;
	color: var(--am-ink) !important;
}

/* ---------- ٤) البطاقات: أبيض بحد حبر وظل حاد ---------- */
.am-card,
.wc-block-components-sidebar,
.woocommerce-checkout-review-order {
	background: #fff;
	border: 2px solid var(--am-ink) !important;
	border-radius: 14px !important;
	box-shadow: 4px 4px 0 var(--am-ink) !important;
}

/* ---------- ٥) محتوى الدرس: الصور والفيديو ---------- */
/* الصور داخل المحتوى: بعرض المحتوى، وحد أقصى ٦٤٠ بكسل على الشاشات الكبيرة */
.entry-content img:not(.ammar-sol-head img),
.learndash-wrapper .ld-tab-content img:not(.ammar-sol-head img) {
	max-width: min(100%, 640px);
	height: auto;
	display: block;
	margin-inline: auto;
}
/* الفيديو المضمَّن (Bunny / YouTube / Vimeo / المرفوع): بعرض المحتوى وبنسبة ١٦:٩ */
.entry-content iframe,
.entry-content .wp-video,
.entry-content video {
	width: 100% !important;
	max-width: 760px !important;
	height: auto !important;
	aspect-ratio: 16 / 9;
	display: block;
	margin-inline: auto;
	border: 0;
}

/* ---------- ٧) شارة الإبراز (تظليل أصفر) للاستخدام داخل المحتوى ---------- */
.ammar-highlight {
	background: linear-gradient(transparent 55%, var(--am-yellow) 55%);
	padding: 0 4px;
}

/* ---------- ١١) السؤال التفاعلي (ammar-q) — حسب «الهوية المعتمدة» ---------- */
.ammar-q {
	position: relative;
	max-width: 640px;
	margin: 0 auto 28px;
	padding: 20px 18px 18px;
	background-color: var(--am-paper);
	background-image:
		linear-gradient(var(--am-grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--am-grid) 1px, transparent 1px);
	background-size: 24px 24px;
	border: 2.5px solid var(--am-ink);
	border-radius: 6px 18px 8px 16px / 16px 8px 18px 6px;
	box-shadow: 4px 4px 0 var(--am-ink);
	color: var(--am-ink);
	font-family: "Readex Pro", system-ui, sans-serif;
	-webkit-user-select: none;
	user-select: none;
	overflow: hidden;
	isolation: isolate; /* طبقات السؤال (العلامة المائية والمسودة) تبقى داخله ولا تعلو شريط توتر السفلي */
}
/* العلامة المائية الإلزامية: الشعار أحادي اللون، مائل −٢٢°، شفافية خفيفة، فوق المحتوى */
.ammar-q::after,
.ammar-sol::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 3;
	background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 xmlns:xlink=%22http://www.w3.org/1999/xlink%22 width=%22100%25%22 height=%22100%25%22%3E%3Cdefs%3E%3CclipPath id=%22wm-q-trim%22%3E%3Cpath d=%22M -1200 -900 L 2000 -900 L 2000 120 L 600 120 L 600 40 L 541 -167 L 520 -168 L 520 120 L -1200 120 Z%22%3E%3C/path%3E%3C/clipPath%3E%3Cg id=%22wm-q-mark%22 fill=%22%231F3A6E%22%3E%3Cg clip-path=%22url(%23wm-q-trim)%22%3E%3Cpath d=%22M433 -292Q417 -292 413 -279Q391 -231 351 -204Q305 -174 250 -153Q194 -132 137 -114Q115 -107 96 -100Q78 -94 64 -89Q50 -84 34 -77Q17 -70 5 -60Q-7 -51 -7 -38Q-7 -28 -2 -23Q12 -10 57 -6Q99 -2 156 0H165Q238 0 288 -23Q337 -46 371 -85Q388 -106 402 -137Q417 -168 429 -204Q441 -240 448 -272V-276Q446 -291 433 -292Z M847 -481Q854 -474 865 -467Q876 -460 889 -460Q897 -460 904 -463Q924 -472 934 -494Q944 -515 948 -542Q952 -570 954 -597Q954 -599 954 -601Q955 -603 955 -605Q955 -612 949 -615Q943 -618 938 -613L920 -597Q917 -594 917 -589V-585Q917 -578 914 -567L915 -568Q913 -560 908 -552Q904 -545 896 -543H895Q890 -543 880 -553Q876 -557 874 -564Q873 -570 873 -578Q873 -580 873 -581Q873 -582 873 -584Q873 -586 874 -587Q874 -588 874 -589V-592Q874 -593 874 -594Q874 -594 874 -595Q874 -602 868 -604Q862 -607 857 -602L839 -586Q837 -556 824 -538Q820 -532 812 -529Q803 -526 795 -526Q794 -526 794 -526Q793 -525 793 -525Q781 -529 778 -542V-548Q778 -564 781 -577Q781 -578 782 -580Q782 -581 782 -582Q783 -584 782 -584Q782 -585 782 -586Q782 -595 774 -597Q762 -598 756 -589Q751 -580 748 -572L749 -574Q748 -572 748 -570Q747 -569 747 -567Q747 -566 746 -566Q746 -566 746 -565Q742 -552 738 -538Q734 -523 734 -506Q734 -505 734 -504Q734 -503 734 -501Q734 -447 788 -444H790Q807 -446 823 -457Q839 -468 847 -481Z M794 -258 760 -181Q722 -170 682 -162Q643 -153 599 -148Q591 -146 589 -138L568 -14Q567 -7 571 -3Q575 1 582 0L620 -10Q633 -13 646 -16Q658 -19 670 -22Q726 -36 777 -56Q828 -75 868 -104Q891 -121 911 -146Q931 -170 942 -190Q954 -212 966 -270Q973 -300 954 -312Q936 -323 907 -323Q903 -323 902 -323Q900 -323 896 -323Q869 -323 852 -318Q831 -317 817 -297Q803 -277 794 -258Z M1071 -608Q1093 -605 1114 -601Q1135 -597 1154 -590Q1164 -587 1168 -597L1209 -723Q1211 -729 1208 -733Q1205 -737 1200 -738Q1176 -742 1154 -748Q1132 -754 1104 -755Q1068 -755 1038 -719Q1013 -689 997 -644Q981 -600 979 -548Q979 -529 982 -512Q984 -495 990 -481Q969 -474 951 -464Q933 -455 917 -444Q875 -413 848 -364Q820 -316 797 -264L784 -236Q781 -229 784 -224Q788 -220 794 -219L814 -217Q818 -216 822 -219Q825 -222 826 -224Q845 -270 876 -294Q908 -318 952 -336L998 -352Q1031 -364 1065 -376Q1099 -387 1132 -398Q1155 -406 1181 -415Q1207 -424 1226 -434L1230 -440L1237 -454Q1247 -474 1258 -498Q1268 -521 1275 -542Q1288 -580 1259 -571Q1251 -567 1242 -564Q1233 -561 1225 -557Q1203 -547 1180 -536Q1156 -526 1124 -524Q1107 -540 1092 -561Q1078 -582 1071 -608Z%22%3E%3C/path%3E%3Cpath d=%22M-916 0Q-955 0 -971 -14Q-988 -28 -988 -54Q-988 -66 -984 -80Q-980 -95 -969 -114L-938 -101Q-943 -89 -944 -81Q-946 -73 -946 -66Q-946 -56 -942 -50Q-937 -45 -929 -43Q-922 -41 -911 -41H-817L-812 0ZM-843 0V-41H-797Q-799 -50 -805 -61Q-811 -72 -820 -84L-783 -122Q-775 -107 -769 -89Q-763 -72 -763 -50Q-763 -28 -773 0ZM-843 -41H-840V0H-843Q-851 0 -851 -20Q-851 -41 -843 -41ZM-897 -118 -924 -146 -898 -174 -871 -146ZM-851 -118 -878 -146 -852 -174 -825 -146Z M-730 -192H-688V0H-730Z M-643 67Q-654 67 -668 62Q-682 58 -694 47L-681 20Q-672 24 -664 25Q-657 26 -650 26Q-636 26 -625 21Q-614 15 -608 5Q-602 -4 -602 -18Q-602 -25 -606 -32Q-609 -38 -617 -48Q-625 -58 -638 -74L-605 -114Q-591 -95 -582 -79Q-574 -63 -570 -49Q-566 -35 -566 -21Q-566 -11 -568 0Q-570 12 -576 24Q-581 35 -590 45Q-599 55 -612 61Q-625 67 -643 67Z M-538 0 -545 -41H-471Q-459 -41 -454 -43Q-449 -46 -448 -48L-437 -14Q-438 -9 -443 -6Q-449 -3 -457 -1Q-464 0 -471 0ZM-506 -93 -474 -134 -428 -52Q-425 -47 -423 -45Q-420 -42 -416 -42Q-412 -41 -407 -41H-405V0H-407Q-416 0 -423 -1Q-430 -2 -437 -5Q-444 -8 -450 -14Q-457 -20 -463 -30Z M-405 0V-41H-367Q-368 -41 -369 -40Q-370 -40 -372 -39Q-373 -39 -374 -38Q-380 -46 -382 -54Q-384 -62 -384 -70Q-384 -80 -380 -90Q-377 -100 -369 -108Q-361 -116 -349 -121Q-338 -126 -323 -126Q-307 -126 -296 -121Q-284 -116 -276 -108Q-269 -100 -265 -90Q-261 -80 -261 -70Q-261 -61 -263 -54Q-265 -46 -271 -38Q-273 -39 -273 -40Q-274 -40 -276 -41H-246V0H-252Q-270 0 -283 0Q-295 -1 -304 -2Q-312 -3 -321 -6Q-325 -5 -328 -4Q-332 -3 -337 -2Q-342 -1 -350 -1Q-358 0 -372 0ZM-323 -39Q-316 -42 -312 -46Q-308 -50 -306 -55Q-304 -60 -304 -66Q-304 -71 -306 -75Q-308 -80 -313 -82Q-317 -85 -323 -85Q-328 -85 -333 -82Q-337 -80 -339 -75Q-341 -71 -341 -66Q-341 -60 -339 -55Q-337 -50 -333 -46Q-329 -42 -323 -39ZM-405 -41H-402V0H-405Q-412 0 -412 -20Q-412 -41 -405 -41ZM-345 -147 -372 -175 -346 -203 -319 -175ZM-299 -147 -326 -175 -300 -203 -273 -175Z M-186 -41H-155V0H-186ZM-246 0V-41H-220V-192H-178V0ZM-246 -41H-243V0H-246Q-253 0 -253 -20Q-253 -41 -246 -41Z M-155 0V-41H-130V-192H-88V0ZM-155 -41H-152V0H-155Q-163 0 -163 -20Q-163 -41 -155 -41Z%22%3E%3C/path%3E%3C/g%3E%3Cg transform=%22rotate(-3 590 0)%22 stroke=%22%231F3A6E%22 stroke-width=%229%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M 553 -170 L 590 -10 L 627 -170 Z%22 fill=%22none%22%3E%3C/path%3E%3Cpath d=%22M 578 -62 L 590 -10 L 602 -62 Z%22%3E%3C/path%3E%3Crect x=%22553%22 y=%22-604%22 width=%2274%22 height=%22434%22%3E%3C/rect%3E%3Crect x=%22553%22 y=%22-640%22 width=%2274%22 height=%2236%22 fill=%22none%22%3E%3C/rect%3E%3Cpath d=%22M 553 -640 L 553 -684 Q 553 -716 581 -716 L 599 -716 Q 627 -716 627 -684 L 627 -640 Z%22%3E%3C/path%3E%3C/g%3E%3C/g%3E%3Cpattern id=%22p%22 patternUnits=%22userSpaceOnUse%22 width=%22300%22 height=%22165%22 patternTransform=%22rotate(-22)%22%3E%3Cuse href=%22%23wm-q-mark%22 xlink:href=%22%23wm-q-mark%22 transform=%22translate(60 55) scale(0.045)%22/%3E%3Cuse href=%22%23wm-q-mark%22 xlink:href=%22%23wm-q-mark%22 transform=%22translate(210 137) scale(0.045)%22/%3E%3C/pattern%3E%3C/defs%3E%3Crect width=%22100%25%22 height=%22100%25%22 fill=%22url(%23p)%22 opacity=%220.06%22/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
}
/* عنوان «حاول تحل السؤال أولًا» يظهر تلقائيًا في كل سؤال */
.ammar-q::before {
	content: "حاول تحل السؤال أولًا";
	display: table;
	margin: 0 auto 14px;
	padding: 0 12px;
	font-family: "Aref Ruqaa", "Readex Pro", serif;
	font-weight: 700;
	font-size: clamp(24px, 6vw, 32px);
	line-height: 1.5;
	color: var(--am-ink);
	background: linear-gradient(transparent 55%, var(--am-yellow) 55%, var(--am-yellow) 92%, transparent 92%);
}
.ammar-q-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px 10px;
	flex-wrap: wrap;
	padding-bottom: 12px;
	margin-bottom: 16px;
	border-bottom: 2px dashed var(--am-ink);
}
.ammar-q-path {
	font-size: 13px;
	font-weight: 700;
	color: var(--am-ink-soft);
}
.ammar-q-badges {
	display: flex;
	align-items: center;
	gap: 8px;
}
/* ملصق الرمز: أصفر مائل */
.ammar-q-code {
	display: inline-block;
	padding: 3px 10px;
	background: var(--am-yellow);
	border: 2px solid var(--am-ink);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	transform: rotate(-2deg);
	white-space: nowrap;
}
/* شارة الصعوبة: أعمدة + كلمة (سهل عمود أخضر · متوسط عمودان أصفران · صعب ثلاثة حمراء) */
.ammar-q-level {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 4px 9px;
	background: #fff;
	border: 2px solid var(--am-ink);
	border-radius: 6px 14px 8px 12px / 12px 8px 14px 6px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	--lv: var(--am-green);
}
.ammar-q-level::before {
	content: "";
	width: 22px;
	height: 16px;
	flex: 0 0 auto;
	--b1: var(--lv); --b2: #fff; --b3: #fff;
	background:
		linear-gradient(var(--b1), var(--b1)) 1.5px 100% / 4px 6px no-repeat,
		linear-gradient(var(--b2), var(--b2)) 9px 100% / 4px 10px no-repeat,
		linear-gradient(var(--b3), var(--b3)) 16.5px 100% / 4px 14px no-repeat,
		linear-gradient(var(--am-ink), var(--am-ink)) 0 100% / 7px 8px no-repeat,
		linear-gradient(var(--am-ink), var(--am-ink)) 7.5px 100% / 7px 12px no-repeat,
		linear-gradient(var(--am-ink), var(--am-ink)) 15px 100% / 7px 16px no-repeat;
}
.ammar-q-level[data-level="متوسط"] { --lv: var(--am-yellow); }
.ammar-q-level[data-level="متوسط"]::before { --b2: var(--lv); }
.ammar-q-level[data-level="صعب"] { --lv: var(--am-red); }
.ammar-q-level[data-level="صعب"]::before { --b2: var(--lv); --b3: var(--lv); }
.ammar-q-text {
	font-size: clamp(18px, 4.6vw, 22px);
	font-weight: 700;
	line-height: 1.9;
	margin: 0 0 18px;
}
/* دائرة حمراء حول المطلوب */
.ammar-q-mark {
	white-space: nowrap;
	border: 2.5px solid var(--am-red);
	border-radius: 50% 45% 55% 40% / 55% 50% 45% 50%;
	padding: 0 8px;
}
.ammar-q-figure {
	display: block;
	max-width: 100%;
	margin: 0 auto 16px;
}
.ammar-q-options {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 12px;
}
.ammar-q .ammar-q-opt {
	all: unset;
	box-sizing: border-box;
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	padding: 8px 12px;
	background: #fff !important;
	color: var(--am-ink) !important;
	border: 2.5px solid var(--am-ink) !important;
	box-shadow: 3px 3px 0 var(--am-ink) !important;
	font-family: "Readex Pro", system-ui, sans-serif !important;
	font-size: clamp(16px, 4.2vw, 19px);
	font-weight: 700 !important;
	cursor: pointer;
	transition: transform .12s ease, background .15s ease, opacity .15s ease;
}
/* حواف يدوية مختلفة لكل خيار (كما في صورة السؤال) */
.ammar-q .ammar-q-opt:nth-child(1) { border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px !important; }
.ammar-q .ammar-q-opt:nth-child(2) { border-radius: 18px 225px 18px 255px / 255px 18px 225px 18px !important; }
.ammar-q .ammar-q-opt:nth-child(3) { border-radius: 18px 225px 18px 255px / 255px 18px 225px 18px !important; }
.ammar-q .ammar-q-opt:nth-child(4) { border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px !important; }
.ammar-q .ammar-q-opt:hover { transform: translate(-1px, -1px); }
.ammar-q .ammar-q-opt:focus-visible { outline: 3px solid var(--am-yellow); outline-offset: 2px; }
.ammar-q-key {
	flex: 0 0 auto;
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	background: var(--am-yellow);
	border: 2px solid var(--am-ink);
	border-radius: 50% 45% 55% 40% / 55% 50% 45% 50%;
	font-weight: 700;
	line-height: 1;
}
/* خيار خاطئ: أحمر ومشطوب، ولا يُضغط مرة ثانية */
.ammar-q .ammar-q-opt.is-wrong {
	background: #fdf0ed !important;
	border-color: var(--am-red) !important;
	box-shadow: 3px 3px 0 var(--am-red) !important;
	color: var(--am-red) !important;
	cursor: default;
	transform: none;
}
.ammar-q .ammar-q-opt.is-wrong .ammar-q-key { background: var(--am-red); color: #fff; border-color: var(--am-red); }
.ammar-q .ammar-q-opt.is-wrong > span:last-child { text-decoration: line-through 2px; }
/* الإجابة الصحيحة */
.ammar-q .ammar-q-opt.is-correct {
	background: #eaf7ef !important;
	border-color: var(--am-green) !important;
	box-shadow: 3px 3px 0 var(--am-green) !important;
	color: var(--am-green) !important;
}
.ammar-q .ammar-q-opt.is-correct .ammar-q-key { background: var(--am-green); color: #fff; border-color: var(--am-green); }
.ammar-q.is-done .ammar-q-opt { cursor: default; transform: none; }
.ammar-q.is-done .ammar-q-opt:not(.is-correct):not(.is-wrong) { opacity: .45; }
/* الرسالة */
.ammar-q-feedback {
	display: none;
	margin-top: 16px;
	padding: 10px 14px;
	border: 2px solid currentColor;
	border-radius: 6px 14px 8px 12px / 12px 8px 14px 6px;
	font-weight: 700;
	line-height: 1.8;
}
.ammar-q.has-feedback .ammar-q-feedback { display: block; }
.ammar-q.is-try-again .ammar-q-feedback { color: var(--am-red); background: #fdf0ed; }
.ammar-q.is-right .ammar-q-feedback { color: var(--am-green); background: #eaf7ef; }
.ammar-q.is-revealed .ammar-q-feedback { color: var(--am-ink); background: #fff; }
.ammar-q-feedback small { display: block; font-weight: 500; color: var(--am-ink); }
.ammar-q-actions { display: flex; gap: 16px; margin-top: 4px; }
.ammar-q .ammar-q-link {
	all: unset;
	font-size: 14px;
	font-weight: 600;
	color: var(--am-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.ammar-q-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin-top: 18px;
	padding-top: 10px;
	border-top: 2px dashed var(--am-ink);
	font-size: 12px;
	font-weight: 700;
	color: var(--am-ink-soft);
}
.ammar-q-footer img { height: 28px !important; width: auto !important; margin: 0 !important; display: inline-block !important; }
@media (max-width: 420px) {
	.ammar-q { padding: 16px 12px 14px; }
	.ammar-q-options { gap: 12px 10px; }
}

/* ---------- ١٢) المسودة داخل السؤال (ammar-pad) ---------- */
.ammar-q .ammar-pad-toggle {
	all: unset;
	display: inline-block;
	margin-top: 14px;
	font-size: 15px;
	font-weight: 700;
	color: var(--am-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.ammar-pad {
	display: none;
	position: relative;
	z-index: 4; /* فوق العلامة المائية حتى تبقى الكتابة واضحة */
	margin-top: 10px;
}
.ammar-pad.is-open { display: block; }
.ammar-pad-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}
.ammar-q .ammar-pad-btn {
	all: unset;
	box-sizing: border-box;
	padding: 6px 10px;
	min-height: 36px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #fff;
	border: 2px solid var(--am-ink);
	border-radius: 10px;
	box-shadow: 2px 2px 0 var(--am-ink);
	color: var(--am-ink);
	font-family: "Readex Pro", system-ui, sans-serif !important;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.ammar-q .ammar-pad-btn.is-on { background: var(--am-yellow); }
.ammar-q .ammar-pad-btn:focus-visible { outline: 3px solid var(--am-yellow); outline-offset: 2px; }
.ammar-pad-area {
	position: relative;
	height: 380px;
	background-color: #fff;
	background-image:
		linear-gradient(var(--am-grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--am-grid) 1px, transparent 1px);
	background-size: 24px 24px;
	border: 2px dashed var(--am-ink);
	border-radius: 10px;
	overflow: hidden;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}
.ammar-pad-area canvas {
	position: absolute;
	inset: 0;
	display: block;
	cursor: crosshair;
	touch-action: none;
}
.ammar-pad-area.is-eraser canvas { cursor: cell; }
@media (max-width: 600px) {
	.ammar-pad-area { height: 320px; }
	.ammar-q .ammar-pad-btn { padding: 5px 8px; font-size: 12px; }
}


/* ===== ١٣) الأشكال والرموز الرياضية (ammar-fig) — نفس قواعد مولّد الأسئلة gen.py ===== */
/* الجزء الذي فيه SVG يُكتب مشفّرًا في data-html والمحرّك يرسمه (بدأ بسبب توتر، ونُبقيه لأنه مختبر ويعمل في كل مكان) */
div.ammar-fig {
	display: block;
	margin: 14px auto;
	max-width: 100%;
	overflow-x: auto;
	text-align: center;
}
span.ammar-fig { display: inline; }
.ammar-fig > svg,
.ammar-fig .fig > svg {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	height: auto;
	overflow: visible;
}
:where(.ammar-q, .ammar-fig, .ammar-sol) .fig { display: flex; justify-content: center; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .req { display: inline-block; white-space: nowrap; line-height: 1.35; border: 3px solid #E5482F; border-radius: 50% 45% 55% 40% / 55% 50% 45% 50%; padding: 0 8px; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .hl { padding: 0 6px; background: linear-gradient(transparent 55%, #FFD43B 55%, #FFD43B 92%, transparent 92%); }
:where(.ammar-q, .ammar-fig, .ammar-sol) .ok { color: #2E8B57; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .fr { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; line-height: 1.15; margin: 0 4px; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .fr > .n { border-bottom: 2px solid currentColor; padding: 0 5px 3px; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .fr > .d { padding: 3px 5px 0; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .rad { display: inline-flex; align-items: stretch; direction: rtl; vertical-align: middle; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .rad > svg { flex: none; width: .6em; height: auto; overflow: visible; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .rad > .rc { border-top: 2.5px solid currentColor; padding: .08em .12em 0 .18em; line-height: 1.15; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .math { display: flex; align-items: stretch; justify-content: center; gap: 8px; direction: rtl; font-weight: 700; line-height: 1; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .math .fr { gap: 4px; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .math .fr > .n { padding: 0 8px 7px; border-bottom-width: 3px; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .math .fr > .d { padding-top: 6px; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .math .op { align-self: center; padding: 0 3px; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .math .par { flex: none; width: 18px; height: auto; align-self: stretch; overflow: visible; margin: 4px 0; }
:where(.ammar-q, .ammar-fig, .ammar-sol) .math .pow { align-self: flex-start; font-size: .55em; }

/* ===== ١٤) الحل الكامل كصفحة (ammar-sol) — نفس «الحل الكامل.png» لكن نصًا يلتف مع الشاشة ===== */
.ammar-sol {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	max-width: 760px;
	margin: 0 auto 28px;
	padding: 20px 18px 22px;
	background-color: var(--am-paper);
	background-image:
		linear-gradient(var(--am-grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--am-grid) 1px, transparent 1px);
	background-size: 24px 24px;
	border: 2.5px solid var(--am-ink);
	border-radius: 16px 8px 18px 6px / 6px 18px 8px 16px;
	box-shadow: 4px 4px 0 var(--am-ink);
	color: var(--am-ink);
	font-family: "Baloo Bhaijaan 2", "Readex Pro", system-ui, sans-serif;
	font-size: 17px;
	line-height: 1.75;
	-webkit-user-select: none;
	user-select: none;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.ammar-sol p { margin: 0; }
.ammar-sol-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	padding-bottom: 12px;
	border-bottom: 2px dashed var(--am-ink);
	font-family: "Readex Pro", system-ui, sans-serif;
}
.ammar-sol-path { font-size: 13px; font-weight: 600; color: var(--am-ink-soft, #4A6390); }
.ammar-sol-head img { height: 30px; width: auto; margin-inline-start: auto; }
.ammar-sol .ammar-sol-title {
	margin: 0;
	font-family: "Aref Ruqaa", serif;
	font-size: clamp(26px, 5vw, 34px);
	line-height: 1.3;
}
.ammar-sol-title span,
.ammar-sol-divider h3 span {
	padding: 0 10px;
	background: linear-gradient(transparent 55%, var(--am-yellow) 55%, var(--am-yellow) 92%, transparent 92%);
}
.ammar-sol-stem { font-weight: 600; font-size: 18px; }
.ammar-sol-fig { margin: 0 auto; }
/* البطاقات وملصقاتها المائلة */
.ammar-sol-card {
	position: relative;
	background: #fff;
	border: 2.5px solid var(--am-ink);
	box-shadow: 4px 4px 0 var(--am-ink);
	border-radius: 6px 18px 8px 16px / 16px 8px 18px 6px;
	padding: 26px 16px 14px;
	margin-top: 10px;
}
.ammar-sol-card:nth-of-type(even) { border-radius: 16px 8px 18px 6px / 6px 18px 8px 16px; }
.ammar-sol-label {
	position: absolute;
	top: -15px;
	right: 18px;
	padding: 0 12px;
	border: 2.5px solid var(--am-ink);
	background: var(--lb, var(--am-ink));
	color: var(--lc, #fff);
	font-family: "Aref Ruqaa", serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.6;
	transform: rotate(-2deg);
}
.ammar-sol-card.is-req, .ammar-sol-card.is-idea { --lb: var(--am-red); }
.ammar-sol-card.is-steps, .ammar-sol-card.is-rule { --lb: var(--am-ink); }
.ammar-sol-card.is-short, .ammar-sol-card.is-try { --lb: var(--am-yellow); --lc: var(--am-ink); }
.ammar-sol-card.is-check { --lb: var(--am-green); }
.ammar-sol-card.is-ans { --lb: #fff; --lc: var(--am-ink); background: var(--am-yellow); }
.ammar-sol-card.is-ans p { font-size: 24px; font-weight: 700; line-height: 1.4; }
/* خطوات الحل: الخطوة يمينًا وشرحها الصغير يسارًا، وتحتها على الجوال */
.ammar-sol-step {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 0 14px;
	font-size: 19px;
	font-weight: 700;
}
.ammar-sol-step small {
	font-size: 13px;
	font-weight: 600;
	color: var(--am-ink-soft, #4A6390);
	margin-inline-start: auto;
	text-align: left;
}
.ammar-sol-tagrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-weight: 600; }
.ammar-sol-tag {
	flex: none;
	border: 2px solid var(--am-ink);
	padding: 0 10px;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.7;
	border-radius: 6px 14px 8px 12px / 12px 8px 14px 6px;
	transform: rotate(-1deg);
}
.ammar-sol-tag.is-st { background: var(--am-ink); color: #fff; }
.ammar-sol-tag.is-mm { background: #fff; color: var(--am-green); border-color: var(--am-green); }
.ammar-sol-short { font-size: 18px; font-weight: 700; margin-top: 6px !important; }
.ammar-sol-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ammar-sol-trap { color: var(--am-red); font-weight: 600; }
.ammar-sol-divider { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.ammar-sol-divider > span { flex: 1; border-top: 2px dashed var(--am-ink); }
.ammar-sol .ammar-sol-divider h3 { margin: 0; font-family: "Aref Ruqaa", serif; font-size: clamp(22px, 4.5vw, 30px); line-height: 1.3; }
.ammar-sol-concepts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ammar-sol-concepts b { font-family: "Aref Ruqaa", serif; font-size: 20px; }
.ammar-sol-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	border: 2px solid var(--am-ink);
	box-shadow: 2px 2px 0 var(--am-ink);
	padding: 0 10px 0 8px;
	font-weight: 700;
	font-size: 15px;
	border-radius: 16px 8px 18px 6px / 6px 18px 8px 16px;
}
.ammar-sol-chip > span {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	background: var(--am-yellow);
	border: 2px solid var(--am-ink);
	border-radius: 50% 45% 55% 40% / 55% 50% 45% 50%;
	font-size: 13px;
	line-height: 1;
}
.ammar-sol-rule-c { font-size: 14px; font-weight: 700; color: var(--am-ink-soft, #4A6390); margin-top: 6px !important; }
.ammar-sol-rule { font-size: 18px; font-weight: 700; }
.ammar-sol-recurs { font-size: 15px; font-weight: 600; color: var(--am-ink-soft, #4A6390); }
.ammar-sol .hl { padding: 0 4px; }
@media (max-width: 600px) {
	.ammar-sol { padding: 16px 12px 18px; font-size: 16px; }
	.ammar-sol-grid { grid-template-columns: 1fr; }
	.ammar-sol-step { font-size: 17px; }
	.ammar-sol-step small { margin-inline-start: 0; text-align: right; width: 100%; }
}
/* خطوط الحل: القاعدة العامة لـ Readex عليها !important، فنحدد خطوط الحل صراحة */
.ammar-sol,
.ammar-sol :where(*:not(svg):not(svg *)) { font-family: "Baloo Bhaijaan 2", "Readex Pro", sans-serif !important; }
.ammar-sol .ammar-sol-head,
.ammar-sol .ammar-sol-head * { font-family: "Readex Pro", system-ui, sans-serif !important; }
.ammar-sol .ammar-sol-title,
.ammar-sol .ammar-sol-title *,
.ammar-sol .ammar-sol-divider h3,
.ammar-sol .ammar-sol-divider h3 *,
.ammar-sol .ammar-sol-label,
.ammar-sol .ammar-sol-concepts b { font-family: "Aref Ruqaa", serif !important; }
.ammar-sol .ammar-sol-head img {
	height: 30px !important;
	width: auto !important;
	max-width: none !important;
	display: inline-block !important;
	margin: 0 !important;
	margin-inline-start: auto !important;
}
.ammar-sol > .ammar-fig { align-self: stretch; width: 100%; margin: 0; }
/* ===== ١٥) ضبط الجوال (١٨ أكتوبر) ===== */
/* الخيارات: إذا انكسر أي خيار على سطرين في شاشة ضيقة، المحرّك يجعل الأربعة تحت بعضها */
.ammar-q-options.is-stack { grid-template-columns: 1fr; }
/* الأشكال: قيم جدول المقارنة في سطر واحد، والمحرّك يصغّر أي شكل أعرض من مكانه */
.ammar-fig td, .ammar-fig th { white-space: nowrap; }
div.ammar-fig { overflow: hidden; }
.ammar-fig-in { margin: 0 auto; }
/* بطاقات الحل الكامل أخف وأقرب لنسب الصورة، والملصقات أوضح */
.ammar-sol { gap: 14px; }
.ammar-sol-card {
	padding: 20px 12px 10px;
	border-width: 2px;
	box-shadow: 3px 3px 0 var(--am-ink);
	margin-top: 8px;
}
.ammar-sol-label { font-size: 19px; top: -16px; }
.ammar-sol-card.is-ans p { font-size: 20px; }
.ammar-sol-grid { gap: 12px; }
.ammar-sol-step { font-size: 18px; }
@media (max-width: 600px) {
	.ammar-sol { gap: 12px; }
	.ammar-sol-card { padding: 18px 10px 8px; }
	.ammar-sol-step { font-size: 16px; }
	.ammar-sol-short, .ammar-sol-rule { font-size: 16px; }
}
@media (max-width: 480px) {
	.ammar-sol { padding: 14px 8px 16px; }
	.ammar-sol-card { padding: 18px 9px 8px; box-shadow: 2px 2px 0 var(--am-ink); }
	.ammar-sol-tag { font-size: 13px; }
}
/* ===== ١٦) ترويسة داكنة: «حاول تحل السؤال أولًا» و«الحل الكامل» (قرار أحمد ١٨ أكتوبر) ===== */
/* ملصق كحلي مائل بخط الرقعة الأبيض، وشريط أصفر داخل الملصق أسفل الكلام حتى يبقى الأبيض واضحًا */
.ammar-q::before,
.ammar-sol::before {
	display: table;
	margin: 2px auto 16px;
	padding: 2px 18px 9px;
	font-family: "Aref Ruqaa", "Readex Pro", serif;
	font-weight: 700;
	font-size: clamp(22px, 5.5vw, 30px);
	line-height: 1.5;
	color: #fff;
	background: linear-gradient(0deg, var(--am-yellow) 0, var(--am-yellow) 6px, var(--am-ink) 6px);
	border-radius: 6px 14px 8px 12px / 12px 8px 14px 6px;
	box-shadow: 3px 3px 0 rgba(31, 58, 110, .25);
	transform: rotate(-2deg);
	position: relative;
	z-index: 1;
}
.ammar-sol::before {
	content: "الحل الكامل";
	align-self: center;
	margin-bottom: 4px;
}
/* «الفكرة والقاعدة»: العنوان يمينًا ثم خط متقطع واحد حتى نهاية السطر */
.ammar-sol-divider > span:first-child { display: none; }
.ammar-sol-divider h3 { flex: none; }
/* الخط المتقطع يُرسم بالـ CSS (ووردبريس قد يحذف العناصر الفارغة) */
.ammar-sol-divider > span,
.ammar-sol-divider > p:empty { display: none !important; }
.ammar-sol-divider::after { content: ""; flex: 1; border-top: 2px dashed var(--am-ink); }


/* ===== ١٧) رأس الموقع والقائمة والتذييل والحاويات (GeneratePress) ===== */
/* ألوان GeneratePress العامة تأخذ ألوان الهوية */
:root {
	--contrast: #1F3A6E;
	--contrast-2: #4A6390;
	--contrast-3: #DCE6F2;
	--base: #DCE6F2;
	--base-2: #FBFBF7;
	--base-3: #ffffff;
	--accent: #1F3A6E;
}
.site-header {
	background: #fff;
	border-bottom: 2px solid var(--am-ink);
}
.inside-header { padding-top: 12px; padding-bottom: 12px; }
/* الشعار ثابت الارتفاع في كل الشاشات */
.site-header .site-logo img,
.site-header .custom-logo,
.site-header .header-image {
	height: 52px !important;
	width: auto !important;
	max-width: none !important;
}
@media (max-width: 768px) {
	.site-header .site-logo img,
	.site-header .custom-logo,
	.site-header .header-image { height: 42px !important; }
}
.main-navigation,
.main-navigation ul ul { background: #fff; }
.main-navigation .main-nav ul li a,
.menu-toggle { color: var(--am-ink); font-weight: 600; }
.main-navigation .main-nav ul li:hover > a { color: var(--am-ink-dark); }
/* الصفحة الحالية في القائمة: تظليل أصفر */
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
	color: var(--am-ink);
	background: linear-gradient(transparent 58%, var(--am-yellow) 58%);
}
/* الحاويات: بطاقات بيضاء بحد حبر وظل حاد فوق ورق الدفتر */
.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.separate-containers .paging-navigation,
.one-container .container,
.inside-page-header {
	background: #fff;
	border: 2px solid var(--am-ink);
	border-radius: 14px;
	box-shadow: 4px 4px 0 var(--am-ink);
}
.site-info {
	background: var(--am-ink);
	color: #fff;
}
.site-info a { color: var(--am-yellow); }

/* ===== ١٨) التجاوب وتجربة القراءة العربية في كل الشاشات ===== */
/* التذييل في أسفل الشاشة دائمًا حتى لو كان المحتوى قصيرًا */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
body > #page { flex: 1 0 auto; width: 100%; }
body > .site-footer { flex-shrink: 0; }
.site-info { padding: 28px 0; font-size: 15px; }
@media (min-width: 769px) {
	.site-info { padding: 36px 0; font-size: 16px; }
}

/* عرض مريح وهوامش جانبية ثابتة */
.grid-container { max-width: 1200px; }
.inside-header { padding-inline: 24px; }

/* نص القراءة: حجم وتباعد أسطر مناسبان للعربية */
.entry-content { font-size: 18px; line-height: 1.9; }
h1,
.entry-title,
.page-title { font-size: clamp(28px, 2.2vw + 18px, 44px); }
h2 { font-size: clamp(24px, 1.6vw + 16px, 34px); }

/* القائمة على الكمبيوتر والآيباد بالعرض */
@media (min-width: 769px) {
	.main-navigation .main-nav ul li a {
		font-size: 17px;
		padding-inline: 18px;
		line-height: 64px;
	}
}

/* الجوال والآيباد الصغير: زر القائمة يمينًا (بداية السطر العربي) والشعار يسارًا */
@media (max-width: 768px) {
	.entry-content { font-size: 17px; line-height: 1.85; }
	.site-header .inside-header {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		padding: 10px 16px;
	}
	.mobile-menu-control-wrapper {
		order: -1;
		margin: 0 !important;
		background: transparent !important;
	}
	.site-branding-container { order: 0; margin: 0 !important; }
	.mobile-menu-control-wrapper .menu-toggle,
	.mobile-menu-control-wrapper .menu-toggle:hover,
	.mobile-menu-control-wrapper .menu-toggle:focus {
		background: transparent !important;
		color: var(--am-ink) !important;
		padding: 0 !important;
		width: 48px;
		height: 48px;
		line-height: 48px;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 12px;
	}
	.menu-toggle .gp-icon svg { width: 26px; height: 26px; }
	.menu-toggle:focus-visible { outline: 3px solid var(--am-yellow); outline-offset: 2px; }
	/* القائمة المفتوحة: بعرض الشاشة تحت الرأس، وعناصر كبيرة سهلة اللمس */
	#site-navigation { order: 5; flex-basis: 100%; width: 100%; }
	#site-navigation .main-nav ul li a {
		line-height: 1.4;
		padding: 14px 8px;
		font-size: 18px;
		text-align: right;
		border-bottom: 1px solid var(--am-grid);
	}
	#site-navigation .main-nav ul li:last-child a { border-bottom: 0; }
}

/* تثبيت ترتيب الجوال (GeneratePress يعطي زر القائمة ترتيبًا متأخرًا)، وهوامش جانبية للبطاقات */
@media (max-width: 768px) {
	.site-header .mobile-menu-control-wrapper { order: -1 !important; }
	.site-header .site-branding-container { order: 0 !important; }
	.separate-containers .site-main { margin: 16px 12px; }
	.separate-containers .inside-article,
	.separate-containers .page-header { padding: 24px 20px; }
}

/* الجوال: قائمة بيضاء نظيفة، والصفحة الحالية بشريط أصفر على يمين العنصر، وهامش جانبي للمحتوى */
@media (max-width: 768px) {
	#site-navigation,
	#site-navigation .main-nav ul,
	#site-navigation .main-nav ul li { background: #fff !important; }
	#site-navigation .main-nav ul li[class*="current-menu-"] > a {
		background: #fff !important;
		box-shadow: inset -5px 0 0 var(--am-yellow);
		padding-inline-start: 16px;
		font-weight: 700;
	}
	.site-content { padding-inline: 12px; }
}

/* ===== ١٩) ما اعتُمد في القالب الأول (١٦–١٨ أكتوبر) مطبّقًا على GeneratePress ===== */
/* الرأس: ورق الدفتر بخط حبر متقطع أسفله */
.site-header {
	background: var(--am-paper) !important;
	border-bottom: 2px dashed var(--am-ink);
}
.main-navigation,
.main-navigation ul ul { background: transparent; }
.main-navigation .main-nav ul li a { font-weight: 500; }

/* الصفحة الحالية: ضربة قلم تظليل غير منتظمة على الكلمة نفسها (مثل تظليل الشعار) */
@media (min-width: 769px) {
	.main-navigation .main-nav ul li[class*="current-menu-"] > a,
	.main-navigation .main-nav ul li:hover > a {
		background-color: transparent;
		background-repeat: no-repeat;
		background-size: calc(100% - 26px) 0.7em;
		background-position: center calc(50% + 5px);
	}
	.main-navigation .main-nav ul li[class*="current-menu-"] > a {
		font-weight: 700;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M3 7 C20 3 38 6 55 4 S88 3 98 6 L96 15 C78 18 58 14 40 17 S12 16 2 14 Z' fill='%23FFD43B'/%3E%3C/svg%3E");
	}
	.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a {
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M3 7 C20 3 38 6 55 4 S88 3 98 6 L96 15 C78 18 58 14 40 17 S12 16 2 14 Z' fill='%23FFD43B' fill-opacity='0.45'/%3E%3C/svg%3E");
	}
}

/* زر «تصفّح الباقات» للزائر */
.am-header-cta.button {
	padding: 8px 18px;
	font-size: 16px;
	line-height: 1.6;
	white-space: nowrap;
}
@media (min-width: 769px) {
	.am-header-cta.button { margin-inline-start: 16px; }
}

/* الجوال والآيباد العمودي: ☰ على الحافة اليمنى ثم الشعار بجانبه، والزر يسارًا، والقائمة تنفتح من اليمين */
@media (max-width: 768px) {
	.site-header .inside-header { justify-content: flex-start; gap: 10px; }
	.site-header .site-branding-container { margin: 0 !important; }
	.am-header-cta.button { order: 1; margin-inline-start: auto; padding: 6px 14px; font-size: 15px; }
	#site-navigation {
		position: fixed !important;
		top: 0;
		right: 0;
		bottom: 0;
		width: min(300px, 82vw) !important;
		z-index: 10000;
		background: #fff !important;
		border-left: 2px solid var(--am-ink);
		transform: translateX(100%);
		visibility: hidden;
		transition: transform .25s ease, visibility .25s;
		overflow-y: auto;
		padding-top: 70px;
	}
	#site-navigation.toggled {
		transform: none;
		visibility: visible;
		box-shadow: 0 0 0 100vmax rgba(31, 58, 110, .35);
	}
	body.admin-bar #site-navigation { top: 46px; }
	/* زر الإغلاق داخل القائمة */
	#site-navigation .inside-navigation > .menu-toggle {
		display: flex !important;
		position: absolute;
		top: 12px;
		right: 12px;
		width: 48px;
		height: 48px;
		padding: 0 !important;
		align-items: center;
		justify-content: center;
		background: transparent !important;
		color: var(--am-ink) !important;
	}
	#site-navigation .inside-navigation > .menu-toggle .mobile-menu { display: none; }
	#site-navigation .main-nav { display: block !important; }
	#site-navigation .main-nav ul li a { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	#site-navigation { transition: none; }
}

/* التذييل: شعار الخلفيات الداكنة ثم النص */
.site-info .copyright-bar {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	width: 100%;
	text-align: center;
}
.site-info .am-footer-logo { height: 56px; width: auto; }
@media (max-width: 768px) {
	.site-info .am-footer-logo { height: 46px; }
}

@media (max-width: 768px) {
	#site-navigation .inside-navigation { position: static; padding: 0; }
}

/* ضربة التظليل تغطي جسم الكلمة مثل قلم التظليل (بملاحظة أحمد ٢٤ أكتوبر) */
@media (min-width: 769px) {
	.main-navigation .main-nav ul li[class*="current-menu-"] > a,
	.main-navigation .main-nav ul li:hover > a {
		background-size: calc(100% - 22px) 1.05em;
		background-position: center calc(50% + 2px);
	}
}

/* درج القائمة بطول الشاشة كاملًا من أعلاها إلى أسفلها (فوق شريط الإدارة أيضًا) */
@media (max-width: 768px) {
	#site-navigation,
	body.admin-bar #site-navigation {
		top: 0 !important;
		height: 100vh;
		height: 100dvh;
		z-index: 100000;
	}
}

/* درج القائمة بطول الشاشة كاملًا من أعلاها إلى أسفلها (فوق شريط الإدارة أيضًا) */
@media (max-width: 768px) {
	#site-navigation,
	body.admin-bar #site-navigation {
		top: 0 !important;
		height: 100vh;
		height: 100dvh;
		z-index: 100000;
	}
}
@media (max-width: 768px) {
	#site-navigation { margin: 0 !important; }
}

/* هامش جانبي ثابت للمحتوى في كل الشاشات (الآيبادات والتابات العريضة كانت البطاقة تلتصق بحافتها) */
#page.site {
	box-sizing: border-box;
	padding-inline: clamp(14px, 3vw, 32px);
}
#page.site .site-content { padding-inline: 0; }
.separate-containers .site-main { margin-inline: 0 !important; }
/* حواف البطاقات على نفس خط الشعار والقائمة في كل المقاسات */
#page.site { padding-inline: clamp(16px, 3vw, 24px); }

/* ===== بطاقات الباقات (شبكة LearnDash) — ٢٥ أكتوبر ٢٠٢٦ ===== */
.ld-course-list-items.row{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:22px;margin:18px 0 0!important}
.ld-course-list-items .ld_course_grid{width:auto!important;max-width:none!important;padding:0!important;float:none!important}
.ld_course_grid article.thumbnail{position:relative;margin:0!important;padding:0!important;background:#fff;border:2.5px solid #1F3A6E!important;border-radius:16px!important;box-shadow:5px 5px 0 #1F3A6E!important;overflow:hidden;height:100%;display:flex;flex-direction:column}
.ld_course_grid article.thumbnail>a img[src*="course-grid/assets/img/thumbnail"]{display:none!important}
.ld_course_grid article.thumbnail>a img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-bottom:2.5px solid #1F3A6E}
.ld_course_grid .ribbon{position:absolute!important;top:14px!important;left:14px!important;right:auto!important;z-index:2;background:#FFD43B!important;color:#1F3A6E!important;font:700 14px/1.4 "Readex Pro",system-ui,sans-serif!important;padding:4px 12px!important;border:2px solid #1F3A6E;border-radius:8px;box-shadow:2px 2px 0 #1F3A6E;transform:rotate(-3deg)}
.ld_course_grid .ribbon:before,.ld_course_grid .ribbon:after{display:none!important}
.ld_course_grid .caption{padding:22px 20px 20px!important;display:flex;flex-direction:column;gap:12px;flex:1}
.ld_course_grid .caption .entry-title{font-family:"Aref Ruqaa","Readex Pro",serif!important;font-size:30px!important;line-height:1.5!important;color:#1F3A6E!important;margin:0!important;padding-left:90px}
.ld_course_grid .caption p{margin:0;color:#4A6390;font-size:16px;line-height:1.8}
.ld_course_grid .ld_course_grid_button{margin-top:auto}
.ld_course_grid .ld_course_grid_button .btn{display:block;width:100%;min-height:48px;padding:10px 16px!important;background:#1F3A6E!important;border:2.5px solid #1F3A6E!important;color:#fff!important;border-radius:12px!important;box-shadow:3px 3px 0 #FFD43B!important;font:700 17px/1.6 "Readex Pro",system-ui,sans-serif!important;text-align:center;text-decoration:none!important}
.ld_course_grid .ld_course_grid_button .btn:hover{background:#16294F!important}
.ld_course_grid .ld-progress,.ld_course_grid .course-progress{margin:0}

/* ===== صفحة الباقة للزائر (ap) — ٢٥ أكتوبر ٢٠٢٦ ===== */
.ammar-course-guest .entry-header,.ammar-course-guest .ld-course-status{display:none!important}
.ap-hero{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:34px;align-items:start;margin:4px 0 40px}
.ap-stk{display:inline-block;background:#FFD43B;color:#1F3A6E;border:2.5px solid #1F3A6E;border-radius:10px;box-shadow:3px 3px 0 #1F3A6E;padding:3px 14px;font:700 15px/1.6 "Readex Pro",system-ui,sans-serif!important;transform:rotate(-2deg)}
.ap-h1{font-family:"Aref Ruqaa","Readex Pro",serif!important;font-size:clamp(44px,7vw,68px)!important;line-height:1.35!important;color:#1F3A6E!important;margin:14px 0 6px!important}
.ap-lead{font-size:19px;line-height:1.9;color:#1F3A6E;margin:0 0 14px}
.ap-lead mark{background:linear-gradient(transparent 55%,#FFD43B 55%,#FFD43B 92%,transparent 92%);color:inherit;padding:0 2px}
.ap-checks{list-style:none;margin:0 0 18px;padding:0}
.ap-checks li{position:relative;padding:4px 34px 4px 0;font-size:17px;line-height:1.8;color:#1F3A6E}
.ap-checks li:before{content:"";position:absolute;right:2px;top:11px;width:20px;height:20px;border-radius:6px;background:#E1F2E8;border:2px solid #2E8B57}
.ap-checks li:after{content:"";position:absolute;right:9px;top:14px;width:6px;height:11px;border:solid #2E8B57;border-width:0 3px 3px 0;transform:rotate(45deg)}
.ap-cta-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px 22px}
.ap-btn{display:inline-flex;align-items:center;justify-content:center;min-height:52px;padding:10px 26px;background:#1F3A6E;color:#fff!important;border:2.5px solid #1F3A6E;border-radius:12px;box-shadow:4px 4px 0 #FFD43B;font:700 18px/1.5 "Readex Pro",system-ui,sans-serif!important;text-decoration:none!important;transition:transform .12s,box-shadow .12s}
.ap-btn:hover{transform:translate(-1px,-1px);box-shadow:5px 5px 0 #FFD43B;background:#16294F}
.ap-btn:active{transform:translate(2px,2px);box-shadow:1px 1px 0 #FFD43B}
.ap-btn-full{display:flex;width:100%}
.ap-btn-y{background:#FFD43B;color:#1F3A6E!important;border-color:#FFD43B;box-shadow:4px 4px 0 #fff}
.ap-btn-y:hover{background:#FFE06A;box-shadow:5px 5px 0 #fff}
.ap-link{color:#1F3A6E!important;font-weight:700;font-size:16px;text-decoration:underline!important;text-decoration-color:#FFD43B!important;text-decoration-thickness:4px!important;text-underline-offset:4px}
.ap-micro{margin:10px 0 0;font-size:14px;color:#4A6390}
.ap-card{background:#fff;border:2.5px solid #1F3A6E;border-radius:16px;box-shadow:6px 6px 0 #1F3A6E;overflow:hidden;position:sticky;top:20px}
.ap-cover{display:block;width:100%!important;max-width:none!important;height:auto;aspect-ratio:16/9;object-fit:cover;border-bottom:2.5px solid #1F3A6E;margin:0!important;border-radius:0!important}
.ap-card-in{padding:18px 20px 20px}
.ap-price{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.ap-price b{font:700 34px/1.2 "Readex Pro",system-ui,sans-serif!important;color:#2E8B57}
.ap-price span{font-size:16px;color:#4A6390}
.ap-facts{list-style:none;margin:16px 0 0;padding:0;border-top:2px dashed #DCE6F2}
.ap-facts li{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:2px dashed #DCE6F2;font-size:15px}
.ap-facts b{color:#1F3A6E;white-space:nowrap}
.ap-facts span{color:#4A6390;text-align:left}
.ap-sec{margin:0 0 42px}
.ap-h2{font-family:"Aref Ruqaa","Readex Pro",serif!important;font-size:clamp(30px,4.6vw,40px)!important;line-height:1.4!important;color:#1F3A6E!important;margin:0 0 18px!important}
.ap-h2 span{background:linear-gradient(transparent 58%,#FFD43B 58%,#FFD43B 90%,transparent 90%);padding:0 4px}
.ap-grid4{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:18px}
.ap-feat{background:#fff;border:2.5px solid #1F3A6E;border-radius:14px;box-shadow:4px 4px 0 #1F3A6E;padding:16px 18px}
.ap-feat svg{width:44px;height:44px;display:block;margin-bottom:6px}
.ap-feat h3{font:700 19px/1.5 "Readex Pro",system-ui,sans-serif!important;color:#1F3A6E;margin:0 0 4px}
.ap-feat p{margin:0;font-size:16px;line-height:1.8;color:#4A6390}
.ap-soon{margin-top:20px;background:#FFF3C4;border:2.5px dashed #1F3A6E;border-radius:14px;padding:14px 18px;font-size:16px;line-height:1.9;color:#1F3A6E}
.ap-steps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;counter-reset:ap}
.ap-steps li{counter-increment:ap;position:relative;background:#fff;border:2.5px solid #1F3A6E;border-radius:14px;box-shadow:4px 4px 0 #1F3A6E;padding:16px 70px 16px 16px;min-height:70px}
.ap-steps li:before{content:counter(ap,arabic-indic);position:absolute;right:16px;top:16px;width:40px;height:40px;border-radius:50%;background:#FFD43B;border:2.5px solid #1F3A6E;color:#1F3A6E;font:700 20px/36px "Readex Pro",system-ui,sans-serif;text-align:center}
.ap-steps b{display:block;font-size:18px;color:#1F3A6E}
.ap-steps span{display:block;font-size:15px;line-height:1.7;color:#4A6390}
.ap-h2-list{margin-bottom:6px!important}
.ammar-course-guest .ld-item-list .ld-section-heading>h2{display:none}
.ap-faq details{background:#fff;border:2.5px solid #1F3A6E;border-radius:12px;margin:0 0 12px;box-shadow:3px 3px 0 #1F3A6E}
.ap-faq summary{cursor:pointer;list-style:none;padding:14px 18px;font:700 17px/1.6 "Readex Pro",system-ui,sans-serif!important;color:#1F3A6E;display:flex;justify-content:space-between;gap:10px}
.ap-faq summary::-webkit-details-marker{display:none}
.ap-faq summary:after{content:"+";font-size:24px;line-height:1;color:#1F3A6E}
.ap-faq details[open] summary:after{content:"−"}
.ap-faq details p{margin:0;padding:0 18px 16px;font-size:16px;line-height:1.9;color:#4A6390}
.ap-final{background:#1F3A6E;color:#fff;border-radius:16px;padding:30px 22px;text-align:center;margin:10px 0 0}
.ap-final p{margin:0 0 16px;font-size:17px;line-height:1.8;color:#fff}
.ap-final .ap-final-t{font-family:"Aref Ruqaa","Readex Pro",serif!important;font-size:clamp(32px,5vw,44px);line-height:1.4;margin-bottom:8px;color:#FFD43B}
.ap-sticky{display:none}
@media (max-width:820px){
 .ap-hero{grid-template-columns:1fr;gap:26px}
 .ap-card{position:static}
 .ap-cta-row .ap-btn{width:100%}
 .ap-sticky{display:flex;position:fixed;bottom:0;right:0;left:0;z-index:999;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:#FBFBF7;border-top:2.5px solid #1F3A6E;box-shadow:0 -4px 0 rgba(31,58,110,.08)}
 .ap-sticky span{font-size:15px;color:#1F3A6E}
 .ap-sticky b{color:#2E8B57;font-size:18px}
 .ap-sticky .ap-btn{min-height:46px;padding:8px 22px;font-size:16px!important;box-shadow:3px 3px 0 #FFD43B}
 .ammar-course-guest .site-footer{padding-bottom:76px}
}
.ammar-course-guest .featured-image,.ammar-course-guest .page-header-image-single{display:none!important}
.entry-content .alignwide.wc-block-checkout,.entry-content .alignwide.wc-block-cart,.entry-content .wp-block-woocommerce-cart.alignwide{margin-left:0!important;margin-right:0!important;max-width:100%!important;width:auto!important}
