/* =====================================================================
   STEP English — theme (navy · blue · teal + the 12 step colours)
   ===================================================================== */
:root {
  --navy: #10243f; --navy2: #1F3A6E; --blue: #1E88E5; --teal: #22C1C3; --teal2: #1C8C93; --gold: #c9a227;
  --bg: #f4f6fb; --ink: #1f2937; --muted: #6b7280; --line: #e5e7eb;
  --rainbow: linear-gradient(90deg, #1E88E5, #1FB0D6, #22C1C3, #26C6A6, #4CB847, #9BC53D, #F2C12E, #F4A42A, #F26A2B);
}
body { font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; color: var(--ink); background: var(--bg); }
body.lang-ar { font-family: 'Cairo', 'Inter', 'Segoe UI', sans-serif; }
a { color: var(--blue); }
h1, h2, h3, h4, h5, h6 { color: inherit; }
.feature h5, .how-step h5 { color: var(--navy); }
.btn-cta { background: linear-gradient(90deg, #F5862A, #F26A2B); color: #fff; font-weight: 700; border: none; }
.btn-cta:hover { color: #fff; filter: brightness(1.08); }
.btn-step { background: var(--blue); color: #fff; font-weight: 600; }
.btn-step:hover { background: #1672c4; color: #fff; }
.step-rainbow { height: 5px; background: var(--rainbow); }

/* ---------- logo ---------- */
.step-logo { direction: ltr; display: inline-flex; align-items: center; gap: 8px; color: var(--navy); text-decoration: none; line-height: 1; }
.step-logo.light { color: #fff; }
.step-mark { width: 30px; height: 26px; }
.step-word { font-weight: 900; font-size: 1.45rem; letter-spacing: 1.5px; font-family: 'Inter', sans-serif; }
.step-word i { color: var(--teal); font-style: normal; }
.step-sub { font-size: .62rem; letter-spacing: 3px; opacity: .75; font-weight: 700; align-self: flex-end; margin-bottom: 3px; }

/* ---------- public site ---------- */
.promo-bar { background: var(--navy); color: #fde68a; text-align: center; font-size: .9rem; padding: 7px 10px; }
.promo-bar a { color: #fff; font-weight: 700; margin-inline-start: 8px; }
.site-nav { background: linear-gradient(90deg, var(--navy), #163866); padding: 10px 0; }
.site-nav .nav-link { color: rgba(255,255,255,.85); font-weight: 600; margin: 0 6px; }
.site-nav .nav-link.active, .site-nav .nav-link:hover { color: #fff; }
.site-nav .nav-link.active { box-shadow: inset 0 -3px 0 var(--teal); }
.hero { background: radial-gradient(1200px 500px at 85% 20%, rgba(34,193,195,.35), transparent 60%), linear-gradient(135deg, var(--navy) 0%, #183f78 55%, #1E88E5 100%); color: #fff; padding: 80px 0 110px; position: relative; overflow: hidden; }
.hero h1 { font-weight: 900; font-size: clamp(2rem, 4.2vw, 3.3rem); line-height: 1.12; }
.hero p.lead { opacity: .9; max-width: 560px; }
.hero .stairs { position: absolute; inset-inline-end: -40px; bottom: -10px; width: min(560px, 55vw); opacity: .95; }
[dir=rtl] .hero .stairs { transform: scaleX(-1); }
.hero-badges span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 30px; padding: 6px 14px; font-size: .85rem; display: inline-flex; gap: 6px; align-items: center; }
.countdown { display: inline-flex; gap: 8px; }
.countdown b { background: rgba(255,255,255,.14); border-radius: 8px; padding: 8px 10px; min-width: 54px; text-align: center; font-size: 1.3rem; display: block; }
.countdown small { display: block; font-size: .65rem; opacity: .8; text-align: center; }
.section { padding: 70px 0; }
.section-title { font-weight: 800; color: var(--navy); }
.section-kicker { color: var(--teal2); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
.feature { background: #fff; border-radius: 16px; padding: 26px; height: 100%; box-shadow: 0 6px 24px rgba(16,36,63,.06); }
.feature i { font-size: 1.6rem; color: #fff; width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; background: var(--c, var(--blue)); }
.level-card { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 8px 26px rgba(16,36,63,.08); height: 100%; display: flex; flex-direction: column; transition: transform .15s; }
.level-card:hover { transform: translateY(-4px); }
.level-card .top { background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #10243f)); color: #fff; padding: 22px; position: relative; min-height: 150px; }
.level-card .code { font-size: 2.3rem; font-weight: 900; line-height: 1; direction: ltr; display: inline-block; }
.level-card .cefr { position: absolute; top: 16px; inset-inline-end: 16px; background: rgba(255,255,255,.2); border-radius: 20px; padding: 3px 10px; font-size: .75rem; font-weight: 700; }
.level-card .disc { position: absolute; bottom: 14px; inset-inline-end: 16px; background: #fde68a; color: #7c2d12; border-radius: 20px; padding: 3px 10px; font-size: .75rem; font-weight: 800; }
.level-card .body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.level-card .meta { display: flex; gap: 14px; color: var(--muted); font-size: .85rem; flex-wrap: wrap; }
.price { font-weight: 900; font-size: 1.5rem; color: var(--navy); }
.price del { color: #9ca3af; font-size: 1rem; font-weight: 500; margin-inline-start: 6px; }
.band-tabs .btn { border-radius: 30px; }
.how-step { text-align: center; }
.how-step .num { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; font-weight: 900; font-size: 1.3rem; color: #fff; background: var(--c); }
.cta-band { background: linear-gradient(120deg, var(--navy), var(--teal2)); color: #fff; border-radius: 22px; padding: 40px; }
.site-footer { background: var(--navy); color: #e5e7eb; }
.site-footer a { color: #cbd5e1; text-decoration: none; } .site-footer a:hover { color: #fff; }
.site-footer h6 { color: #fff; font-weight: 700; margin-bottom: 12px; }
.site-footer .soc { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.page-head { background: linear-gradient(135deg, var(--navy), #1E88E5); color: #fff; padding: 46px 0; }
.page-head h1 { font-weight: 900; }
.faq .accordion-button { font-weight: 600; }
.ladder-mini { display: flex; gap: 4px; align-items: flex-end; height: 64px; direction: ltr; }
.ladder-mini span { flex: 1; border-radius: 4px 4px 0 0; }

/* ---------- auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { background: radial-gradient(800px 400px at 80% 10%, rgba(34,193,195,.35), transparent 60%), linear-gradient(150deg, var(--navy), #1E88E5); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art .stairs { width: 100%; max-width: 520px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px 18px; background: #fff; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .nav-pills .nav-link { border-radius: 30px; font-weight: 600; color: var(--navy); }
.auth-card .nav-pills .nav-link.active { background: var(--navy); color: #fff; }
.otp-input { letter-spacing: .6em; font-size: 1.6rem; text-align: center; font-weight: 800; direction: ltr; }
.gender-pick input { display: none; }
.gender-pick label { border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; flex: 1; text-align: center; font-weight: 600; }
.gender-pick input:checked + label { border-color: var(--blue); background: #eaf3fd; color: var(--blue); }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- portal ---------- */
.portal-wrap { display: flex; min-height: 100vh; }
.portal-side { width: 250px; flex: none; background: linear-gradient(180deg, var(--navy) 0%, #163866 60%, #1b4f8f 100%); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 1030; }
.side-top { padding: 20px 18px 12px; border-bottom: 1px solid rgba(255,255,255,.1); }
.side-top a { text-decoration: none; }
.side-role { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; opacity: .65; margin-top: 8px; }
.portal-side .nav-link { color: rgba(255,255,255,.82); padding: 10px 20px; font-size: .93rem; border-inline-start: 3px solid transparent; }
.portal-side .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.portal-side .nav-link.active { background: rgba(255,255,255,.12); color: #fff; border-inline-start-color: var(--teal); font-weight: 600; }
.portal-side .nav-link i { opacity: .85; margin-inline-end: 6px; }
.side-bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding: 6px 0 12px; }
.portal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.portal-top { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 24px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 1020; }
.portal-body { padding: 24px; }
@media (max-width: 991px) { .portal-side { position: fixed; inset-inline-start: -260px; transition: inset-inline-start .2s; } .portal-side.open { inset-inline-start: 0; box-shadow: 0 0 40px rgba(0,0,0,.4); } .portal-body { padding: 16px; } }
.card { border: none; border-radius: 14px; box-shadow: 0 4px 16px rgba(16,36,63,.06); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); font-weight: 700; border-radius: 14px 14px 0 0 !important; }
.stat-card { background: #fff; border-radius: 14px; padding: 18px; display: flex; gap: 14px; align-items: center; box-shadow: 0 4px 16px rgba(16,36,63,.06); border-inline-start: 5px solid var(--c); color: var(--ink); height: 100%; }
.stat-card i { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); font-size: 1.2rem; }
.stat-card .v { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.stat-card .l { color: var(--muted); font-size: .85rem; }
.lv-pill { display: inline-block; background: var(--c); color: #fff; font-weight: 800; border-radius: 8px; padding: 2px 9px; font-size: .85rem; }
.empty-state { text-align: center; padding: 40px 10px; color: var(--muted); }
.empty-state i { font-size: 2.6rem; opacity: .35; margin-bottom: 10px; }
.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafc; }
.welcome { background: linear-gradient(120deg, var(--navy), #1E88E5 70%, var(--teal)); color: #fff; border-radius: 16px; padding: 24px 26px; position: relative; overflow: hidden; }
.welcome .ladder-mini span { background: rgba(255,255,255,.25); } .welcome .ladder-mini span.on { background: #fde68a; box-shadow: 0 0 10px #fde68a; } .welcome .ladder-mini span.done { background: rgba(255,255,255,.7); }
.progress { border-radius: 10px; }
.form-label { font-weight: 600; font-size: .9rem; }
.settings-nav .nav-link { color: var(--ink); border-radius: 10px; }
.settings-nav .nav-link.active { background: var(--navy); color: #fff; }
.help-card h5 { color: var(--navy); font-weight: 800; }
.kbd-step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; font-size: .8rem; margin-inline-end: 8px; }

/* ---------- study plans ---------- */
.plan-card { position: relative; border: 2px solid transparent; transition: transform .15s; }
.plan-card:hover { transform: translateY(-3px); }
.plan-best { border-color: var(--teal); box-shadow: 0 14px 40px rgba(34,193,195,.25); }
.plan-ribbon { position: absolute; top: -14px; inset-inline-start: 50%; transform: translateX(-50%); background: linear-gradient(90deg, #F5862A, #F26A2B); color: #fff; font-weight: 800; font-size: .8rem; padding: 5px 16px; border-radius: 20px; white-space: nowrap; box-shadow: 0 4px 12px rgba(242,106,43,.4); }
[dir=rtl] .plan-ribbon { transform: translateX(50%); }
.plan-icon { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: var(--c); }
/* ---------- textbook ---------- */
.book-card { flex-wrap: wrap; display: flex; gap: 22px; align-items: center; background: linear-gradient(120deg, var(--navy), #1b4f8f 60%, var(--teal2)); color: #e5e7eb; border-radius: 16px; padding: 22px 24px; margin-bottom: 20px; }
.book-card li { margin-bottom: 3px; }
.book-ill .bk { width: 92px; height: 120px; border-radius: 4px 10px 10px 4px; background: linear-gradient(160deg, #fff, #e8eef7); box-shadow: 6px 8px 0 rgba(0,0,0,.25), inset 6px 0 0 #1E88E5; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; color: var(--navy); }
.book-ill .bk span { font-weight: 900; letter-spacing: 1px; } .book-ill .bk span i { color: var(--teal); font-style: normal; }
.book-ill .bk small { font-weight: 800; color: #1E88E5; } .book-ill .bk .qr { position: absolute; bottom: 8px; inset-inline-end: 8px; font-size: 1.1rem; color: var(--navy); }
.book-strip { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: #fff8eb; border: 1px solid #f5d38a; border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: .92rem; }
.book-strip > i { color: #d97706; font-size: 1.2rem; }
@media (max-width: 576px) { .book-card { flex-direction: column; text-align: center; } .book-card ul { text-align: start; } }
/* ---------- placement pages ---------- */
.pl-steps { display: flex; gap: 8px; } .pl-steps span { flex: 1; height: 8px; border-radius: 6px; background: #e5e7eb; } .pl-steps span.on { background: linear-gradient(90deg, var(--blue), var(--teal)); }

/* English content inside Arabic pages: keep radio buttons and check boxes on the left (LTR) */
[dir=rtl] [dir=ltr] .form-check { padding-left: 1.5em; padding-right: 0; text-align: left; }
[dir=rtl] [dir=ltr] .form-check .form-check-input { float: left; margin-left: -1.5em; margin-right: 0; }
[dir=rtl] [dir=ltr] .form-check-inline { margin-right: 1rem; margin-left: 0; }
