/* علي فوتوشوب — هوية الموقع العامة */
:root {
  --ink: #0c1222;
  --ink-2: #141c33;
  --ink-3: #1d2745;
  --paper: #f6f4ef;
  --paper-2: #efece4;
  --card: #ffffff;
  --line: #e2ded3;
  --text: #161b2a;
  --muted: #586074;
  --brand: #2f5bff;
  --brand-d: #1f44d6;
  --brand-soft: #e7ecff;
  --amber: #ffb224;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(12, 18, 34, .05), 0 12px 32px -18px rgba(12, 18, 34, .28);
  --head: 'Alexandria', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-d); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.35; margin: 0; letter-spacing: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.wrap.narrow { width: min(780px, 100% - 40px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.preview-bar { background: var(--amber); color: #2a1c00; text-align: center; padding: 10px 16px; font-weight: 600; font-size: .95rem; }

/* ---------- الرأس ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(246, 244, 239, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-head.scrolled { border-color: var(--line); box-shadow: 0 8px 24px -20px rgba(12, 18, 34, .5); }
.head-in { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-mark { flex: none; }
.mk-bg { fill: var(--brand); }
.mk-a { fill: #fff; }
.mk-b { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.mk-c { fill: none; stroke: var(--amber); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { display: grid; line-height: 1.2; }
.brand-text b { font-family: var(--head); font-size: 1.12rem; font-weight: 700; }
.brand-text small { font-family: var(--head); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-align: right; }

.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 500; font-size: .98rem; transition: background .15s, color .15s; }
.nav a:hover { background: var(--paper-2); }
.nav a[aria-current] { background: var(--ink); color: #fff; }
.head-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; text-decoration: none; }
.icon-btn:hover { border-color: var(--ink); }
.menu-toggle { display: none; gap: 4px; align-content: center; }
.menu-toggle span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- الأزرار ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border-radius: 14px; border: 1.5px solid transparent; font: 600 1rem var(--body); text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s, color .15s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-d); }
.btn.ghost { background: var(--card); border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.light { background: #fff; color: var(--ink); }
.btn.light:hover { background: var(--amber); }
.btn.outline-light { border-color: rgba(255, 255, 255, .32); color: #fff; }
.btn.outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--brand-d); white-space: nowrap; }
.text-link svg { width: 18px; height: 18px; transition: transform .2s; }
.text-link:hover svg { transform: translateX(-4px); }

.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; font: 700 .82rem var(--head); color: var(--brand-d); }
.kicker::before { content: ''; width: 22px; height: 3px; border-radius: 3px; background: var(--amber); }
.kicker.light { color: #b9c6ff; }
.lead { font-size: 1.13rem; color: var(--muted); max-width: 62ch; }

/* ---------- الواجهة ---------- */
.hero { margin: 10px 12px 0; border-radius: 30px; color: #fff; overflow: hidden; position: relative; isolation: isolate;
  background:
    radial-gradient(900px 520px at 88% -10%, rgba(47, 91, 255, .55), transparent 62%),
    radial-gradient(620px 420px at 0% 110%, rgba(255, 178, 36, .16), transparent 60%),
    var(--ink); }
.hero-in { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding-block: 76px 84px; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.55rem); font-weight: 800; line-height: 1.3; margin-bottom: 18px; text-wrap: balance; }
.hero .lead { color: #c9d0e4; font-size: 1.16rem; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 34px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); font-size: .9rem; color: #dfe4f3; }
.hero-points svg { width: 17px; height: 17px; color: var(--amber); }
.hero-visual { position: relative; }
.hero-art { width: 100%; height: auto; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .45)); }
.art-grid path { stroke: rgba(255, 255, 255, .06); stroke-width: 1; fill: none; }
.art-lid { fill: #1b2544; stroke: rgba(255, 255, 255, .16); stroke-width: 1.5; }
.art-screen { fill: #0a0f1e; }
.art-dim { fill: rgba(255, 255, 255, .14); }
.art-amber { fill: var(--amber); }
.art-layer1 { fill: var(--brand); }
.art-layer2 { fill: none; stroke: #8ea6ff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.art-layer3 { fill: none; stroke: var(--amber); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.art-tile { fill: rgba(255, 255, 255, .07); stroke: rgba(255, 255, 255, .12); }
.art-stroke { fill: none; stroke: #cfd8ff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.art-stroke2 { fill: none; stroke: #8ea6ff; stroke-width: 2; stroke-linecap: round; }
.art-btn { fill: var(--brand); }
.art-bar { fill: var(--amber); }
.art-base { fill: #232f55; stroke: rgba(255, 255, 255, .14); stroke-width: 1.5; }
.art-card { fill: #18213d; stroke: rgba(255, 255, 255, .18); stroke-width: 1.5; }
.art-chipc { fill: var(--brand); }
.art-line { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art-playc { fill: #fff; }
.art-float { animation: float 7s ease-in-out infinite; }
.art-float.f2 { animation-delay: -2.5s; }
.art-float.f3 { animation-delay: -4.5s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- الأقسام ---------- */
.sec { padding-block: 76px; }
.sec.alt { background: var(--paper-2); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.sec-head h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 700; }
.sub { font-size: 1.3rem; margin: 34px 0 18px; }

.page-head { padding-block: 62px 6px; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; margin-bottom: 14px; text-wrap: balance; }

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.service { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 22px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.service-num { position: absolute; left: 22px; top: 18px; font: 800 1.5rem var(--head); color: #dedacf; direction: ltr; }
.service-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-d); margin-bottom: 18px; }
.service h3 { font-size: 1.14rem; margin-bottom: 8px; }
.service p { margin: 0; color: var(--muted); font-size: .98rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card-link { display: grid; height: 100%; grid-template-rows: auto 1fr; color: inherit; text-decoration: none; }
.cover { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--ink-2); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .cover img { transform: scale(1.04); }
.cover-ph { background: radial-gradient(260px 160px at 80% 0%, rgba(47, 91, 255, .7), transparent 70%), repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 34px), repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 34px), var(--ink-2); }
.ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .5); }
.ph svg { width: 54px; height: 54px; }
.play-badge { position: absolute; inset-inline-start: 14px; bottom: 14px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.play-badge svg { transform: translateX(1px); }
.play-badge.big { inset: 0; margin: auto; width: 84px; height: 84px; background: var(--brand); color: #fff; transition: transform .2s, background .2s; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.card-body h3 { font-size: 1.12rem; font-weight: 700; }
.card-body p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.7; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); margin: 0; }
.tag { padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-d); font-weight: 600; }
.tag-star { background: #fff1d2; color: #7a4c00; }
.more { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--brand-d); }
.more svg { width: 17px; height: 17px; transition: transform .2s; }
.card:hover .more svg { transform: translateX(-4px); }

.empty { text-align: center; padding: 46px 20px; border: 1.5px dashed var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .5); color: var(--muted); }
.empty > span { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--brand-soft); color: var(--brand-d); margin-bottom: 14px; }
.empty h1, .empty h3 { color: var(--text); margin-bottom: 6px; }
.empty p { margin: 0 0 12px; }
.empty.big { padding-block: 70px; }
.empty .code { font: 800 4.4rem var(--head); color: var(--brand); margin: 0; line-height: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chips a, .chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); text-decoration: none; font: 500 .93rem var(--body); cursor: pointer; }
.chips a:hover, .chip-btn:hover { border-color: var(--ink); }
.chips a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips small { opacity: .6; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 34px; color: var(--muted); }

/* ---------- الشريط الختامي ---------- */
.band { padding: 0 12px 12px; }
.band-in { background: radial-gradient(700px 300px at 10% 0%, rgba(47, 91, 255, .5), transparent 65%), var(--ink); color: #fff; border-radius: 28px; padding: 48px clamp(22px, 5vw, 56px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.band-in h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin-bottom: 8px; }
.band-in p { margin: 0; color: #c9d0e4; }
.band-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- المقال والفيديو ---------- */
.article-head { padding-block: 44px 26px; }
.article-head h1 { font-size: clamp(1.75rem, 4vw, 2.7rem); font-weight: 800; margin-bottom: 14px; text-wrap: balance; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-d); }
.article-cover { margin: 0 0 34px; border-radius: 22px; overflow: hidden; background: var(--ink-2); box-shadow: var(--shadow); }
.article-cover img { width: 100%; height: auto; }
.article { padding-bottom: 70px; }

.prose { font-size: 1.1rem; line-height: 2.05; }
.prose > * { margin: 0 0 1.15em; }
.prose h2 { font-size: 1.5rem; margin-top: 1.9em; }
.prose h3 { font-size: 1.22rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose img { border-radius: 16px; height: auto; margin-inline: auto; }
.prose blockquote { margin-inline: 0; padding: 14px 22px; border-inline-start: 4px solid var(--amber); background: var(--card); border-radius: 12px; color: var(--muted); }
.prose pre { direction: ltr; text-align: left; background: var(--ink); color: #e6e9f5; padding: 16px 18px; border-radius: 14px; overflow-x: auto; font-size: .92rem; line-height: 1.7; }
.prose code { font-family: ui-monospace, Consolas, monospace; background: var(--paper-2); padding: 2px 6px; border-radius: 6px; font-size: .92em; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2em; }
.prose a { overflow-wrap: anywhere; }

.player { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: var(--ink); box-shadow: var(--shadow); }
.player.vertical { aspect-ratio: 9 / 16; width: min(380px, 100%); margin-inline: auto; }
.player-btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: radial-gradient(400px 260px at 80% 0%, rgba(47, 91, 255, .7), transparent 70%), var(--ink-2); cursor: pointer; }
.player-btn img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.player-btn:hover .play-badge.big { transform: scale(1.08); background: var(--amber); color: var(--ink); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-note { text-align: center; font-size: .88rem; color: var(--muted); margin: 12px 0 28px; }
.player-link { display: grid; gap: 16px; justify-items: center; margin-bottom: 28px; }
.player-link img { border-radius: 22px; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.share-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-inline-end: 6px; }
.share-label svg { width: 20px; height: 20px; }

/* ---------- التواصل والبحث ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 26px; }
.contact-card { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.contact-icon { flex: none; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: var(--ink); color: #fff; }
.contact-card b { display: block; font-family: var(--head); }
.contact-card small { display: block; color: var(--muted); font-size: .88rem; text-align: right; overflow-wrap: anywhere; }
.note { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 22px; }
.note p:last-child { margin: 0; }
.search-form { display: flex; gap: 10px; margin-bottom: 28px; }
.search-form input { flex: 1; min-width: 0; min-height: 52px; padding: 10px 18px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font: 1.05rem var(--body); color: var(--text); }
.search-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

/* ---------- التذييل ---------- */
.site-foot { background: var(--ink); color: #c9d0e4; margin-top: 12px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-block: 56px 36px; }
.site-foot .brand { color: #fff; margin-bottom: 14px; }
.site-foot .brand-text small { color: #8d97b3; }
.site-foot p { max-width: 38ch; font-size: .95rem; }
.site-foot h2 { font-size: .95rem; color: #fff; margin-bottom: 14px; }
.site-foot nav a, .site-foot div > a:not(.brand) { display: block; padding: 5px 0; color: #c9d0e4; text-decoration: none; font-size: .95rem; }
.site-foot a:hover { color: var(--amber); }
.ltr-link { text-align: right; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; color: #8d97b3; }

/* ---------- حركة الظهور ---------- */
.reveal.pre { opacity: 0; transform: translateY(18px); }
.reveal { transition: opacity .6s ease, transform .6s ease; }
.toast-mini { position: fixed; bottom: 22px; inset-inline: 0; margin-inline: auto; width: max-content; max-width: calc(100% - 32px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); z-index: 80; }

/* ---------- الشاشات الصغيرة ---------- */
@media (max-width: 920px) {
  .menu-toggle { display: inline-grid; }
  .head-tools { margin-inline-start: auto; }
  .nav { position: absolute; inset-inline: 12px; top: calc(100% + 8px); margin: 0; display: none; flex-direction: column; gap: 2px; padding: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 13px 16px; border-radius: 12px; font-size: 1.05rem; }
  .hero-in { grid-template-columns: 1fr; padding-block: 48px 40px; gap: 26px; }
  .hero-visual { max-width: 460px; margin-inline: auto; width: 100%; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap, .wrap.narrow { width: calc(100% - 32px); }
  .hero { margin: 6px 6px 0; border-radius: 22px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .sec { padding-block: 52px; }
  .sec-head { flex-direction: column; align-items: start; margin-bottom: 24px; }
  .page-head { padding-top: 40px; }
  .band { padding: 0 6px 6px; }
  .band-in { border-radius: 22px; padding-block: 36px; }
  .band-actions, .band-actions .btn { width: 100%; }
  .grid { grid-template-columns: 1fr; }
  .search-form { flex-direction: column; }
  .prose { font-size: 1.04rem; }
  .head-in { min-height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal.pre { opacity: 1; transform: none; }
}
