/*
 * موقع العائلة — ghosn.ae/{code}
 * يعيد نظام تصميم binkalban.ae (INVENTORY §D) بـ CSS عاديّ بلا بناء.
 * الألوان والخطّ من متغيّراتٍ تكتبها كلّ عائلة في <head> (App\Support\FamilyTheme).
 * الاتّجاه بالخصائص المنطقيّة (inline-start/end) فيصلح للعربيّة والإنجليزيّة.
 * نقطة التحوّل lg = 1024px: تحتها واجهة التطبيق (شريطان)، وفوقها واجهة الموقع (رأس وتذييل).
 */

:root {
    --primary: #225228;
    --primary-hover: #1a3f1f;
    --primary-rgb: 34 82 40;
    --muted: #edf2ee;
    --shadow-card: 0 4px 24px rgba(34, 82, 40, 0.08);
    --font: "Readex Pro";
    --background: #ffffff;
    --foreground: #1a1a1a;
    --fg-rgb: 26 26 26;
    --surface: #f5f5f7;
    --border-subtle: rgba(0, 0, 0, 0.06);
    --link: #059669;
    --danger: #dc2626;
    --ring: 0 0 0 1px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

html[data-splash] { background-color: var(--primary); }

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--surface);
    color: var(--foreground);
    font-family: var(--font), system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
    font-variant-numeric: lining-nums;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; }
[hidden] { display: none !important; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums lining-nums; direction: ltr; unicode-bidi: isolate; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.icon-sm { width: 1rem; height: 1rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
[dir="rtl"] .flip { transform: scaleX(-1); }
[dir="ltr"] .flip-ltr { transform: scaleX(-1); }
.muted-text { color: rgb(var(--fg-rgb) / 0.6); }
.text-primary { color: var(--primary); }
.text-link { color: var(--link); }
.text-link:hover { text-decoration: underline; }
.mt-2 { margin-top: .5rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

/* ------------------------------------------------------------------ الحاوية */

.container { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
.site-main { width: 100%; max-width: 72rem; margin-inline: auto; padding: 1.5rem 1rem; min-width: 0; overflow-x: clip; flex: 1 0 auto; }
.shell { display: flex; flex-direction: column; min-height: 100dvh; padding-bottom: 5rem; }

@media (min-width: 768px) {
    .container { padding-inline: 1.5rem; }
    .site-main { padding: 2rem 1.5rem; }
}

/* ------------------------------------------------------------------ الأزرار */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    border: 0; border-radius: .75rem; font-weight: 500; font-size: .875rem; line-height: 1.25rem;
    padding: .625rem 1rem; white-space: nowrap; text-align: center;
    background: var(--primary); color: #fff;
    transition: background-color .15s, color .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { background: var(--primary-hover); }
.btn:focus-visible { outline: 2px solid rgb(var(--primary-rgb) / .4); outline-offset: 2px; }
.btn:disabled, .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-secondary { background: var(--muted); color: var(--primary); }
.btn-secondary:hover { background: rgb(var(--primary-rgb) / .1); }
.btn-ghost { background: transparent; color: rgb(var(--fg-rgb) / .8); }
.btn-ghost:hover { background: var(--muted); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: var(--muted); }
.btn-sm { padding: .375rem .75rem; font-size: .875rem; }
.btn-lg { padding: .75rem 1.5rem; font-size: 1rem; line-height: 1.5rem; }
.btn-pill { border-radius: 9999px; }
.btn-block { width: 100%; }
.btn-xl { padding-block: 1rem; font-size: 1rem; }
.link-btn { background: none; border: 0; padding: 0; color: var(--link); font-weight: 500; font-size: .875rem; }
.link-btn:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ البطاقات */

.section-shell {
    border-radius: 1rem; background: #fff; padding: 1.5rem;
    box-shadow: var(--shadow-sm), var(--ring);
}
@media (min-width: 768px) { .section-shell { padding: 2rem; } }

.card {
    border-radius: 1rem; background: #fff; padding: 1rem;
    box-shadow: var(--shadow-sm), var(--ring);
}
@media (min-width: 640px) { .card { padding: 1.25rem; } }
.card-elevated { box-shadow: var(--shadow-card); }

/* ------------------------------------------------------------------ الشارات */

.chip {
    display: inline-flex; align-items: center; gap: .375rem;
    border-radius: 9999px; border: 1px solid rgb(var(--primary-rgb) / .2);
    background: rgb(var(--primary-rgb) / .05); color: var(--primary);
    padding: .375rem .75rem; font-size: .75rem; font-weight: 500; line-height: 1rem;
}
.chip-sm { padding: .125rem .5rem; font-size: .6875rem; }
.chip-neutral { border-color: rgba(0, 0, 0, .1); background: #f4f4f5; color: #52525b; }
.chip-amber { border-color: #fcd34d; background: #fffbeb; color: #b45309; }
.chip-green { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.code-chip {
    display: inline-block; border-radius: .375rem; background: var(--muted); color: var(--primary);
    padding: .125rem .5rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .75rem;
    direction: ltr; unicode-bidi: isolate;
}

/* ------------------------------------------------------------------ رأس الصفحة */

.page-header { margin-bottom: 2rem; }
.page-header-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.page-header h1 { font-size: 1.5rem; line-height: 2rem; font-weight: 700; color: var(--primary); }
.page-header .subtitle { margin-top: .5rem; max-width: 42rem; font-size: .875rem; color: rgb(var(--fg-rgb) / .7); }
.page-header.hero {
    border-radius: 1rem; padding: 1.5rem; color: #fff;
    background: linear-gradient(to bottom left, var(--primary), var(--primary-hover));
}
[dir="ltr"] .page-header.hero { background: linear-gradient(to bottom right, var(--primary), var(--primary-hover)); }
.page-header.hero h1 { color: #fff; }
.page-header.hero .subtitle { color: rgba(255, 255, 255, .85); }
.page-header.compact { margin-bottom: 1.5rem; padding: 1rem; }
@media (min-width: 768px) {
    .page-header h1 { font-size: 1.875rem; line-height: 2.25rem; }
    .page-header .subtitle { font-size: 1rem; }
    .page-header.hero { padding: 2rem; }
    .page-header.compact { margin-bottom: 2rem; padding: 1.5rem; }
}

.back-link { display: inline-flex; align-items: center; gap: .25rem; margin-bottom: 1rem; font-size: .875rem; color: var(--link); }
.back-link:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ الأقسام */

.section { padding-block: 2rem; }
@media (min-width: 768px) { .section { padding-block: 3rem; } }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head .eyebrow { margin-bottom: .25rem; font-size: .75rem; font-weight: 600; letter-spacing: .025em; color: rgb(var(--primary-rgb) / .7); }
.section-head h2 { font-size: 1.5rem; line-height: 2rem; font-weight: 700; color: var(--primary); }
.section-head .sub { margin-top: .5rem; max-width: 42rem; font-size: .875rem; color: rgb(var(--fg-rgb) / .65); }
@media (min-width: 768px) {
    .section-head h2 { font-size: 1.875rem; line-height: 2.25rem; }
    .section-head .sub { font-size: 1rem; }
}

.only-lg { display: none; }
.only-md { display: none; }
@media (min-width: 768px) { .only-md { display: block; } .hide-md { display: none !important; } }
@media (min-width: 1024px) { .only-lg { display: block; } .hide-lg { display: none !important; } }

/* ------------------------------------------------------------------ الشبكات والمنزلقات */

.content-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .content-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.home-grid { display: none; gap: 1rem; }
@media (min-width: 768px) { .home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.slider {
    display: flex; gap: .75rem; overflow-x: auto; margin-inline: -1rem; padding: 0 1rem .25rem;
    scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.slider::-webkit-scrollbar { display: none; }
.slider > * { flex: 0 0 calc((100% - .75rem) / 1.5); min-width: calc((100% - .75rem) / 1.5); scroll-snap-align: start; }
@media (min-width: 768px) { .slider { display: none; } }

/* ------------------------------------------------------------------ بطاقات المحتوى */

.c-card {
    display: block; overflow: hidden; border-radius: 1rem; background: #fff;
    box-shadow: var(--shadow-sm), var(--ring); transition: box-shadow .2s, transform .2s;
}
.c-card:hover { box-shadow: var(--shadow-md), var(--ring); }
.c-media { position: relative; height: 11rem; width: 100%; overflow: hidden; background: var(--muted); }
.c-media img, .c-media video { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.c-card:hover .c-media img, .c-card:hover .c-media video { transform: scale(1.05); }
.c-media .c-placeholder { display: flex; height: 100%; align-items: center; justify-content: center; color: rgb(var(--primary-rgb) / .35); }
.c-media .c-placeholder .icon { width: 2.5rem; height: 2.5rem; }
.c-media .c-badge { position: absolute; inset-block-start: .625rem; inset-inline-start: .625rem; }
.c-media .c-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .25); color: #fff; }
.c-body { padding: 1rem; }
.c-title { font-weight: 700; color: var(--primary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-excerpt { margin-top: .5rem; font-size: .875rem; color: rgb(var(--fg-rgb) / .7); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-sched { margin-top: .25rem; font-size: .75rem; color: rgb(var(--fg-rgb) / .55); }
.c-loc { margin-top: .125rem; font-size: .75rem; color: rgb(var(--fg-rgb) / .6); }
.c-meta { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--border-subtle); }

/* الكاتب والصورة الرمزيّة */
.author { display: flex; align-items: center; gap: .625rem; min-width: 0; }
.author-name { font-weight: 600; color: rgb(var(--fg-rgb) / .85); font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author time { display: block; margin-top: .125rem; font-size: .75rem; color: rgb(var(--fg-rgb) / .5); }
.author.md .author-name { font-size: 1rem; }
.author.md time { font-size: .875rem; }

.avatar {
    position: relative; display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; overflow: hidden;
    width: 2.25rem; height: 2.25rem; border-radius: 9999px;
    background: rgb(var(--primary-rgb) / .1); box-shadow: 0 0 0 1px rgb(var(--primary-rgb) / .15);
    color: var(--primary); font-weight: 700; font-size: 1rem; line-height: 1;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.md { width: 2.75rem; height: 2.75rem; }
.avatar.lg { width: 2.5rem; height: 2.5rem; }
.avatar.xl { width: 6rem; height: 6rem; font-size: 2.25rem; }
.avatar.sm { width: 2.125rem; height: 2.125rem; font-size: .875rem; }

/* ------------------------------------------------------------------ النصّ الطويل */

.prose { line-height: 1.85; color: rgb(var(--fg-rgb) / .85); overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3 { color: var(--primary); font-weight: 700; line-height: 1.4; }
.prose h2 { font-size: 1.375rem; margin-top: 1.5em; }
.prose h3 { font-size: 1.125rem; margin-top: 1.25em; }
.prose ul, .prose ol { padding-inline-start: 1.5rem; }
.prose li + li { margin-top: .25rem; }
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { opacity: .85; }
.prose img { border-radius: .75rem; height: auto; }

/* ------------------------------------------------------------------ الحقول */

.form { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field { display: flex; flex-direction: column; min-width: 0; }
.label { display: block; margin-bottom: .375rem; font-size: .875rem; font-weight: 500; color: var(--foreground); }
.label .opt { font-weight: 400; color: rgb(var(--fg-rgb) / .5); }
.input, .select, .textarea {
    width: 100%; border-radius: .75rem; border: 1px solid rgba(0, 0, 0, .1); background: #fff;
    padding: .625rem 1rem; font-size: .9375rem; line-height: 1.5rem; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(var(--primary-rgb) / .2); }
.input[readonly] { background: #fafafa; color: rgb(var(--fg-rgb) / .7); }
.textarea { resize: vertical; min-height: 7rem; }
.select { appearance: none; padding-inline-end: 2.25rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left .75rem center; }
[dir="ltr"] .select { background-position: right .75rem center; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.input[type="file"] { padding: .5rem .75rem; font-size: .875rem; }
.input[type="file"]::file-selector-button { margin-inline-end: .75rem; border: 0; border-radius: .5rem; background: var(--muted); color: var(--primary); padding: .375rem .75rem; font: inherit; font-weight: 500; cursor: pointer; }
.error { margin-top: .25rem; font-size: .75rem; color: var(--danger); }
.hint { margin-top: .25rem; font-size: .75rem; color: rgb(var(--fg-rgb) / .55); }
.phone-group { display: flex; gap: .5rem; direction: ltr; }
.phone-group .select { flex: 0 0 7.5rem; }
.phone-group .input { flex: 1 1 auto; min-width: 0; }
.check { display: flex; align-items: flex-start; gap: .5rem; font-size: .875rem; color: rgb(var(--fg-rgb) / .75); }
.check input { margin-top: .3rem; accent-color: var(--primary); width: 1rem; height: 1rem; flex-shrink: 0; }
.hp-field { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* حقول الدخول بخطٍّ سفليّ */
.uline-form { display: flex; flex-direction: column; gap: 2rem; }
.uline label.uline-label { display: block; margin-bottom: .5rem; font-size: .875rem; font-weight: 600; color: var(--foreground); }
.uline-box { position: relative; border-bottom: 2px solid rgb(var(--primary-rgb) / .8); padding-bottom: .5rem; }
.uline-box input, .uline-box select {
    width: 100%; border: 0; background: transparent; outline: none; font-size: .875rem; line-height: 1.5rem;
    padding-inline-start: 2.5rem; padding-inline-end: .5rem; appearance: none; border-radius: 0;
}
.uline-box input::placeholder { color: rgb(var(--fg-rgb) / .35); }
.uline-box select:invalid, .uline-box select.is-empty { color: rgb(var(--fg-rgb) / .35); }
.uline-box select:disabled { opacity: .5; }
.uline-box .uline-icon { position: absolute; inset-inline-start: 0; top: calc(50% - .25rem); transform: translateY(-50%); color: rgb(var(--fg-rgb) / .4); pointer-events: none; }
.uline-box:focus-within { border-bottom-color: var(--primary); }
.uline .error { text-align: start; }
.uline-phone { display: flex; gap: .75rem; direction: ltr; }
.uline-phone .uline-box:first-child { flex: 0 0 7rem; }
.uline-phone .uline-box:first-child select { padding-inline-start: .25rem; }
.uline-phone .uline-box:last-child { flex: 1 1 auto; }

/* ------------------------------------------------------------------ التبويبات */

.tabs { display: flex; margin-bottom: 2rem; border-bottom: 1px solid rgb(var(--fg-rgb) / .15); }
.tabs button, .tabs a {
    flex: 1; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none;
    padding: .75rem 0; text-align: center; font-size: .875rem; font-weight: 600; color: rgb(var(--fg-rgb) / .5);
    transition: color .15s, border-color .15s;
}
.tabs button:hover, .tabs a:hover { color: var(--primary); }
.tabs .is-active { border-bottom-color: var(--primary); color: var(--primary); }

.seg { display: flex; margin-bottom: 1rem; padding: .25rem; border-radius: .75rem; border: 1px solid var(--border-subtle); background: rgb(from var(--muted) r g b / .3); background: color-mix(in srgb, var(--muted) 30%, transparent); }
.seg button { flex: 1; border: 0; border-radius: .5rem; background: none; padding: .5rem 0; font-size: .875rem; font-weight: 600; color: rgb(var(--fg-rgb) / .55); }
.seg button.is-active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------------ الحالة الفارغة والتحميل */

.empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    border-radius: 1rem; border: 1px dashed rgba(0, 0, 0, .12); background: #fff; padding: 3rem 1.5rem;
}
.empty-icon { display: flex; width: 3rem; height: 3rem; align-items: center; justify-content: center; margin-bottom: .75rem; border-radius: 9999px; background: var(--muted); color: var(--primary); }
.empty-title { font-size: 1.125rem; font-weight: 600; color: rgb(var(--fg-rgb) / .85); }
.empty-text { margin-top: .5rem; max-width: 28rem; font-size: .875rem; color: rgb(var(--fg-rgb) / .6); }
.empty .btn { margin-top: 1.25rem; }

.loader { display: inline-block; width: 2rem; height: 2rem; border-radius: 9999px; border: 3px solid rgb(var(--primary-rgb) / .2); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ التنبيهات */

.flash { display: flex; align-items: flex-start; gap: .625rem; margin-bottom: 1.25rem; border-radius: .75rem; padding: .75rem 1rem; font-size: .875rem; }
.flash-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-warning, .flash-pending { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.flash-info { background: var(--muted); color: var(--primary); border: 1px solid rgb(var(--primary-rgb) / .15); }
.note { border-radius: .75rem; background: var(--muted); color: var(--primary); padding: .75rem 1rem; font-size: .875rem; }

/* ------------------------------------------------------------------ رأس الموقع (lg+) */

.site-header { display: none; }
@media (min-width: 1024px) {
    .site-header {
        display: block; position: sticky; top: 0; z-index: 50;
        border-bottom: 1px solid var(--border-subtle); background: rgba(255, 255, 255, .95);
        -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    }
}
.site-header .bar { display: flex; align-items: center; gap: 1rem; max-width: 72rem; margin-inline: auto; padding: .625rem 1.5rem; }
.site-header .main-nav { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; justify-content: center; gap: .125rem; }
.site-header .actions { display: flex; flex-shrink: 0; align-items: center; gap: .5rem; }
.site-header .divider { width: 1px; height: 1.25rem; margin-inline: .125rem; background: var(--border-subtle); }

.nav-link {
    display: inline-flex; flex-shrink: 0; align-items: center; gap: .375rem; white-space: nowrap;
    border-radius: .5rem; padding: .375rem .5rem; font-size: .875rem; font-weight: 500;
    color: rgb(var(--fg-rgb) / .7); transition: background-color .15s, color .15s;
}
.nav-link .icon { width: 1rem; height: 1rem; opacity: .8; }
.nav-link:hover { background: var(--muted); color: var(--primary); }
.nav-link.is-active { background: rgb(var(--primary-rgb) / .1); color: var(--primary); font-weight: 600; }
@media (min-width: 1280px) { .site-header .main-nav { gap: .25rem; } .nav-link { padding-inline: .625rem; } }

.lang-btn { display: inline-flex; align-items: center; gap: .25rem; border-radius: .5rem; padding: .375rem .5rem; font-size: .8125rem; font-weight: 600; color: rgb(var(--fg-rgb) / .65); }
.lang-btn:hover { background: var(--muted); color: var(--primary); }

.badge-dot { position: absolute; inset-block-start: -.25rem; inset-inline-end: -.25rem; min-width: 1.125rem; height: 1.125rem; padding: 0 .25rem; border-radius: 9999px; background: var(--danger); color: #fff; font-size: .625rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* الشعار */
.logo { display: inline-flex; flex-shrink: 0; align-items: center; gap: .625rem; opacity: .95; transition: opacity .15s; }
.logo:hover { opacity: 1; }
.logo img { height: auto; width: auto; object-fit: contain; }
.logo-mark {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 2.75rem; height: 2.75rem; border-radius: 9999px;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 1.25rem; line-height: 1;
}
.logo-name { font-weight: 700; color: var(--primary); font-size: 1rem; line-height: 1.2; white-space: nowrap; }
.on-primary .logo-mark { background: #fff; color: var(--primary); }
.on-primary .logo-name { color: #fff; }
.logo-white-filter { filter: brightness(0) invert(1); }
.site-header .logo img { max-height: 2.75rem; max-width: 8.75rem; }

/* قائمة الحساب */
.menu { position: relative; }
.menu-btn {
    display: inline-flex; align-items: center; gap: .375rem; border-radius: 9999px;
    border: 1px solid rgb(var(--fg-rgb) / .15); background: none; padding: .125rem; padding-inline-end: .5rem;
    transition: border-color .15s, background-color .15s;
}
.menu-btn:hover, .menu-btn.is-active { border-color: rgb(var(--primary-rgb) / .3); background: var(--muted); }
.menu-btn .chev { width: 1rem; height: 1rem; color: rgb(var(--fg-rgb) / .5); transition: transform .15s; }
.menu.is-open .menu-btn .chev { transform: rotate(180deg); }
.menu-panel {
    position: absolute; inset-inline-end: 0; top: calc(100% + .35rem); z-index: 60; min-width: 15rem; overflow: hidden;
    border-radius: .75rem; border: 1px solid rgb(var(--fg-rgb) / .1); background: #fff; padding-block: .25rem; box-shadow: var(--shadow-lg);
}
.menu-head { display: flex; align-items: center; gap: .75rem; border-bottom: 1px solid rgb(var(--fg-rgb) / .1); padding: .75rem 1rem; }
.menu-head p { font-size: .875rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-head small { display: block; font-size: .75rem; color: rgb(var(--fg-rgb) / .55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: start; }
.menu-item { display: flex; width: 100%; align-items: center; gap: .5rem; border: 0; background: none; padding: .625rem 1rem; font-size: .875rem; color: rgb(var(--fg-rgb) / .8); text-align: start; }
.menu-item .icon { width: 1rem; height: 1rem; opacity: .7; }
.menu-item:hover { background: var(--muted); color: var(--primary); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: #fef2f2; color: var(--danger); }
.menu-sep { margin-block: .25rem; border-top: 1px solid rgb(var(--fg-rgb) / .1); }

/* ------------------------------------------------------------------ واجهة التطبيق (أقلّ من lg) */

.mobile-bar {
    position: sticky; top: 0; z-index: 50;
    border-bottom: 1px solid var(--border-subtle); background: rgba(255, 255, 255, .98);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    padding: .5rem 1rem; padding-top: max(.5rem, env(safe-area-inset-top));
}
@media (min-width: 1024px) { .mobile-bar { display: none; } }
.mobile-bar .top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .375rem; }
.mobile-bar .icons { display: flex; align-items: center; gap: .375rem; }
.icon-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    border-radius: .75rem; border: 1px solid var(--border-subtle); background: color-mix(in srgb, var(--muted) 50%, transparent);
    padding: .5rem; color: var(--primary); font-size: .75rem; font-weight: 700; min-width: 2.375rem; height: 2.375rem;
}
.icon-btn:hover { background: var(--muted); }
.icon-btn.is-active { border-color: rgb(var(--primary-rgb) / .3); background: rgb(var(--primary-rgb) / .1); }
.tree-pill { display: inline-flex; align-items: center; gap: .375rem; border-radius: .75rem; background: var(--primary); color: #fff; padding: .5rem .75rem; font-size: .75rem; font-weight: 600; box-shadow: var(--shadow-sm); }
.tree-pill:hover { background: var(--primary-hover); }
.tree-pill .icon { width: 1rem; height: 1rem; }
.mobile-bar .brand { display: flex; justify-content: center; }
.mobile-bar .brand img { max-height: 4rem; max-width: min(9rem, 42vw); }
.mobile-bar .brand .logo-mark { width: 3rem; height: 3rem; font-size: 1.375rem; }

.bottom-nav {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 40; display: flex;
    border-top: 1px solid var(--border-subtle); background: #fff; padding: .5rem; padding-bottom: max(.5rem, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 12px rgba(0, 0, 0, .06);
}
@media (min-width: 1024px) { .bottom-nav { display: none; } .shell { padding-bottom: 0; } }
.bottom-nav a { display: flex; flex: 1; flex-direction: column; align-items: center; gap: .125rem; font-size: .75rem; color: rgb(var(--fg-rgb) / .5); }
.bottom-nav a.is-active { color: var(--primary); }
.bottom-nav .icon { width: 1.25rem; height: 1.25rem; }

/* ------------------------------------------------------------------ التذييل (lg+) */

.made-by { position: fixed; inset-inline: 0; bottom: 0; z-index: 41; display: flex; align-items: center; justify-content: center;
           gap: .75rem; height: 3rem; padding: 0 1rem; background: #fff; border-top: 1px solid var(--border-subtle, #ececec);
           box-shadow: 0 -4px 12px rgba(0, 0, 0, .05); white-space: nowrap; }
/* الحاسب: مكانٌ له أسفل الصفحة كي لا يغطّي التذييل */
@media (min-width: 1024px) { .shell { padding-bottom: 3rem; } }
/* الجوال: يُخفى إلّا في «حسابي»، وهناك فوق القائمة السفليّة مباشرة */
@media (max-width: 1023.98px) {
    .made-by { display: none; }
    .made-by.made-by-mobile { display: flex; bottom: var(--bottom-nav-h, 4.25rem); height: 2.5rem; box-shadow: none; }
    .shell.shell-made-by-mobile { padding-bottom: calc(5rem + 2.5rem); }
}
.made-by-logo { display: inline-flex; }
.made-by-logo img { height: 1.375rem; width: auto; display: block; }
.made-by-sep { width: 1px; height: 1rem; background: var(--border-subtle, #e5e5e5); }
.made-by-text { font-size: .8rem; color: #737373; text-decoration: none; }
.made-by-text:hover { color: var(--primary); }
.site-footer { display: none; }
@media (min-width: 1024px) { .site-footer { display: block; margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .1); background: var(--primary); color: #fff; } }
.site-footer .inner { max-width: 72rem; margin-inline: auto; padding: 3rem 1.5rem; }
.site-footer .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; }
.site-footer .about { max-width: 24rem; }
.site-footer .about p { margin-top: 1rem; font-size: .875rem; line-height: 1.65; color: rgba(255, 255, 255, .8); }
.site-footer .logo img { max-height: 3.5rem; max-width: 10rem; }
.site-footer nav { display: grid; grid-template-columns: repeat(3, auto); gap: .5rem 2rem; }
.site-footer nav a { font-size: .875rem; color: rgba(255, 255, 255, .85); transition: color .15s; }
.site-footer nav a:hover { color: #fff; }
.site-footer .bottom { margin-top: 2rem; border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 1.5rem; text-align: center; font-size: .75rem; color: rgba(255, 255, 255, .6); }
.site-footer .bottom p + p { margin-top: .25rem; }
.site-footer .bottom a { color: rgba(255, 255, 255, .8); }
.site-footer .bottom a:hover { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------------ الرئيسيّة */

.home-hero { display: none; margin-bottom: .75rem; padding: .25rem .5rem; text-align: center; }
@media (min-width: 1024px) { .home-hero { display: block; } }
.home-hero .hero-logo { display: flex; justify-content: center; margin-bottom: .25rem; }
.home-hero .hero-logo img { width: min(13rem, 75%); height: auto; max-height: 9rem; object-fit: contain; }
.home-hero .hero-logo .logo-mark { width: 6.5rem; height: 6.5rem; font-size: 3rem; margin-bottom: .5rem; }
.home-hero .latin { font-size: .875rem; font-weight: 600; letter-spacing: .025em; color: rgb(var(--primary-rgb) / .9); }
.home-hero h1 { margin-top: .125rem; font-size: 1rem; font-weight: 700; line-height: 1.4; color: var(--primary); }
.home-hero p.lead { margin: .375rem auto 0; max-width: 28rem; font-size: .75rem; line-height: 1.65; color: rgb(var(--fg-rgb) / .55); }

.mobile-welcome { margin-bottom: .5rem; text-align: center; }
.mobile-welcome h1 { font-size: 1.125rem; font-weight: 700; color: var(--primary); line-height: 1.4; }
.mobile-welcome p { margin-top: .25rem; font-size: .8125rem; color: rgb(var(--fg-rgb) / .55); }
@media (min-width: 1024px) { .mobile-welcome { display: none; } }

.promo-banner { display: none; margin-top: .5rem; }
@media (min-width: 768px) { .promo-banner { display: block; } }
.promo-banner .frame { position: relative; aspect-ratio: 4 / 1; width: 100%; overflow: hidden; border-radius: 1rem; background: var(--primary); }
.promo-banner img { width: 100%; height: 100%; object-fit: contain; object-position: center; }

.about-preview p { font-size: 1rem; line-height: 1.65; color: rgb(var(--fg-rgb) / .8); }
.about-preview .more { display: inline-block; margin-top: 1rem; font-size: .875rem; font-weight: 600; color: var(--primary); }
.about-preview .more:hover { text-decoration: underline; }

.tree-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    border-radius: 1.5rem; background: var(--primary); color: #fff; padding: 1.5rem; box-shadow: var(--shadow-lg);
    transition: background-color .15s;
}
.tree-cta:hover { background: var(--primary-hover); }
.tree-cta .title { font-size: 1.25rem; font-weight: 700; }
.tree-cta .text { margin-top: .5rem; font-size: .875rem; color: rgba(255, 255, 255, .8); }
.tree-cta .mark { flex-shrink: 0; transition: transform .2s; }
.tree-cta:hover .mark { transform: scale(1.05); }
.tree-cta .mark img { max-height: 4rem; max-width: 7.5rem; }
.tree-cta .mark .logo-mark { width: 4rem; height: 4rem; font-size: 1.75rem; }
@media (min-width: 768px) {
    .tree-cta { padding: 2rem; }
    .tree-cta .title { font-size: 1.5rem; }
    .tree-cta .text { font-size: 1rem; }
}

.quick-links { display: grid; gap: .75rem; }
@media (min-width: 640px) { .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .quick-links { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.quick-link { display: flex; align-items: center; gap: .75rem; border-radius: 1rem; border: 1px solid var(--border-subtle); background: #fff; padding: 1rem; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.quick-link:hover { border-color: rgb(var(--primary-rgb) / .3); box-shadow: var(--shadow-md); }
.quick-link .ico { display: flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; border-radius: .75rem; background: var(--muted); color: var(--primary); }
.quick-link span:last-child { font-weight: 500; }

/* بطاقة فعاليّة في صفّ */
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; width: 3.5rem; height: 3.5rem; border-radius: .875rem; background: var(--muted); color: var(--primary); line-height: 1.1; }
.event-date b { font-size: 1.25rem; }
.event-date small { font-size: .6875rem; font-weight: 600; }

/* ------------------------------------------------------------------ خطوات «كيف يعمل» */

.steps { display: grid; gap: 1rem; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.step { display: flex; gap: 1rem; }
.step .ico { display: flex; width: 3rem; height: 3rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: .75rem; background: var(--muted); color: var(--primary); }
.step .n { font-size: .75rem; font-weight: 600; color: rgb(var(--primary-rgb) / .7); }
.step h3 { margin-top: .25rem; font-weight: 700; font-size: 1rem; }
.step p { margin-top: .5rem; font-size: .875rem; color: rgb(var(--fg-rgb) / .7); }

/* ------------------------------------------------------------------ اتّصل بنا */

.contact-grid { display: grid; gap: 1rem; min-width: 0; }
@media (min-width: 768px) { .contact-grid { gap: 2rem; } }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 2fr 3fr; } }
.contact-side { display: none; }
@media (min-width: 1024px) { .contact-side { display: block; } }
.contact-side h2, .card-title { font-size: 1.125rem; font-weight: 700; color: var(--primary); }
.contact-side ul { list-style: none; padding: 0; margin-top: 1.5rem; display: flex; flex-direction: column; gap: .75rem; font-size: .875rem; color: rgb(var(--fg-rgb) / .75); }
.contact-side li { display: flex; align-items: center; gap: .5rem; }
.contact-side li .icon { width: 1rem; height: 1rem; color: var(--primary); }

/* ------------------------------------------------------------------ معرض الوسائط */

.gallery { width: 100%; max-width: 48rem; margin: 0 auto 2rem; }
.gallery-stage { position: relative; overflow: hidden; border-radius: 1rem; border: 1px solid var(--border-subtle); background: #fff; box-shadow: var(--shadow-sm); }
.gallery-frame { position: relative; aspect-ratio: 4 / 3; width: 100%; overflow: hidden; background: var(--muted); }
@media (min-width: 768px) { .gallery-frame { aspect-ratio: 16 / 10; } }
.gallery-frame > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery-frame video { background: #000; object-fit: contain; }
.gallery-frame button.open { border: 0; padding: 0; background: none; cursor: zoom-in; }
.gallery-frame button.open img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; top: 50%; z-index: 10; transform: translateY(-50%); display: flex; border: 0; border-radius: 9999px; background: rgba(255, 255, 255, .9); padding: .5rem; color: var(--primary); box-shadow: var(--shadow-md), var(--ring); }
.gallery-nav:hover { background: #fff; }
.gallery-nav.prev { inset-inline-start: .75rem; }
.gallery-nav.next { inset-inline-end: .75rem; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: 1rem; overflow-x: auto; padding: 0 .25rem .25rem; }
@media (min-width: 640px) { .gallery-thumbs { justify-content: center; } }
.gallery-thumbs button {
    position: relative; flex-shrink: 0; width: 4.5rem; height: 4.5rem; overflow: hidden; padding: 0;
    border-radius: .75rem; border: 2px solid rgb(var(--fg-rgb) / .1); background: var(--muted); opacity: .75; transition: opacity .15s, border-color .15s;
}
@media (min-width: 640px) { .gallery-thumbs button { width: 5rem; height: 5rem; } }
.gallery-thumbs button:hover { opacity: 1; border-color: rgb(var(--primary-rgb) / .4); }
.gallery-thumbs button.is-active { opacity: 1; border-color: var(--primary); box-shadow: 0 0 0 2px rgb(var(--primary-rgb) / .25); }
.gallery-thumbs img, .gallery-thumbs video { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .35); color: #fff; }
.gallery-count { margin-top: .5rem; text-align: center; font-size: .75rem; color: rgb(var(--fg-rgb) / .5); }

.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .9); padding: 1rem; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: .5rem; object-fit: contain; }
.lightbox .close { position: absolute; inset-block-start: 1rem; inset-inline-end: 1rem; display: flex; border: 0; border-radius: 9999px; background: rgba(255, 255, 255, .15); padding: .5rem; color: #fff; }
.lightbox .close:hover { background: rgba(255, 255, 255, .25); }

.meta-list { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-bottom: 1.5rem; list-style: none; padding: 0; font-size: .875rem; color: rgb(var(--fg-rgb) / .6); }
.meta-list b { font-weight: 500; color: var(--foreground); }

/* ------------------------------------------------------------------ التعليقات */

.comments { display: flex; flex-direction: column; gap: .75rem; }
.comment { display: flex; align-items: flex-start; gap: .75rem; border-radius: 1rem; border: 1px solid var(--border-subtle); background: #fff; padding: 1rem; box-shadow: var(--shadow-sm); }
.comment .head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .125rem .75rem; }
.comment .head p { font-weight: 600; }
.comment time { font-size: .75rem; color: rgb(var(--fg-rgb) / .5); }
.comment .body { margin-top: .375rem; font-size: .875rem; line-height: 1.65; color: rgb(var(--fg-rgb) / .8); white-space: pre-line; overflow-wrap: anywhere; }
.comment .del { border: 0; background: none; padding: .25rem; color: rgb(var(--fg-rgb) / .4); display: inline-flex; }
.comment .del:hover { color: var(--danger); }
.comment-form { display: flex; flex-direction: column; gap: .75rem; margin-top: 1rem; }
@media (min-width: 640px) { .comment-form { flex-direction: row; } .comment-form .input { flex: 1; } }

/* ------------------------------------------------------------------ الحساب */

.account-card { overflow: hidden; padding: 0; margin-top: 1.5rem; }
.account-top { display: flex; flex-direction: column; align-items: center; gap: 1rem; border-bottom: 1px solid rgb(var(--fg-rgb) / .1); background: linear-gradient(to bottom, rgb(var(--primary-rgb) / .05), #fff); padding: 2rem 1.5rem; text-align: center; }
.account-top h2 { font-size: 1.5rem; font-weight: 600; }
.account-top p { margin-top: .25rem; font-size: .875rem; color: rgb(var(--fg-rgb) / .6); direction: ltr; unicode-bidi: isolate; }
.dl-rows { margin: 0; padding: 0 1.5rem; }
.dl-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .875rem 0; border-bottom: 1px solid rgb(var(--fg-rgb) / .08); font-size: .875rem; }
.dl-rows > div:last-child { border-bottom: 0; }
.dl-rows dt { color: rgb(var(--fg-rgb) / .6); }
.dl-rows dd { margin: 0; font-weight: 500; text-align: end; }
.account-actions { display: flex; flex-wrap: wrap; gap: .75rem; border-top: 1px solid rgb(var(--fg-rgb) / .08); padding: 1.25rem 1.5rem; }

.avatar-edit { display: flex; align-items: center; gap: 1rem; }

/* ------------------------------------------------------------------ النوافذ والصفائح */

.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-panel { position: relative; z-index: 1; display: flex; flex-direction: column; width: 100%; max-width: 32rem; max-height: 90vh; overflow: hidden; border-radius: 1rem; background: #fff; box-shadow: var(--shadow-xl); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--border-subtle); padding: 1rem 1.25rem; }
.modal-head h2 { font-size: 1.125rem; font-weight: 700; color: var(--primary); }
.modal-head .x { display: flex; border: 0; border-radius: .5rem; background: none; padding: .25rem; color: rgb(var(--fg-rgb) / .5); }
.modal-head .x:hover { background: var(--muted); color: var(--primary); }
.modal-body { overflow-y: auto; padding: 1.25rem; }
.modal-foot { display: flex; justify-content: flex-end; gap: .5rem; border-top: 1px solid var(--border-subtle); padding: .875rem 1.25rem; }
body.is-locked { overflow: hidden; }

.sheet { position: fixed; inset: 0; z-index: 95; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 1024px) { .sheet { display: none !important; } }
.sheet-panel { position: relative; z-index: 1; width: 100%; max-width: 32rem; overflow: hidden; border-radius: 1rem 1rem 0 0; background: #fff; box-shadow: var(--shadow-xl), var(--ring); animation: sheet-up .28s ease-out; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-head { padding: 1.25rem 1.5rem; text-align: center; color: #fff; background: linear-gradient(to bottom left, var(--primary), var(--primary-hover)); }
.sheet-head h2 { font-size: 1.25rem; font-weight: 700; }
.sheet-head p { margin: .375rem auto 0; max-width: 24rem; font-size: .875rem; line-height: 1.6; color: rgba(255, 255, 255, .85); }
.sheet-head .mini-logo { display: flex; justify-content: center; margin-bottom: .5rem; }
.sheet-head .mini-logo img { max-height: 2rem; max-width: 2rem; }
.sheet-head .mini-logo .logo-mark { width: 2.25rem; height: 2.25rem; font-size: 1rem; }
.sheet-body { padding: 1.25rem 1.5rem 2rem; padding-bottom: max(2rem, env(safe-area-inset-bottom)); text-align: center; }
.sheet-steps { margin-bottom: 1.25rem; border-radius: .75rem; border: 1px solid var(--border-subtle); background: color-mix(in srgb, var(--muted) 40%, transparent); padding: 1rem; text-align: start; font-size: .875rem; }
.sheet-steps ol { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .75rem; color: rgb(var(--fg-rgb) / .8); }
.sheet-steps li { display: flex; align-items: flex-start; gap: .5rem; }
.sheet-steps .n { display: flex; width: 1.5rem; height: 1.5rem; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 9999px; background: rgb(var(--primary-rgb) / .1); color: var(--primary); font-size: .75rem; font-weight: 700; }
.sheet-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 1rem; }

/* بانر الجوّال: يملأ الشاشة ثمّ يُغلق */
.mobile-banner { position: fixed; inset: 0; z-index: 96; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .75); padding: 1.5rem; }
@media (min-width: 768px) { .mobile-banner { display: none !important; } }
.mobile-banner img { max-height: 85vh; border-radius: 1rem; object-fit: contain; box-shadow: var(--shadow-xl); }
.mobile-banner .close { position: absolute; inset-block-start: max(1rem, env(safe-area-inset-top)); inset-inline-end: 1rem; display: flex; border: 0; border-radius: 9999px; background: rgba(255, 255, 255, .9); padding: .5rem; color: var(--primary); }

/* ------------------------------------------------------------------ شاشة البدء (جوّال) */

.splash { position: fixed; inset: 0; z-index: 9999; display: none; flex-direction: column; background: var(--primary); color: #fff; transition: opacity .32s; }
html[data-splash] .splash { display: flex; }
.splash.is-out { opacity: 0; pointer-events: none; }
.splash .center { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 0 2rem; text-align: center; }
.splash .center img { margin-bottom: 2rem; max-height: 7rem; max-width: min(16rem, 70vw); height: auto; width: auto; object-fit: contain; }
.splash .center .logo-mark { width: 6rem; height: 6rem; font-size: 2.75rem; margin-bottom: 2rem; }
.splash h1 { font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.splash p { margin: 1rem auto 0; max-width: 28rem; font-size: .875rem; line-height: 1.65; color: rgba(255, 255, 255, .85); }
.splash .foot { display: flex; justify-content: center; padding: 1rem 1.5rem 2.5rem; font-size: .75rem; color: rgba(255, 255, 255, .7); }
.splash .foot img { max-height: 1.75rem; opacity: .9; }

/* ------------------------------------------------------------------ الدخول */

.auth-wrap { max-width: 32rem; margin-inline: auto; }
.auth-head { margin-bottom: 2rem; text-align: center; }
.auth-head .logo { justify-content: center; margin-bottom: 1.5rem; }
.auth-head .logo img { max-height: 5.5rem; max-width: 13.75rem; }
.auth-head .logo .logo-mark { width: 4.5rem; height: 4.5rem; font-size: 2rem; }
.auth-head .slogan { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.auth-head .slogan-text { margin: .5rem auto 0; max-width: 28rem; font-size: .875rem; line-height: 1.65; color: rgb(var(--fg-rgb) / .6); }
.auth-aux { text-align: end; font-size: .875rem; }
.auth-privacy { text-align: center; font-size: .75rem; line-height: 1.65; color: rgb(var(--fg-rgb) / .6); }
.auth-privacy a { font-weight: 600; color: var(--primary); }

/* ------------------------------------------------------------------ الترقيم */

.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.pager .info { font-size: .875rem; color: rgb(var(--fg-rgb) / .55); }
.pager .btns { display: flex; gap: .5rem; }

/* ------------------------------------------------------------------ الصفحة المقفلة / غير المفعّلة */

.state { display: flex; min-height: 60vh; align-items: center; justify-content: center; }
.state .section-shell { max-width: 30rem; text-align: center; }
.state .empty-icon { margin-inline: auto; }
.state h1 { font-size: 1.375rem; font-weight: 700; color: var(--primary); margin-top: .5rem; }
.state p { margin-top: .5rem; color: rgb(var(--fg-rgb) / .65); font-size: .9375rem; }
.state .btn { margin-top: 1.25rem; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* رأس الموقع بين 1024 و1279: بلا أيقونات الروابط ولا اسم العائلة بجانب الحرف، فلا يفيض */
@media (min-width: 1024px) and (max-width: 1279px) {
    .site-header .bar { gap: .5rem; padding-inline: 1rem; }
    .site-header .main-nav .nav-link .icon { display: none; }
    .site-header .main-nav .nav-link { padding-inline: .4rem; }
    .site-header .logo .logo-name { display: none; }
    .site-header .lang-btn .icon { display: none; }
}

/* وحتى 1535: بلا أيقونات الروابط — سبعة روابط وزرّ الشجرة لا تتّسع بأيقوناتها */
@media (min-width: 1280px) and (max-width: 1535px) {
    .site-header .main-nav .nav-link .icon { display: none; }
    .site-header .main-nav .nav-link { padding-inline: .5rem; }
}
