/* =========================================================
   النشرات التعريفية للبرامج الأكاديمية (.brochure)
   تُحمَّل في صفحة البرنامج فقط عند وجود نشرة.
   الفكرة البصرية: لغة القوائم المالية — خطوط الدفاتر، والخط المزدوج تحت الإجمالي.
   ========================================================= */
.brochure {
  --b-ink: var(--green-900, #0B3D2E);
  --b-green: var(--green-700, #11604A);
  --b-mid: var(--green-500, #1F8A65);
  --b-soft: var(--green-50, #EAF3EE);
  --b-gold: var(--gold, #E3B23C);
  --b-gold-soft: #FBF5E3;
  --b-paper: var(--paper, #F5F7F4);
  --b-line: var(--line, #DCE4DF);
  --b-muted: var(--muted, #5B6B64);
  font-size: 1.04rem;
}
.prose:has(.brochure) { max-width: none; }
.brochure p { margin: 0 0 1rem; }

/* ---------- الغلاف ---------- */
.b-hero {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1.25rem, 4vw, 2.5rem); align-items: center;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 34px),
    var(--b-ink);
  color: #fff; border-radius: 14px; padding: clamp(1.5rem, 4vw, 2.75rem);
  margin-bottom: 1.5rem; position: relative; overflow: hidden;
}
.b-hero::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 6px;
  background: linear-gradient(var(--b-gold), var(--b-gold)) top / 100% 2px no-repeat, linear-gradient(var(--b-gold), var(--b-gold)) bottom / 100% 2px no-repeat; }
.b-seal { width: clamp(110px, 16vw, 168px); aspect-ratio: 1; border-radius: 50%; background: #fff; padding: .55rem;
  box-shadow: 0 0 0 4px rgba(227,178,60,.35); flex-shrink: 0; }
.b-seal img { width: 100%; height: 100%; object-fit: contain; }
.b-kicker { color: var(--b-gold); font-weight: 600; font-size: .95rem; margin: 0 0 .35rem !important; }
.brochure .b-hero h2 { color: #fff; font-size: clamp(1.6rem, 3.6vw, 2.35rem); margin: 0 0 .9rem; border: 0; padding: 0; }
.b-quote { font-family: var(--font-head, inherit); font-size: clamp(1.1rem, 2.3vw, 1.35rem); line-height: 1.7;
  color: #fff; border-inline-start: 3px solid var(--b-gold); padding-inline-start: 1rem; margin: 0 0 .9rem !important; }
.b-aud { color: rgba(255,255,255,.72); margin: 0 !important; font-size: .95rem; }

/* ---------- البرنامج في أرقام: كشف بأسلوب القوائم المالية ---------- */
.b-ledger { border: 1px solid var(--b-line); border-radius: 12px; padding: 1.25rem clamp(1rem, 3vw, 1.75rem) 1.1rem; margin-bottom: 2.75rem; background: #fff; }
.b-ledger-title { font-family: var(--font-head, inherit); color: var(--b-ink); font-size: 1.05rem; margin: 0 0 .6rem !important; }
.b-ledger dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
.b-ledger dl > div { display: flex; align-items: baseline; gap: .5rem; padding: .55rem 0; border-bottom: 1px dashed var(--b-line); }
.b-ledger dt { font-weight: 500; color: var(--b-muted); white-space: nowrap; }
.b-ledger dt::after { content: ""; }
.b-ledger dd { margin: 0; margin-inline-start: auto; font-weight: 600; color: var(--b-ink); text-align: end; }
.b-ledger dl > div::before { content: ""; order: 1; flex: 1; border-bottom: 1px dotted #C9D4CE; transform: translateY(-.3em); min-width: 1rem; }
.b-ledger dt { order: 0; } .b-ledger dd { order: 2; margin-inline-start: 0; }
.b-ledger .b-total { grid-column: 1 / -1; border-bottom: 0; border-top: 1px solid var(--b-ink); margin-top: .35rem; padding-top: .7rem; }
.b-ledger .b-total dt { color: var(--b-ink); font-weight: 700; }
.b-ledger .b-total dd { font-family: var(--font-head, inherit); font-size: 1.3rem; color: var(--b-green);
  padding-bottom: 3px; border-bottom: 4px double var(--b-ink); }

/* ---------- الأقسام ---------- */
.b-sec { padding: 2.25rem 0; border-top: 1px solid var(--b-line); scroll-margin-top: 6rem; }
.b-sec:first-of-type { border-top: 0; padding-top: 0; }
.b-ord { color: var(--b-gold); font-weight: 700; font-size: .92rem; margin: 0 0 .15rem !important; letter-spacing: .02em; }
.lang-en .b-ord { font-family: var(--font-body, inherit); }
.brochure .b-sec > h3 {
  display: inline-block; font-size: clamp(1.3rem, 2.8vw, 1.65rem); color: var(--b-ink);
  margin: 0 0 1.25rem; padding: 0 0 .45rem; border: 0;
  background: linear-gradient(var(--b-gold), var(--b-gold)) left bottom / 100% 2px no-repeat,
              linear-gradient(var(--b-gold), var(--b-gold)) left calc(100% - 5px) / 100% 1px no-repeat;
}
.brochure h4 { font-size: 1.1rem; margin: 1.75rem 0 .8rem; color: var(--b-green); }
.brochure h5 { font-size: 1.02rem; margin: 0 0 .6rem; color: var(--b-ink); }
.b-lead { font-size: 1.1rem; color: #2C3A34; }
.b-muted { color: var(--b-muted); font-size: .97rem; }

/* ---------- القوائم ---------- */
.b-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.b-list li { position: relative; padding-inline-start: 1.6rem; }
.b-list li::before { content: ""; position: absolute; inset-inline-start: .3rem; top: .78em; width: 7px; height: 7px; background: var(--b-gold); transform: rotate(45deg); }
.b-checks li::before { content: "\F26E"; font-family: "bootstrap-icons"; background: none; transform: none; width: auto; height: auto;
  inset-inline-start: 0; top: .05em; color: var(--b-mid); font-size: 1.15rem; line-height: 1.6; }
.b-cols { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
.b-numbered { counter-reset: n; grid-template-columns: 1fr 1fr; gap: .75rem 1.25rem; }
.b-numbered li { counter-increment: n; background: var(--b-paper); border-radius: 10px; padding: .85rem 1rem; padding-inline-start: 3.1rem; }
.b-numbered li::before { content: counter(n); transform: none; background: var(--b-soft); color: var(--b-green); width: 1.75rem; height: 1.75rem;
  border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; inset-inline-start: .85rem; top: .85rem; }

.b-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.b-panel { background: var(--b-paper); border-radius: 12px; padding: 1.25rem 1.35rem; }
.b-panel-gold { background: var(--b-gold-soft); }
.brochure .b-panel h4 { margin-top: 0; display: flex; align-items: center; gap: .5rem; }
.b-panel h4 .bi { color: var(--b-gold); }

.b-mission { background: var(--b-soft); border-radius: 12px; padding: 1.1rem 1.35rem; font-family: var(--font-head, inherit);
  font-size: 1.12rem; line-height: 1.8; color: var(--b-ink); margin-bottom: 1.25rem !important; }

/* ---------- خطوات التسجيل ---------- */
.b-steps { list-style: none; counter-reset: st; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.b-steps li { counter-increment: st; position: relative; padding: 2.9rem 1rem 1rem; border: 1px solid var(--b-line); border-radius: 12px; background: #fff; font-size: .97rem; }
.b-steps li::before { content: counter(st); position: absolute; top: .85rem; inset-inline-start: 1rem; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--b-green); color: #fff; font-weight: 700; font-size: .9rem; }
.b-steps li:not(:last-child)::after { content: ""; position: absolute; top: 1.75rem; inset-inline-start: 3.1rem; inset-inline-end: -1rem; height: 1px; background: var(--b-line); }

.b-note { border: 1px solid #EBDCAD; background: var(--b-gold-soft); border-radius: 12px; padding: 1.15rem 1.35rem; }
.b-note-title { font-weight: 700; color: #6E5310; display: flex; gap: .5rem; align-items: center; margin-bottom: .8rem !important; }

/* سلّم الحد الأعلى للمقررات */
.b-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; align-items: end; }
.b-scale > div { display: flex; flex-direction: column; align-items: center; text-align: center; background: #fff; border: 1px solid var(--b-line); border-radius: 12px; padding: .9rem .5rem .8rem; }
.b-scale-bar { width: 30%; min-width: 18px; border-radius: 4px 4px 0 0; background: var(--b-soft); margin-bottom: .5rem; }
.lv1 .b-scale-bar { height: 22px; } .lv2 .b-scale-bar { height: 34px; } .lv3 .b-scale-bar { height: 46px; background: #CDE3D7; } .lv4 .b-scale-bar { height: 58px; background: var(--b-mid); }
.b-scale strong { font-family: var(--font-head, inherit); font-size: 1.6rem; color: var(--b-ink); line-height: 1.1; }
.b-scale small { color: var(--b-muted); }
.b-scale-label { margin-top: .5rem; padding-top: .45rem; border-top: 1px solid var(--b-line); width: 100%; font-size: .85rem; font-weight: 600; color: var(--b-green); }
.b-callout { margin: 1.5rem 0 0 !important; padding: 1.1rem 1.35rem; border-inline-start: 4px solid var(--b-gold); background: var(--b-paper); border-radius: 0 10px 10px 0; }
[dir="ltr"] .b-callout { border-radius: 0 10px 10px 0; }
[dir="rtl"] .b-callout { border-radius: 10px 0 0 10px; }

/* ---------- الجدول ---------- */
.b-table-wrap { overflow-x: auto; border: 1px solid var(--b-line); border-radius: 12px; }
.b-table { width: 100%; border-collapse: collapse; margin: 0; }
.b-table th, .b-table td { padding: .85rem 1.1rem; border-bottom: 1px solid var(--b-line); text-align: start; vertical-align: top; }
.b-table thead th { background: var(--b-ink); color: #fff; font-weight: 600; }
.b-table tbody th { background: var(--b-paper); color: var(--b-ink); font-weight: 600; width: 30%; }
.b-table tbody tr:last-child > * { border-bottom: 0; }

/* ---------- سلّم العقوبات ---------- */
.b-ladder { display: grid; gap: .7rem; }
.b-step { display: grid; grid-template-columns: 8.5rem 1fr; border-radius: 12px; overflow: hidden; border: 1px solid var(--b-line); background: #fff; }
.b-step-name { margin: 0 !important; display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: var(--font-head, inherit); font-size: 1.2rem; color: #fff; padding: 1rem .5rem; }
.b-step > div { padding: 1rem 1.25rem; }
.b-step > div > p { color: var(--b-muted); font-size: .95rem; margin-bottom: .55rem !important; }
.b-step .b-list li::before { background: currentColor; opacity: .45; }
.b-warn .b-step-name { background: #C9961F; }
.b-fail .b-step-name { background: #C46A26; }
.b-susp .b-step-name { background: #B23A2F; }
.b-dism .b-step-name { background: #6F1B28; }
.b-dism { border-color: #E8CACE; }

/* ---------- سوق العمل ---------- */
.b-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.b-field { border: 1px solid var(--b-line); border-radius: 12px; padding: 1.05rem 1.15rem; background: #fff; }
.b-field h5 { display: flex; align-items: center; gap: .55rem; }
.b-field h5 .bi { color: var(--b-green); font-size: 1.35rem; }
.b-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.b-tags li { background: var(--b-soft); color: var(--b-green); border-radius: 99px; padding: .15rem .7rem; font-size: .88rem; font-weight: 500; }

/* ---------- التواصل ---------- */
.b-contact { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.b-contact > div { background: var(--b-paper); border-radius: 10px; padding: .85rem 1.1rem; }
.b-contact dt { color: var(--b-muted); font-weight: 500; font-size: .9rem; display: flex; align-items: center; gap: .4rem; }
.b-contact dt .bi { color: var(--b-gold); }
.b-contact dd { margin: .15rem 0 0; font-weight: 600; color: var(--b-ink); }
.b-contact dd a { color: var(--b-green); }

.b-closing { margin: 2.25rem 0 0 !important; padding: 1.6rem 1.25rem; text-align: center; border-radius: 14px;
  background: var(--b-ink); color: #fff; font-family: var(--font-head, inherit); font-size: clamp(1.1rem, 2.4vw, 1.4rem); line-height: 1.8; }

/* ---------- فهرس النشرة (يُولَّد في program.php) ---------- */
.b-toc { list-style: none; padding: 0; margin: 0; border-inline-start: 2px solid var(--b-line, #DCE4DF); counter-reset: t; }
.b-toc a { display: block; padding: .38rem .9rem; margin-inline-start: -2px; border-inline-start: 2px solid transparent; color: inherit; font-size: .93rem; line-height: 1.5; }
.b-toc a:hover { color: var(--green-700, #11604A); }
.b-toc a.active { border-color: var(--gold, #E3B23C); color: var(--green-900, #0B3D2E); font-weight: 600; background: var(--paper, #F5F7F4); }
.b-toc-mobile { border: 1px solid var(--line, #DCE4DF); border-radius: 12px; padding: .75rem 1rem; margin-bottom: 1.5rem; }
.b-toc-mobile summary { font-weight: 600; cursor: pointer; color: var(--green-900, #0B3D2E); }
.b-toc-mobile .b-toc { margin-top: .75rem; }
.b-print-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; width: 100%; margin-top: 1rem; }

/* ---------- الشاشات الصغيرة ---------- */
@media (max-width: 1199.98px) {
  .b-steps { grid-template-columns: 1fr 1fr; }
  .b-steps li::after { display: none; }
}
@media (max-width: 767.98px) {
  .b-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .b-quote { border-inline-start: 0; padding-inline-start: 0; border-top: 2px solid var(--b-gold); padding-top: .8rem; }
  .b-ledger dl { grid-template-columns: 1fr; }
  .b-pair, .b-cols, .b-numbered, .b-contact { grid-template-columns: 1fr; }
  .b-scale { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .35rem; }
  .b-scale > div { padding: .7rem .2rem .6rem; }
  .b-scale strong { font-size: 1.3rem; }
  .b-scale-label { font-size: .72rem; }
  .b-step { grid-template-columns: 1fr; }
  .b-step-name { justify-content: flex-start; padding: .6rem 1.1rem; font-size: 1.1rem; }
}
@media (max-width: 479.98px) {
  .b-steps { grid-template-columns: 1fr; }
  .b-ledger dt { white-space: normal; }
}


/* =========================================================
   مكونات إضافية (نشرة إدارة الأعمال وما بعدها)
   ========================================================= */
/* القيم والمهارات كبطاقات صغيرة */
.b-values { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .55rem; }
.b-values li { background: var(--b-paper); border-radius: 10px; padding: .7rem .95rem; font-weight: 600; color: var(--b-ink);
  border-inline-start: 3px solid var(--b-gold); line-height: 1.6; }

/* مخرجات التعلّم */
.b-outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.b-outcome { border: 1px solid var(--b-line); border-radius: 12px; padding: 1.1rem 1.2rem; background: #fff; }
.b-outcome h5 { display: flex; align-items: center; gap: .5rem; padding-bottom: .6rem; margin-bottom: .7rem !important; border-bottom: 1px dashed var(--b-line); }
.b-outcome h5 .bi { color: var(--b-green); font-size: 1.25rem; }
.b-outcome ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.b-outcome li { display: flex; gap: .6rem; align-items: baseline; line-height: 1.7; font-size: .97rem; }
.b-code { flex-shrink: 0; min-width: 2.6rem; text-align: center; font-size: .78rem; font-weight: 700; color: var(--b-green);
  background: var(--b-soft); border-radius: 6px; padding: .05rem .35rem; font-family: var(--font-body, inherit); }

/* شريط التوزيع النسبي (مكونات البرنامج / توزيع الدرجات) */
.b-stack { display: flex; height: 2.6rem; border-radius: 10px; overflow: hidden; margin: .25rem 0 1rem; gap: 2px; background: #fff; }
.b-stack span { display: grid; place-items: center; min-width: 2.6rem; color: #fff; font-size: .85rem; }
.b-stack b { font-weight: 700; }
.c1, .b-dot.c1 { background: #11604A; } .c2, .b-dot.c2 { background: #0B3D2E; }
.c3, .b-dot.c3 { background: #C9961F; } .c4, .b-dot.c4 { background: #7FB39B; }
.a1, .b-dot.a1 { background: #11604A; } .a2, .b-dot.a2 { background: #C9961F; }
.a3, .b-dot.a3 { background: #E3B23C; } .a4, .b-dot.a4 { background: #0B3D2E; }
.b-stack .a3 { color: #3A2E0A; }
.b-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; vertical-align: middle; margin-inline-end: .35rem; }
.b-table tfoot th, .b-table tfoot td { background: var(--b-paper); font-weight: 700; color: var(--b-ink); border-top: 2px solid var(--b-ink); border-bottom: 0;
  padding: .8rem 1.1rem; text-align: start; }
.b-comp td, .b-comp tfoot td { white-space: nowrap; }

/* مجالات الدراسة */
.b-tags-lg { gap: .5rem; }
.b-tags-lg li { font-size: .95rem; padding: .35rem .9rem; background: #fff; border: 1px solid var(--b-line); color: var(--b-ink); }

/* متطلبات الاستمرار: خطوتان متجاورتان */
.b-steps-2 { grid-template-columns: 1fr 1fr; }
.b-steps-2 li:not(:last-child)::after { display: none; }

/* طرق التعليم */
.b-methods { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.b-methods li { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--b-line); border-radius: 10px; padding: .75rem .9rem; background: #fff; font-weight: 500; }
.b-methods .bi { color: var(--b-green); font-size: 1.3rem; }

/* سلّم التقديرات */
.b-grades { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.b-grades > div { border-radius: 10px; padding: .8rem .5rem; text-align: center; display: grid; gap: .15rem; }
.b-grades strong { font-family: var(--font-head, inherit); font-size: 1.05rem; }
.b-grades span { font-size: .85rem; opacity: .85; }
.b-grades .g1 { background: #FBEDEC; color: #8C2A22; }
.b-grades .g2 { background: #FBF5E3; color: #6E5310; }
.b-grades .g3 { background: #EAF3EE; color: #11604A; }
.b-grades .g4 { background: #CDE3D7; color: #0B3D2E; }
.b-grades .g5 { background: #11604A; color: #fff; }

/* دورة التحسين المستمر */
.b-cycle { list-style: none; counter-reset: cy; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.b-cycle li { counter-increment: cy; display: inline-flex; align-items: center; gap: .45rem; background: var(--b-soft); color: var(--b-ink);
  border-radius: 99px; padding: .4rem .95rem .4rem .45rem; font-weight: 600; position: relative; }
[dir="rtl"] .b-cycle li { padding: .4rem .45rem .4rem .95rem; }
.b-cycle li::before { content: counter(cy); width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--b-green); color: #fff; font-size: .8rem; }
.b-cycle li:not(:last-child)::after { content: "\F138"; font-family: "bootstrap-icons"; position: absolute; inset-inline-end: -.95rem; color: var(--b-gold); font-size: .8rem; font-weight: 400; }
[dir="ltr"] .b-cycle li:not(:last-child)::after { content: "\F135"; }
.b-cycle li:last-child { background: var(--b-ink); color: #fff; }
.b-cycle li:last-child::before { background: var(--b-gold); color: var(--b-ink); }

/* مجالات العمل */
.b-careers { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .55rem; margin-bottom: 1.25rem; }
.b-careers > div { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: 10px; background: var(--b-paper); font-weight: 500; }
.b-careers .bi { color: var(--b-green); font-size: 1.2rem; }
.b-note-green { background: var(--b-soft); border-color: #CFE3D8; }
.b-note-green .b-note-title { color: var(--b-green); }

@media (max-width: 767.98px) {
  .b-outcomes, .b-steps-2 { grid-template-columns: 1fr; }
  .b-table tbody th { width: auto; }
  .b-table th, .b-table td, .b-table tfoot th, .b-table tfoot td { padding: .65rem .7rem; font-size: .93rem; }
  .b-grades { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; }
  .b-grades > div { padding: .6rem .2rem; }
  .b-grades strong { font-size: .88rem; }
  .b-grades span { font-size: .7rem; }
  .b-stack span { min-width: 2.2rem; font-size: .75rem; }
  .b-cycle li:not(:last-child)::after { display: none; }
}
@media print {
  .b-stack span, .b-dot, .b-grades > div, .b-cycle li { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .b-outcome, .b-grades, .b-stack { break-inside: avoid; }
}

/* ---------- الطباعة: النشرة وحدها، وتُحفظ كـ PDF من نافذة الطباعة ---------- */
@media print {
  @page { margin: 14mm 12mm; }
  .topbar, .site-nav, .site-footer, .page-head, .skip-link, .b-aside, .b-toc-mobile { display: none !important; }
  .section { padding: 0 !important; }
  .b-main { flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; }
  .brochure { font-size: 10.5pt; }
  .brochure * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .b-sec { break-inside: auto; padding: 1.2rem 0; }
  .b-sec > h3, .b-step, .b-field, .b-panel, .b-steps li, .b-note, .b-table tr { break-inside: avoid; }
  .b-sec > h3 { break-after: avoid; }
  a { color: inherit !important; text-decoration: none !important; }
}
