/* دورات من بلو كورنر (Blue Corner courses): /courses pages. Phone first; desktop from 900px.
   Blue Corner identity, scoped to these pages: light background, navy titles/buttons/badges, blue key word,
   sky + gradient accents, the leaf ring cropped in corners (never under text). Logical properties only, so the
   English (left-to-right) pages mirror by themselves. */

/* Fonts, served from the site (no Google Fonts). Manchette Fine: the site's own copy (see /css/brand.css for the
   licence note). Inter 4.1 variable (SIL OFL 1.1): /assets/fonts/PROVENANCE-Inter-4.1.md */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/InterVariable.woff2') format('woff2'); }
@font-face { font-family: 'Manchette Fine'; font-weight: 400; font-display: swap; src: url('/assets/fonts/ManchetteFine-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Manchette Fine'; font-weight: 500; font-display: swap; src: url('/assets/fonts/ManchetteFine-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Manchette Fine'; font-weight: 600; font-display: swap; src: url('/assets/fonts/ManchetteFine-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Manchette Fine'; font-weight: 700; font-display: swap; src: url('/assets/fonts/ManchetteFine-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Manchette Fine'; font-weight: 800; font-display: swap; src: url('/assets/fonts/ManchetteFine-ExtraBold.woff2') format('woff2'); }

:root {
  --bg: #F5FAFE;
  --navy: #1A4375;
  --blue: #3981BD;
  --sky: #50AEE0;
  --line: #DCEDF9;
  --muted: #4D6B8A;
  --white: #FFFFFF;
  --grad: linear-gradient(135deg, #3981BD, #50AEE0);
  --wz: #001A33;          /* the Wazzifni site bar (desktop) */
  --wz-body: #AFC3D6;
  --danger: #B3261E;
  --font: 'Inter', 'Manchette Fine', Tahoma, 'Segoe UI', sans-serif;
  --wrap: 1200px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--navy); font-family: var(--font); font-size: 15px; line-height: 1.55;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }
img, svg { display: block; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.key { color: var(--blue); }
.ltr { direction: ltr; unicode-bidi: isolate; }
main { flex: 1; width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 16px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
html[dir="ltr"] .flip { transform: scaleX(-1); }

/* Leaf ring decoration: always cropped by an overflow:hidden parent, placed in an empty corner */
.ring { position: absolute; pointer-events: none; user-select: none; max-width: none; }
.ring--soft { opacity: 0.18; }

/* ---------- Wazzifni site bar (desktop only) ---------- */
.wz-bar { display: none; background: var(--wz); }
.wz-bar-in { max-width: var(--wrap); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 28px; }
.wz-brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 800; font-size: 18px; }
.wz-brand:hover { color: var(--white); }
.wz-brand img { width: 28px; height: 28px; }
.wz-nav { display: flex; gap: 22px; flex: 1; font-size: 15px; }
.wz-nav a { color: var(--wz-body); }
.wz-nav a:hover, .wz-nav a[aria-current="page"] { color: var(--white); }
.wz-nav a[aria-current="page"] { font-weight: 600; }
.wz-actions { display: flex; align-items: center; gap: 10px; }
.wz-get { background: #0088C7; color: var(--white); padding: 8px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.wz-get:hover { color: var(--white); background: #00A0DB; }
.lang-toggle { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.18); background: transparent; color: var(--white); font-size: 14px; }
.lang-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.lang-toggle .lt-to-ar { font-family: 'Manchette Fine', sans-serif; }
html[lang="en"] .lang-toggle .lt-to-en, html:not([lang="en"]) .lang-toggle .lt-to-ar { display: none; }

/* ---------- Blue Corner bar (every size) ---------- */
.bc-bar { background: var(--white); border-bottom: 1px solid var(--line); }
.bc-bar-in { max-width: var(--wrap); margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; min-height: 64px; }
.bc-bar-title { flex: 1; min-width: 0; }
.bc-bar-title .lbl { font-size: 12.5px; color: var(--muted); line-height: 1.3; }
.bc-bar-title .ttl { font-weight: 800; font-size: 16px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-bar-title .slogan { font-size: 15px; font-weight: 600; }
.bc-bar-title .crumbs { font-size: 14px; color: var(--muted); }
.bc-bar-title .crumbs a { color: var(--blue); }
.sq-btn { width: 44px; height: 44px; flex: none; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.sq-btn:hover { color: var(--navy); border-color: var(--blue); }
.bc-id { display: flex; align-items: center; gap: 8px; color: var(--navy); direction: ltr; flex: none; }
.bc-id:hover { color: var(--navy); }
.bc-id img { width: 34px; height: 34px; }
.bc-id b { display: block; font-weight: 800; font-size: 15px; line-height: 1.2; }
.bc-id small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.desk-only { display: none; }

/* Phone menu sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 26, 51, 0.45); z-index: 40; }
.sheet { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(320px, 86vw); background: var(--white); z-index: 41; padding: 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 0 40px rgba(0, 26, 51, 0.25); overflow-y: auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head b { font-size: 17px; }
.sheet a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 12px; color: var(--navy); font-weight: 600; }
.sheet a:hover, .sheet a[aria-current="page"] { background: var(--bg); }
.sheet .lang-toggle { margin-top: 8px; height: 46px; justify-content: center; color: var(--navy); border-color: var(--line); }
.sheet .wz-get { margin-top: 4px; justify-content: center; color: var(--white); min-height: 46px; }

/* ---------- Shared pieces ---------- */
.badge { display: inline-block; background: var(--navy); color: var(--white); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; line-height: 1.5; }
.badge--light { background: var(--white); color: var(--navy); font-weight: 700; }
.badge--line { background: var(--white); color: var(--navy); border: 1px solid var(--line); font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border: 0; border-radius: 14px; background: var(--navy); color: var(--white); font-size: 16px; font-weight: 700; text-align: center; }
.btn:hover { color: var(--white); background: #143761; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn--block { width: 100%; }
.btn--ghost { background: var(--white); color: var(--navy); border: 1px solid var(--line); font-weight: 600; min-height: 46px; }
.btn--ghost:hover { background: var(--white); color: var(--navy); border-color: var(--blue); }
.btn--outline { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn--outline:hover { background: var(--white); color: var(--navy); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.num { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 800; }
.lead { margin: 0; color: var(--muted); font-size: 14px; }
.note { margin: 0; font-size: 12.5px; color: var(--muted); }
.alert { border-radius: 12px; padding: 10px 14px; font-size: 14px; background: #FDECEA; color: var(--danger); border: 1px solid #F5C2BE; }
.info-box { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px; font-size: 13.5px; color: var(--muted); }
.state { text-align: center; padding: 40px 16px; color: var(--muted); }
.state b { display: block; color: var(--navy); font-size: 18px; margin-bottom: 4px; }
.state .btn { margin-top: 14px; }
.spinner { width: 28px; height: 28px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--blue); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* ---------- List page ---------- */
.hero { position: relative; overflow: hidden; }
.hero .ring { width: 260px; height: 260px; inset-inline-end: -120px; top: -40px; }
.hero-in { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 22px 16px 20px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hero-copy { flex: 999 1 520px; min-width: 0; padding-inline-end: 110px; }
.hero-slogan { font-size: 13px; font-weight: 600; }
.hero h1 { margin: 10px 0 8px; font-size: 36px; line-height: 1.15; font-weight: 800; }
.hero p { margin: 0; font-size: 15px; color: var(--muted); }
.hero-pill { display: none; }
.hero-stats { display: none; }

.filters { display: flex; flex-direction: column; gap: 10px; }
.search { position: relative; display: block; }
.fld { height: 46px; width: 100%; border-radius: 12px; border: 1px solid var(--line); background: var(--white); color: var(--navy); padding: 0 14px; font-size: 15px; }
.fld::placeholder { color: var(--muted); opacity: 1; }
.fld:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(80, 174, 224, 0.25); }
.fld[aria-invalid="true"] { border-color: var(--danger); }
select.fld { appearance: none; -webkit-appearance: none; padding-inline-end: 36px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234D6B8A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left 12px center / 16px 16px; }
html[dir="ltr"] select.fld { background-position: right 12px center; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--navy); font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); font-weight: 600; }
.list-head { display: none; }
.courses { list-style: none; margin: 0; padding: 14px 0 24px; display: grid; gap: 14px; }
.c-card { display: flex; flex-direction: column; height: 100%; background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: var(--navy); }
.c-card:hover { color: var(--navy); border-color: #B9D9F0; box-shadow: 0 10px 24px -16px rgba(26, 67, 117, 0.45); }
.c-top { height: 92px; position: relative; overflow: hidden; background: var(--grad) center / cover no-repeat; }
.c-top .ring { width: 170px; height: 170px; inset-inline-end: -50px; bottom: -90px; }
.c-top .badge { position: absolute; top: 12px; inset-inline-start: 12px; }
.c-top .badge--light { top: auto; bottom: 12px; }
.c-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.c-title { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.35; }
.c-trainer { display: none; font-size: 14px; color: var(--muted); }
.c-meta { font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.c-meta span + span::before { content: " · "; }
.c-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.c-price { font-weight: 800; }
.c-seats { font-size: 12.5px; color: var(--muted); }
.c-seats.is-full { color: var(--navy); font-weight: 700; }
.bar { margin-top: 8px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); width: 0; }
.bar.is-full, .bar.is-full i { background: var(--navy); }
.c-cta { display: none; }

/* Footer */
.bc-foot { background: var(--navy); color: var(--white); }
.bc-foot-in { max-width: var(--wrap); margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.bc-foot .bc-id { color: var(--white); }
.bc-foot .bc-id small { color: var(--line); }
.bc-foot-text { color: var(--line); display: flex; flex-direction: column; gap: 2px; }
.bc-foot-text a { color: var(--white); font-weight: 600; align-self: flex-start; }
.bc-foot-text a:hover { color: var(--line); }

/* ---------- Course page ---------- */
.c-hero { position: relative; overflow: hidden; height: 180px; background: var(--grad) center / cover no-repeat; }
.c-hero .ring { width: 300px; height: 300px; inset-inline-end: -110px; bottom: -150px; }
.c-hero .badge { position: absolute; bottom: 14px; inset-inline-start: 16px; font-size: 12.5px; padding: 4px 12px; }
.c-hero .share-sq { position: absolute; top: 12px; inset-inline-end: 16px; border: 0; }
.course-layout { padding: 18px 16px 24px; display: flex; flex-direction: column; gap: 18px; max-width: var(--wrap); margin: 0 auto; }
.course-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.c-badges { display: none; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.course-main h1 { margin: 0 0 6px; font-size: 30px; line-height: 1.2; font-weight: 800; }
.c-desc { margin: 0; font-size: 14px; color: var(--muted); white-space: pre-line; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: 13px; }
.fact { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.fact .k { color: var(--muted); }
.fact .v { font-weight: 700; }
.fact .s { color: var(--muted); font-size: 13px; }
.sec-title { margin: 0 0 10px; font-size: 20px; font-weight: 800; }
.topics { margin: 0; padding: 14px; list-style: none; display: flex; flex-direction: column; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.topics li { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.trainer { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; gap: 12px; align-items: center; }
.avatar { width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--grad); display: flex; align-items: center; justify-content: center; color: var(--white); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .ic { width: 24px; height: 24px; stroke-width: 1.8; }
.trainer .k { font-size: 12.5px; color: var(--muted); }
.trainer .v { font-weight: 800; }
.trainer .s { font-size: 14px; color: var(--muted); }
.share { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--white); color: var(--navy); border-radius: 12px; padding: 10px 16px; font-weight: 600; }
.share:hover { color: var(--navy); border-color: var(--blue); }

.reg { background: var(--white); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.reg-head { position: relative; overflow: hidden; background: var(--navy); color: var(--white); padding: 20px 24px; }
.reg-head .ring { width: 170px; height: 170px; inset-inline-end: -70px; top: -70px; }
.reg-price { position: relative; font-size: 26px; font-weight: 800; }
.reg-seats { position: relative; font-size: 14px; color: var(--line); }
.reg-head .bar { position: relative; margin-top: 10px; height: 6px; background: rgba(255, 255, 255, 0.2); max-width: calc(100% - 90px); }
.reg-head .bar i { background: var(--sky); }
.reg-body { padding: 20px 16px; }

/* Registration form / OTP / done (inside .reg on desktop; a full screen on phones) */
.form { display: flex; flex-direction: column; gap: 12px; }
.form h2, .step h2 { margin: 0; font-size: 22px; font-weight: 800; }
.lbl { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.lbl .fld { color: var(--navy); }
.fld.ltr-in { direction: ltr; text-align: end; }
html[dir="ltr"] .fld.ltr-in { text-align: start; }
.err { font-size: 12.5px; color: var(--danger); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: 13px; color: var(--muted); padding: 0; margin-bottom: 5px; }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 4px 6px; border: 1px solid var(--line); background: var(--white); border-radius: 12px; font-size: 13.5px; color: var(--navy); text-align: center; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label:has(input:checked) { background: var(--navy); border-color: var(--navy); color: var(--white); }
.seg label:has(input:focus-visible) { outline: 3px solid var(--sky); outline-offset: 2px; }
.seg label.is-on { background: var(--navy); border-color: var(--navy); color: var(--white); }
.ts { min-height: 65px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--blue); border-radius: 12px; font-size: 12.5px; color: var(--muted); padding: 2px; }
.ts.is-ready { border-color: transparent; }
.otp-in { text-align: center; letter-spacing: 0.4em; font-size: 22px; height: 56px; direction: ltr; }

.done { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 48px 20px 28px; }
.done > :not(.ring) { position: relative; }
.done .ring { width: 240px; height: 240px; inset-inline-end: -130px; top: -130px; }
.done .logo { width: 84px; height: 84px; }
.done h2 { margin: 8px 0 0; font-size: 32px; font-weight: 800; }
.done .k { font-size: 13px; color: var(--muted); }
.bc-num { direction: ltr; font-size: 26px; font-weight: 800; letter-spacing: 0.08em; border: 1px solid var(--line); background: var(--white); border-radius: 12px; padding: 4px 18px; }
.done p { margin: 0; color: var(--muted); max-width: 320px; }
.steps { margin: 4px 0 0; padding: 14px; list-style: none; width: 100%; background: var(--white); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 10px; text-align: start; font-size: 14px; }
.steps li { display: flex; gap: 10px; align-items: center; }
.steps .num { width: 26px; height: 26px; font-size: 12.5px; }
.done .btn { width: 100%; margin-top: 8px; }
.done .mail { direction: ltr; font-size: 13.5px; }

/* Phone: the course page has a fixed bottom bar; registering is its own screen */
.buybar { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; background: var(--white); border-top: 1px solid var(--line); padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; }
.buybar .p { flex: 1; min-width: 0; }
.buybar .p b { display: block; font-size: 18px; font-weight: 800; }
.buybar .p span { font-size: 12.5px; color: var(--muted); }
.buybar .btn { min-height: 48px; padding: 0 26px; border-radius: 12px; }
/* the fixed bar must never cover the end of the page (footer): the space is on body, after the footer */
body[data-page="course"][data-step="info"] { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
body[data-page="course"]:not([data-step="info"]) .buybar,
body[data-page="course"]:not([data-step="info"]) .c-hero,
body[data-page="course"]:not([data-step="info"]) .course-main { display: none; }
body[data-page="course"][data-step="info"] .reg { display: none; }
body[data-page="course"]:not([data-step="info"]) .reg { border: 0; border-radius: 0; background: transparent; }
body[data-page="course"]:not([data-step="info"]) .reg-head { display: none; }
body[data-page="course"]:not([data-step="info"]) .course-layout { padding: 0; }
body[data-page="course"]:not([data-step="info"]) .reg-body { padding: 16px; }
body[data-page="course"][data-step="otp"] .reg-body { padding: 28px 16px; }
body[data-page="course"][data-step="done"] .reg-body { padding: 0; }
.bc-bar .when-step { display: none; }
body[data-page="course"]:not([data-step="info"]) .bc-bar .when-step { display: flex; }
body[data-page="course"]:not([data-step="info"]) .bc-bar .when-info { display: none; }
.step { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Redeem ---------- */
.page { padding: 22px 16px 28px; display: flex; flex-direction: column; gap: 16px; max-width: 560px; margin: 0 auto; }
.tabs { display: flex; gap: 6px; background: var(--line); padding: 4px; border-radius: 12px; }
.tab { flex: 1; height: 44px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.tab[aria-selected="true"] { background: var(--white); color: var(--navy); }
.scan { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.viewfinder { position: relative; width: 100%; height: 300px; border-radius: 20px; overflow: hidden; background: var(--navy); display: flex; align-items: center; justify-content: center; }
.viewfinder video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viewfinder .ring { width: 220px; height: 220px; inset-inline-end: -80px; bottom: -90px; }
.frame { position: relative; width: 200px; height: 200px; }
.corner { position: absolute; width: 36px; height: 36px; border-color: var(--white); border-style: solid; }
.corner.tr { top: 0; right: 0; border-width: 4px 4px 0 0; border-radius: 0 14px 0 0; }
.corner.tl { top: 0; left: 0; border-width: 4px 0 0 4px; border-radius: 14px 0 0 0; }
.corner.br { bottom: 0; right: 0; border-width: 0 4px 4px 0; border-radius: 0 0 14px 0; }
.corner.bl { bottom: 0; left: 0; border-width: 0 0 4px 4px; border-radius: 0 0 0 14px; }
.scanline { position: absolute; top: 50%; inset-inline: 12px; height: 2px; background: var(--sky); }
.cam-start { position: absolute; z-index: 2; background: var(--white); color: var(--navy); }
.cam-start:hover { background: var(--white); color: var(--navy); }
.scan-hint { font-size: 13.5px; color: var(--muted); text-align: center; }
.code-in { height: 56px; font-size: 20px; font-weight: 700; letter-spacing: 0.08em; text-align: center; direction: ltr; text-transform: uppercase; }
.code-in::placeholder { letter-spacing: 0.08em; font-weight: 600; }

/* ---------- Ticket ---------- */
.ok-line { display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 14px; }
.ok-dot { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--navy); color: var(--white); display: flex; align-items: center; justify-content: center; }
.ok-dot .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.ok-line.is-warn .ok-dot { background: var(--danger); }
.ticket { background: var(--white); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.t-head { position: relative; overflow: hidden; background: var(--grad); color: var(--white); padding: 18px 18px 20px; padding-inline-end: 104px; }
.t-head .ring { width: 170px; height: 170px; inset-inline-end: -62px; top: -62px; }
.t-head .badge { position: relative; }
.t-title { position: relative; margin-top: 10px; font-size: 24px; line-height: 1.25; font-weight: 800; }
.t-grid { padding: 16px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.t-grid .wide { grid-column: span 2; }
.t-grid .k { font-size: 12.5px; color: var(--muted); }
.t-grid .v { font-weight: 700; font-size: 15px; }
.t-grid .v.ltr { text-align: start; }
html[dir="rtl"] .t-grid .v.ltr { text-align: right; }
.perf { position: relative; height: 24px; }
.perf::before { content: ""; position: absolute; top: 11px; inset-inline: 18px; border-top: 2px dashed var(--line); }
.perf i { position: absolute; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.perf i:first-child { right: -13px; }
.perf i:last-child { left: -13px; }
.t-qr { padding: 10px 18px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.t-qr canvas { width: 180px; height: 180px; image-rendering: pixelated; }
.t-qr b { font-weight: 700; }
.t-qr span { font-size: 13px; color: var(--muted); text-align: center; }
.t-actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- My tickets ---------- */
.tlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.titem { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--navy); }
.titem:hover { color: var(--navy); border-color: var(--blue); }
.titem .tx { flex: 1; min-width: 0; }
.titem .tx b { display: block; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.titem .tx span { font-size: 13px; color: var(--muted); }
.titem .mini { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--grad); display: flex; align-items: center; justify-content: center; color: var(--white); }
.recover { display: flex; flex-direction: column; gap: 12px; }
.recover h2 { margin: 0; font-size: 20px; font-weight: 800; }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  body { font-size: 16px; line-height: 1.6; }
  .wz-bar { display: block; }
  .bc-bar .phone-only { display: none !important; }
  .desk-only { display: block; }
  .bc-id.desk-only { display: flex; }
  .bc-bar-in { padding: 14px 24px; }
  .bc-id img { width: 40px; height: 40px; }
  .bc-id b { font-size: 17px; }
  .bc-id small { font-size: 13px; }
  .wrap { padding-inline: 24px; }

  .hero .ring { width: 560px; height: 560px; inset-inline-end: -200px; top: auto; bottom: -260px; }
  .hero-in { padding: 56px 24px 64px; }
  .hero-copy { padding-inline-end: 0; }
  .hero-slogan { display: none; }
  .hero-pill { display: inline-block; font-size: 14px; padding: 6px 16px; }
  .hero h1 { margin: 18px 0 14px; font-size: 64px; line-height: 1.1; }
  .hero p { max-width: 540px; font-size: 19px; }
  .hero-stats { display: flex; flex: 1 1 320px; position: relative; overflow: hidden; background: var(--navy); border-radius: 20px; padding: 24px; color: var(--white); flex-direction: column; gap: 16px; }
  .hero-stats .ring { width: 150px; height: 150px; inset-inline-end: -80px; bottom: -80px; top: auto; }
  .hero-stats .two { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hero-stats .n { font-size: 34px; font-weight: 800; line-height: 1.3; }
  .hero-stats .l { font-size: 14px; color: var(--line); }
  .hero-stats .where { position: relative; border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 14px; font-size: 15px; max-width: 220px; margin-inline-end: 60px; }

  .filters { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 20px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; }
  .filters .search { flex: 1 1 260px; }
  .filters .fld { background: var(--bg); border-radius: 10px; }
  .filters .chips { flex: 2 1 420px; flex-wrap: wrap; overflow: visible; padding: 0; }
  .chip { height: 46px; border-radius: 10px; font-size: 15px; }
  .list-head { display: flex; justify-content: space-between; align-items: center; margin: 32px 0 16px; flex-wrap: wrap; gap: 8px; }
  .list-head h2 { margin: 0; font-size: 28px; font-weight: 800; }
  .list-head > span { font-size: 14px; color: var(--muted); }
  .courses { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 20px; padding: 0 0 72px; }
  .c-top { height: 140px; }
  .c-top .ring { width: 240px; height: 240px; inset-inline-end: -70px; bottom: -120px; }
  .c-top .badge { top: 14px; inset-inline-start: 14px; font-size: 13px; padding: 4px 12px; }
  .c-top .badge--light { top: auto; bottom: 14px; }
  .c-body { padding: 18px 20px 20px; gap: 10px; }
  .c-title { font-size: 21px; }
  .c-trainer { display: block; }
  .c-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
  .c-meta span { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 3px 10px; color: var(--navy); }
  .c-meta span + span::before { content: none; }
  .c-row { margin-top: 4px; align-items: baseline; }
  .c-price { font-size: 19px; }
  .c-seats { font-size: 13px; }
  .bar { margin-top: 0; height: 6px; }
  .c-cta { display: block; margin-top: auto; padding-top: 8px; }
  .c-cta span { display: block; text-align: center; background: var(--navy); color: var(--white); border-radius: 12px; padding: 12px; font-weight: 600; }
  .c-cta.is-full span { background: transparent; border: 1.5px solid var(--navy); color: var(--navy); padding: 11px; }

  .bc-foot-in { padding: 28px 24px; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
  .bc-foot .bc-id img { width: 36px; height: 36px; }

  /* course page: two columns, the form always visible beside the details */
  .c-hero, .buybar { display: none !important; }
  body[data-page="course"][data-step] main { padding-bottom: 0; }
  body[data-page="course"][data-step="info"] { padding-bottom: 0; } /* no fixed bar on desktop */
  body[data-page="course"][data-step] .course-main { display: flex; }
  body[data-page="course"][data-step] .reg { display: block; border: 1px solid var(--line); border-radius: 20px; background: var(--white); }
  body[data-page="course"][data-step] .reg-head { display: block; }
  body[data-page="course"][data-step] .course-layout { padding: 36px 24px 72px; }
  body[data-page="course"][data-step] .reg-body { padding: 24px; }
  body[data-page="course"][data-step="done"] .reg-body { padding: 0; }
  .bc-bar .when-step, .bc-bar .when-info { display: none !important; }
  .course-layout { flex-direction: row; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
  .course-main { flex: 999 1 560px; gap: 28px; }
  .reg { flex: 1 1 380px; min-width: 0; position: sticky; top: 16px; }
  .c-badges { display: flex; }
  .course-main h1 { margin: 0 0 12px; font-size: 52px; line-height: 1.15; }
  .c-desc { font-size: 18px; max-width: 640px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; font-size: 13px; }
  .fact { border-radius: 14px; padding: 16px; }
  .fact .v { font-size: 16px; }
  .fact .s { font-size: 14px; }
  .sec-title { font-size: 26px; margin-bottom: 14px; }
  .topics { background: transparent; border: 0; padding: 0; }
  .topics li { font-size: 16px; }
  .trainer { border-radius: 16px; padding: 20px; gap: 18px; }
  .avatar { width: 72px; height: 72px; }
  .avatar .ic { width: 32px; height: 32px; }
  .trainer .v { font-size: 19px; }
  .trainer .s { font-size: 15px; }
  .reg-price { font-size: 28px; }
  .done { padding: 32px 24px 24px; }
  .done .logo { width: 72px; height: 72px; }
  .done h2 { font-size: 26px; }
  .page { padding: 40px 24px 64px; }
  .h1 { font-size: 36px; }
}
@media (min-width: 1200px) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Saving the ticket as an image happens on a canvas; printing shows the ticket only */
@media print {
  .wz-bar, .bc-bar, .bc-foot, .t-actions, .ok-line { display: none !important; }
  body { background: #FFFFFF; }
}

/* Small helpers */
.mt { margin-top: 6px; }
.recover.card { padding: 16px; }
.wz-nav-link { color: var(--wz-body); font-size: 14px; padding: 0 6px; }
.wz-nav-link:hover, .wz-nav-link[aria-current="page"] { color: var(--white); }
.desk-text { display: none; }
@media (min-width: 900px) {
  .phone-text { display: none; }
  .desk-text { display: block; }
}

/* ---------- rc18 (owner 2026-11-28) ---------- */
/* In-page registration block (phones): right after the course facts, always reachable (also in the app's WebView). */
.inreg { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.inreg-p { flex: 1; min-width: 0; }
.inreg-p b { display: block; font-size: 18px; font-weight: 800; color: var(--navy); }
.inreg-p span { font-size: 12.5px; color: var(--muted); }
.inreg-p .bar { max-width: 220px; }
.inreg .btn { min-height: 48px; padding: 0 22px; border-radius: 12px; white-space: nowrap; }
@media (min-width: 900px) { .inreg { display: none !important; } } /* desktop: the form is beside the details */

/* The Wazzifni app's WebView sits under the app's own bottom tab bar: keep the fixed bar and every page's end above it. */
html.in-app .buybar { bottom: calc(100px + env(safe-area-inset-bottom)); border-bottom: 1px solid var(--line); }
html.in-app body { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
html.in-app body[data-page="course"][data-step="info"] { padding-bottom: calc(196px + env(safe-area-inset-bottom)); }

/* Paid course done screen: ask for the code on WhatsApp */
.done .lead-step { font-weight: 700; color: var(--navy); }
.done .muted { margin: 0; font-size: 13px; color: var(--muted); }
.wa-preview { width: 100%; text-align: start; background: #F2FBF5; border: 1px solid #CDEBD7; border-radius: 14px; padding: 12px 14px; }
.wa-preview .k { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.wa-msg { margin: 0; font-size: 14px; line-height: 1.7; color: #14301E; overflow-wrap: anywhere; }
.btn--wa { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: #1A4375; color: #FFFFFF; }
.btn--wa .ic { width: 20px; height: 20px; }
.done .btn--ghost { width: 100%; }
.wa-fallback { text-align: center; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }

/* ---------- rc19: the catalog (owner 2026-11-28) ---------- */
/* Search: our own clear button (the browser's own one is hidden, so there is one on every engine) */
.search .fld { padding-inline-end: 46px; }
.search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.q-clear { position: absolute; top: 50%; inset-inline-end: 4px; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.q-clear:hover { color: var(--navy); background: var(--bg); }
/* «عرض المزيد»: the next page is appended under the cards */
.more-count { margin: 0 0 10px; text-align: center; font-size: 13px; color: var(--muted); }
.more-count:empty { display: none; }
.more { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 0 28px; }
.more .btn { min-width: 220px; }
/* Cards by state. Coming soon: the line in blue. Closed / ended: dimmed + a light red tint, a solid red badge in the middle
   (#C62828 with white text: contrast 5.6:1, WCAG AA), still a link to the course. */
.c-card { position: relative; }
.c-soon { color: var(--blue); font-weight: 600; }
.c-card.is-dim { background: #FFF5F5; border-color: #F2D4D4; }
.c-card.is-dim > .c-top, .c-card.is-dim > .c-body { opacity: 0.5; }
.c-card.is-dim::after { content: ""; position: absolute; inset: 0; background: rgba(198, 40, 40, 0.06); pointer-events: none; }
.c-state { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; background: #C62828; color: #FFFFFF; font-size: 15px; font-weight: 800; line-height: 1.4; padding: 6px 20px; border-radius: 999px; box-shadow: 0 6px 18px -8px rgba(120, 20, 20, 0.6); white-space: nowrap; }
/* Course page: the catalog code (small), the closed / ended banner */
.c-code { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 4px; }
html[dir="rtl"] .c-code { text-align: right; }
.state-banner { border-radius: 14px; padding: 12px 16px; background: #FDECEC; border: 1px solid #F2C4C4; color: #8E1B1B; font-weight: 800; font-size: 16px; }
body[data-page="course"][data-reg="none"][data-step] { padding-bottom: 0; }
html.in-app body[data-page="course"][data-reg="none"][data-step] { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
