/* ========================================================================== *
 *  موقع د. عاصم الطيب قرشي — هوية بصرية سودانية تراثية مع لمسات العلم.        *
 *  Palette مستوحاة من صورة الكمان: روب نيلي/تركوازي + خلفية طينية أفريقية.    *
 * ========================================================================== */

:root {
  --clay: #b5532a;          /* طيني */
  --clay-dark: #8a3c1d;
  --gold: #e0a52e;          /* ذهبي/أوكر */
  --gold-soft: #f0c869;
  --teal: #0f6b78;          /* نيلي تركوازي (روب الدكتور) */
  --teal-deep: #0a4853;
  --sand: #f6ecd9;          /* رملي فاتح */
  --sand-2: #efe1c6;
  --ink: #2a1a12;           /* بني داكن للنص */
  --ink-soft: #5a4636;
  --night: #1a1310;         /* أقسام داكنة */
  --night-2: #241a14;
  --cream: #fffaf0;

  /* لمسات العلم السوداني */
  --flag-red: #ce1126;
  --flag-green: #007a3d;
  --flag-black: #14110f;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px -22px rgba(42, 26, 18, .55);
  --shadow-lg: 0 30px 80px -30px rgba(42, 26, 18, .65);
  --maxw: 1180px;
  --font: "Tajawal", "Cairo", system-ui, sans-serif;
  --font-display: "Cairo", "Tajawal", sans-serif;
  --font-serif: "Amiri", serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.85;
  overflow-x: hidden;
  position: relative;
}

/* نقش هندسي نوبي خفيف يغطي الخلفية */
.pattern-bg {
  position: fixed; inset: 0; z-index: -2;
  background-color: var(--sand);
  background-image:
    radial-gradient(circle at 50% 50%, rgba(181,83,42,.06) 0 2px, transparent 3px),
    repeating-linear-gradient(45deg, rgba(15,107,120,.035) 0 12px, transparent 12px 24px),
    repeating-linear-gradient(-45deg, rgba(224,165,46,.04) 0 12px, transparent 12px 24px);
  background-size: 26px 26px, 48px 48px, 48px 48px;
}

.container { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }

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

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.3; color: var(--ink); }

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

/* ----------------------------- شريط التنقل ------------------------------- */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 250, 240, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(181, 83, 42, .15);
  transition: box-shadow .3s, background .3s;
}
.navbar.scrolled { box-shadow: 0 8px 30px -16px rgba(42,26,18,.4); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: .7rem 0; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .7rem; }
.brand-mark {
  display: block; width: 46px; height: 46px; border-radius: 14px;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 6px 18px -6px rgba(181,83,42,.7);
  transition: transform .3s;
}
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.05); }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-mark.big { width: 56px; height: 56px; border-radius: 16px; }
/* شعار التذييل: حجم متوازن ومحاذاة لبداية العمود */
.footer-col .brand-mark.big { width: 52px; height: 52px; margin-bottom: .4rem; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }
.brand-text small { color: var(--ink-soft); font-size: .72rem; letter-spacing: .3px; }

.nav-links { display: flex; align-items: center; gap: .35rem; }
.nav-links a {
  padding: .5rem .85rem; border-radius: 10px; font-weight: 500; font-size: .95rem;
  color: var(--ink-soft); transition: .2s;
}
.nav-links a:hover { color: var(--clay); background: rgba(181,83,42,.08); }
.nav-cta {
  background: linear-gradient(135deg, var(--teal), var(--teal-deep)) !important;
  color: var(--cream) !important; font-weight: 700;
  box-shadow: 0 8px 20px -8px rgba(15,107,120,.7);
}
.nav-cta:hover { transform: translateY(-1px); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--clay); border-radius: 3px; transition: .3s; }

/* -------------------------------- الفلاش -------------------------------- */
.flash {
  margin: 1rem 0; padding: .9rem 1.2rem; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(0,122,61,.14), rgba(0,122,61,.05));
  border-inline-start: 4px solid var(--flag-green); font-weight: 500;
}
.flash.error { background: rgba(206,17,38,.1); border-color: var(--flag-red); }

/* --------------------------------- الواجهة ------------------------------- */
.hero { position: relative; padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(15,107,120,.20), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(181,83,42,.16), transparent 60%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  background: rgba(224,165,46,.16); color: var(--clay-dark);
  padding: .4rem 1rem; border-radius: 100px; font-weight: 700; font-size: .85rem;
  border: 1px solid rgba(224,165,46,.4); margin-bottom: 1.4rem;
}
.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem); font-weight: 900; line-height: 1.15;
  letter-spacing: -.5px; margin-bottom: 1rem;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--clay), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-quote {
  font-family: var(--font-serif); font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--ink-soft); line-height: 1.9; margin-bottom: 2rem;
  border-inline-start: 4px solid var(--gold); padding-inline-start: 1.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.6rem; border-radius: 100px; font-weight: 700; font-size: 1rem;
  cursor: pointer; border: 0; transition: transform .2s, box-shadow .2s; font-family: var(--font);
}
.btn-primary {
  background: linear-gradient(135deg, var(--clay), var(--gold)); color: var(--cream);
  box-shadow: 0 14px 30px -12px rgba(181,83,42,.8);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -14px rgba(181,83,42,.9); }
.btn-ghost { background: transparent; color: var(--teal-deep); border: 2px solid var(--teal); }
.btn-ghost:hover { background: var(--teal); color: var(--cream); transform: translateY(-2px); }

/* صورة الواجهة بإطار نوبي */
.hero-portrait { position: relative; }
.hero-portrait .frame {
  position: relative; border-radius: 26px; overflow: hidden;
  border: 8px solid var(--cream);
  box-shadow: var(--shadow-lg), 0 0 0 3px var(--gold);
  transform: rotate(-1.5deg);
  aspect-ratio: 4 / 3.4;
}
.hero-portrait .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-portrait .frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, transparent 55%, rgba(10,72,83,.45));
}
.hero-badge {
  position: absolute; bottom: -18px; inset-inline-start: -18px;
  background: var(--cream); color: var(--ink);
  padding: .8rem 1.2rem; border-radius: 16px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: .7rem; transform: rotate(-1.5deg);
  border: 1px solid rgba(181,83,42,.18);
}
.hero-badge b { font-family: var(--font-display); font-size: 1.4rem; color: var(--clay); }
.hero-badge small { color: var(--ink-soft); }
.flag-dot { width: 10px; height: 10px; border-radius: 50%; }

/* شريط الإحصاءات */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
}
.stat {
  background: var(--cream); border-radius: var(--radius); padding: 1.4rem 1rem;
  text-align: center; box-shadow: var(--shadow); border: 1px solid rgba(181,83,42,.1);
  position: relative; overflow: hidden;
}
.stat::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 4px;
  background: linear-gradient(90deg, var(--clay), var(--gold)); }
.stat b { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; color: var(--teal-deep); }
.stat span { color: var(--ink-soft); font-weight: 600; font-size: .9rem; }

/* -------------------------------- الأقسام -------------------------------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section.dark { background: linear-gradient(160deg, var(--night), var(--night-2)); color: var(--sand); position: relative; }
.section.dark h2, .section.dark h3 { color: var(--cream); }
.section.dark .section-sub { color: rgba(246,236,217,.7); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto clamp(2rem,4vw,3rem); }
.section-tag {
  display: inline-block; color: var(--clay); font-weight: 800; letter-spacing: 2px;
  font-size: .8rem; text-transform: uppercase; margin-bottom: .6rem;
}
.section.dark .section-tag { color: var(--gold-soft); }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 900; }
.section-head h2 .accent { color: var(--clay); }
.section.dark .section-head h2 .accent { color: var(--gold); }
.section-sub { color: var(--ink-soft); margin-top: .6rem; font-size: 1.05rem; }
.section-divider {
  width: 90px; height: 4px; margin: 1rem auto 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--clay), var(--gold));
}

/* شبكة البطاقات */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* بطاقة العمل */
.card {
  background: var(--cream); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid rgba(181,83,42,.1);
  display: flex; flex-direction: column; transition: transform .28s, box-shadow .28s;
  position: relative;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-cover { position: relative; aspect-ratio: 16/10; overflow: hidden; background: linear-gradient(135deg, var(--teal-deep), var(--clay)); }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-cover img { transform: scale(1.06); }
.card-cover .placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 3.5rem;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 10px, transparent 10px 20px),
    linear-gradient(135deg, var(--teal-deep), var(--clay));
}
.kind-badge {
  position: absolute; top: .8rem; inset-inline-start: .8rem;
  background: rgba(26,19,16,.78); color: var(--cream); backdrop-filter: blur(6px);
  padding: .3rem .8rem; border-radius: 100px; font-size: .78rem; font-weight: 700;
  display: flex; align-items: center; gap: .35rem;
}
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-body h3 { font-size: 1.15rem; font-weight: 700; }
.card-body h3 a:hover { color: var(--clay); }
.card-summary { color: var(--ink-soft); font-size: .92rem; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  color: var(--ink-soft); font-size: .82rem; border-top: 1px dashed rgba(181,83,42,.2); padding-top: .7rem; margin-top: .3rem; }
.card-meta .chip { background: rgba(15,107,120,.1); color: var(--teal-deep); padding: .15rem .6rem; border-radius: 100px; font-weight: 600; }
.card-meta .dot { display: inline-flex; align-items: center; gap: .25rem; }

/* مشغّل صوتي مدمج في البطاقة */
.card audio { width: 100%; margin-top: .3rem; height: 38px; }

/* تصنيفات */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1rem; }
.cat-card {
  display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.2rem;
  background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid rgba(181,83,42,.1); transition: .25s; position: relative; overflow: hidden;
}
.cat-card:hover { transform: translateY(-4px); }
.cat-card .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; flex-shrink: 0; }
.cat-card b { font-family: var(--font-display); display: block; }
.cat-card small { color: var(--ink-soft); }

/* مناسبات — خط زمني */
.timeline { position: relative; max-width: 760px; margin-inline: auto; padding-inline-start: 1.5rem; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 6px; top: 6px; bottom: 6px; width: 3px;
  background: linear-gradient(var(--gold), var(--clay)); border-radius: 3px; }
.tl-item { position: relative; padding: 0 0 1.6rem 0; margin-inline-start: 1.4rem; }
.tl-item::before { content: ""; position: absolute; inset-inline-start: -1.85rem; top: .35rem;
  width: 16px; height: 16px; border-radius: 50%; background: var(--gold); border: 3px solid var(--cream); box-shadow: 0 0 0 2px var(--clay); }
.tl-card { background: var(--cream); border-radius: var(--radius-sm); padding: 1rem 1.2rem; box-shadow: var(--shadow); border:1px solid rgba(181,83,42,.1); }
.section.dark .tl-card { background: var(--night-2); border-color: rgba(224,165,46,.18); }
.tl-date { color: var(--clay); font-weight: 700; font-size: .85rem; }
.section.dark .tl-date { color: var(--gold-soft); }
.tl-card h4 { margin: .2rem 0 .3rem; }
.tl-card p { color: var(--ink-soft); font-size: .92rem; }
.section.dark .tl-card p { color: rgba(246,236,217,.72); }

.center { text-align: center; }
.mt-3 { margin-top: 2rem; }

/* قسم عن الدكتور (شريط) */
.about-strip { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem,5vw,3.5rem); align-items: center; }
.about-portrait { border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); border: 6px solid var(--cream); aspect-ratio: 1; }
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-strip p { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 1rem; }
.section.dark .about-strip p { color: rgba(246,236,217,.82); }

/* ------------------------- صفحة قائمة الأعمال ---------------------------- */
.page-hero { padding: clamp(2.5rem,5vw,4rem) 0 2rem; text-align: center; position: relative; }
.page-hero h1 { font-size: clamp(1.9rem,4.5vw,3rem); font-weight: 900; }
.page-hero h1 .accent { color: var(--clay); }
.page-hero p { color: var(--ink-soft); margin-top: .6rem; }

.filters {
  background: var(--cream); border-radius: var(--radius); padding: 1.2rem;
  box-shadow: var(--shadow); border: 1px solid rgba(181,83,42,.1); margin-bottom: 2rem;
}
.filters form { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: .8rem; align-items: end; }
.filters label { font-size: .78rem; font-weight: 700; color: var(--ink-soft); display: block; margin-bottom: .3rem; }
.field, .filters select, .filters input {
  width: 100%; padding: .7rem .9rem; border-radius: 12px; border: 1.5px solid rgba(181,83,42,.22);
  background: var(--sand); font-family: var(--font); font-size: .95rem; color: var(--ink); transition: .2s;
}
.field:focus, .filters select:focus, .filters input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,107,120,.12); }
.chips-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.fchip {
  padding: .4rem .9rem; border-radius: 100px; font-size: .85rem; font-weight: 600;
  background: var(--sand-2); color: var(--ink-soft); border: 1px solid transparent; transition: .2s;
}
.fchip:hover { border-color: var(--clay); color: var(--clay); }
.fchip.active { background: linear-gradient(135deg, var(--clay), var(--gold)); color: var(--cream); }
.result-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; color: var(--ink-soft); }

.empty { text-align: center; padding: 4rem 1rem; color: var(--ink-soft); }
.empty .big { font-size: 4rem; }

/* ----------------------------- صفحة التفصيل ----------------------------- */
.detail-hero { padding: clamp(2rem,4vw,3rem) 0 1.5rem; }
.breadcrumb { color: var(--ink-soft); font-size: .85rem; margin-bottom: 1rem; }
.breadcrumb a:hover { color: var(--clay); }
.detail-grid { display: grid; grid-template-columns: 1.6fr .9fr; gap: 2.5rem; align-items: start; }
.detail-main h1 { font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 900; margin-bottom: .8rem; }
.detail-meta { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 1.5rem; }
.detail-meta .chip { background: rgba(15,107,120,.12); color: var(--teal-deep); padding: .35rem .9rem; border-radius: 100px; font-weight: 600; font-size: .85rem; }

.media-stage { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); margin-bottom: 1.8rem; background: var(--night); }
.media-stage video { width: 100%; display: block; }
.media-stage.audio-stage { background: linear-gradient(135deg, var(--teal-deep), var(--clay)); padding: 2.5rem 1.5rem; text-align: center; color: var(--cream); }
.media-stage.audio-stage .disc { font-size: 4rem; margin-bottom: 1rem; animation: spin 6s linear infinite; display:inline-block;}
@keyframes spin { to { transform: rotate(360deg); } }
.media-stage audio { width: 100%; max-width: 520px; }
.cover-hero { width: 100%; max-height: 460px; object-fit: cover; }

.prose { font-family: var(--font-serif); font-size: 1.18rem; line-height: 2.1; color: var(--ink); white-space: pre-wrap; }
.prose.desc { font-family: var(--font); font-size: 1.05rem; color: var(--ink-soft); }

.reactions { display: flex; align-items: center; gap: 1rem; margin: 2rem 0; flex-wrap: wrap; }
.like-btn {
  display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.4rem; border-radius: 100px;
  border: 2px solid var(--flag-red); background: transparent; color: var(--flag-red); font-weight: 800;
  font-size: 1rem; cursor: pointer; font-family: var(--font); transition: .2s;
}
.like-btn:hover { background: rgba(206,17,38,.08); }
.like-btn.liked { background: var(--flag-red); color: #fff; }
.like-btn .heart { font-size: 1.2rem; transition: transform .3s; }
.like-btn.liked .heart { animation: pop .4s; }
@keyframes pop { 0%,100%{transform:scale(1)} 40%{transform:scale(1.4)} }
.views-pill { color: var(--ink-soft); font-size: .9rem; }

/* الشريط الجانبي */
.sidebar-card { background: var(--cream); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); border:1px solid rgba(181,83,42,.1); margin-bottom: 1.5rem; }
.sidebar-card h4 { margin-bottom: .9rem; padding-bottom: .6rem; border-bottom: 2px solid rgba(224,165,46,.3); }
.mini-list a { display: flex; gap: .7rem; align-items: center; padding: .5rem 0; border-bottom: 1px dashed rgba(181,83,42,.15); }
.mini-list a:last-child { border-bottom: 0; }
.mini-list .mini-thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: linear-gradient(135deg,var(--teal),var(--clay)); display:grid;place-items:center;font-size:1.4rem; }
.mini-list b { font-size: .92rem; font-weight: 600; }
.mini-list small { color: var(--ink-soft); }

/* التعليقات */
.comments { margin-top: 3rem; }
.comments h3 { font-size: 1.5rem; margin-bottom: 1.2rem; }
.comment {
  background: var(--cream); border-radius: var(--radius-sm); padding: 1.1rem 1.3rem; margin-bottom: 1rem;
  box-shadow: var(--shadow); border: 1px solid rgba(181,83,42,.08); border-inline-start: 4px solid var(--gold);
}
.comment .who { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.comment .avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg,var(--clay),var(--gold)); color: #fff; display: grid; place-items: center; font-weight: 800; }
.comment .who b { font-family: var(--font-display); }
.comment .who time { color: var(--ink-soft); font-size: .8rem; margin-inline-start: auto; }
.comment p { color: var(--ink-soft); }

.comment-form { background: var(--cream); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); border:1px solid rgba(181,83,42,.1); margin-top: 1.5rem; }
.comment-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.comment-form textarea { resize: vertical; }
.form-note { color: var(--ink-soft); font-size: .85rem; margin-top: .6rem; }

/* -------------------------------- التذييل -------------------------------- */
.footer { position: relative; background: linear-gradient(160deg, var(--night), var(--flag-black)); color: var(--sand); padding-top: 3.5rem; margin-top: 4rem; overflow: hidden; }
.footer-pattern { position: absolute; inset: 0; opacity: .07;
  background-image: repeating-linear-gradient(45deg, var(--gold) 0 14px, transparent 14px 28px); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; position: relative; padding-bottom: 2.5rem; }
.footer h3 { color: var(--cream); margin: .8rem 0 .5rem; }
.footer h4 { color: var(--gold-soft); margin-bottom: .8rem; }
.footer p { color: rgba(246,236,217,.7); font-family: var(--font-serif); max-width: 40ch; }
.footer-col a { display: block; color: rgba(246,236,217,.78); padding: .25rem 0; transition: .2s; }
.footer-col a:hover { color: var(--gold-soft); padding-inline-start: 6px; }
.socials a { display: inline-block; margin-inline-end: .5rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 0; border-top: 1px solid rgba(246,236,217,.12); position: relative; color: rgba(246,236,217,.6); font-size: .88rem; }
.flag-strip { display: inline-block; width: 90px; height: 16px; border-radius: 4px;
  background: linear-gradient(to bottom, var(--flag-red) 0 33%, #fff 33% 66%, var(--flag-black) 66% 100%);
  position: relative; }
.flag-strip::before { content:""; position:absolute; inset-inline-start:0; top:0; bottom:0; width:24px;
  background: var(--flag-green); clip-path: polygon(0 0, 100% 50%, 0 100%); }

/* ------------------------------ استجابة الشاشة --------------------------- */
@media (max-width: 920px) {
  .hero-grid, .about-strip, .detail-grid { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; max-width: 460px; margin-inline: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .filters form { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--cream); padding: 1rem; gap: .3rem; box-shadow: var(--shadow-lg);
    transform: translateY(-150%); transition: transform .3s; border-bottom: 3px solid var(--gold);
  }
  body.nav-open .nav-links { transform: translateY(0); }
  .nav-links a { padding: .8rem 1rem; }
  .comment-form .row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .filters form { grid-template-columns: 1fr; }
}

/* تأثير ظهور عند التمرير */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------ زر تبديل اللغة --------------------------- */
.lang-toggle {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .5rem .9rem !important; border-radius: 100px; font-weight: 700; font-size: .9rem;
  color: var(--teal-deep) !important; border: 1.5px solid var(--teal);
  background: transparent; transition: .2s; white-space: nowrap;
}
.lang-toggle:hover { background: var(--teal) !important; color: var(--cream) !important; }

/* ============================ الوضع الإنجليزي (LTR) ====================== *
 * عند body.ltr نستبدل الخطوط بخطوط لاتينية راقية ونضبط بعض المحاذاة.        *
 * ----------------------------------------------------------------------- */
body.ltr {
  --font: "Inter", system-ui, sans-serif;
  --font-display: "Inter", system-ui, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  line-height: 1.7;
}
body.ltr .hero-quote,
body.ltr .prose { line-height: 1.85; }
body.ltr .prose { font-size: 1.18rem; }
body.ltr .brand-text small { letter-spacing: .2px; }
/* النصوص الأدبية الإنجليزية: محاذاة لليسار حتى داخل صفحة LTR */
body.ltr .prose { text-align: left; }
/* السهم في فتات الخبز يدور تلقائيًا حسب الاتجاه */
.breadcrumb .sep { margin: 0 .15rem; opacity: .6; }

/* ========================================================================== *
 *  واجهة البطل المبهرة (Hero) — نسخة محسّنة تتجاوز التعريفات السابقة.         *
 *  شفق متحرك + نوتات عائمة + إطار ذهبي بهالة + مُعادل صوتي + عنوان لامع.       *
 * ========================================================================== */
.hero {
  position: relative;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(4rem, 8vw, 6.5rem);
  overflow: hidden;
  isolation: isolate;
}
.hero::before { content: none; }   /* نلغي التدرّج القديم لصالح الشفق */

/* ---- الشفق المتحرك (aurora mesh) ---- */
.hero-aurora { position: absolute; inset: -20% -10% 0 -10%; z-index: -2; filter: blur(60px); }
.hero-aurora .aurora {
  position: absolute; border-radius: 50%; opacity: .55; mix-blend-mode: multiply;
  animation: auroraFloat 18s ease-in-out infinite;
}
.aurora.a1 { width: 46vw; height: 46vw; top: -8%; inset-inline-end: 2%;
  background: radial-gradient(circle, rgba(15,107,120,.55), transparent 70%); }
.aurora.a2 { width: 40vw; height: 40vw; bottom: -14%; inset-inline-start: -4%;
  background: radial-gradient(circle, rgba(181,83,42,.5), transparent 70%);
  animation-delay: -6s; animation-duration: 22s; }
.aurora.a3 { width: 34vw; height: 34vw; top: 22%; inset-inline-start: 32%;
  background: radial-gradient(circle, rgba(224,165,46,.45), transparent 70%);
  animation-delay: -11s; animation-duration: 26s; }
@keyframes auroraFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(4%, 5%) scale(1.12); }
  66%     { transform: translate(-5%, -3%) scale(.94); }
}

/* ---- نوتات موسيقية عائمة ---- */
.hero-notes { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.hero-notes span {
  position: absolute; bottom: -10%; inset-inline-start: var(--x);
  font-size: calc(1.6rem * var(--s)); color: var(--clay);
  opacity: 0; animation: noteRise 11s linear infinite; animation-delay: var(--d);
  text-shadow: 0 2px 10px rgba(181,83,42,.25);
}
@keyframes noteRise {
  0%   { transform: translateY(0) rotate(0); opacity: 0; }
  10%  { opacity: .5; }
  50%  { opacity: .75; }
  90%  { opacity: .25; }
  100% { transform: translateY(-115vh) rotate(40deg); opacity: 0; }
}

/* ---- الشبكة والعنوان ---- */
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; position: relative;
}

/* ---- خريطة السودان كخلفية مائية خلف نص الواجهة ---- */
.hero-text { position: relative; }
.sudan-map-wrap {
  position: absolute; z-index: -1; pointer-events: none;
  /* تُوضع خلف الكتابة، منزاحة لأعلى-جهة البداية لتملأ الفراغ بأناقة */
  inset-block-start: 50%; inset-inline-end: -6%;
  width: clamp(340px, 38vw, 560px); transform: translateY(-50%);
  opacity: .14; filter: saturate(1.1);
  animation: mapBreathe 12s ease-in-out infinite;
}
.sudan-map-wrap .sudan-map { width: 100%; height: auto; }
@keyframes mapBreathe {
  0%,100% { opacity: .12; transform: translateY(-50%) scale(1); }
  50%     { opacity: .18; transform: translateY(-51%) scale(1.015); }
}
/* الحلقة البشرية تدور ببطء شديد، والقلب ينبض */
.sudan-map .unity-ring { transform-box: fill-box; transform-origin: center;
  animation: ringSpin 90s linear infinite; }
@keyframes ringSpin { to { transform: rotate(360deg); } }
.sudan-map .unity-heart { transform-box: fill-box; transform-origin: center;
  animation: heartBeat 3.2s ease-in-out infinite; }
@keyframes heartBeat { 0%,100% { opacity: .75; } 45% { opacity: 1; } }
/* في الوضع الإنجليزي (LTR) تنزاح الخريطة لجهة اليمين بصريًا أيضًا */
body.ltr .sudan-map-wrap { inset-inline-end: -6%; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  background: linear-gradient(90deg, rgba(224,165,46,.22), rgba(181,83,42,.14));
  color: var(--clay-dark); padding: .5rem 1.1rem; border-radius: 100px;
  font-weight: 800; font-size: .85rem; border: 1px solid rgba(224,165,46,.45);
  margin-bottom: 1.5rem; box-shadow: 0 6px 18px -10px rgba(181,83,42,.5);
  backdrop-filter: blur(4px);
}
.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.3rem); font-weight: 900; line-height: 1.12;
  letter-spacing: -.5px; margin-bottom: 1.1rem; display: flex; flex-direction: column;
}
.hero h1 .hero-name {
  color: var(--ink); font-size: .62em; font-weight: 800; opacity: .9;
  margin-bottom: .15em;
}
.hero h1 .accent {
  display: inline-block;
  background: linear-gradient(110deg, var(--clay) 0%, var(--gold) 35%, #ffe6a8 50%, var(--gold) 65%, var(--clay) 100%);
  background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 .shimmer { animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: 250% center; } }

.hero-quote {
  font-family: var(--font-serif); font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: var(--ink-soft); line-height: 1.95; margin-bottom: 2rem; max-width: 46ch;
  border-inline-start: 4px solid var(--gold); padding-inline-start: 1.2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.4rem; }

/* زر بنبضة ضوئية */
.btn-glow { position: relative; overflow: hidden; }
.btn-glow::after {
  content: ""; position: absolute; top: 0; inset-inline-start: -120%;
  width: 60%; height: 100%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  animation: sheen 3.6s ease-in-out infinite;
}
@keyframes sheen { 0%,60% { inset-inline-start: -120%; } 100% { inset-inline-start: 160%; } }

/* ---- إحصاءات مدمجة في البطل ---- */
.hero-stats {
  display: grid; grid-template-columns: repeat(4, auto); gap: clamp(1rem, 3vw, 2.2rem);
  justify-content: start;
}
.hero-stats .hs { position: relative; padding-inline-end: clamp(1rem, 3vw, 2.2rem); }
.hero-stats .hs:not(:last-child)::after {
  content: ""; position: absolute; inset-inline-end: 0; top: 10%; height: 80%;
  width: 1px; background: linear-gradient(var(--gold), transparent);
}
.hero-stats b {
  display: block; font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.5rem);
  font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, var(--teal-deep), var(--clay));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats span { color: var(--ink-soft); font-weight: 600; font-size: .82rem; }

/* ---- الصورة: إطار ذهبي + هالة + حلقة دوّارة ---- */
.hero-portrait { position: relative; }
.orbit-ring {
  position: absolute; inset: -22px; border-radius: 50% 48% 52% 50%;
  background: conic-gradient(from 0deg, var(--gold), var(--clay), var(--teal), var(--gold));
  filter: blur(2px); opacity: .35; z-index: -1;
  animation: spinSlow 14s linear infinite;
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
.hero-portrait .frame {
  position: relative; border-radius: 24px; overflow: hidden;
  border: 7px solid var(--cream);
  box-shadow: var(--shadow-lg), 0 0 0 3px var(--gold), 0 0 60px -10px rgba(224,165,46,.55);
  transform: rotate(-1.5deg) translateZ(0);
  aspect-ratio: 4 / 3.6; transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.hero-portrait:hover .frame { transform: rotate(0) scale(1.02); }
.hero-portrait .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-portrait .frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, transparent 50%, rgba(10,72,83,.55));
}

/* مُعادل صوتي متحرك أسفل الصورة */
.equalizer {
  position: absolute; inset-inline: 0; bottom: 0; height: 56px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: center; gap: 4px;
  padding: 0 1rem 12px;
}
.equalizer span {
  width: 5px; border-radius: 4px; height: 14px;
  background: linear-gradient(var(--gold-soft), var(--clay));
  animation: eq 1s ease-in-out infinite;
}
.equalizer span:nth-child(odd)  { animation-duration: .9s; }
.equalizer span:nth-child(3n)   { animation-duration: 1.3s; }
.equalizer span:nth-child(3n+1) { animation-duration: 1.1s; }
.equalizer span:nth-child(5n)   { animation-duration: .7s; }
@keyframes eq { 0%,100% { height: 12px; } 50% { height: 42px; } }

/* البطاقات العائمة */
.hero-badge {
  position: absolute; bottom: -18px; inset-inline-start: -18px; z-index: 3;
  background: var(--cream); color: var(--ink);
  padding: .8rem 1.2rem; border-radius: 16px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: .7rem; transform: rotate(-1.5deg);
  border: 1px solid rgba(181,83,42,.18);
}
.hero-badge b { font-family: var(--font-display); font-size: 1.3rem; color: var(--clay); }
.hero-badge small { color: var(--ink-soft); }
.hero-chip {
  position: absolute; top: -16px; inset-inline-end: -10px; z-index: 3;
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center;
  font-size: 1.8rem; background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  box-shadow: 0 12px 26px -10px rgba(15,107,120,.8); border: 3px solid var(--cream);
}
.floaty  { animation: floaty 5s ease-in-out infinite; }
.floaty2 { animation: floaty 6.5s ease-in-out infinite reverse; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-10px) rotate(-1.5deg); } }
.flag-dot { width: 10px; height: 10px; border-radius: 50%; }

/* مؤشّر التمرير */
.scroll-cue {
  position: absolute; bottom: 14px; inset-inline-start: 50%; transform: translateX(-50%);
  z-index: 3; opacity: .7; transition: opacity .2s;
}
.scroll-cue:hover { opacity: 1; }
.scroll-cue .mouse {
  display: block; width: 26px; height: 42px; border: 2px solid var(--clay);
  border-radius: 14px; position: relative;
}
.scroll-cue .wheel {
  position: absolute; top: 7px; inset-inline-start: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 3px; background: var(--clay);
  animation: wheel 1.6s ease-in-out infinite;
}
@keyframes wheel { 0% { opacity: 0; top: 7px; } 40% { opacity: 1; } 80% { opacity: 0; top: 20px; } 100% { opacity: 0; } }

/* الوضع الإنجليزي: اسم البطل أكبر قليلًا */
body.ltr .hero h1 .hero-name { font-size: .55em; }

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  .aurora, .hero-notes span, .shimmer, .btn-glow::after, .orbit-ring,
  .equalizer span, .floaty, .floaty2, .scroll-cue .wheel,
  .sudan-map-wrap, .unity-ring, .unity-heart { animation: none !important; }
  .hero-notes { display: none; }
}

/* استجابة الشاشات الصغيرة للبطل الجديد */
@media (max-width: 920px) {
  .hero-portrait { max-width: 460px; margin-inline: auto; }
  .hero-stats { justify-content: center; }
  .scroll-cue { display: none; }
  /* على الجوال نجعل الخريطة خلفية مركزية خفيفة جدًا للقسم بأكمله */
  .sudan-map-wrap {
    inset: 0; inset-inline-end: auto; width: min(82vw, 460px);
    inset-inline-start: 50%; inset-block-start: 50%;
    transform: translate(-50%, -50%); opacity: .07;
  }
  body.ltr .sudan-map-wrap { inset-inline-end: auto; }
}
@media (max-width: 540px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 1rem 1.5rem; }
  .hero-stats .hs:nth-child(2)::after { display: none; }
  .hero-chip { width: 50px; height: 50px; font-size: 1.5rem; }
}
