/* ===========================================================
 * OfficeUP — الموقع التعريفي
 * ===========================================================
 * ورقة واحدة بلا إطار عمل: الموقع ستّ صفحات ثابتة، وسحب Bootstrap
 * كاملاً لها يعني 200KB تُحمَّل قبل أول سطر يقرأه الزائر — والصفحة
 * التعريفية تُقاس بثانية فتحها قبل كل شيء.
 *
 * الشبكات كلها auto-fit: لا نكتب مقاسات للهاتف واللوحي والحاسوب
 * منفصلة، بل نقول «عمودٌ لا يقلّ عن كذا» ويتكفّل المتصفح بالباقي.
 * =========================================================== */

/* ----------------------------------------------------------
 * 1) الخطّ
 * ----------------------------------------------------------
 * ملفات الخط محلية داخل هذا القالب نفسه (assets/css/font/) — نفس
 * اصطلاح قالب workup الأصلي، وليس مساراً عابراً لقالب آخر (كان
 * الملف المرفوع يشير خطأً إلى abma/assets/vendor/fonts/ غير الموجود
 * أصلاً بهذا المسار).
 * -------------------------------------------------------- */
@font-face {
    font-family: 'Workup';
    src: url('font/Workup-Regular.woff2') format('woff2'),
         url('font/Workup-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Workup';
    src: url('font/Workup-Bold.woff2') format('woff2'),
         url('font/Workup-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: 'Workup';
    src: url('font/Workup-Heavy.woff2') format('woff2'),
         url('font/Workup-Heavy.ttf') format('truetype');
    font-weight: 900;
    font-display: swap;
}

/* ----------------------------------------------------------
 * 2) المتغيّرات
 * -------------------------------------------------------- */
:root {
    --brand: #0B7F68;
    --brand-dark: #0E3B34;
    --brand-deep: #072520;
    --emerald: #00D4A6;
    --emerald-soft: #E6F7F4;

    --ink: #0C211D;
    --body: #4C5F5B;
    --muted: #7C8C89;
    --line: #E3EEEB;
    --surface: #FFFFFF;
    --canvas: #F4FAF8;

    --amber: #F0A030;
    --rose: #E2585A;

    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 24px;
    --r-xl: 32px;

    --shadow-sm: 0 2px 8px rgba(12, 33, 29, 0.05);
    --shadow-md: 0 10px 30px rgba(12, 33, 29, 0.07);
    --shadow-lg: 0 24px 60px rgba(12, 33, 29, 0.12);

    --wrap: 1180px;
    --pad: clamp(1rem, 4vw, 2rem);
}

/* ----------------------------------------------------------
 * 3) الأساس
 * -------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* الشريط العلوي لاصق: بلا هذا يختفي عنوان القسم تحته عند القفز إليه */
    scroll-padding-top: 90px;
}

body {
    margin: 0;
    font-family: 'Workup', 'Segoe UI', Tahoma, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.85;
    color: var(--body);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
svg {
    max-width: 100%;
    display: block;
}

a {
    color: var(--brand);
    text-decoration: none;
}

h1, h2, h3, h4 {
    color: var(--ink);
    line-height: 1.35;
    margin: 0 0 0.75rem;
    font-weight: 900;
}

h1 { font-size: clamp(2rem, 5vw, 3.35rem); letter-spacing: -0.5px; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.35rem); }
h3 { font-size: clamp(1.125rem, 2.2vw, 1.375rem); }

p { margin: 0 0 1rem; }

ul { margin: 0; padding: 0; list-style: none; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding-inline: var(--pad);
}

.sec {
    padding-block: clamp(3.5rem, 8vw, 6rem);
}

.sec.tint { background: var(--canvas); }

.sec.dark {
    background: linear-gradient(160deg, var(--brand-dark) 0%, var(--brand-deep) 100%);
    color: #C7DBD6;
}

.sec.dark h2,
.sec.dark h3 { color: #fff; }

/* رأس القسم: عنوانٌ وسطرٌ تحته لا أكثر — والزائر يمسح الصفحة مسحاً */
.sec-head {
    max-width: 640px;
    margin: 0 auto clamp(2rem, 5vw, 3.25rem);
    text-align: center;
}

.sec-head p { margin: 0; font-size: 1.0625rem; }

.eyebrow {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    margin-bottom: 0.9rem;
    border-radius: 999px;
    background: var(--emerald-soft);
    color: var(--brand);
    font-size: 0.8125rem;
    font-weight: 700;
}

.sec.dark .eyebrow {
    background: rgba(0, 212, 166, 0.16);
    color: var(--emerald);
}

/* ----------------------------------------------------------
 * 4) الأزرار
 * -------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }

.btn-main {
    background: linear-gradient(180deg, #0C9478 0%, #0B6E5B 100%);
    color: #fff;
    box-shadow: 0 8px 22px rgba(11, 127, 104, 0.28);
}

.btn-ghost {
    background: transparent;
    border-color: rgba(11, 127, 104, 0.3);
    color: var(--brand);
}

.btn-ghost:hover { background: var(--emerald-soft); }

.btn-light {
    background: #fff;
    color: var(--brand-dark);
}

.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.875rem; }
.btn-wide { width: 100%; }

/* ----------------------------------------------------------
 * 5) الشريط العلوي
 * -------------------------------------------------------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* الحدّ يظهر بعد النزول لا قبله: خطٌّ تحت الشريط وأنت في أعلى
   الصفحة يقطعها بلا سبب */
.nav.stuck {
    border-bottom-color: var(--line);
    box-shadow: var(--shadow-sm);
}

.nav-in {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 900;
    font-size: 1.1875rem;
    color: var(--ink);
}

.brand img { width: 32px; height: 32px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-inline-start: auto;
}

.nav-links a {
    padding: 0.5rem 0.75rem;
    border-radius: var(--r-sm);
    color: var(--body);
    font-size: 0.9375rem;
    font-weight: 700;
}

.nav-links a:hover,
.nav-links a.on {
    background: var(--emerald-soft);
    color: var(--brand);
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-burger {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: #fff;
    cursor: pointer;
    padding: 0;
    color: var(--ink);
}

@media (max-width: 960px) {
    .nav-burger { display: inline-flex; align-items: center; justify-content: center; margin-inline-start: auto; }
    .nav-cta { display: none; }

    /* القائمة تنزل لوحاً كاملاً لا قائمةً صغيرة: الإصبع يحتاج مساحة،
       والروابط سبعة لا اثنان */
    .nav-links {
        position: fixed;
        inset: 72px 0 auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0.125rem;
        margin: 0;
        padding: 1rem var(--pad) 1.5rem;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        transform: translateY(-120%);
        transition: transform 0.25s ease;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    .nav-links.open { transform: translateY(0); }

    .nav-links a { padding: 0.8rem 0.75rem; font-size: 1rem; }

    .nav-links .btn { margin-top: 0.75rem; }
}

@media (min-width: 961px) {
    .nav-links .btn { display: none; }
}

/* ----------------------------------------------------------
 * 6) الواجهة (Hero)
 * -------------------------------------------------------- */
.hero {
    position: relative;
    padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3rem, 8vw, 6rem);
    background:
        radial-gradient(1000px 520px at 85% -10%, rgba(0, 212, 166, 0.16), transparent 60%),
        radial-gradient(800px 420px at 5% 10%, rgba(11, 127, 104, 0.08), transparent 55%),
        var(--surface);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-actions, .hero-badges, .hero-facts { justify-content: center; }
    .hero-points { display: inline-block; text-align: start; }
}

.hero h1 { margin-bottom: 1rem; }

.hero-lead {
    font-size: clamp(1rem, 2vw, 1.1875rem);
    max-width: 44ch;
}

@media (max-width: 900px) { .hero-lead { margin-inline: auto; } }

.hero-points {
    margin: 1.25rem 0 1.75rem;
    display: grid;
    gap: 0.5rem;
}

.hero-points li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--ink);
}

.tick {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--emerald-soft);
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tick svg { width: 12px; height: 12px; }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.store {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.store svg { width: 22px; height: 22px; }
.store b { display: block; font-size: 0.875rem; line-height: 1.2; }
.store span { font-size: 0.6875rem; color: var(--muted); }

/* ----- لقطة الشاشة في الواجهة ----- */
.hero-shot {
    position: relative;
    border-radius: var(--r-xl);
    background: linear-gradient(160deg, var(--brand-dark), var(--brand-deep));
    padding: 0.75rem;
    box-shadow: var(--shadow-lg);
}

.hero-shot img,
.hero-shot .shot-fake {
    border-radius: calc(var(--r-xl) - 8px);
    width: 100%;
}

/* بديلٌ يُرسم بلا صورة: القالب يصل بلا لقطات، وإطارٌ فارغ يبدو عطلاً */
.shot-fake {
    aspect-ratio: 16 / 10;
    background: #fff;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
}

.hero-float {
    position: absolute;
    inset-inline-start: -18px;
    bottom: 28px;
    background: #fff;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-md);
    padding: 0.7rem 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ink);
}

@media (max-width: 560px) { .hero-float { display: none; } }

.dot-live {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 0 4px rgba(0, 212, 166, 0.2);
}

/* ----------------------------------------------------------
 * 7) الأرقام
 * -------------------------------------------------------- */
.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
    margin-top: clamp(2rem, 5vw, 3.5rem);
}

.fact { text-align: center; }
.fact b { display: block; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--brand); font-weight: 900; }
.fact span { font-size: 0.875rem; }

/* ----------------------------------------------------------
 * 8) البطاقات والشبكات
 * -------------------------------------------------------- */
.grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.6rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(11, 127, 104, 0.25);
    box-shadow: var(--shadow-md);
}

.card h3 { margin-bottom: 0.4rem; }
.card p { margin: 0; font-size: 0.9375rem; }

.ico {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--emerald-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
}

.ico svg { width: 24px; height: 24px; }

.sec.dark .card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    color: #BFD6D1;
}

.sec.dark .ico {
    background: rgba(0, 212, 166, 0.14);
    color: var(--emerald);
}

/* ----- عمودان: نصّ وصورة ----- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.split.flip .split-media { order: -1; }

@media (max-width: 860px) { .split.flip .split-media { order: 0; } }

.split-media {
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--canvas);
    box-shadow: var(--shadow-md);
}

.checks { display: grid; gap: 0.75rem; margin-top: 1.25rem; }

.checks li {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.checks .tick { margin-top: 5px; }

/* ----------------------------------------------------------
 * 9) الخطوات
 * -------------------------------------------------------- */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 1.75rem 1.5rem 1.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    top: -18px;
    inset-inline-start: 1.5rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #0C9478, #0B6E5B);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 6px 16px rgba(11, 127, 104, 0.3);
}

/* ----------------------------------------------------------
 * 10) عملاؤنا
 * -------------------------------------------------------- */
.logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    align-items: center;
}

.logo-box {
    height: 74px;
    display: grid;
    place-items: center;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    color: var(--muted);
    font-weight: 700;
    font-size: 0.9375rem;
    /* الشعارات رماديةٌ حتى يُمرّ عليها: صفٌّ من عشرة شعارات ملوّنة
       ينافس المحتوى على العين */
    filter: grayscale(1);
    opacity: 0.75;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.logo-box:hover { filter: none; opacity: 1; }
.logo-box img { max-height: 42px; width: auto; object-fit: contain; }

/* ----------------------------------------------------------
 * 11) التقييمات
 * -------------------------------------------------------- */
.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(310px, 1fr);
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
}

.rail > * { scroll-snap-align: start; }

@media (min-width: 900px) {
    .rail {
        grid-auto-flow: row;
        grid-template-columns: repeat(3, 1fr);
        overflow: visible;
    }
}

.quote {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stars { display: flex; gap: 2px; color: var(--amber); }
.stars svg { width: 17px; height: 17px; }

.quote p { margin: 0; font-size: 0.9688rem; color: var(--ink); }

.who { display: flex; align-items: center; gap: 0.75rem; margin-top: auto; }

.who-face {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--emerald-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-weight: 900;
    flex: 0 0 auto;
}

.who b { display: block; color: var(--ink); font-size: 0.9375rem; }
.who span { font-size: 0.8125rem; color: var(--muted); }

/* ----------------------------------------------------------
 * 12) الأسئلة الشائعة
 * -------------------------------------------------------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 0.75rem; }

.qa {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
}

.qa summary {
    list-style: none;
    cursor: pointer;
    padding: 1.1rem 1.35rem;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qa summary::-webkit-details-marker { display: none; }

.qa summary::after {
    content: "";
    margin-inline-start: auto;
    width: 10px;
    height: 10px;
    border-inline-end: 2px solid var(--brand);
    border-bottom: 2px solid var(--brand);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}

.qa[open] summary::after { transform: rotate(-135deg); }

.qa .qa-body { padding: 0 1.35rem 1.25rem; font-size: 0.9375rem; }

/* ----------------------------------------------------------
 * 13) النماذج
 * -------------------------------------------------------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.field { display: grid; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }

.field label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ink);
}

.field .req { color: var(--rose); }

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea { min-height: 140px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 0;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(11, 127, 104, 0.14);
}

.field.bad input,
.field.bad select,
.field.bad textarea { border-color: var(--rose); }

.field .err {
    display: none;
    font-size: 0.75rem;
    color: var(--rose);
}

.field.bad .err { display: block; }

.form-note { font-size: 0.8125rem; color: var(--muted); }

.form-done {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--r-md);
    background: var(--emerald-soft);
    color: var(--brand);
    font-weight: 700;
    margin-bottom: 1rem;
}

.form-done.show { display: flex; }

/* بطاقة النموذج على خلفية داكنة */
.form-card {
    background: #fff;
    border-radius: var(--r-lg);
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: var(--shadow-lg);
}

.contact-lines { display: grid; gap: 1.1rem; margin-top: 1.5rem; }

.contact-line { display: flex; gap: 0.85rem; align-items: flex-start; }

.contact-line .ico { width: 42px; height: 42px; margin: 0; border-radius: 12px; }
.contact-line b { display: block; color: inherit; }
.sec.dark .contact-line b { color: #fff; }

/* ----------------------------------------------------------
 * 14) المدوّنة
 * -------------------------------------------------------- */
.page-head {
    padding-block: clamp(2.5rem, 6vw, 4rem) clamp(2rem, 4vw, 3rem);
    background:
        radial-gradient(700px 320px at 80% -30%, rgba(0, 212, 166, 0.14), transparent 60%),
        var(--canvas);
    border-bottom: 1px solid var(--line);
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1.5rem;
}

.chip {
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--body);
    font-size: 0.875rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.chip.on,
.chip:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.search {
    position: relative;
    margin-inline-start: auto;
    min-width: min(280px, 100%);
}

.search input {
    width: 100%;
    padding: 0.6rem 2.4rem 0.6rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 0.9375rem;
}

.search svg {
    position: absolute;
    inset-inline-end: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--muted);
}

.posts {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.post {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.post:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.post-cover {
    aspect-ratio: 16 / 9;
    background: linear-gradient(140deg, #0E4C41, #0B7F68);
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8125rem;
}

.post-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-body { padding: 1.35rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.75rem;
    color: var(--muted);
}

.tag {
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--emerald-soft);
    color: var(--brand);
    font-weight: 700;
}

.post h3 { margin: 0; font-size: 1.0625rem; }
.post p { margin: 0; font-size: 0.9062rem; }

.post-more {
    margin-top: auto;
    padding-top: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* المقال المميّز: عريضٌ بعمودين على الشاشة الواسعة */
.post.wide { grid-column: 1 / -1; flex-direction: row; }
.post.wide .post-cover { flex: 0 0 44%; aspect-ratio: auto; }
.post.wide .post-body { padding: clamp(1.25rem, 3vw, 2.25rem); justify-content: center; }
.post.wide h3 { font-size: clamp(1.25rem, 2.6vw, 1.75rem); }

@media (max-width: 760px) {
    .post.wide { flex-direction: column; }
    .post.wide .post-cover { flex: none; aspect-ratio: 16 / 9; }
}

.pager {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.pager a,
.pager span {
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--body);
    font-weight: 700;
    font-size: 0.9375rem;
}

.pager .on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .off { opacity: 0.45; pointer-events: none; }

/* ----------------------------------------------------------
 * 15) المقالة والصفحة الفرعية
 * -------------------------------------------------------- */
.doc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

@media (max-width: 900px) { .doc { grid-template-columns: 1fr; } }

.prose { font-size: 1.0625rem; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin: 2.25rem 0 0.75rem; font-size: clamp(1.3rem, 2.8vw, 1.75rem); }
.prose h3 { margin: 1.75rem 0 0.5rem; }
.prose p { margin: 0 0 1.15rem; }
.prose img { border-radius: var(--r-md); margin: 1.5rem 0; }

.prose ul, .prose ol { margin: 0 0 1.15rem; padding-inline-start: 1.25rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 0.4rem; }

.prose blockquote {
    margin: 1.75rem 0;
    padding: 1rem 1.35rem;
    border-inline-start: 4px solid var(--emerald);
    background: var(--canvas);
    border-radius: var(--r-sm);
    color: var(--ink);
    font-weight: 600;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

.prose th, .prose td {
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    text-align: start;
}

.prose th { background: var(--canvas); color: var(--ink); }

.prose code {
    background: var(--canvas);
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    font-size: 0.875em;
}

.side { display: grid; gap: 1.25rem; position: sticky; top: 92px; }

@media (max-width: 900px) { .side { position: static; } }

.side-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.25rem;
}

.side-box h4 { margin: 0 0 0.85rem; font-size: 1rem; }

.side-nav { display: grid; gap: 0.125rem; }

.side-nav a {
    padding: 0.55rem 0.75rem;
    border-radius: var(--r-sm);
    color: var(--body);
    font-size: 0.9375rem;
    font-weight: 600;
}

.side-nav a:hover { background: var(--canvas); color: var(--brand); }

.side-nav a.on {
    background: var(--emerald-soft);
    color: var(--brand);
    font-weight: 700;
}

.toc { display: grid; gap: 0.35rem; font-size: 0.9062rem; }
.toc a { color: var(--body); }
.toc a:hover { color: var(--brand); }

.share { display: flex; gap: 0.5rem; }

.share a {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--body);
}

.share a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.share svg { width: 18px; height: 18px; }

.author {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.35rem;
    background: var(--canvas);
    border-radius: var(--r-lg);
    margin: 2.5rem 0;
}

.author .who-face { width: 56px; height: 56px; font-size: 1.125rem; }

/* شريط تقدّم القراءة: المقالة طويلة، والشريط يقول كم بقي بلا كلام */
.reading {
    position: fixed;
    inset-block-start: 0;
    inset-inline-start: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--emerald), var(--brand));
    z-index: 200;
    transition: width 0.1s linear;
}

/* ----------------------------------------------------------
 * 16) نداء الختام والتذييل
 * -------------------------------------------------------- */
.cta-band {
    background: linear-gradient(140deg, var(--brand-dark), var(--brand-deep));
    border-radius: var(--r-xl);
    padding: clamp(2rem, 5vw, 3.25rem);
    text-align: center;
    color: #C7DBD6;
}

.cta-band h2 { color: #fff; }

.cta-band .btn-row {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.foot {
    background: var(--brand-deep);
    color: #9FBAB4;
    padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.5rem;
    font-size: 0.9375rem;
}

.foot-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }

.foot h4 { color: #fff; font-size: 0.9375rem; margin-bottom: 0.9rem; }
.foot a { color: #9FBAB4; }
.foot a:hover { color: var(--emerald); }
.foot-links { display: grid; gap: 0.5rem; }

.foot .brand { color: #fff; margin-bottom: 0.85rem; }

.foot-social { display: flex; gap: 0.5rem; margin-top: 1rem; }

.foot-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    display: grid;
    place-items: center;
}

.foot-social a:hover { background: var(--emerald); color: var(--brand-deep); }
.foot-social svg { width: 17px; height: 17px; }

.foot-end {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    font-size: 0.8125rem;
}

/* ----------------------------------------------------------
 * 17) الظهور عند التمرير
 * ----------------------------------------------------------
 * مُعطَّل لمن طلب تقليل الحركة: الحركة على الصفحة كلها تُصيب بعض
 * الناس بالدوار، والنظام يعرف تفضيلهم.
 * -------------------------------------------------------- */
.up {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.up.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .up { opacity: 1; transform: none; transition: none; }
    .btn:hover, .card:hover, .post:hover { transform: none; }
}

/* الطباعة: الشريط والتذييل لا يُطبعان */
@media print {
    .nav, .foot, .side, .cta-band, .reading { display: none !important; }
    body { color: #000; }
}

/* ===========================================================
 * 18) الأسعار
 * ===========================================================
 * ثلاث بطاقات لا أكثر: الزائر يقارن ثلاثة خيارات في نظرة، وما زاد
 * عنها يُقارَن بجدولٍ لا ببطاقات. والوسطى مرفوعة ومُعلَّمة «الأكثر
 * اختياراً» لأن العين تبدأ من المميّز ثم تنظر يمينه ويساره.
 * =========================================================== */

.plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 980px) {
    .plans { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}

.plan {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 1.75rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.plan:hover { border-color: rgba(11, 127, 104, 0.3); box-shadow: var(--shadow-md); }

/* الباقة الموصى بها: إطارٌ ملوّن ورفعةٌ خفيفة — لا لونٌ صارخ يجعل
   البقية تبدو معطوبة */
.plan.pick {
    border-color: var(--brand);
    box-shadow: 0 16px 44px rgba(11, 127, 104, 0.16);
}

@media (min-width: 981px) {
    .plan.pick { transform: translateY(-14px); padding-block: 2rem 1.75rem; }
    .plan.pick:hover { transform: translateY(-18px); }
}

.plan-flag {
    position: absolute;
    top: -13px;
    inset-inline-start: 50%;
    transform: translateX(50%);
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #0C9478, #0B6E5B);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(11, 127, 104, 0.3);
}

[dir="ltr"] .plan-flag { transform: translateX(-50%); }

.plan-name { font-size: 1.125rem; font-weight: 900; color: var(--ink); }
.plan-for { font-size: 0.875rem; color: var(--muted); margin-top: -0.6rem; }

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--line);
}

.plan-price b {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 900;
    color: var(--ink);
    line-height: 1;
}

.plan-price span { font-size: 0.875rem; color: var(--muted); }

/* السعر المشطوب يظهر مع الاشتراك السنوي وحده */
.plan-was {
    text-decoration: line-through;
    opacity: 0.55;
    font-size: 0.9375rem;
    display: none;
}

body.yearly .plan-was { display: inline; }

.plan-list { display: grid; gap: 0.65rem; font-size: 0.9375rem; }

.plan-list li { display: flex; gap: 0.6rem; align-items: flex-start; }
.plan-list .tick { margin-top: 4px; }

/* ما لا تشمله الباقة: يُذكر ولا يُخفى — إخفاؤه يجعل العميل يكتشفه
   بعد الشراء، وهو أسوأ وقتٍ لاكتشافه */
.plan-list li.no { color: var(--muted); }

.plan-list li.no .tick {
    background: rgba(134, 146, 163, 0.14);
    color: var(--muted);
}

.plan-foot { margin-top: auto; padding-top: 0.5rem; }

.plan-note {
    font-size: 0.75rem;
    color: var(--muted);
    text-align: center;
    margin: 0.6rem 0 0;
}

/* ----- مفتاح شهري/سنوي ----- */
.cycle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    margin-top: 1.25rem;
}

.cycle button {
    border: 0;
    background: transparent;
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--body);
    cursor: pointer;
}

.cycle button.on {
    background: linear-gradient(180deg, #0C9478, #0B6E5B);
    color: #fff;
}

.cycle .save {
    font-size: 0.6875rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: var(--emerald-soft);
    color: var(--brand);
    margin-inline-start: 0.35rem;
}

.cycle button.on .save { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* ----------------------------------------------------------
 * 19) جدول المقارنة
 * ----------------------------------------------------------
 * على الهاتف يُمرَّر أفقياً وعمودُ الميزة مثبَّت: جدولٌ يتقلّص حتى
 * يُقرأ كاملاً على 360px يصير حروفاً لا يقرأها أحد.
 * -------------------------------------------------------- */
.cmp-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.cmp {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.cmp th,
.cmp td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
    text-align: center;
    vertical-align: middle;
}

.cmp thead th {
    position: sticky;
    top: 72px;
    z-index: 2;
    background: var(--canvas);
    color: var(--ink);
    font-weight: 900;
    border-bottom: 2px solid var(--line);
}

.cmp thead th small {
    display: block;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--muted);
}

.cmp th.feat,
.cmp td.feat {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    background: #fff;
    text-align: start;
    font-weight: 700;
    color: var(--ink);
    min-width: 220px;
    box-shadow: 1px 0 0 var(--line);
}

.cmp thead th.feat { background: var(--canvas); z-index: 3; }

/* صفّ العنوان داخل الجدول: يفصل المجموعات فلا يقرأ الزائر أربعين
   سطراً متشابهاً */
.cmp tr.group td {
    background: var(--canvas);
    text-align: start;
    font-weight: 900;
    color: var(--brand);
    font-size: 0.875rem;
    letter-spacing: 0.2px;
}

.cmp tbody tr:hover td { background: rgba(0, 212, 166, 0.04); }
.cmp tbody tr:hover td.feat { background: rgba(0, 212, 166, 0.06); }

.cmp .yes { color: #16A34A; }
.cmp .nope { color: #C9D4D1; }
.cmp svg { width: 20px; height: 20px; }

.cmp .pickcol { background: rgba(0, 212, 166, 0.05); }

/* overflow يصنع حاوية تمرير، وposition:sticky داخلها يلتصق بها لا
   بالنافذة — فيختفي رأس الجدول عند النزول. على الشاشة الواسعة يتّسع
   الجدول أصلاً، فنرفع التمرير عنها ليلتصق الرأس بالشريط العلوي */
@media (min-width: 981px) {
    .cmp-wrap { overflow: visible; }
}

.cmp-hint {
    display: none;
    font-size: 0.8125rem;
    color: var(--muted);
    text-align: center;
    margin-top: 0.75rem;
}

@media (max-width: 760px) { .cmp-hint { display: block; } }

/* ----- بطاقات الإضافات ----- */
.addons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.addon {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.addon b { display: block; color: var(--ink); }
.addon p { margin: 0.2rem 0 0; font-size: 0.875rem; }

/* ===========================================================
 * 20) الوضع الغامق
 * ===========================================================
 * السمة على <html data-theme> لا صنفٌ على <body>: يُكتب في أول سطر
 * داخل <head> قبل أن يرسم المتصفح شيئاً، فلا تومض الصفحة بيضاء ثم
 * تسودّ — وهي وميضةٌ تُرى في كل تنقّل بين الصفحات.
 *
 * والألوان تُعاد تعريفها متغيّراتٍ لا قواعد: أغلب الورقة يقرأ من
 * :root أصلاً، فما يحتاج سطراً هنا هو ما كُتب فيه #fff صراحةً.
 *
 * والأخضر يُفتَح في الغامق (#22CFAA): #0B7F68 لون نصٍّ على أبيض،
 * وعلى داكن يصير بقعةً لا حرفاً.
 * =========================================================== */

html[data-theme="dark"] {
    --brand: #22CFAA;
    --brand-dark: #0C2B26;
    --brand-deep: #071C19;
    --emerald: #2FE3C0;
    --emerald-soft: rgba(34, 207, 170, 0.14);

    --ink: #EAF3F1;
    --body: #A9BDB8;
    --muted: #82948F;
    --line: rgba(255, 255, 255, 0.1);
    --surface: #0F1A18;
    --canvas: #15211F;

    /* سطحٌ واحد لكل البطاقات: الورقة كتبت #fff في عشرين قاعدة،
       وهذا المتغيّر يجمعها في موضع واحد يُبدَّل */
    --card: #17231F;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] body { background: var(--surface); }

html[data-theme="dark"] .nav {
    background: rgba(15, 26, 24, 0.85);
}

/* كل ما كُتب فيه أبيض صراحةً */
html[data-theme="dark"] .card,
html[data-theme="dark"] .plan,
html[data-theme="dark"] .post,
html[data-theme="dark"] .quote,
html[data-theme="dark"] .qa,
html[data-theme="dark"] .step,
html[data-theme="dark"] .facts,
html[data-theme="dark"] .side-box,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .addon,
html[data-theme="dark"] .logo-box,
html[data-theme="dark"] .store,
html[data-theme="dark"] .cycle,
html[data-theme="dark"] .cmp-wrap,
html[data-theme="dark"] .hero-float,
html[data-theme="dark"] .shot-fake,
html[data-theme="dark"] .nav-burger,
html[data-theme="dark"] .nav-toggle,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .pager a,
html[data-theme="dark"] .pager span,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .search input,
html[data-theme="dark"] .cmp th.feat,
html[data-theme="dark"] .cmp td.feat {
    background: var(--card);
    color: var(--body);
}

html[data-theme="dark"] .card h3,
html[data-theme="dark"] .plan-name,
html[data-theme="dark"] .quote p,
html[data-theme="dark"] .who b,
html[data-theme="dark"] .addon b,
html[data-theme="dark"] .field label,
html[data-theme="dark"] .qa summary,
html[data-theme="dark"] .cmp th.feat,
html[data-theme="dark"] .cmp td.feat,
html[data-theme="dark"] .brand,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea {
    color: var(--ink);
}

/* القائمة المنسدلة على الهاتف */
html[data-theme="dark"] .nav-links {
    background: var(--surface);
}

/* الشعارات لا تُقلب: بعضها داكن على شفاف فيختفي. نُفتّحها قليلاً */
html[data-theme="dark"] .logo-box img {
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

/* الأقسام الداكنة تبقى داكنة لكن أعمق من الصفحة، وإلا اختفى الفصل
   بينها وبين ما حولها */
html[data-theme="dark"] .sec.dark,
html[data-theme="dark"] .cta-band {
    background: linear-gradient(160deg, #10201C 0%, #0A1614 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .sec.dark { border-inline: 0; }

html[data-theme="dark"] .foot {
    background: #0A1513;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .page-head {
    background:
        radial-gradient(700px 320px at 80% -30%, rgba(34, 207, 170, 0.1), transparent 60%),
        var(--canvas);
}

html[data-theme="dark"] .hero {
    background:
        radial-gradient(1000px 520px at 85% -10%, rgba(34, 207, 170, 0.12), transparent 60%),
        radial-gradient(800px 420px at 5% 10%, rgba(34, 207, 170, 0.06), transparent 55%),
        var(--surface);
}

html[data-theme="dark"] .hero-shot {
    background: linear-gradient(160deg, #123B33, #0A211C);
}

html[data-theme="dark"] .prose blockquote,
html[data-theme="dark"] .prose code,
html[data-theme="dark"] .prose th,
html[data-theme="dark"] .author {
    background: var(--canvas);
}

html[data-theme="dark"] .btn-light {
    background: var(--brand);
    color: #062A23;
}

html[data-theme="dark"] .cmp .nope { color: #3E4F4B; }
html[data-theme="dark"] .cmp .yes { color: #35D98C; }
html[data-theme="dark"] .cmp .pickcol { background: rgba(34, 207, 170, 0.06); }
html[data-theme="dark"] .cmp tbody tr:hover td { background: rgba(34, 207, 170, 0.05); }
html[data-theme="dark"] .cmp tbody tr:hover td.feat { background: rgba(34, 207, 170, 0.08); }

/* زرّ التبديل نفسه */
.nav-toggle {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--body);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-toggle:hover {
    color: var(--brand);
    border-color: rgba(11, 127, 104, 0.35);
}

.nav-toggle svg { width: 19px; height: 19px; }

/* أيقونةٌ واحدة تظهر: القمر يعني «اذهب إلى الغامق»، والشمس عكسها.
   إظهارهما معاً يجعل الزرّ لغزاً */
.nav-toggle .i-sun { display: none; }
html[data-theme="dark"] .nav-toggle .i-moon { display: none; }
html[data-theme="dark"] .nav-toggle .i-sun { display: block; }

/* الترتيب: الشعار، ثم الروابط، ثم التبديل، ثم الأزرار */
@media (min-width: 961px) {
    .brand { order: 1; }
    .nav-links { order: 2; }
    .nav-toggle { order: 3; }
    .nav-cta { order: 4; }
}

@media (max-width: 960px) {
    .nav-toggle { margin-inline-start: auto; }
    .nav-burger { margin-inline-start: 0.5rem; }
}
