/*
 * Rushaid public landing page (task 026). Arabic first, logical properties only, colours from
 * the --rs-* tokens (rushaid-tokens.css). No framework: this file and Tajawal are all the page loads.
 */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body.rl {
    margin: 0;
    background: var(--rs-bg);
    color: var(--rs-text);
    font-family: 'Tajawal', system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.75;
    overflow-x: hidden;
}
html[lang="en"] body.rl { line-height: 1.6; }

/* Element defaults at zero specificity (:where), so every class rule below wins over them */
:where(.rl) :where(img, svg) { max-width: 100%; }
:where(.rl) :where(h1, h2, h3, p) { margin: 0; }
:where(.rl) :where(h1, h2, h3) { color: var(--rs-walnut-900); font-weight: 700; line-height: 1.3; }
:where(.rl) :where(a) { color: var(--rs-walnut-700); text-underline-offset: 3px; }
:where(.rl) :where(a:hover) { color: var(--rs-walnut-900); }
.rl :focus-visible { outline: 3px solid var(--rs-walnut-500); outline-offset: 3px; border-radius: 4px; }
.rl-dark :focus-visible { outline-color: var(--rs-on-walnut); }

.rl-sr {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.rl-skip {
    position: absolute; inset-inline-start: 16px; top: -100px; z-index: 50;
    background: var(--rs-walnut-900); color: var(--rs-on-walnut) !important;
    padding: 12px 16px; border-radius: 8px; text-decoration: none;
}
.rl-skip:focus { top: 12px; }

.rl-wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .rl-wrap { padding-inline: 32px; } }

.rl-section { padding-block: 72px; scroll-margin-top: 72px; }
@media (min-width: 1024px) { .rl-section { padding-block: 104px; } }

.rl-head { max-width: 40rem; margin-block-end: 40px; }
.rl-head h2 { font-size: clamp(26px, 3vw, 34px); }
.rl-head p { margin-block-start: 12px; color: var(--rs-text-muted); }

/* Buttons: 48px tall, so every action clears the 44px touch target */
.rl-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 10px 24px; border-radius: 8px;
    font: 700 16px/1.2 'Tajawal', system-ui, sans-serif; text-decoration: none; cursor: pointer;
    border: 2px solid var(--rs-walnut-700); transition: background-color .15s, color .15s;
}
.rl-btn-primary { background: var(--rs-walnut-700); color: var(--rs-on-walnut) !important; }
.rl-btn-primary:hover { background: var(--rs-walnut-900); border-color: var(--rs-walnut-900); }
.rl-btn-ghost { background: transparent; color: var(--rs-walnut-700) !important; }
.rl-btn-ghost:hover { background: var(--rs-walnut-100); }
.rl-btn[disabled] { opacity: .7; cursor: progress; }
.rl-btn svg { width: 22px; height: 22px; flex: none; }

/* Header */
.rl-header {
    position: sticky; top: 0; z-index: 40;
    background: var(--rs-bg); border-block-end: 1px solid var(--rs-border);
}
.rl-header-in { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.rl-brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--rs-walnut-900); }
.rl-brand svg { height: 44px; width: auto; display: block; }
.rl-nav { margin-inline-start: auto; }
.rl-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.rl-nav a {
    display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding-inline: 12px;
    color: var(--rs-text); text-decoration: none; font-weight: 500; border-radius: 8px;
}
.rl-nav a:hover { background: var(--rs-walnut-100); color: var(--rs-walnut-900); }
.rl-header-actions { display: flex; align-items: center; gap: 8px; }
.rl-lang { font-weight: 700; }
.rl-menu {
    display: none; margin-inline-start: auto; width: 48px; height: 48px; border-radius: 8px;
    border: 1px solid var(--rs-border-strong); background: var(--rs-surface); color: var(--rs-walnut-900);
    cursor: pointer; align-items: center; justify-content: center;
}
.rl-menu svg { width: 24px; height: 24px; }
.rl-menu .rl-icon-close { display: none; }
.rl-header[data-open="true"] .rl-menu .rl-icon-open { display: none; }
.rl-header[data-open="true"] .rl-menu .rl-icon-close { display: block; }

@media (max-width: 1023.98px) {
    .rl-menu { display: inline-flex; order: 3; margin-inline-start: 0; }
    .rl-header-actions { margin-inline-start: auto; }
    .rl-nav {
        display: none; position: absolute; inset-inline: 0; top: 100%;
        background: var(--rs-surface); border-block-end: 1px solid var(--rs-border);
        box-shadow: var(--rs-shadow); padding: 12px 20px 20px;
    }
    .rl-header[data-open="true"] .rl-nav { display: block; }
    .rl-nav ul { flex-direction: column; align-items: stretch; }
    .rl-nav a { width: 100%; }
    .rl-header-actions .rl-btn-login { display: none; }
    .rl-nav .rl-nav-login { display: list-item; }
}
@media (min-width: 1024px) { .rl-nav .rl-nav-login { display: none; } }
@media (max-width: 420px) {
    .rl-header-actions { display: none; }
    .rl-menu { margin-inline-start: auto; }
}

/* Hero */
.rl-hero { padding-block: 48px 72px; }
@media (min-width: 1024px) { .rl-hero { padding-block: 72px 112px; } }
.rl-hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .rl-hero-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.rl-hero-mark { color: var(--rs-walnut-900); margin-block-end: 24px; }
.rl-hero-mark svg { display: block; height: clamp(112px, 17vw, 184px); width: auto; }
.rl-hero h1 { font-size: clamp(26px, 3.4vw, 40px); max-width: 20em; }
.rl-hero-lead { margin-block-start: 16px; color: var(--rs-text-muted); max-width: 34rem; font-size: 18px; }
.rl-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 32px; }
.rl-hero-note { margin-block-start: 16px; font-size: 15px; color: var(--rs-text-muted); }

/* The product composition: a weekly timetable and a fee receipt, drawn in HTML */
.rl-board { position: relative; padding-block-end: 88px; }
.rl-week {
    background: var(--rs-surface); border: 1px solid var(--rs-border); border-radius: 12px;
    box-shadow: var(--rs-shadow-lg); overflow: hidden;
}
.rl-week-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; background: var(--rs-walnut-900); color: var(--rs-on-walnut);
    font-weight: 700; font-size: 15px;
}
.rl-week-head span:last-child { color: var(--rs-on-walnut-muted); font-weight: 500; font-size: 13px; }
.rl-week-grid {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 14px;
    font-size: 12px; line-height: 1.3;
}
@media (min-width: 480px) { .rl-week-grid { gap: 8px; padding: 18px; font-size: 13px; } }
.rl-week-day { text-align: center; color: var(--rs-text-muted); font-weight: 700; padding-block-end: 4px; }
.rl-cell {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 40px; padding: 4px; border-radius: 6px; background: var(--rs-surface-2); color: var(--rs-walnut-900);
}
.rl-cell-a { background: var(--rs-walnut-100); }
.rl-cell-b { background: var(--rs-walnut-700); color: var(--rs-on-walnut); }
.rl-cell-c { background: transparent; border: 1px dashed var(--rs-border-strong); color: var(--rs-text-muted); }
.rl-slip {
    position: absolute; inset-inline-end: -8px; bottom: 0; width: min(260px, 72%);
    background: var(--rs-surface); border: 1px solid var(--rs-border); border-radius: 12px;
    box-shadow: var(--rs-shadow-lg); padding: 16px 18px; border-block-start: 4px solid var(--rs-success);
}
@media (min-width: 1024px) { .rl-slip { inset-inline-end: -24px; } }
.rl-slip-title { font-weight: 700; color: var(--rs-walnut-900); font-size: 15px; }
.rl-slip-line { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--rs-text-muted); margin-block-start: 6px; }
.rl-slip-amount { font-size: 24px; font-weight: 700; color: var(--rs-walnut-900); margin-block-start: 6px; }
.rl-badge {
    display: inline-flex; align-items: center; min-height: 24px; padding-inline: 10px; border-radius: 999px;
    font-size: 12px; font-weight: 700; background: var(--rs-success-soft); color: var(--rs-success-ink);
}
@media (prefers-reduced-motion: no-preference) {
    .rl-week { animation: rl-rise .6s ease-out both; }
    .rl-slip { animation: rl-rise .6s .35s ease-out both; }
    @keyframes rl-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}

/* Why Rushaid: the one dark band */
.rl-dark { background: var(--rs-walnut-900); color: var(--rs-on-walnut); }
.rl-dark h2, .rl-dark h3 { color: var(--rs-on-walnut); }
.rl-why { padding-block: 64px; }
.rl-why-grid { display: grid; gap: 40px; }
@media (min-width: 1024px) { .rl-why-grid { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } }
.rl-why h2 { font-size: clamp(26px, 3vw, 34px); }
.rl-why-intro p { margin-block-start: 12px; color: var(--rs-on-walnut-muted); }
.rl-why-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
@media (min-width: 640px) { .rl-why-points { grid-template-columns: 1fr 1fr; gap: 32px 40px; } }
.rl-why-points li { border-inline-start: 3px solid var(--rs-walnut-300); padding-inline-start: 16px; }
.rl-why-points h3 { font-size: 19px; }
.rl-why-points p { margin-block-start: 4px; color: var(--rs-on-walnut-muted); font-size: 16px; }

/* Modules: a ruled register, hairlines instead of floating cards */
.rl-modules {
    list-style: none; margin: 0; padding: 0; display: grid; gap: 1px;
    background: var(--rs-border); border: 1px solid var(--rs-border); border-radius: 12px; overflow: hidden;
}
@media (min-width: 640px) { .rl-modules { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .rl-modules { grid-template-columns: repeat(4, 1fr); } }
.rl-module { background: var(--rs-surface); padding: 28px 24px; }
.rl-module-icon {
    width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center;
    background: var(--rs-walnut-100); color: var(--rs-walnut-700); margin-block-end: 16px;
}
.rl-module-icon svg { width: 26px; height: 26px; }
.rl-module h3 { font-size: 19px; }
.rl-module p { margin-block-start: 6px; color: var(--rs-text-muted); font-size: 16px; }

.rl-more { margin-block-start: 56px; display: grid; gap: 40px; }
.rl-more-section h3 { font-size: 22px; }
.rl-more-section > p { color: var(--rs-text-muted); margin-block-start: 6px; }
.rl-more-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 768px) { .rl-more-list { grid-template-columns: repeat(2, 1fr); } }
.rl-more-list li { display: flex; gap: 16px; align-items: flex-start; }
.rl-more-list img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: var(--rs-surface-2); flex: none; }
.rl-more-list strong { display: block; color: var(--rs-walnut-900); }
.rl-more-list span { color: var(--rs-text-muted); font-size: 16px; }

/* Apps */
.rl-alt { background: var(--rs-surface-2); }
.rl-section.rl-flush { padding-block-start: 0; }
.rl-head.rl-head-tight { margin-block-end: 0; }
.rl-apps-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .rl-apps-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.rl-app { margin-block-start: 28px; }
.rl-app h3 { font-size: 20px; }
.rl-app p { margin-block-start: 4px; color: var(--rs-text-muted); }
.rl-stores { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 12px; }
.rl-stores .rl-btn { min-height: 44px; padding-inline: 16px; font-size: 15px; }
.rl-soon { margin-block-start: 28px; font-size: 15px; color: var(--rs-text-muted); }
.rl-phones { display: flex; justify-content: center; gap: clamp(12px, 3vw, 32px); }
.rl-phone {
    width: clamp(140px, 40vw, 236px); aspect-ratio: 9 / 18.5; flex: none;
    background: var(--rs-walnut-900); border-radius: 32px; padding: 10px; box-shadow: var(--rs-shadow-lg);
}
.rl-phone:nth-child(2) { margin-block-start: 40px; }
.rl-screen {
    height: 100%; border-radius: 24px; background: var(--rs-bg); overflow: hidden;
    display: flex; flex-direction: column; font-size: 11px; line-height: 1.35;
}
.rl-screen img { width: 100%; height: 100%; object-fit: cover; }
.rl-screen-bar { background: var(--rs-walnut-700); color: var(--rs-on-walnut); padding: 18px 12px 10px; font-weight: 700; font-size: 12px; }
.rl-screen-body { padding: 10px; display: grid; gap: 8px; }
.rl-row { display: flex; align-items: center; gap: 8px; background: var(--rs-surface); border-radius: 8px; padding: 8px; }
.rl-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; background: var(--rs-walnut-100); }
.rl-line { height: 7px; border-radius: 4px; background: var(--rs-border); flex: 1; }
.rl-line.short { flex: .5; }
.rl-tick { width: 16px; height: 16px; border-radius: 4px; flex: none; background: var(--rs-success); }
.rl-tick.off { background: var(--rs-danger); }
.rl-tile { background: var(--rs-surface); border-radius: 10px; padding: 10px; }
.rl-tile b { display: block; font-size: 15px; color: var(--rs-walnut-900); }
.rl-meter { height: 6px; border-radius: 3px; background: var(--rs-walnut-100); margin-block-start: 6px; overflow: hidden; }
.rl-meter i { display: block; height: 100%; width: 66%; background: var(--rs-walnut-700); }

/* Pricing */
.rl-plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.rl-plan {
    position: relative; display: flex; flex-direction: column; background: var(--rs-surface);
    border: 1px solid var(--rs-border); border-radius: 12px; padding: 28px 24px;
}
.rl-plan.is-highlight { border: 2px solid var(--rs-walnut-700); box-shadow: var(--rs-shadow); }
.rl-plan-badge {
    position: absolute; top: -14px; inset-inline-start: 24px; background: var(--rs-walnut-700);
    color: var(--rs-on-walnut); font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px;
}
.rl-plan h3 { font-size: 20px; }
.rl-plan-desc { color: var(--rs-text-muted); font-size: 15px; margin-block-start: 4px; }
.rl-price { margin-block-start: 20px; font-size: 30px; font-weight: 700; color: var(--rs-walnut-900); line-height: 1.2; }
.rl-unit { color: var(--rs-text-muted); font-size: 15px; margin-block-start: 4px; }
.rl-plan ul { list-style: none; margin: 20px 0 24px; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.rl-plan li { display: flex; gap: 8px; align-items: baseline; }
.rl-plan li::before {
    content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--rs-walnut-300);
    transform: translateY(-2px);
}
.rl-plan .rl-btn { margin-block-start: auto; }
.rl-plan .rl-more-features { color: var(--rs-text-muted); }
.rl-plan .rl-more-features::before { display: none; }
.rl-pay-note {
    margin-block-start: 28px; padding: 16px 20px; border-radius: 12px; background: var(--rs-surface);
    border: 1px solid var(--rs-border); border-inline-start: 4px solid var(--rs-walnut-500); font-size: 16px;
}
.rl-custom {
    margin-block-start: 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-radius: 12px; border: 1px dashed var(--rs-border-strong);
}
.rl-custom p { max-width: 44rem; color: var(--rs-text-muted); }
.rl-custom strong { display: block; color: var(--rs-walnut-900); }

/* FAQ */
.rl-faq-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) { .rl-faq-grid { grid-template-columns: 4fr 8fr; gap: 64px; } }
.rl-faq-list { border-block-start: 1px solid var(--rs-border); }
.rl-faq-list details { border-block-end: 1px solid var(--rs-border); }
.rl-faq-list summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: 56px; padding-block: 12px; font-weight: 700; color: var(--rs-walnut-900);
}
.rl-faq-list summary::-webkit-details-marker { display: none; }
.rl-faq-list summary::after {
    content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: var(--rs-walnut-100); color: var(--rs-walnut-700); font-size: 20px; line-height: 1;
}
.rl-faq-list details[open] summary::after { content: "\2212"; }
.rl-faq-answer { padding-block-end: 20px; color: var(--rs-text-muted); max-width: 46rem; }

/* Contact */
.rl-contact-grid { display: grid; gap: 40px; }
@media (min-width: 1024px) { .rl-contact-grid { grid-template-columns: 5fr 7fr; gap: 64px; } }
.rl-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.rl-contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.rl-contact-list .rl-module-icon { margin: 0; width: 44px; height: 44px; flex: none; }
.rl-contact-list .rl-module-icon svg { width: 22px; height: 22px; }
.rl-contact-list small { display: block; color: var(--rs-text-muted); font-size: 14px; }
.rl-contact-list a, .rl-contact-list span.v { font-weight: 700; color: var(--rs-walnut-900); }
.rl-contact-list a { display: inline-flex; min-height: 44px; align-items: center; }
.rl-whatsapp { margin-block-start: 24px; }
.rl-form { background: var(--rs-surface); border: 1px solid var(--rs-border); border-radius: 12px; padding: 24px; display: grid; gap: 16px; }
@media (min-width: 768px) { .rl-form { padding: 32px; grid-template-columns: 1fr 1fr; } .rl-field-wide { grid-column: 1 / -1; } }
.rl-field label { display: block; font-weight: 500; margin-block-end: 6px; color: var(--rs-walnut-900); }
.rl-field input, .rl-field textarea {
    width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--rs-border-strong);
    background: var(--rs-bg); color: var(--rs-text); font: 400 16px/1.5 'Tajawal', system-ui, sans-serif;
}
.rl-field textarea { min-height: 140px; resize: vertical; }
.rl-field input:focus, .rl-field textarea:focus { outline: 3px solid var(--rs-walnut-300); outline-offset: 0; border-color: var(--rs-walnut-500); }
.rl-field [aria-invalid="true"] { border-color: var(--rs-danger); }
.rl-error { display: block; color: var(--rs-danger); font-size: 14px; margin-block-start: 4px; }
.rl-status { grid-column: 1 / -1; border-radius: 8px; padding: 12px 16px; font-weight: 500; }
.rl-status:empty { display: none; }
.rl-status.is-ok { background: var(--rs-success-soft); color: var(--rs-success-ink); }
.rl-status.is-error { background: var(--rs-danger-soft); color: var(--rs-danger-ink); }
.rl-form .rl-btn { justify-self: start; }

/* Schools and blog */
.rl-schools { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.rl-schools li { display: flex; align-items: center; gap: 10px; color: var(--rs-text-muted); font-weight: 500; }
.rl-schools img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--rs-surface-2); }
.rl-posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 768px) { .rl-posts { grid-template-columns: repeat(3, 1fr); } }
.rl-posts a { display: block; height: 100%; padding: 20px; border-radius: 12px; background: var(--rs-surface); border: 1px solid var(--rs-border); text-decoration: none; }
.rl-posts strong { display: block; color: var(--rs-walnut-900); font-size: 18px; }
.rl-posts span { display: block; color: var(--rs-text-muted); font-size: 14px; margin-block-start: 8px; }

/* Footer */
.rl-footer { padding-block: 56px 32px; }
.rl-footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .rl-footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.rl-footer .rl-brand { color: var(--rs-on-walnut); }
.rl-footer .rl-brand svg { height: 64px; }
.rl-footer p { color: var(--rs-on-walnut-muted); margin-block-start: 12px; max-width: 28rem; font-size: 16px; }
.rl-footer h2 { font-size: 16px; color: var(--rs-on-walnut); }
.rl-footer ul { list-style: none; margin: 8px 0 0; padding: 0; }
.rl-footer li a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--rs-on-walnut-muted); text-decoration: none; }
.rl-footer li a:hover { color: var(--rs-on-walnut); text-decoration: underline; }
.rl-footer-line { margin-block-start: 40px; padding-block-start: 20px; border-block-start: 1px solid color-mix(in srgb, var(--rs-on-walnut) 16%, transparent); font-size: 14px; color: var(--rs-on-walnut-muted); }
