/* CAJO School — school.cajogroup.com
   Same brand as cajogroup.com (Cairo font, CAJO red + navy), laid out like a course
   marketplace: catalogue cards (Udemy-style) and a full course page (Coursera-style). */

:root {
  --primary: #d7484e;
  --primary-dark: #b03239;
  --ink: #14213d;
  --text: #2f3a4f;
  --muted: #6b7588;
  --line: #e2e6ee;
  --bg: #f3f5f9;
  --white: #fff;
  --gold: #e0a019;
  --ok: #2f8a57;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .06);
  --container: 1200px;
  --font: "Cairo", sans-serif;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.7; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px;
  padding: 10px 20px; font-weight: 700; font-size: .95rem; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-block { width: 100%; }
.btn.in-cart { background: var(--ok); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 36px; width: auto; }
.brand-name { font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: .02em; }
.brand-name span { color: var(--primary); }
.top-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 16px; height: 42px; }
.top-search input { flex: 1; border: 0; background: none; font: inherit; outline: none; color: var(--ink); min-width: 0; }
.top-search i { color: var(--muted); }
.top-links { display: flex; align-items: center; gap: 18px; margin-inline-start: auto; font-weight: 600; font-size: .92rem; }
.top-links a:hover { color: var(--primary); }
.cart-btn { position: relative; background: none; border: 0; font-size: 1.25rem; color: var(--ink); cursor: pointer; padding: 6px; }
.cart-count { position: absolute; top: -2px; inset-inline-end: -6px; background: var(--primary); color: #fff; font-size: .7rem; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.cart-count[hidden] { display: none; }

/* ---------- home hero ---------- */
.hero { background: linear-gradient(120deg, #14213d 0%, #1d2f57 60%, #2a2346 100%); color: #fff; padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset-inline-start: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(215, 72, 78, .35), transparent 70%); }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.3; margin: 0 0 12px; font-weight: 800; }
.hero h1 span { color: var(--primary); }
.hero p { color: #c9d1e0; font-size: 1.1rem; max-width: 620px; margin: 0 0 26px; }
.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 34px; }
.hero-stats strong { display: block; font-size: 1.5rem; color: #fff; }
.hero-stats span { color: #b7c0d1; font-size: .88rem; }

/* ---------- sections ---------- */
.section { padding: 56px 0; }
.section.alt { background: var(--bg); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 1.6rem; color: var(--ink); font-weight: 800; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.link-more { color: var(--primary); font-weight: 700; font-size: .95rem; }
.link-more:hover { text-decoration: underline; }

/* topic tabs (Udemy-style) */
.topic-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.topic-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font-weight: 700; color: var(--muted);
  cursor: pointer; white-space: nowrap; font-size: .95rem; }
.topic-tabs button:hover { color: var(--ink); }
.topic-tabs button.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- course cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.course-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.course-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(16, 24, 40, .12); }
.cover { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #14213d, #2b3f6b 55%, #d7484e 140%); overflow: hidden;
  display: grid; place-items: center; color: rgba(255, 255, 255, .92); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover > i { font-size: 3.2rem; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .3)); }
.cover .cover-label { position: absolute; inset-inline-start: 12px; bottom: 10px; font-size: .78rem; font-weight: 700; background: rgba(0, 0, 0, .35);
  padding: 2px 10px; border-radius: 999px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.02rem; line-height: 1.5; color: var(--ink); font-weight: 800; }
.card-body h3 a:hover { color: var(--primary); }
.card-inst { color: var(--muted); font-size: .82rem; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; }
.badge { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 9px; border-radius: 4px; background: #fde8e9; color: var(--primary-dark); }
.badge.new { background: #e3f3ea; color: #23774d; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: #8a5a00; }
.rating i { color: var(--gold); font-size: .8rem; }
.rating-count { color: var(--muted); font-weight: 400; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; }
.price { font-weight: 800; color: var(--ink); font-size: 1.15rem; }
.price del { color: var(--muted); font-weight: 400; font-size: .85rem; margin-inline-start: 6px; }
.add-cart { background: #fff; border: 1px solid var(--primary); color: var(--primary); border-radius: 8px; padding: 6px 12px; font-weight: 700;
  font-size: .82rem; cursor: pointer; white-space: nowrap; }
.add-cart:hover { background: var(--primary); color: #fff; }
.add-cart.in-cart { background: var(--ok); border-color: var(--ok); color: #fff; }

/* bundles («البرامج») */
.bundle { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 28px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.bundle::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--primary), #8b5cf6); }
.bundle-kicker { color: var(--primary); font-weight: 800; font-size: .85rem; display: flex; align-items: center; gap: 6px; }
.bundle h3 { margin: 6px 0 8px; font-size: 1.45rem; color: var(--ink); font-weight: 800; }
.bundle-courses { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bundle-courses li { display: flex; align-items: center; gap: 12px; background: var(--bg); border-radius: 8px; padding: 10px 12px; font-weight: 700; color: var(--ink); }
.bundle-courses li i { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: .95rem; }
.bundle-courses li span { margin-inline-start: auto; color: var(--muted); font-weight: 400; font-size: .85rem; }
.bundle-price { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 4px; }
.bundle-price strong { font-size: 2rem; color: var(--ink); }
.save { background: #e3f3ea; color: #23774d; font-weight: 800; font-size: .82rem; padding: 2px 10px; border-radius: 999px; }

/* why us */
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.why div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.why i { font-size: 1.5rem; color: var(--primary); }
.why h4 { margin: 10px 0 4px; color: var(--ink); }
.why p { margin: 0; color: var(--muted); font-size: .92rem; }

/* ---------- course page ---------- */
.crumbs { font-size: .85rem; color: var(--muted); padding: 14px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs a:hover { color: var(--primary); }
.course-hero { background: linear-gradient(180deg, #eef2fb, #f7f8fc); border-bottom: 1px solid var(--line); }
.course-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; padding-bottom: 40px; }
.course-hero h1 { margin: 6px 0 10px; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.35; color: var(--ink); font-weight: 800; }
.course-hero .lead { font-size: 1.08rem; margin: 0 0 14px; }
.in-program { font-size: .9rem; margin: 0 0 12px; }
.in-program a { color: var(--primary); font-weight: 700; }
.hero-inst { display: flex; align-items: center; gap: 10px; font-size: .92rem; margin-bottom: 18px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--ink), var(--primary)); color: #fff;
  display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.avatar.lg { width: 72px; height: 72px; font-size: 1.6rem; }
.hero-inst a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* buy card (sticky on wide screens) */
.buy-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(16, 24, 40, .14); overflow: hidden;
  align-self: start; position: sticky; top: 84px; margin-top: 18px; }
.buy-card .cover { aspect-ratio: 16 / 9; }
.play-preview { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 33, 61, .25); cursor: pointer; color: #fff; border: 0; width: 100%; }
.play-preview span { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; }
.play-preview i { width: 62px; height: 62px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-size: 1.4rem; padding-inline-start: 4px; }
.buy-body { padding: 18px 20px 20px; display: grid; gap: 12px; }
.buy-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.buy-price strong { font-size: 1.9rem; color: var(--ink); }
.buy-price del { color: var(--muted); }
.buy-includes { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; font-size: .88rem; }
.buy-includes i { width: 20px; color: var(--ink); }

/* stats strip */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); margin: -6px 0 0; }
.stats-strip > div { padding: 16px 20px; border-inline-start: 1px solid var(--line); }
.stats-strip > div:first-child { border-inline-start: 0; }
.stats-strip strong { display: block; color: var(--ink); font-size: 1.05rem; }
.stats-strip span { color: var(--muted); font-size: .84rem; }

/* sticky tabs */
.page-tabs { position: sticky; top: 68px; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); margin-top: 28px; }
.page-tabs nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.page-tabs a { padding: 12px 14px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; font-size: .93rem; }
.page-tabs a:hover { color: var(--ink); }
.page-tabs a.active { color: var(--ink); border-bottom-color: var(--primary); }
.course-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; }
.course-main > div { min-width: 0; }
.block { padding: 30px 0 6px; scroll-margin-top: 130px; }
.block h2 { margin: 0 0 14px; font-size: 1.35rem; color: var(--ink); font-weight: 800; }
.block h3 { margin: 22px 0 10px; font-size: 1.05rem; color: var(--ink); font-weight: 800; }
.learn-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; }
.learn-list li { display: flex; gap: 10px; align-items: flex-start; }
.learn-list i { color: var(--ok); margin-top: 6px; }
.course-desc { max-width: 820px; line-height: 1.95; color: var(--ink); margin-bottom: 26px; }
.course-desc p { margin: 0 0 .8em; }
.course-desc.folded { max-height: 13em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); margin-bottom: 4px; }
.desc-more { background: none; border: 0; padding: 0; cursor: pointer; color: var(--primary); margin-bottom: 26px; font-weight: 700; font-size: .95rem; }
.req-list { margin: 0; padding-inline-start: 1.2em; line-height: 1.9; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { background: #e8edf6; color: var(--ink); border-radius: 999px; padding: 4px 14px; font-size: .86rem; font-weight: 600; }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.details > div { display: flex; gap: 12px; align-items: flex-start; }
.details i { font-size: 1.35rem; color: var(--ink); width: 26px; margin-top: 4px; }
.details i.fa-linkedin { color: #0a66c2; }
.details strong { display: block; color: var(--ink); }
.details span { color: var(--muted); font-size: .88rem; }

/* curriculum accordion */
.curr-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-size: .9rem; }
.curr-head button { background: none; border: 0; color: var(--primary); font-weight: 700; cursor: pointer; }
.module { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; background: #fff; }
.module summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 12px; background: #f8f9fc; }
.module summary::-webkit-details-marker { display: none; }
.module summary strong { color: var(--ink); }
.module summary .m-meta { margin-inline-start: auto; color: var(--muted); font-size: .84rem; white-space: nowrap; }
.module summary .chev { transition: transform .2s; color: var(--muted); }
.module[open] summary .chev { transform: rotate(180deg); }
.m-num { color: var(--muted); font-size: .8rem; display: block; font-weight: 400; }
.lessons { list-style: none; margin: 0; padding: 6px 18px 12px; }
.lessons li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.lessons li:last-child { border-bottom: 0; }
.lessons li > i { width: 22px; text-align: center; color: var(--muted); }
.lessons .l-time { margin-inline-start: auto; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.free { background: #e3f3ea; color: #23774d; border: 0; border-radius: 999px; padding: 1px 10px; font-size: .76rem; font-weight: 800; cursor: pointer; }
.locked { color: #b5bdca; font-size: .8rem; }

/* instructor card */
.inst-card { display: flex; gap: 18px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: #fff; box-shadow: var(--shadow); }
.inst-card h3 { margin: 0; }
.inst-card .inst-title { color: var(--muted); font-size: .9rem; margin: 2px 0 8px; }
.inst-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.inst-stats i { color: var(--ink); }

/* reviews */
.review-summary { display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; margin-bottom: 18px; }
.big-rating { text-align: center; }
.big-rating strong { font-size: 3rem; color: var(--ink); line-height: 1; display: block; }
.stars i { color: var(--gold); }
.bars { display: grid; gap: 6px; }
.bars div { display: grid; grid-template-columns: 84px 1fr 42px; gap: 10px; align-items: center; font-size: .85rem; }
.bars .stars { font-size: .72rem; white-space: nowrap; }
.bars .track { display: block; height: 8px; background: #edf0f5; border-radius: 4px; overflow: hidden; }
.bars .fill { display: block; height: 100%; background: linear-gradient(90deg, #f3c04d, var(--gold)); border-radius: 4px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.review { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fff; box-shadow: var(--shadow); }
.review header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.review header strong { color: var(--ink); display: block; }
.review header small { color: var(--muted); }
.review p { margin: 6px 0 0; font-size: .93rem; }

/* side column on the course page (program box) */
.side-box { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fff; box-shadow: var(--shadow); margin-top: 30px; }
.side-box h4 { margin: 0 0 8px; color: var(--ink); }

/* cart drawer */
.drawer-back { position: fixed; inset: 0; background: rgba(14, 24, 48, .45); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(400px, 92vw); background: #fff; z-index: 100; display: flex; flex-direction: column;
  transform: translateX(-105%); transition: transform .25s var(--ease, ease); box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
[dir="rtl"] .drawer { transform: translateX(-105%); inset-inline-end: auto; left: 0; }
body.cart-open .drawer { transform: none; }
body.cart-open .drawer-back { opacity: 1; pointer-events: auto; }
.drawer header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer header h3 { margin: 0; color: var(--ink); }
.drawer header button { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
.drawer-items { flex: 1; overflow: auto; padding: 8px 20px; }
.drawer-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.drawer-item .cover { border-radius: 6px; aspect-ratio: 16 / 10; }
.drawer-item .cover > i { font-size: 1.2rem; }
.drawer-item strong { color: var(--ink); font-size: .9rem; display: block; line-height: 1.4; }
.drawer-item button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: .8rem; padding: 0; }
.drawer-item button:hover { color: var(--primary); }
.drawer footer { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font: inherit; min-width: 0; }
.total { display: flex; justify-content: space-between; font-weight: 800; color: var(--ink); font-size: 1.1rem; }
.drawer-note { font-size: .78rem; color: var(--muted); text-align: center; margin: 0; }
.empty-cart { text-align: center; color: var(--muted); padding: 40px 0; }
.empty-cart i { font-size: 2.4rem; color: #c5ccd8; display: block; margin-bottom: 8px; }

/* toast */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(120%); background: var(--ink); color: #fff; padding: 10px 18px;
  border-radius: 8px; z-index: 120; transition: transform .25s; font-weight: 600; font-size: .92rem; }
.toast.show { transform: translateX(-50%); }

/* footer */
.footer { background: #0e1830; color: #b7c0d1; padding: 40px 0 24px; margin-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer h5 { color: #fff; margin: 0 0 10px; font-size: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .9rem; }
.footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 26px; padding-top: 16px; font-size: .85rem; }

/* ---------- small screens ---------- */
@media (max-width: 980px) {
  .course-hero-inner, .course-main { grid-template-columns: minmax(0, 1fr); }
  .buy-card { position: static; }
  .side-col { display: none; }
  .bundle { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .top-search { display: none; }
  .top-links a.hide-sm { display: none; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stats-strip > div:nth-child(3) { border-inline-start: 0; }
  .stats-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .learn-list, .details { grid-template-columns: 1fr; }
  .review-summary { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

.price { display: inline-flex; align-items: baseline; gap: 6px; } .price del { margin: 0; }

/* ---------- home slider (same behaviour as the main website's) ----------
   The track is laid out left-to-right on purpose so slides move right → left;
   each slide's text is back to RTL. */
.slider { position: relative; height: 560px; background: var(--ink); color: #fff; overflow: hidden; direction: ltr; }
.slider-track { display: flex; height: 100%; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.slider-track.no-anim, .slider-track.no-anim .slide-content > * { transition: none; }
.slide { position: relative; flex: 0 0 100%; height: 100%; display: flex; align-items: center; direction: rtl; }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(270deg, rgba(14, 24, 48, .9) 0%, rgba(14, 24, 48, .6) 45%, rgba(14, 24, 48, .15) 100%); }
.slide-content { position: relative; z-index: 1; padding-inline: 80px; }
.slide-title { color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.3; font-weight: 800; margin: 0 0 14px; max-width: 700px; }
.slide-title span { color: var(--primary); }
.slide-lead { font-size: 1.12rem; color: rgba(255, 255, 255, .88); max-width: 600px; margin: 0 0 28px; }
.slide-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.slide-content .hero-stats { margin-top: 34px; }
/* slide text rises in when its slide becomes active */
.slide-content > * { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.slide.active .slide-content > * { opacity: 1; transform: none; }
.slide.active .slide-content > :nth-child(2) { transition-delay: .15s; }
.slide.active .slide-content > :nth-child(3) { transition-delay: .3s; }
.slide.active .slide-content > :nth-child(4) { transition-delay: .45s; }
.slider-arrow { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .35);
  font-size: 1.05rem; cursor: pointer; transition: background .3s, border-color .3s; }
.slider-arrow:hover { background: var(--primary); border-color: var(--primary); }
.slider-prev { left: 22px; }
.slider-next { right: 22px; }
.slider-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.slider-dots i { width: 9px; height: 9px; border-radius: 5px; background: rgba(255, 255, 255, .45); transition: width .3s, background .3s; }
.slider-dots i.on { width: 26px; background: var(--primary); }
@media (max-width: 720px) {
  .slider { height: 520px; }
  .slide-content { padding-inline: 16px; }
  .slide-overlay { background: linear-gradient(0deg, rgba(14, 24, 48, .9) 0%, rgba(14, 24, 48, .65) 55%, rgba(14, 24, 48, .35) 100%); }
  .slider-arrow { top: auto; bottom: 14px; transform: none; width: 42px; height: 42px; }
  .slider-prev { left: 14px; }
  .slider-next { right: 14px; }
  .slide-content .hero-stats { gap: 22px; }
}
.slider-dots { direction: rtl; }

/* ---------- course cards, Domestika-style ---------- */
.card-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }
.course-card { border: 0; border-radius: 12px; box-shadow: 0 2px 10px rgba(16, 24, 40, .08); }
.course-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(16, 24, 40, .14); }
.cc-media { position: relative; display: block; }
.cc-media .cover { border-radius: 0; }
.cc-badge { position: absolute; top: 10px; inset-inline-start: 10px; background: #ffd23f; color: #3a2d00; font-size: .74rem; font-weight: 800;
  padding: 2px 10px; border-radius: 999px; letter-spacing: .02em; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.cc-badge.new { background: #2fbf84; color: #fff; }
.cc-strip { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 18px 12px 8px;
  color: #fff; font-size: .82rem; font-weight: 700; background: linear-gradient(0deg, rgba(10, 16, 32, .78), transparent); }
.cc-strip i { margin-inline-end: 3px; }
.cc-level { display: inline-flex; align-items: center; gap: 6px; }
.lv { display: inline-flex; gap: 2px; }
.lv i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .45); margin: 0; }
.lv i.on { background: #fff; }
.cc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cc-body h3 { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--ink); font-weight: 800;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }
.cc-body h3 a:hover { color: var(--primary); }
.cc-meta { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: var(--muted); }
.cc-meta i { margin-inline-end: 3px; }
.cc-inst { color: var(--text); font-weight: 600; margin-inline-end: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cc-off { color: var(--primary); font-weight: 700; font-size: .86rem; margin-top: auto; padding-top: 6px; }
.cc-off del { margin-inline-start: 6px; }
.cc-buy { width: 100%; border: 0; border-radius: 8px; background: var(--primary); color: #fff; font: inherit; font-weight: 700; font-size: .95rem;
  padding: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s; }
.cc-buy:hover { background: var(--primary-dark); }
.cc-buy b { font-size: 1.05rem; }
.cc-buy.in-cart { background: var(--ok); }

/* ---------- courses in one row that slides sideways ---------- */
.row-slider { position: relative; }
.card-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 22px) / 4); gap: 22px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 6px 4px 14px; margin: -6px -4px 0; scrollbar-width: none; }
.card-row::-webkit-scrollbar { display: none; }
.card-row > * { scroll-snap-align: start; }
.row-arrow { position: absolute; top: 38%; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  color: var(--ink); font-size: 1rem; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(16, 24, 40, .16);
  transition: background .15s, color .15s, opacity .2s; }
.row-arrow:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.row-arrow:disabled { opacity: 0; pointer-events: none; }
.row-right { right: -22px; }
.row-left { left: -22px; }
@media (max-width: 1100px) { .card-row { grid-auto-columns: calc((100% - 2 * 22px) / 3); } }
@media (max-width: 760px) { .card-row { grid-auto-columns: calc((100% - 22px) / 2); } .row-right { right: -8px; } .row-left { left: -8px; } }
@media (max-width: 520px) { .card-row { grid-auto-columns: 82%; gap: 14px; } .row-arrow { display: none; } }

/* ---------- programs as cards in a sliding row ---------- */
.program-cover { background: linear-gradient(135deg, #14213d 0%, #3b2a5c 55%, #d7484e 130%); }
.cc-badge.pro { background: #fff; color: var(--primary); }
.cc-badge.pro i { margin-inline-end: 3px; }
.pc-courses { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 3px; font-size: .84rem; }
.pc-courses a { color: var(--text); display: flex; gap: 6px; align-items: baseline; }
.pc-courses a:hover { color: var(--primary); }
.pc-courses i { color: var(--ok); font-size: .72rem; }
.program-card h3 { min-height: 0; }
.top-links a i { margin-inline-end: 4px; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.user-chip .avatar { width: 34px; height: 34px; font-size: .9rem; }

/* ---------- testimonials (copied from the main site), laid out like Yasser's reference ---------- */
.testi { background: #eef2f8; }
.testi-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-bottom: 32px; }
.eyebrow3 { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.eyebrow3 i { color: var(--primary); }
.testi-head h2 { margin: 8px 0 10px; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.4; color: var(--ink); font-weight: 800; }
.testi-head p { margin: 0; color: var(--muted); max-width: 560px; }
.community { position: relative; border-radius: 14px; overflow: hidden; min-height: 180px; color: #fff; display: flex; align-items: flex-end; }
.community img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.community::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(270deg, rgba(14, 24, 48, .92), rgba(14, 24, 48, .55)); }
.community > div { position: relative; z-index: 2; padding: 20px 22px; display: grid; gap: 2px; }
.community b { font-size: 1.25rem; }
.community strong { font-size: 2rem; line-height: 1.2; margin-top: 8px; }
.community span { color: #d5dbe7; font-size: .92rem; max-width: 320px; }
.testi-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 22px; align-items: stretch; }
.testi-photo { position: relative; background: #fff; border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.testi-photo img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; border-radius: 10px; }
.q-badge { position: absolute; top: 0; inset-inline-end: 0; width: 64px; height: 64px; border-radius: 50%; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 1.4rem; border: 8px solid #eef2f8; transform: translate(-30%, -30%); }
[dir="rtl"] .q-badge { transform: translate(30%, -30%); }
.testi-row { grid-auto-columns: calc((100% - 22px) / 2); }
.testi-card { background: #fff; border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.testi-card header { display: flex; align-items: center; gap: 12px; }
.t-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; font-size: 1.2rem; }
.testi-card header strong { color: var(--ink); display: block; font-size: 1rem; }
.testi-card header a:hover strong { color: var(--primary); }
.testi-card header span { color: var(--muted); font-size: .82rem; line-height: 1.5; display: block; }
.t-q { margin-inline-start: auto; font-size: 2rem; color: #dfe4ee; align-self: flex-start; }
.testi-card .stars { font-size: .8rem; }
.testi-card p { margin: 0; font-size: .95rem; line-height: 1.85; }
.testi-card footer { margin-top: auto; display: flex; gap: 10px; }
.testi-card footer a { width: 30px; height: 30px; border-radius: 50%; background: #eef2f8; color: var(--ink); display: grid; place-items: center; font-size: .8rem; }
.testi-card footer a:hover { background: var(--ink); color: #fff; }
@media (max-width: 980px) {
  .testi-head, .testi-body { grid-template-columns: 1fr; }
  .testi-photo { display: none; }
}
@media (max-width: 600px) { .testi-row { grid-auto-columns: 86%; } }
/* the photo beside the testimonials is only as tall as the testimonial cards */
.testi-photo { min-height: 0; }
.testi-photo img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); min-height: 0; object-position: 50% 30%; }
.community img { object-position: 50% 35%; }
/* slide text stays in a column on the right so the people in the pictures stay visible */
.slide-content { padding-inline: 70px; width: 100%; }
.slide-content > * { max-width: 470px; }
.slide-title { font-size: clamp(1.9rem, 3.6vw, 3rem); }
.slide-lead { font-size: 1.1rem; }
.slide-overlay { background: linear-gradient(270deg, rgba(14, 24, 48, .88) 0%, rgba(14, 24, 48, .55) 38%, rgba(14, 24, 48, .08) 70%); }
/* pictures shifted left (and slide 4 mirrored) so the people sit on the left and the text on the right is clear */
.slide-bg { left: auto; right: 0; width: 128%; }
.slide-bg.mirror { transform: scaleX(-1); }
.slide-content { padding-inline: 96px; }
@media (max-width: 720px) { .slide-bg { width: 100%; } .slide-content { padding-inline: 16px; } }
.slide-bg.far { width: 150%; } @media (max-width: 720px) { .slide-bg.far { width: 100%; } }
.slide-bg { max-width: none; }
.slide { overflow: hidden; }
/* full-screen slider, like the main CAJO website (the whole screen under the top bar) */
.slider { height: calc(100vh - 68px); min-height: 560px; max-height: 1000px; }
.slide-title { font-size: clamp(2.2rem, 5vw, 4rem); }
.slide-lead { font-size: 1.2rem; }
.slide-content > * { max-width: 540px; }
@media (max-width: 720px) { .slider { height: calc(100vh - 68px); min-height: 520px; } }
/* students and % liked in thin light-grey boxes */
.cc-meta { gap: 6px; }
.cc-pill { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #e3e7ee; background: #f6f8fb; border-radius: 6px; padding: 1px 8px;
  font-size: .78rem; color: var(--muted); white-space: nowrap; }
.cc-pill i { margin: 0; font-size: .74rem; }

/* ---------- course page: purchase card always in view ---------- */
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.course-col { min-width: 0; }
.hero-band { position: relative; padding-bottom: 30px; }
.hero-band::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 70px; left: -100vw; right: -100vw;
  background: linear-gradient(180deg, #eef2fb, #f7f8fc); border-bottom: 1px solid var(--line); }
#heroText { padding-bottom: 34px; }
.course-side { position: relative; align-self: stretch; }
.side-sticky { position: sticky; top: 84px; margin-top: 54px; display: grid; gap: 0; }
.side-sticky .buy-card { position: static; margin-top: 0; }
.side-sticky .side-box { margin-top: 16px; }
.course-layout .page-tabs { position: sticky; top: 68px; z-index: 40; background: #fff; margin: 10px 0 0; border-bottom: 1px solid var(--line); }
.course-layout .stats-strip { margin: 0; }
@media (max-width: 980px) {
  .course-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-band::before { bottom: 40px; }
  /* phones / tablets: price + button in a bar fixed at the bottom of the screen */
  .course-side { position: fixed; inset: auto 0 0 0; z-index: 60; }
  .side-sticky { position: static; margin: 0; }
  .side-sticky .buy-card { border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px rgba(16, 24, 40, .16); }
  .side-sticky .buy-card .cover, .side-sticky .buy-includes, #sideCol { display: none; }
  .side-sticky .buy-body { grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 12px 16px; }
  .side-sticky .buy-price strong { font-size: 1.4rem; }
  .side-sticky .buy-price .save { display: none; }
  body[data-page="course"] { padding-bottom: 80px; }
}
.top-links .btn { white-space: nowrap; } @media (max-width: 420px) { .brand-name { font-size: 1rem; } .brand img { height: 30px; } .top-links { gap: 10px; } }
/* course-page reviews slide sideways, 3 at a time */
.review-row { grid-auto-columns: calc((100% - 2 * 22px) / 3); }
@media (max-width: 760px) { .review-row { grid-auto-columns: calc((100% - 22px) / 2); } }
@media (max-width: 520px) { .review-row { grid-auto-columns: 86%; } }
/* «حفظ» — save a course for later (signed-in students) */
.save-btn { order: 99; margin-inline-start: auto; background: none; border: 0; color: #2f6fd6; font: inherit; font-weight: 700; font-size: .92rem;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; }
.save-btn:hover { background: #e8f0fd; }
.save-btn.on { color: #1f5bb8; }
.mini-count { background: #2f6fd6; color: #fff; font-size: .7rem; font-weight: 700; border-radius: 9px; padding: 0 6px; margin-inline-start: 2px; }
.mini-count[hidden] { display: none; }
.saved-link i { color: #2f6fd6; }

/* ================= «دوراتي» ================= */
.my-head { background: linear-gradient(120deg, #14213d, #1d2f57); color: #fff; padding: 34px 0; }
.my-head h1 { margin: 0 0 4px; font-size: 1.8rem; }
.my-head h1 i { color: var(--primary); margin-inline-end: 6px; }
.my-head p { margin: 0; color: #c9d1e0; }
.my-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.my-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(16, 24, 40, .08); display: flex; flex-direction: column; }
.my-body { padding: 14px 16px 16px; display: grid; gap: 10px; }
.my-body h3 { margin: 0; font-size: 1.02rem; color: var(--ink); line-height: 1.5; }
.my-progress { display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.my-progress b { color: var(--ink); white-space: nowrap; }
.bar { flex: 1; height: 8px; background: #edf0f5; border-radius: 4px; overflow: hidden; display: block; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, #2fa865, #3cc47c); border-radius: 4px; }
.btn.owned { background: var(--ok); color: #fff; }

/* ================= the learning page ================= */
body[data-page="learn"] .footer { display: none; }
.learn-bar { position: sticky; top: 68px; z-index: 45; background: var(--ink); color: #fff; }
.lb-inner { display: flex; align-items: center; gap: 18px; padding: 10px 20px; }
.lb-back { color: #c9d1e0; font-size: .9rem; white-space: nowrap; }
.lb-back:hover { color: #fff; }
.lb-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-progress { display: flex; align-items: center; gap: 8px; font-size: .85rem; width: 200px; }
.lb-toggle { display: none; background: rgba(255, 255, 255, .12); border: 0; color: #fff; border-radius: 6px; padding: 6px 10px; font: inherit; cursor: pointer; }
.learn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: calc(100vh - 120px); }
.learn-main { padding: 22px 28px 60px; min-width: 0; }
.learn-side { background: #fff; border-inline-start: 1px solid var(--line); max-height: calc(100vh - 120px); overflow: auto; position: sticky; top: 120px; }
.side-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.side-sec summary { list-style: none; cursor: pointer; padding: 12px 16px; background: #f6f8fb; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between;
  gap: 8px; font-weight: 700; color: var(--ink); font-size: .9rem; }
.side-sec summary::-webkit-details-marker { display: none; }
.side-sec[open] summary i { transform: rotate(180deg); }
.side-sec ul { list-style: none; margin: 0; padding: 0; }
.side-sec li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 10px 16px; font-size: .88rem; cursor: pointer; border-bottom: 1px solid #f0f2f6; }
.side-sec li:hover { background: #f6f8fb; }
.side-sec li.cur { background: #e8f1fd; }
.side-sec li.cur .lt { color: #1d4f91; font-weight: 700; }
.tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #c8cfda; display: grid; place-items: center; font-size: .65rem; color: #fff; }
.side-sec li.done .tick { background: var(--ok); border-color: var(--ok); }
.lt i { color: var(--muted); margin-inline-end: 4px; }

.player { position: relative; aspect-ratio: 16 / 9; background: #0b1224; border-radius: 12px; overflow: hidden; }
.player img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.player-shade { position: absolute; inset: 0; background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, .55)); }
.player-play { position: absolute; inset: 0; margin: auto; width: 78px; height: 78px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 1.6rem;
  cursor: pointer; padding-inline-start: 6px; box-shadow: 0 8px 26px rgba(0, 0, 0, .35); }
.watermark { position: absolute; top: 18%; left: 12%; color: rgba(255, 255, 255, .35); font-size: .82rem; transform: rotate(-12deg); direction: ltr;
  animation: wm 14s linear infinite alternate; pointer-events: none; }
@keyframes wm { 0% { top: 15%; left: 10%; } 50% { top: 60%; left: 55%; } 100% { top: 30%; left: 70%; } }
.player-bar { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: 14px; padding: 10px 16px; color: #fff; font-size: .82rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, .7), transparent); direction: ltr; }
.player-bar .track { flex: 1; height: 4px; background: rgba(255, 255, 255, .3); border-radius: 2px; }
.reading { background: #fff; border-radius: 12px; padding: 26px 30px; box-shadow: var(--shadow); line-height: 2; }
.reading h2 { margin-top: 0; color: var(--ink); }
.file-card { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 12px; padding: 22px; box-shadow: var(--shadow); flex-wrap: wrap; }
.file-card > i { font-size: 2.4rem; color: var(--primary); }
.file-card > div { flex: 1; display: grid; }
.file-card b { color: var(--ink); }
.quiz { background: #fff; border-radius: 12px; padding: 22px 26px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.quiz-head { display: flex; gap: 12px; align-items: center; }
.quiz-head > i { font-size: 1.8rem; color: var(--primary); }
.quiz-head div { display: grid; }
.quiz-head b { color: var(--ink); font-size: 1.1rem; }
.q { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 0; }
.q legend { font-weight: 700; color: var(--ink); padding: 0 6px; }
.q label { display: flex; gap: 8px; align-items: center; padding: 6px 4px; cursor: pointer; border-radius: 6px; }
.q label.right { background: #e3f3ea; }
.quiz-result { border-radius: 10px; padding: 12px 16px; font-weight: 700; }
.quiz-result.pass { background: #e3f3ea; color: #23774d; }
.quiz-result.fail { background: #fde8e9; color: var(--primary-dark); }
.quiz-result b { font-size: 1.3rem; margin-inline-end: 8px; }
.lesson-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 18px 0 10px; flex-wrap: wrap; }
.lesson-head h1 { margin: 2px 0 0; font-size: 1.4rem; color: var(--ink); }
.lesson-nav { display: flex; gap: 10px; }
.lesson-nav .btn:disabled { opacity: .45; cursor: default; }
.lesson-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 10px; }
.lesson-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.lesson-tabs button.on { color: var(--ink); border-bottom-color: var(--primary); }
.lesson-tab { padding: 16px 2px; }
.file-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.file-row a { margin-inline-start: auto; color: var(--primary); font-weight: 700; }
.notes { width: 100%; min-height: 140px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: inherit; }
@media (max-width: 980px) {
  .learn-layout { grid-template-columns: minmax(0, 1fr); }
  .learn-side { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: min(360px, 88vw); max-height: none; z-index: 110; transform: translateX(105%);
    transition: transform .25s; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  body.side-open .learn-side { transform: none; }
  .lb-toggle { display: inline-block; }
  .lb-progress { display: none; }
  .learn-main { padding: 14px 14px 40px; }
}

/* ================= «دوراتي» — like Coursera «My Learning» ================= */
.ml-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 26px; overflow-x: auto; scrollbar-width: none; }
.ml-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font: inherit; font-weight: 700; font-size: 1rem;
  color: var(--muted); cursor: pointer; white-space: nowrap; }
.ml-tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.ml-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 34px; align-items: start; }
.ml-group { margin-bottom: 26px; }
.ml-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--ink); font-size: 1.08rem; }
.ml-logo { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--primary); background: #fff; }
.ml-box { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.ml-row { display: flex; align-items: center; gap: 18px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ml-row:last-child { border-bottom: 0; }
.ml-ok { width: 36px; height: 36px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.ml-info { flex: 1 1 260px; display: grid; gap: 3px; min-width: 0; }
.ml-info b { color: var(--ink); font-size: 1.02rem; }
.ml-info a:hover b { color: var(--primary); }
.ml-info > span { color: var(--muted); font-size: .9rem; }
.ml-bar { height: 9px; margin-top: 8px; max-width: 420px; }
.ml-bar > span { background: linear-gradient(90deg, #6d28d9, #8b5cf6); }
.ml-actions { display: flex; align-items: center; gap: 18px; }
.btn.ml-in { background: #0a66c2; color: #fff; }
.btn.ml-in:hover { background: #084f96; }
.ml-link { color: #0a66c2; font-weight: 700; }
.ml-next { display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: #fbfcfe; }
.ml-next div { display: grid; }
.ml-next b { color: var(--ink); }
.ml-next span { color: var(--muted); font-size: .86rem; }
.ml-next span i { margin-inline-end: 4px; }
.ml-more { background: none; border: 0; color: #0a66c2; font-size: 1.1rem; cursor: pointer; margin-inline-start: auto; padding: 4px 8px; }
.ml-skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ml-skill { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; display: grid; gap: 2px; }
.ml-skill b { color: var(--ink); }
.ml-skill span { color: var(--muted); font-size: .84rem; }
.ml-certs { display: grid; gap: 12px; }
.ml-cert { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fff; flex-wrap: wrap; }
.ml-cert > i { font-size: 2rem; color: var(--gold); }
.ml-cert > div { flex: 1; display: grid; }
.ml-cert b { color: var(--ink); }
.ml-cert span { color: var(--muted); font-size: .84rem; }
/* side: calendar + last 4 weeks */
.ml-side { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; position: sticky; top: 84px; }
.ml-cal { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: var(--ink); font-size: 1.05rem; }
.cal-head button { background: none; border: 0; cursor: pointer; color: var(--ink); padding: 4px 8px; font-size: .95rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px 0; text-align: center; font-size: .92rem; }
.cal-grid i { font-style: normal; color: var(--muted); font-size: .8rem; padding-bottom: 4px; }
.cal-grid span { position: relative; height: 34px; display: grid; place-items: center; color: var(--text); }
.cal-grid span.some::after { content: ""; position: absolute; bottom: 2px; width: 5px; height: 5px; border-radius: 50%; background: #7c3aed; }
.cal-grid span.goal::after { content: ""; position: absolute; bottom: 2px; width: 18px; height: 2px; background: #7c3aed; border-radius: 1px; }
.cal-grid span.goal { font-weight: 700; text-decoration: none; }
.cal-grid span.today { border: 2px solid #7c3aed; border-radius: 50%; width: 34px; margin: 0 auto; font-weight: 800; color: var(--ink); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.cal-legend em { display: inline-block; vertical-align: middle; margin-inline-end: 4px; background: #7c3aed; }
.cal-legend .dot { width: 6px; height: 6px; border-radius: 50%; }
.cal-legend .line { width: 14px; height: 2px; }
.ml-stats { padding: 18px 22px 22px; }
.ml-stats > b { color: var(--ink); }
.ml-stats > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.ml-stats strong { display: block; font-size: 1.7rem; color: var(--ink); line-height: 1.2; }
.ml-stats span { color: var(--muted); font-size: .82rem; }
@media (max-width: 980px) { .ml-layout { grid-template-columns: 1fr; } .ml-side { position: static; } }
.cal-grid span[data-day] { cursor: pointer; border-radius: 50%; }
.cal-grid span[data-day]:hover { background: #f3effe; }
.cal-grid span.picked { background: #ede6fd; }
.cal-day { margin-top: 12px; padding: 10px 12px; background: #f7f5fe; border-radius: 10px; font-size: .84rem; color: var(--muted); display: grid; gap: 3px; }
.cal-day b { color: var(--ink); }
.cal-day span { color: var(--text); }
.cal-day i { color: #7c3aed; width: 18px; }
.cal-day .ok { color: #23774d; } .cal-day .ok i { color: #23774d; }
.ml-stats > div { grid-template-columns: repeat(2, 1fr); gap: 14px; }

/* ---------- account menu ---------- */
.user-menu { position: relative; }
.user-chip { background: none; border: 0; font: inherit; cursor: pointer; }
.um-list { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(16, 24, 40, .14);
  min-width: 190px; padding: 6px; z-index: 60; display: grid; }
.um-list a, .um-list button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--ink); background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; text-align: start; }
.um-list a:hover, .um-list button:hover { background: var(--bg); }
.um-list i { width: 18px; color: var(--muted); }
.um-list button { color: var(--primary); } .um-list button i { color: var(--primary); }

/* ---------- 1) sign in / create account ---------- */
body[data-page="login"] .footer { display: none; }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - 68px); }
.auth-card { padding: 40px 24px; display: grid; align-content: center; justify-items: stretch; max-width: 440px; margin: 0 auto; width: 100%; gap: 10px; }
.auth-brand { justify-content: center; margin-bottom: 6px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 10px; padding: 4px; }
.auth-tabs button { border: 0; background: none; padding: 9px; border-radius: 8px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.auth-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(16, 24, 40, .1); }
.auth-card h1 { margin: 12px 0 0; font-size: 1.6rem; color: var(--ink); }
.auth-card > p { margin: 0 0 8px; }
.auth-google { background: #fff; border: 1px solid var(--line); color: var(--ink); width: 100%; }
.auth-google:hover { background: var(--bg); }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 6px 0; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#authForm { display: grid; gap: 12px; }
#authForm label { display: grid; gap: 4px; font-weight: 600; color: var(--ink); font-size: .9rem; }
#authForm input:not([type="checkbox"]) { border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; font: inherit; }
#authForm input:focus { outline: 2px solid #c9d6f2; border-color: #8aa6dd; }
.auth-check { display: flex !important; grid-template-columns: none; align-items: center; gap: 8px; font-weight: 400 !important; color: var(--text) !important; }
.auth-forgot { color: #2f6fd6; font-size: .86rem; justify-self: start; margin-top: -4px; }
.auth-msg { margin: 0; min-height: 1.2em; color: var(--primary); font-size: .88rem; }
.auth-msg.ok { color: #23774d; }
.auth-terms { font-size: .78rem; color: var(--muted); text-align: center; margin: 4px 0 0; }
.auth-terms a { color: #2f6fd6; }
.auth-side { position: relative; overflow: hidden; color: #fff; display: flex; align-items: flex-end; }
.auth-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.auth-side::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(14, 24, 48, .9), rgba(14, 24, 48, .2)); }
.auth-side > div { position: relative; z-index: 2; padding: 40px; }
.auth-side h2 { font-size: 2.2rem; margin: 0 0 6px; } .auth-side h2 span { color: var(--primary); }
.auth-side p { color: #d5dbe7; margin: 0; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- 2) checkout ---------- */
.checkout h1 { color: var(--ink); font-size: 1.7rem; margin: 0 0 20px; } .checkout h1 i { color: var(--ok); font-size: 1.2rem; }
.co-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; }
.co-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; display: grid; gap: 10px; }
.co-box h3 { margin: 0 0 4px; color: var(--ink); }
.pay { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; }
.pay.on { border-color: #2f6fd6; background: #f3f7ff; }
.pay span:not(.pay-logos) { display: grid; flex: 1; } .pay b { color: var(--ink); } .pay small { color: var(--muted); }
.pay-logos { display: flex; gap: 6px; font-size: 1.6rem; color: #1a1f71; }
.co-item { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.co-item:last-child { border-bottom: 0; }
.co-item .cover { border-radius: 6px; aspect-ratio: 16 / 10; } .co-item .cover > i { font-size: 1.2rem; }
.co-item div { display: grid; } .co-item b { color: var(--ink); font-size: .95rem; } .co-item small { color: var(--muted); } .co-item em { color: #23774d; font-style: normal; font-weight: 700; }
.co-sum { position: sticky; top: 84px; }
.co-row { display: flex; justify-content: space-between; color: var(--text); }
.co-row.ok { color: #23774d; font-weight: 700; }
.co-row.total { font-weight: 800; color: var(--ink); font-size: 1.2rem; border-top: 1px solid var(--line); padding-top: 10px; }
.success { max-width: 560px; margin: 0 auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 40px 30px; box-shadow: var(--shadow); }
.success-ico { width: 74px; height: 74px; border-radius: 50%; background: #e3f3ea; color: var(--ok); display: inline-grid; place-items: center; font-size: 2rem; }
.success h1 { color: var(--ink); margin: 14px 0 6px; }
.success-list { list-style: none; padding: 0; margin: 18px 0 6px; display: grid; gap: 6px; text-align: start; }
.success-list i { color: var(--ok); margin-inline-end: 6px; }
@media (max-width: 900px) { .co-layout { grid-template-columns: 1fr; } .co-sum { position: static; } }

/* ---------- 3) program page ---------- */
.prog-hero { position: relative; color: #fff; padding: 40px 0 46px; background: var(--ink); overflow: hidden; }
.prog-hero::before { content: ""; position: absolute; inset: 0; background: var(--bg, none) center / cover; opacity: .35; }
.prog-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(14, 24, 48, .95), rgba(14, 24, 48, .6)); }
.prog-hero-in { position: relative; z-index: 1; }
.prog-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 12px 0 8px; }
.prog-hero p { color: #d5dbe7; max-width: 640px; margin: 0 0 18px; font-size: 1.08rem; }
.prog-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 600; }
.prog-facts i { color: var(--primary); margin-inline-end: 4px; }
.prog-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.prog-list li { display: grid; grid-template-columns: 34px 120px 1fr auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.prog-list .cover { border-radius: 8px; } .prog-list .cover > i { font-size: 1.6rem; }
.prog-list div { display: grid; gap: 2px; } .prog-list b { color: var(--ink); } .prog-list small { color: var(--muted); font-size: .84rem; }
.pl-num { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; }
.pl-own { color: var(--ok); font-weight: 700; font-size: .88rem; white-space: nowrap; }
.pd-note { margin: 0; font-size: .86rem; background: #f3f7ff; border-radius: 8px; padding: 8px 10px; color: var(--text); }
.pd-note i { color: #2f6fd6; }
.cert-mini { max-width: 520px; border: 2px solid #e2c56b; outline: 6px solid #fbf6e6; border-radius: 6px; padding: 22px; text-align: center; display: grid; gap: 4px; background: #fffdf7; }
.cm-head { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink); } .cm-head img { height: 26px; }
.cert-mini strong { font-size: 1.2rem; color: var(--ink); } .cert-mini span, .cert-mini small { color: var(--muted); } .cert-mini em { color: #9a7b1c; font-style: normal; font-size: .82rem; }
@media (max-width: 640px) { .prog-list li { grid-template-columns: 30px 1fr; } .prog-list .cover { display: none; } }

/* ---------- 4) instructor page ---------- */
.inst-hero { background: linear-gradient(180deg, #eef2fb, #f7f8fc); border-bottom: 1px solid var(--line); padding: 40px 0; }
.inst-hero-in { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.inst-photo { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; font-size: 3rem; box-shadow: 0 10px 30px rgba(16, 24, 40, .2); }
.inst-hero h1 { margin: 2px 0; color: var(--ink); font-size: 2rem; }
.inst-t { margin: 0 0 12px; color: var(--muted); }
.inst-stats { display: flex; gap: 22px; flex-wrap: wrap; } .inst-stats b { color: var(--ink); font-size: 1.2rem; }
.inst-links { display: flex; gap: 10px; margin-top: 12px; }
.inst-links a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--ink); }
.inst-links a:hover { background: var(--ink); color: #fff; }

/* ---------- 5) certificate + verification ---------- */
.cert-wrap { max-width: 1000px; }
.cert-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; } .cert-tools .spacer { flex: 1; }
.certificate { background: #fffdf7; aspect-ratio: 1.414; padding: 18px; box-shadow: 0 16px 40px rgba(16, 24, 40, .15); border-radius: 4px; }
.cert-border { height: 100%; border: 3px solid #c9a94a; outline: 1px solid #c9a94a; outline-offset: -10px; padding: 34px 50px; display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; text-align: center; background: radial-gradient(ellipse at top, #fff, #fffaf0); }
.certificate header { display: flex; align-items: center; gap: 10px; } .certificate header img { height: 44px; }
.cert-kicker { letter-spacing: .05em; color: #9a7b1c; font-weight: 800; font-size: 1.3rem; margin: 6px 0 0; }
.cert-small { margin: 0; color: var(--muted); }
.cert-name { font-size: clamp(1.8rem, 4vw, 3rem); color: var(--ink); margin: 0; border-bottom: 2px solid #e2c56b; padding: 0 30px 6px; }
.cert-course { font-size: clamp(1.2rem, 2.6vw, 1.8rem); color: var(--primary-dark); margin: 0; }
.cert-meta { color: var(--muted); margin: 0; }
.certificate footer { display: flex; width: 100%; justify-content: space-between; align-items: flex-end; gap: 16px; }
.sig { display: grid; text-align: center; } .sig-line { border-top: 1px solid var(--ink); padding-top: 6px; min-width: 160px; font-weight: 700; color: var(--ink); }
.sig small, .verify-box small { color: var(--muted); font-size: .76rem; }
.seal { width: 86px; height: 86px; border-radius: 50%; background: radial-gradient(circle, #e6c25a, #b8912c); color: #fff; display: grid; place-items: center; align-content: center;
  font-size: 1.8rem; box-shadow: 0 0 0 5px #f4e3a7; } .seal small { color: #fff; font-size: .7rem; font-weight: 800; }
.verify-box { display: flex; align-items: center; gap: 8px; text-align: start; } .verify-box div { display: grid; } .verify-box b { color: var(--ink); font-size: .85rem; }
.qr { width: 54px; height: 54px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 2.2rem; color: var(--ink); background: #fff; }
@media print { .topbar, .footer, .cert-tools, .drawer, .drawer-back { display: none !important; } .cert-wrap { padding: 0; max-width: none; } .certificate { box-shadow: none; } @page { size: A4 landscape; margin: 0; } }
@media (max-width: 700px) { .certificate { aspect-ratio: auto; } .cert-border { padding: 24px 16px; gap: 10px; } .certificate footer { flex-direction: column; align-items: center; } }
.verify { max-width: 620px; text-align: center; }
.verify-ico { width: 70px; height: 70px; border-radius: 50%; background: #e8f0fd; color: #2f6fd6; display: inline-grid; place-items: center; font-size: 1.8rem; }
.verify h1 { color: var(--ink); margin: 12px 0 4px; }
.verify-form { display: flex; gap: 10px; margin: 22px 0 14px; }
.verify-form input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; font: inherit; text-align: center; letter-spacing: .04em; }
.verify-res { display: flex; gap: 12px; align-items: center; text-align: start; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.verify-res i { font-size: 1.8rem; } .verify-res div { display: grid; }
.verify-res.ok { background: #e3f3ea; color: #23774d; } .verify-res.bad { background: #fde8e9; color: var(--primary-dark); }
.verify-res span { color: var(--text); font-size: .9rem; }

/* ---------- 6) «حسابي» ---------- */
.pf-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 30px; align-items: start; }
.pf-nav { display: grid; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; position: sticky; top: 84px; }
.pf-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-weight: 600; color: var(--text); }
.pf-nav a i { width: 18px; color: var(--muted); }
.pf-nav a:hover { background: var(--bg); }
.pf-nav a.on { background: #e8f1fd; color: #1d4f91; } .pf-nav a.on i { color: #2f6fd6; }
.pf-body { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; box-shadow: var(--shadow); }
.pf-body h2 { margin: 0 0 18px; color: var(--ink); font-size: 1.3rem; }
.pf-form { display: grid; gap: 18px; justify-items: start; }
.pf-photo { display: flex; align-items: center; gap: 14px; } .pf-photo .avatar { width: 72px; height: 72px; font-size: 1.6rem; } .pf-photo div { display: grid; gap: 4px; justify-items: start; }
.pf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; width: 100%; }
.pf-grid label { display: grid; gap: 4px; font-weight: 600; color: var(--ink); font-size: .9rem; }
.pf-grid input, .pf-grid select { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; background: #fff; }
.pf-prefs { border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; width: 100%; display: grid; gap: 6px; }
.pf-prefs legend { font-weight: 700; color: var(--ink); padding: 0 6px; }
.pf-prefs label { display: flex; gap: 8px; align-items: center; }
.pf-cards { display: grid; gap: 12px; margin-bottom: 12px; }
.pcard { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.pcard > i { font-size: 2rem; color: #1a1f71; } .pcard > div { flex: 1; display: grid; } .pcard b { color: var(--ink); } .pcard small { color: var(--muted); }
.pcard.add { justify-content: center; border-style: dashed; color: #2f6fd6; font: inherit; font-weight: 700; cursor: pointer; } .pcard.add i { font-size: 1rem; color: #2f6fd6; }
.pdefault { background: #e3f3ea; color: #23774d; font-size: .76rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.link-blue, .link-danger { background: none; border: 0; font: inherit; font-weight: 700; cursor: pointer; color: #2f6fd6; }
.link-danger { color: var(--primary); }
.pf-table-wrap { overflow-x: auto; }
.pf-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.pf-table th { text-align: start; background: #f6f8fb; color: var(--muted); font-weight: 700; padding: 10px 12px; white-space: nowrap; }
.pf-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.st-paid { background: #e3f3ea; color: #23774d; font-size: .78rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.pf-sec { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; border-top: 1px solid var(--line); padding-top: 14px; }
.pf-sec div { display: grid; } .pf-sec b { color: var(--ink); }
.pf-sec.danger b { color: var(--primary-dark); } .pf-sec.danger .btn { border-color: var(--primary); color: var(--primary); }
@media (max-width: 860px) { .pf-layout { grid-template-columns: 1fr; } .pf-nav { position: static; grid-auto-flow: column; overflow-x: auto; } .pf-grid { grid-template-columns: 1fr; } }
.um-list[hidden] { display: none; }
.prog-hero::before { display: none; }
.prog-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .4; max-width: none; }
.pd-owned { display: grid; gap: 4px; text-align: center; justify-items: center; color: var(--text); }
.pd-owned i { font-size: 2rem; color: var(--ok); } .pd-owned b { color: var(--ink); } .pd-owned span { font-size: .88rem; color: var(--muted); }
.pf-nav a { white-space: nowrap; }
@media (max-width: 640px) {
  .pf-body { padding: 18px 16px; }
  .pf-table thead { display: none; }
  .pf-table, .pf-table tbody, .pf-table tr, .pf-table td { display: block; width: 100%; }
  .pf-table tr { border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px; margin-bottom: 12px; }
  .pf-table td { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
  .pf-table td:last-child { border-bottom: 0; }
  .pf-table td[data-l]::before { content: attr(data-l); color: var(--muted); font-weight: 600; }
  .pf-table td.pf-items { display: block; font-weight: 700; color: var(--ink); }
}
/* already bought: the buy button is switched off */
[data-cart].is-owned, [data-cart].is-owned:hover { background: #eef1f5; color: var(--muted); border-color: #eef1f5; cursor: default; box-shadow: none; }
[data-cart].is-owned i { color: var(--ok); }
/* connected to the database */
.cc-pill.new { background: #eaf3ff; color: #2f6fd6; border-color: #d6e6fb; }
.stage-loading { display: grid; place-items: center; min-height: 260px; color: var(--muted); font-size: 1.6rem; }
.db-error { background: #fde8e9; color: var(--primary-dark); text-align: center; padding: 10px 16px; font-weight: 600; }
/* invoice (receipt.html) */
.inv-wrap { max-width: 860px; }
.invoice { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 30px 34px; box-shadow: var(--shadow); }
.inv-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 16px; }
.inv-head .brand img { height: 36px; }
.inv-title { display: flex; align-items: center; gap: 10px; } .inv-title h1 { margin: 0; color: var(--ink); font-size: 1.6rem; }
.st-ref { background: #fff4d6; color: #a46b00; border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; }
.inv-meta { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px 40px; margin: 22px 0; font-size: .93rem; }
.inv-facts { margin: 0; display: grid; gap: 10px; align-content: start; }
.inv-facts div { display: grid; grid-template-columns: 105px 1fr; gap: 10px; align-items: baseline; }
.inv-facts dt { color: var(--muted); } .inv-facts dd { margin: 0; color: var(--text); line-height: 1.6; } .inv-facts b { color: var(--ink); }
.inv-table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.inv-table th { background: #f6f8fb; color: var(--muted); text-align: start; padding: 10px 12px; }
.inv-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.inv-table .num { text-align: left; width: 110px; white-space: nowrap; }
.inv-sum { margin: 14px 0 0 auto; max-width: 320px; margin-inline-start: auto; margin-inline-end: 0; display: grid; gap: 6px; font-size: .95rem; }
.inv-sum div { display: flex; justify-content: space-between; } .inv-sum .ok { color: var(--ok); }
.inv-sum .total { border-top: 2px solid var(--ink); padding-top: 8px; font-weight: 800; color: var(--ink); font-size: 1.08rem; }
.inv-foot { margin-top: 26px; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .85rem; text-align: center; }
@media (max-width: 640px) { .invoice { padding: 20px 16px; } .inv-meta { grid-template-columns: 1fr; } .inv-table .num { width: 64px; } .inv-facts div { grid-template-columns: 92px 1fr; } }
@media print { .topbar, .footer, .no-print, .drawer, .drawer-back { display: none !important; } body { background: #fff; } .invoice { box-shadow: none; border: 0; padding: 0; } }
/* Bunny Stream player (16:9) + the video window for free lessons and the selling video */
.vframe { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0b1220; border-radius: 12px; overflow: hidden; }
.vframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vframe .stage-loading { position: absolute; inset: 0; min-height: 0; color: #9aa6bd; }
.video-win { position: fixed; inset: 0; z-index: 90; background: rgba(8, 12, 24, .75); display: grid; place-items: center; padding: 16px; }
.video-win[hidden] { display: none; }
.video-win-card { width: min(960px, 100%); background: #0b1220; border-radius: 14px; overflow: hidden; }
.video-win-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; color: #fff; }
.video-win-card header button { border: 0; background: none; color: #fff; font-size: 1.2rem; cursor: pointer; }
.video-win-card .vframe { border-radius: 0; }

/* «قيّم الدورة» (learn bar button + window) */
.lb-rate { background: rgba(255, 255, 255, .12); border: 0; color: #fff; border-radius: 6px; padding: 6px 12px; font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.lb-rate:hover { background: rgba(255, 255, 255, .22); } .lb-rate i { color: var(--gold); }
.rate-card { width: min(480px, 100%); background: #fff; border-radius: 14px; padding: 18px 20px 20px; }
.rate-card header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; color: var(--ink); }
.rate-card header button { border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
.rate-stars { display: flex; justify-content: center; gap: 6px; }
.rate-stars button { border: 0; background: none; font-size: 2rem; color: var(--line); cursor: pointer; padding: 2px; }
.rate-stars button.on { color: var(--gold); }
.rate-card textarea { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; resize: vertical; }
.rate-state { background: #e8f1fd; color: #1d4f91; border-radius: 8px; padding: 8px 12px; font-size: .88rem; margin: 0 0 10px; }
.rate-state.ok { background: #e3f3ea; color: #23774d; }
/* lesson page: the video is sized so the lesson title, buttons and the tabs below stay on screen */
.learn-main .stage .vframe { width: min(100%, max(420px, (100vh - 430px) * 16 / 9)); margin-inline: auto; }
@media (max-width: 760px) { .learn-main .stage .vframe { width: 100%; } }

/* «قيّم الدورة» on the course page (for students who own it) */
.rate-cta i { color: var(--gold); }
.btn-block.rate-cta { margin-top: 10px; }
#programs[hidden] { display: none; }
#testimonials[hidden] { display: none; }
