/* ===== المدحتية — تنسيقات الواجهة الرئيسية ===== */

/* ---------- 1. الرموز التصميمية ---------- */
:root {
    --brand: #1877f2;
    --brand-soft: #4a9bff;
    --brand-deep: #0b4da2;
    --brand-pale: #e7f0fe;
    --brand-tint: #f2f7ff;

    --bg: #f5f8fd;
    --card: #ffffff;
    --ink: #1c1e21;
    --ink-soft: #3a4450;
    --muted: #65676b;
    --line: rgba(24, 119, 242, 0.16);
    --line-strong: rgba(24, 119, 242, 0.34);

    --ok: #16a34a;
    --ok-pale: #e8f7ee;

    --shadow-sm: 0 2px 10px -6px rgba(15, 23, 42, 0.18);
    --shadow-md: 0 12px 32px -20px rgba(15, 23, 42, 0.30);
    --shadow-lg: 0 30px 64px -34px rgba(24, 119, 242, 0.45);
    --shadow-brand: 0 12px 28px -12px rgba(24, 119, 242, 0.55);

    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 26px;
    --r-xl: 34px;

    --header-h: 76px;
    --container: 1180px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2. إعادة الضبط والأساسيات ---------- */
*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html,
body {
    font-variant-numeric: lining-nums;
    -webkit-locale: "en";
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
    border-radius: 6px;
}

/* تجاوز الروابط للوصولية */
.skip-link {
    position: absolute;
    inset-inline-start: 50%;
    top: -100px;
    transform: translateX(50%);
    z-index: 200;
    background: var(--brand);
    color: #fff;
    padding: 10px 22px;
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    font-weight: 700;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 22px;
}

/* الخلفية المتوهّجة */
.glow {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(1100px 560px at 92% -10%, rgba(24, 119, 242, 0.16), transparent 62%),
        radial-gradient(860px 540px at 0% 102%, rgba(74, 155, 255, 0.13), transparent 58%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 55%, var(--bg) 100%);
}

/* الأيقونات */
.icon {
    width: 24px;
    height: 24px;
    flex: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 28px; height: 28px; }
.icon-brand {
    width: 22px;
    height: 22px;
    stroke: none;
    fill: currentColor;
}

/* ---------- 3. الأزرار ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 26px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.4;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease),
                background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}

.btn-brand {
    background-image: linear-gradient(135deg, var(--brand-soft), var(--brand));
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.btn-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -14px rgba(24, 119, 242, 0.65);
}

.btn-ghost {
    border-color: var(--line-strong);
    color: var(--brand-deep);
    background: rgba(255, 255, 255, 0.7);
}
.btn-ghost:hover {
    background: var(--brand-pale);
    border-color: var(--brand);
    transform: translateY(-2px);
}

.btn-plain { color: var(--ink-soft); padding-inline: 16px; }
.btn-plain:hover { color: var(--brand); background: var(--brand-tint); }

.btn-lg { padding: 15px 34px; font-size: 16.5px; }

/* ---------- 4. الشريط العلوي ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-stuck {
    border-bottom-color: var(--line);
    box-shadow: var(--shadow-sm);
    background: rgba(255, 255, 255, 0.92);
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
    height: var(--header-h);
}
.nav-logo img { height: 44px; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline-end: auto;
}
.nav-menu a {
    padding: 9px 15px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    color: var(--ink-soft);
    transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-menu a:hover { color: var(--brand); background: var(--brand-tint); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    color: var(--brand-deep);
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

/* ---------- 5. القسم الافتتاحي ---------- */
/* padding-block فقط، حتى لا يُلغى الحشو الأفقي القادم من .container */
.hero { padding-block: 74px 84px; }

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--brand-pale);
    border: 1px solid var(--line);
    color: var(--brand-deep);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 22px;
}

.hero h1 {
    font-size: clamp(34px, 5.4vw, 60px);
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.6px;
    margin-bottom: 20px;
}

.grad {
    background-image: linear-gradient(135deg, var(--brand-soft), var(--brand-deep));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--muted);
    max-width: 560px;
    margin-bottom: 30px;
}

.hero-actions { display: flex; gap: 13px; flex-wrap: wrap; margin-bottom: 30px; }

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
}
.hero-points li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink-soft);
}
.hero-points .icon {
    width: 20px;
    height: 20px;
    padding: 3px;
    border-radius: 50%;
    background: var(--ok-pale);
    color: var(--ok);
    stroke-width: 3;
}

/* ---------- 6. معاينة التطبيق ---------- */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}
.hero-visual::before {
    content: "";
    position: absolute;
    inset: 8% 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(24, 119, 242, 0.22), transparent 68%);
    filter: blur(34px);
    z-index: -1;
}

.phone {
    width: 300px;
    max-width: 100%;
    border-radius: 42px;
    padding: 11px;
    background: linear-gradient(160deg, #1c2b3f, #0d1725);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.phone-screen {
    position: relative;
    border-radius: 32px;
    background: linear-gradient(180deg, #ffffff, var(--brand-tint));
    padding: 26px 18px 20px;
    overflow: hidden;
}
.phone-notch {
    position: absolute;
    top: 9px;
    inset-inline-start: 50%;
    transform: translateX(50%);
    width: 92px;
    height: 7px;
    border-radius: 999px;
    background: #d5deea;
}

.app-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}
.app-head strong { font-size: 15.5px; }
.app-eta {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand-deep);
    background: var(--brand-pale);
    border-radius: 999px;
    padding: 4px 11px;
}

.app-track {
    height: 7px;
    border-radius: 999px;
    background: #e3ebf6;
    overflow: hidden;
    margin-bottom: 9px;
}
.app-fill {
    display: block;
    height: 100%;
    width: 72%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-soft), var(--brand));
}
.app-stages {
    display: flex;
    justify-content: space-between;
    font-size: 10.5px;
    font-weight: 600;
    color: #9aa5b4;
    margin-bottom: 20px;
}
.app-stages .on { color: var(--brand-deep); }

.app-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 8px;
}

.app-store {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 9px 11px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}
.app-store .icon {
    width: 30px;
    height: 30px;
    padding: 6px;
    border-radius: 9px;
    background: var(--brand-pale);
    color: var(--brand-deep);
}
.app-store span { font-size: 13px; font-weight: 700; }
.app-store em {
    margin-inline-start: auto;
    font-style: normal;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ok);
    background: var(--ok-pale);
    border-radius: 999px;
    padding: 2px 9px;
}

.app-driver {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--line-strong);
}
.app-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-soft), var(--brand));
}
.app-avatar .icon { width: 19px; height: 19px; }
.app-driver b { display: block; font-size: 13px; }
.app-driver small { font-size: 11.5px; color: var(--muted); }
.app-rating {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: #b8860b;
}
.app-rating .icon { width: 14px; height: 14px; fill: #f5b301; stroke: none; }

/* ---------- 7. عناوين الأقسام ---------- */
.section { padding-block: 72px; }
.section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.section-head {
    text-align: center;
    max-width: 660px;
    margin: 0 auto 48px;
}
.section-tag {
    display: inline-block;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: .4px;
    color: var(--brand);
    background: var(--brand-pale);
    border-radius: 999px;
    padding: 5px 15px;
    margin-bottom: 14px;
}
.section-head h2 {
    font-size: clamp(26px, 3.8vw, 40px);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.4px;
    margin-bottom: 12px;
}
.section-head p { color: var(--muted); font-size: 16.5px; }

/* ---------- 8. الشبكات والبطاقات ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 28px 26px;
    box-shadow: var(--shadow-md);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    box-shadow: 0 26px 54px -26px rgba(24, 119, 242, 0.38);
}
.card h3 { font-size: 19.5px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

.card-ico {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    color: var(--brand-deep);
    background: linear-gradient(135deg, var(--brand-pale), #dbe7fb);
    border: 1px solid var(--line);
    transition: transform .3s var(--ease), color .3s var(--ease), background .3s var(--ease);
}
.card:hover .card-ico {
    transform: translateY(-2px) scale(1.05);
    color: #fff;
    background: linear-gradient(135deg, var(--brand-soft), var(--brand));
}

/* ---------- 9. خطوات العمل ---------- */
.steps { position: relative; }
.steps::before {
    content: "";
    position: absolute;
    top: 34px;
    inset-inline: 16%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--line-strong) 0 9px, transparent 9px 18px);
    z-index: 0;
}
.step { position: relative; z-index: 1; text-align: center; padding: 0 8px; }
.step-num {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-soft), var(--brand));
    box-shadow: 0 14px 28px -14px rgba(24, 119, 242, 0.7), 0 0 0 8px var(--bg);
}
.step h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- 10. بطاقات الشركاء ---------- */
.partner { display: flex; flex-direction: column; text-align: center; align-items: center; }
.partner .card-ico { margin-inline: auto; }
.partner ul {
    display: grid;
    gap: 7px;
    margin: 16px 0 20px;
    text-align: start;
    width: 100%;
}
.partner li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    color: var(--ink-soft);
}
.partner li .icon {
    width: 18px;
    height: 18px;
    color: var(--ok);
    stroke-width: 3;
}
.partner .btn { margin-top: auto; width: 100%; }

/* ---------- 11. الأسئلة الشائعة ---------- */
.faq { max-width: 800px; margin-inline: auto; display: grid; gap: 12px; }
.faq details {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.faq summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 22px;
    font-weight: 700;
    font-size: 16.5px;
    cursor: pointer;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon {
    margin-inline-start: auto;
    color: var(--brand);
    transition: transform .25s var(--ease);
}
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq p { padding: 0 22px 19px; color: var(--muted); font-size: 15.5px; }

/* ---------- 12. دعوة التحميل ---------- */
.cta {
    text-align: center;
    border-radius: var(--r-xl);
    padding: 62px 28px;
    background:
        radial-gradient(620px 320px at 85% 0%, rgba(24, 119, 242, 0.20), transparent 62%),
        linear-gradient(135deg, #ffffff, var(--brand-pale));
    border: 1px solid var(--line-strong);
    box-shadow: 0 32px 64px -34px rgba(24, 119, 242, 0.40);
}
.cta h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; margin-bottom: 12px; }
.cta p { color: var(--muted); margin-bottom: 28px; font-size: 16.5px; }
.cta-actions { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }

/* ---------- 13. التذييل ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.86);
    padding: 52px 0 26px;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 34px;
}
.footer-brand img { height: 42px; margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: 14.5px; max-width: 320px; }
.footer-col h4 { font-size: 15.5px; font-weight: 800; margin-bottom: 14px; }
.footer-col li + li { margin-top: 9px; }
.footer-col a {
    color: var(--muted);
    font-size: 14.5px;
    transition: color .2s var(--ease);
}
.footer-col a:hover { color: var(--brand); }

.footer-bottom {
    border-top: 1px solid var(--line);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

/* ---------- 14. ظهور تدريجي عند التمرير ---------- */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 15. الاستجابة للشاشات ---------- */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 46px; text-align: center; }
    .hero-lead { margin-inline: auto; }
    .hero-actions, .hero-points { justify-content: center; }
    .hero { padding-top: 56px; }
}

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .steps::before { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 780px) {
    .nav-toggle { display: inline-flex; }
    .nav-menu,
    .nav-actions {
        display: none;
    }
    .nav-menu { margin-inline-end: 0; }
    .nav { justify-content: space-between; }

    .site-header.is-open .nav-menu,
    .site-header.is-open .nav-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
    }
    .site-header.is-open .nav {
        flex-wrap: wrap;
        height: auto;
        padding-bottom: 18px;
        gap: 12px;
    }
    .site-header.is-open .nav-menu a { padding: 12px 16px; border-radius: var(--r-sm); }
    .site-header.is-open .nav-actions { gap: 9px; margin-top: 4px; }
    .site-header.is-open .nav-actions .btn { width: 100%; }
    .site-header.is-open { border-bottom-color: var(--line); background: rgba(255, 255, 255, 0.97); }
}

@media (max-width: 620px) {
    .grid-3 { grid-template-columns: 1fr; }
    .section { padding-block: 54px; }
    .cta { padding: 46px 20px; border-radius: var(--r-lg); }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-points { flex-direction: column; align-items: center; gap: 9px; }
    .btn { width: 100%; }
    .hero-actions .btn, .cta-actions .btn { width: auto; flex: 1 1 220px; }
}

/* ---------- 16. تقليل الحركة ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
