/* =========================================================
   معسكر حلول الحوسبة السحابية — هوية مجتمع TechnoRepos
   ========================================================= */

:root {
    /* هوية Cloud Camp — أحمد السماعيل */
    --brand: #5b2bd9;
    --brand-dark: #3f1c9e;
    --brand-light: #8b6cf0;
    --brand-soft: #efeafd;
    --deep: #1a0b2e;
    --deepest: #0f041f;
    --teal: #14b8a6;
    --teal-dark: #0d9488;
    --teal-soft: #e0f7f4;
    --pink: #e5466c;
    --pink-soft: #fdeff3;
    --ok: #12a150;
    --ok-soft: #e6f6ec;

    --ink: #1a0b2e;
    --body: #3d3a4f;
    --muted: #6f6a85;
    --line: #ebe7f3;
    --page: #ffffff;
    --tint: #f8f6ff;
    --white: #ffffff;

    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(26, 11, 46, 0.05), 0 6px 20px rgba(26, 11, 46, 0.06);
    --shadow-lg: 0 18px 44px rgba(26, 11, 46, 0.12);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);

    --gradient-blue: linear-gradient(135deg, #3f1c9e, #5b2bd9);
    --gradient-purple: linear-gradient(135deg, #1a0b2e, #3f1c9e);
    --gradient-accent: linear-gradient(135deg, #12a150, #22c55e);
    --gradient-secondary: linear-gradient(135deg, #e5466c, #f472b6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: 'IBM Plex Sans Arabic', -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--page);
    color: var(--body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input {
    font-family: inherit;
}

::selection {
    background: var(--brand);
    color: #fff;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.mono {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    direction: ltr;
    unicode-bidi: isolate;
}

/* ---------- أزرار مائلة مثل موقع المجتمع ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 30px;
    font-weight: 800;
    font-size: 0.98rem;
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.25s var(--ease), filter 0.25s var(--ease), box-shadow 0.25s var(--ease);
    white-space: nowrap;
}

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

.btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-teal {
    background: var(--brand);
    box-shadow: 0 8px 20px rgba(91, 43, 217, 0.28);
}

.btn-brand {
    background: var(--brand);
}

.btn-dark {
    background: var(--white);
    color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--line);
}

.btn-dark:hover {
    box-shadow: inset 0 0 0 1px var(--brand-light);
}

.btn-brand {
    box-shadow: 0 6px 16px rgba(91, 43, 217, 0.25);
}

.btn-sm {
    padding: 10px 22px;
    font-size: 0.9rem;
}

/* ---------- الهيدر ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--line);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    flex-shrink: 0;
}

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

.brand-text {
    line-height: 1.2;
}

.brand-text strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    direction: ltr;
    text-align: right;
}

.brand-text small {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
}

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

.nav a {
    position: relative;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.93rem;
    color: var(--body);
    border-radius: 8px;
    transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
    color: var(--brand);
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 12px;
    left: 12px;
    height: 3px;
    border-radius: 3px;
    background: var(--brand);
}

.head-end {
    display: flex;
    align-items: center;
    gap: 10px;
}

.partner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 6px;
    border-radius: 50px;
    border: 1px solid var(--line);
    background: var(--white);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.15;
    transition: border-color 0.2s;
}

.partner:hover {
    border-color: var(--brand-light);
}

.partner img,
.brand img {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

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

.partner small {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--muted);
}

@media (max-width: 680px) {
    .partner span {
        display: none;
    }

    .partner {
        padding: 5px;
    }
}

@media (max-width: 420px) {
    .join-txt {
        display: none;
    }

    .join-btn {
        padding: 10px 12px;
    }
}

/* ---------- الهيرو ---------- */
.hero-wrap {
    padding: 0;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 48px;
    padding: 72px 0 120px;
}

.hero-bg {
    position: absolute;
    inset: 0 0 0 0;
    z-index: -1;
    background:
        radial-gradient(600px 340px at 85% 10%, rgba(91, 43, 217, 0.12), transparent 70%),
        radial-gradient(500px 300px at 10% 90%, rgba(20, 184, 166, 0.12), transparent 70%),
        radial-gradient(rgba(26, 11, 46, 0.07) 1px, transparent 1px) 0 0 / 22px 22px;
    mask-image: linear-gradient(to bottom, #000 70%, transparent);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--white);
    border: 1px solid var(--line);
    color: var(--body);
    box-shadow: var(--shadow);
}

.pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 4px rgba(18, 161, 80, 0.18);
}

.hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4.6vw, 3.3rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--ink);
}

.grad {
    color: var(--brand);
    position: relative;
    white-space: nowrap;
}

.grad::after {
    content: '';
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0.05em;
    height: 0.28em;
    z-index: -1;
    border-radius: 4px;
    background: rgba(20, 184, 166, 0.35);
}

.hero p.lead {
    max-width: 560px;
    color: var(--body);
    font-size: 1.08rem;
}

.hero-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.hero-by {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 26px;
    font-size: 0.9rem;
    color: var(--muted);
}

.hero-by .av {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: #fff;
    background: var(--deep);
}

.hero-by b {
    color: var(--ink);
}

/* كرت الترمنال */
.term {
    direction: ltr;
    text-align: left;
    border-radius: 16px;
    overflow: hidden;
    background: #1a0b2e;
    color: #e4dcfb;
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(26, 11, 46, 0.08);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.86rem;
    transform: rotate(-1.5deg);
}

.term-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 16px;
    background: #0f041f;
    color: #8e84a8;
    font-size: 0.78rem;
}

.term-bar i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff5f57;
}

.term-bar i:nth-child(2) {
    background: #febc2e;
}

.term-bar i:nth-child(3) {
    background: #28c840;
    margin-right: 8px;
}

.term-body {
    padding: 18px 20px 22px;
    line-height: 1.9;
}

.term-body .p {
    color: #8b6cf0;
}

.term-body .o {
    color: #a197bd;
}

.term-body .k {
    color: #14b8a6;
}

.term-body .g {
    color: #4ade80;
}

.caret {
    display: inline-block;
    width: 8px;
    height: 1.05em;
    vertical-align: -2px;
    background: #14b8a6;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ---------- كرت الإحصائيات ---------- */
.stats {
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: -60px auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
}

.stat {
    padding: 26px 16px;
    text-align: center;
}

.stat + .stat {
    border-right: 1px solid var(--line);
}

.stat-value {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand);
    line-height: 1.2;
}

.stat-label {
    margin-top: 6px;
    font-weight: 800;
    color: var(--ink);
    font-size: 0.95rem;
}

.stat-sub {
    font-size: 0.78rem;
    color: var(--muted);
}

/* شريط التقدم */
.progress {
    max-width: 1000px;
    margin: 18px auto 0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 22px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.progress-label {
    font-weight: 800;
    color: var(--ink);
    font-size: 0.9rem;
    white-space: nowrap;
}

.progress-track {
    flex: 1;
    height: 10px;
    border-radius: 10px;
    background: var(--brand-soft);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--brand), var(--brand-light));
    transition: width 1.2s var(--ease);
}

.progress-percent {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-weight: 800;
    color: var(--brand);
    min-width: 3.2em;
    text-align: left;
}

/* ---------- عناوين الأقسام ---------- */
.section {
    padding: 84px 0 0;
}

.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 40px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--brand);
}

.eyebrow {
    padding: 4px 12px;
    border-radius: 50px;
    background: var(--brand-soft);
}

.eyebrow::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
}

.section-head h2 {
    margin: 8px 0 8px;
    font-size: clamp(1.7rem, 3.6vw, 2.3rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
}

.section-head p {
    color: var(--muted);
}

.soft-panel {
    background: var(--tint);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 64px 32px;
}

/* ---------- رسالة المدرب ---------- */
.note {
    max-width: 1000px;
    margin: 40px auto 0;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 24px 26px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--line);
    border-right: 5px solid var(--teal);
    box-shadow: var(--shadow);
}

.note-avatar {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 700;
    font-size: 1.2rem;
}

.note h3 {
    color: var(--ink);
    font-weight: 700;
    font-size: 1.1rem;
}

.note .by {
    font-size: 0.82rem;
    color: var(--brand);
    font-weight: 700;
    margin-bottom: 6px;
}

.note p {
    font-size: 0.96rem;
}

/* ---------- خطوات المسار ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 26px 22px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: #d8cff7;
}

.step-num {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    margin-bottom: 14px;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-weight: 800;
    color: #fff;
    background: var(--brand);
}

.step:nth-child(4) .step-num {
    background: var(--teal);
    color: var(--deep);
}

.step h3 {
    color: var(--ink);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.step p {
    font-size: 0.9rem;
    color: var(--muted);
}

/* ---------- منصات التطبيق ---------- */
.platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 18px;
}

.platform {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}

.platform:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: #d8cff7;
}

.platform-ic {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    background: var(--brand-soft);
}

.platform .tag {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.05em;
    direction: ltr;
    text-align: right;
}

.platform h3 {
    color: var(--ink);
    font-weight: 700;
    font-size: 1.12rem;
}

.platform p {
    flex: 1;
    font-size: 0.9rem;
    color: var(--muted);
}

.go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    color: var(--brand);
    font-size: 0.92rem;
}

.go svg {
    width: 16px;
    height: 16px;
    transition: transform 0.25s var(--ease);
}

a:hover .go svg {
    transform: translateX(-4px);
}

/* ---------- التصفح: فلاتر + بحث ---------- */
.browse {
    position: sticky;
    top: 72px;
    z-index: 50;
    padding: 14px 0;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
}

.browse-inner {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.quick-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 5px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.quick-filter-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--body);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.quick-filter-btn:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

.quick-filter-btn.active {
    background: var(--brand);
    color: #fff;
}

.search-input {
    flex: 1;
    min-width: 220px;
    padding: 13px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    color: var(--ink);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder {
    color: var(--muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-light);
    box-shadow: 0 0 0 4px rgba(91, 43, 217, 0.15);
}

/* ---------- أقسام المحتوى ---------- */
.labs-section {
    padding-top: 64px;
}

.labs-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.labs-head h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink);
}

.labs-head h2 .ic {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    font-size: 1.3rem;
}

.labs-head p {
    color: var(--muted);
    font-size: 0.93rem;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--brand);
    background: var(--brand-soft);
}

.labs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr));
    gap: 20px;
}

/* بطاقة اللاب (يولدها script.js) */
.lab-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
    animation: fadeUp 0.5s var(--ease) backwards;
}

.lab-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: #d8cff7;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.lab-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 22px 0;
}

.lab-category {
    display: inline-block;
    padding: 4px 14px;
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
    border-radius: 50px;
}

.lab-favorite {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--white);
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.lab-favorite:hover {
    color: var(--pink);
    border-color: var(--pink);
    background: var(--pink-soft);
}

.lab-favorite.active {
    color: #fff;
    background: var(--pink);
    border-color: var(--pink);
}

.lab-favorite svg {
    width: 17px;
    height: 17px;
}

.lab-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 22px 22px;
}

.lab-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.5;
    margin-bottom: 8px;
}

.lab-description {
    flex: 1;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.75;
    margin-bottom: 14px;
}

.lab-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.lab-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--body);
}

.lab-meta-item svg {
    width: 15px;
    height: 15px;
    color: var(--teal);
}

.lab-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.lab-tag {
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--brand-dark);
    background: var(--brand-soft);
}

.lab-actions {
    display: flex;
    gap: 8px;
}

.lab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 12px;
    border-radius: 12px;
    border: none;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.lab-btn-primary {
    background: var(--brand);
    color: #fff;
}

.lab-btn-primary:hover {
    background: var(--brand-dark);
}

.lab-btn-secondary {
    background: var(--white);
    color: var(--ink);
    border: 1px solid var(--line);
}

.lab-btn-secondary:hover {
    border-color: var(--ok);
    color: var(--ok);
    background: var(--ok-soft);
}

.lab-completed {
    border-color: rgba(18, 161, 80, 0.4);
    background: linear-gradient(180deg, #f1faf4, #fff 40%);
}

.lab-completed::before {
    content: '✓ مكتمل';
    position: absolute;
    top: 20px;
    left: 66px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--ok);
    background: var(--ok-soft);
}

.skeleton {
    animation: skeleton 1s linear infinite alternate;
}

@keyframes skeleton {
    from {
        background-color: #f3effd;
    }
    to {
        background-color: #e7e0fa;
    }
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    background: var(--white);
    border: 1px dashed #d8cff7;
    border-radius: var(--radius);
}

.empty-state svg {
    width: 48px !important;
    height: 48px !important;
    opacity: 0.5;
    margin-bottom: 8px;
}

.empty-state h3 {
    color: var(--ink);
    font-size: 1rem;
}

/* تبويبات الاختبارات */
.exam-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 5px;
    margin-bottom: 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.exam-tab {
    padding: 9px 20px;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--body);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.exam-tab.active {
    background: var(--deep);
    color: #fff;
}

.exam-tab-content {
    display: none;
}

.exam-tab-content.active {
    display: grid;
}

/* ---------- المجتمع ---------- */
.flow {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--ink);
}

.flow span {
    padding: 8px 16px;
    border-radius: 50px;
    background: var(--white);
    border: 1px solid var(--line);
}

.flow b {
    color: var(--brand-light);
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin: 0 auto;
    gap: 20px;
}

.c-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px 26px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.c-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.c-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: var(--accent);
}

.c-card .c-ic {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
}

.c-card .c-ic img {
    width: 34px;
    height: 34px;
}

.c-card .c-ic svg {
    width: 28px;
    height: 28px;
}

.c-card .c-tag {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent);
    direction: ltr;
    text-align: right;
}

.c-card h3 {
    color: var(--ink);
    font-weight: 700;
    font-size: 1.3rem;
}

.c-card p {
    flex: 1;
    font-size: 0.94rem;
    color: var(--body);
}

.c-card .go {
    color: var(--accent);
}

.c-card.tr {
    --accent: #5b2bd9;
    --accent-soft: #efeafd;
}

.c-card.yt {
    --accent: #e11d48;
    --accent-soft: #ffe4e8;
}

.c-card.me {
    --accent: var(--brand);
    --accent-soft: var(--brand-soft);
}

.c-card.me .c-ic {
    font-weight: 700;
    font-size: 1.3rem;
}

.c-card.me .en {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
    direction: ltr;
    text-align: right;
    margin-top: -6px;
}

.quote {
    margin-top: 26px;
    text-align: center;
    font-weight: 800;
    color: var(--ink);
    font-size: 1.05rem;
}

.quote span {
    color: var(--brand);
}

/* ---------- CTA ---------- */
.cta {
    position: relative;
    overflow: hidden;
    margin-top: 84px;
    padding: 54px 32px;
    border-radius: 26px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(600px 300px at 0% 100%, rgba(20, 184, 166, 0.22), transparent 60%),
        linear-gradient(135deg, #1a0b2e, #3f1c9e);
}

.cta h2 {
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    font-weight: 700;
    margin-bottom: 8px;
}

.cta p {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 24px;
}

/* ---------- الفوتر ---------- */
.site-footer {
    margin-top: 84px;
    border-top: 1px solid var(--line);
    background: var(--white);
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 30px 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

.footer-links a {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--body);
}

.footer-links a:hover {
    color: var(--brand);
}

.socials {
    display: flex;
    gap: 8px;
}

.socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    color: var(--ink);
    transition: all 0.2s;
}

.socials a:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.socials svg {
    width: 17px;
    height: 17px;
}

.footer-bottom {
    padding: 18px 0 26px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

.footer-bottom a {
    color: var(--brand);
    font-weight: 700;
}

/* ---------- ظهور تدريجي ---------- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ---------- الجوال ---------- */
@media (max-width: 1000px) {
    .nav {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero p.lead {
        margin: 0 auto;
    }

    .hero-ctas,
    .hero-by {
        justify-content: center;
    }

    .term {
        max-width: 520px;
        margin: 0 auto;
        width: 100%;
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .community-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .container {
        padding: 0 16px;
    }

    .site-header .container {
        height: 64px;
    }

    html {
        scroll-padding-top: 150px;
    }

    .brand-text small {
        display: none;
    }

    .hero {
        padding: 40px 0 100px;
        gap: 32px;
    }

    .term {
        font-size: 0.78rem;
        transform: none;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        margin: -56px 0 0;
    }

    .stat:nth-child(3) {
        border-right: none;
    }

    .stat:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .soft-panel {
        padding: 44px 16px;
        border-radius: 22px;
    }

    .browse {
        top: 64px;
    }

    .quick-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        width: 100%;
        scrollbar-width: none;
    }

    .quick-filters::-webkit-scrollbar {
        display: none;
    }

    .search-input {
        min-width: 0;
        width: 100%;
    }

    .note {
        flex-direction: column;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
