/* =====================================================================
   مؤسسة بابل العالمية للثقافات والفنون — الهوية الرقمية v5
   الليل البابلي + أزرق عشتار + ذهب الدورة 13 + فيروز الآجر المزجّج
   العناوين: Alexandria · النص: IBM Plex Sans Arabic
   الحركة: transform/opacity فقط، تتوقف خارج الشاشة، وتحترم «تقليل الحركة».
   ===================================================================== */
:root {
  --night: #0c1a3a;
  --night-2: #12254f;
  --blue: #1e46a0;
  --blue-bright: #2d5fc4;
  --turq: #1fa3b0;
  --turq-deep: #0f7682;
  --gold: #e0b21e;
  --gold-soft: #f0d36a;
  --gold-deep: #7d6000;
  --ivory: #f7f2e8;
  --paper: #fbf9f4;
  --surface: #ffffff;
  --sand: #f1ebdf;
  --ink: #0e1424;
  --muted: #566074;
  --line: #e4ddcf;
  --terra: #b04a24;
  --palm: #2c6a59;
  --on-dark: #f7f2e8;
  --on-dark-2: #b9c3dc;
  --line-dark: rgba(247, 242, 232, .14);
  --ph-bg: #f6e8b8;
  --ph-fg: #5f4a00;
  /* أسماء قديمة تستخدمها لوحة التحكم */
  --lapis: var(--blue);
  --lapis-deep: var(--night);

  --font-display: "Alexandria", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-serif: "Noto Naskh Arabic", "Times New Roman", Georgia, serif;

  --radius: 6px;
  --gutter: clamp(18px, 4.5vw, 64px);
  --hdr: 78px;          /* يحدّثه main.js حسب الارتفاع الفعلي للترويسة */
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* الأزرار وحالات الاختيار (تنقلب في الوضع الليلي) */
  --btn-fg: #fff; --btn-hover-bg: var(--night); --btn-hover-fg: #fff;
  --night-ui: var(--night);
}
/* الوضع الليلي: تلقائياً حسب الجهاز، أو باختيار الزائر من زر الترويسة (data-theme) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b1124; --surface: #121a33; --sand: #0f1730; --ink: #eef0f6; --muted: #a6b0c6; --line: #243050;
    --blue: #8aa9f0; --gold-deep: #e9c45a; --turq-deep: #5fcbd6; --ph-bg: #3b3214; --ph-fg: #f3df9c;
    --btn-fg: #0c1a3a; --btn-hover-bg: #f7f2e8; --btn-hover-fg: #0c1a3a; --night-ui: #1e46a0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --paper: #0b1124; --surface: #121a33; --sand: #0f1730; --ink: #eef0f6; --muted: #a6b0c6; --line: #243050;
    --blue: #8aa9f0; --gold-deep: #e9c45a; --turq-deep: #5fcbd6; --ph-bg: #3b3214; --ph-fg: #f3df9c;
    --btn-fg: #0c1a3a; --btn-hover-bg: #f7f2e8; --btn-hover-fg: #0c1a3a; --night-ui: #1e46a0;
    color-scheme: dark;
}

/* ---------- اللغتان وحجم الخط ---------- */
:root[data-lang="ar"] [lang="en"]:not(html),
:root[data-lang="en"] [lang="ar"]:not(html) { display: none !important; }
html { font-size: 106.25%; }
html[data-size="1"] { font-size: 120%; }
html[data-size="2"] { font-size: 133%; }

/* ---------- الأساس ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.75;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden; overflow-x: clip;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; margin: 0; text-wrap: balance; }
:root[data-lang="en"] h1, :root[data-lang="en"] h2 { letter-spacing: -.02em; line-height: 1.1; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.top-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 64px; pointer-events: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -80px; z-index: 100; background: var(--gold); color: var(--night); padding: 12px 18px; font-weight: 600; }
.skip:focus { top: 12px; }
.ph { background: var(--ph-bg); color: var(--ph-fg); padding: 0 .35em; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.num, time { font-variant-numeric: lining-nums tabular-nums; }

/* عناصر مشتركة */
.eyebrow { display: block; font-size: .84rem; font-weight: 700; color: var(--gold-deep); }
:root[data-lang="en"] .eyebrow { font-size: .8rem; letter-spacing: .02em; }
.is-dark .eyebrow, .eyebrow--light { color: var(--gold); }
.note { font-size: .84rem; color: var(--muted); }
.shead { display: grid; gap: 12px; margin-bottom: clamp(32px, 4.5vw, 56px); padding-top: 20px; border-top: 2px solid var(--ink); }
.is-dark .shead { border-top-color: rgba(247,242,232,.35); }
.shead h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); font-weight: 800; max-width: 22ch; }
.shead p { color: var(--muted); font-size: 1.08rem; max-width: 62ch; }
.shead--row { max-width: none; grid-template-columns: 1fr auto; align-items: end; gap: 20px 40px; }
.shead--row > p { max-width: 42ch; }
.is-dark .shead p { color: var(--on-dark-2); }
section { position: relative; }
.block { padding-block: clamp(84px, 11vw, 150px); }
.block--sand { background: var(--sand); }
.is-dark { background: var(--night); color: var(--on-dark); }
.orn { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold); margin: 6px auto; width: min(200px, 60%); }
.orn i { flex: 1; height: 1px; background: currentColor; opacity: .7; }
.orn svg { width: 14px; height: 14px; }

/* ---------- الأزرار ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.actions--center { justify-content: center; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; font: inherit; font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  background: var(--blue); color: var(--btn-fg); border: 1.5px solid var(--blue); border-radius: 4px;
  transition: color .2s, border-color .2s, background-color .2s;
}
.btn:hover { background: var(--btn-hover-bg); border-color: var(--btn-hover-bg); color: var(--btn-hover-fg); }
.btn svg { width: 18px; height: 18px; }
[dir="rtl"] .btn svg { transform: scaleX(-1); }
.btn--gold { background: var(--gold); color: var(--night); border-color: var(--gold); }
.btn--gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--night); }
.btn--line, .btn--soft { background: transparent; color: var(--ink); border-color: currentColor; }
.btn--line:hover, .btn--soft:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.is-dark .btn--line, .btn--ghost { background: transparent; color: var(--on-dark); border-color: rgba(247,242,232,.45); }
.is-dark .btn--line:hover, .btn--ghost:hover { background: var(--ivory); color: var(--night); border-color: var(--ivory); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .86rem; }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: inherit; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }

/* ---------- العلامة (اللوغو) ---------- */
.bmark { display: block; width: auto; height: 100%; fill: currentColor; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex: none; }
.brand__mark { display: grid; place-items: center; width: 44px; height: 44px; flex: none; color: var(--on-dark); }
.brand__mark svg { width: 40px; height: 40px; }
.brand__name { display: flex; flex-direction: column; line-height: 1.15; }
.brand__ar { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; }
.brand__en { font-family: var(--font-display); font-weight: 500; font-size: .68rem; letter-spacing: .08em; opacity: .75; }
:root[data-lang="en"] .brand__name { flex-direction: column-reverse; }
:root[data-lang="en"] .brand__en { font-size: .98rem; font-weight: 700; letter-spacing: 0; opacity: 1; }
:root[data-lang="en"] .brand__ar { font-size: .74rem; font-weight: 500; opacity: .75; }

/* ---------- الترويسة ---------- */
header.site { position: fixed; inset: 0 0 auto; z-index: 50; color: var(--on-dark); transition: background .4s var(--ease), color .4s var(--ease), box-shadow .4s var(--ease); }
header.site.is-solid { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
header.site.is-solid .brand__mark { color: var(--blue); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 76px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { position: relative; text-decoration: none; color: inherit; font-size: .92rem; font-weight: 500; padding: 10px 13px; white-space: nowrap; }
.nav a:not(.nav__cta)::after { content: ""; position: absolute; inset-inline: 13px; bottom: 4px; height: 1.5px; background: var(--gold); transform: scaleX(0); transition: transform .35s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav__cta { margin-inline-start: 10px; background: var(--gold); color: var(--night) !important; border-radius: 4px; font-weight: 700 !important; padding: 10px 20px !important; transition: background .3s; }
.nav__cta:hover { background: var(--gold-soft); }
.tools { display: flex; align-items: center; gap: 6px; }
.tool { font: inherit; font-size: .82rem; font-weight: 600; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 4px; min-width: 40px; min-height: 40px; padding: 0 12px; cursor: pointer; transition: border-color .25s; }
.tool:hover { border-color: var(--gold); }
.tool sup { font-size: .6em; }
.tool--theme { display: inline-grid; place-items: center; width: 40px; padding: 0; }
.tool--theme svg { width: 18px; height: 18px; }
.tool--theme .i-sun { display: none; }
:root[data-theme="dark"] .tool--theme .i-sun { display: block; }
:root[data-theme="dark"] .tool--theme .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tool--theme .i-sun { display: block; }
  :root:not([data-theme="light"]) .tool--theme .i-moon { display: none; }
}
.menu-btn { display: none; }
@media (max-width: 1180px) {
  .menu-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; color: inherit; background: none; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 4px; cursor: pointer; }
  .menu-btn i, .menu-btn i::before, .menu-btn i::after { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; content: ""; transition: transform .3s var(--ease); }
  .menu-btn i::before { position: absolute; top: -6px; } .menu-btn i::after { position: absolute; top: 6px; }
  .menu-btn[aria-expanded="true"] i { background: transparent; }
  .menu-btn[aria-expanded="true"] i::before { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] i::after { transform: translateY(-6px) rotate(-45deg); }
  .menu-btn__txt { display: none; }
  .nav { position: fixed; inset: var(--hdr) 0 auto; flex-direction: column; align-items: stretch; gap: 0; padding: 12px var(--gutter) 28px;
    background: var(--night); color: var(--on-dark); max-height: calc(100vh - var(--hdr)); overflow: auto;
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity .3s var(--ease), transform .4s var(--ease), visibility .3s; }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
  .nav a::after { display: none; }
  .nav__cta { margin: 18px 0 0; text-align: center; font-size: 1.05rem !important; }
}

/* ---------- شريط عاجل ---------- */
.breaking { background: var(--terra); color: #fff; }
.breaking__in { display: flex; align-items: center; gap: 14px; min-height: 42px; }
.breaking__tag { flex: none; background: #fff; color: var(--terra); font-weight: 700; font-size: .74rem; padding: 2px 10px; border-radius: 4px; }
.breaking__link { flex: 1; color: #fff; font-size: .92rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; text-decoration: none; }
.breaking__link:hover { text-decoration: underline; }
.breaking__link .ph { background: rgba(255,255,255,.2); color: #fff; }
.breaking__x { flex: none; width: 40px; height: 40px; border: 0; background: transparent; color: #fff; font: inherit; cursor: pointer; border-radius: 50%; }

/* =====================================================================
   البطل
   ===================================================================== */
.hero { min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding-top: calc(var(--hdr) + 24px); overflow: hidden; isolation: isolate; }
.hero > .wrap { width: 100%; }
.hero__bg { position: absolute; inset: 0; z-index: -1; background: var(--night); }
.hero__bg::after { content: ""; position: absolute; inset: 0; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='36'%3E%3Cpath d='M0 17.5h72M0 35.5h72M36 0v18M18 18v18M54 18v18' stroke='%23ffffff' stroke-opacity='.05' fill='none'/%3E%3C/svg%3E"); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 5vw, 80px); align-items: center; padding-block: 24px 40px; }
.hero__kicker { color: var(--gold); font-weight: 600; font-size: .9rem; margin-bottom: 18px; }
.hero__title { font-weight: 800; font-size: clamp(3.4rem, 9.6vw, 8.4rem); line-height: 1.02; letter-spacing: -.01em; }
:root[data-lang="ar"] .hero__title { line-height: 1.12; }
:root[data-lang="en"] .hero__title { font-size: clamp(3rem, 6.4vw, 6.6rem); }
.hero__title .hl { color: var(--gold); display: block; }
.hero__sub { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--on-dark); margin-top: 14px; opacity: .92; }
.hero__lead { color: var(--on-dark-2); font-size: 1.06rem; max-width: 52ch; margin-top: 18px; }
/* البوابة المملوءة بصور المهرجان: علامة المؤسسة قناعاً للصور */
.hero__gate { margin: 0; position: relative; width: min(100%, 560px); aspect-ratio: 304 / 300; justify-self: center; }
.gate-mask { position: absolute; inset: 0;
  -webkit-mask: url("../brand/mark-black.svg") center / contain no-repeat; mask: url("../brand/mark-black.svg") center / contain no-repeat; background: var(--blue); }
.gate-mask img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; animation: gateFade 18s infinite; will-change: opacity; }
.gate-mask img:nth-child(1) { animation-delay: 0s; }
.gate-mask img:nth-child(2) { animation-delay: 6s; }
.gate-mask img:nth-child(3) { animation-delay: 12s; }
.gate-mask::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,26,58,0) 40%, rgba(12,26,58,.55)), linear-gradient(135deg, rgba(30,70,160,.35), rgba(224,178,30,.12)); }
@keyframes gateFade { 0% { opacity: 0; } 6% { opacity: 1; } 33% { opacity: 1; } 40% { opacity: 0; } 100% { opacity: 0; } }
.hero__gate figcaption { position: absolute; inset-inline-end: 0; bottom: -6px; font-size: .78rem; color: var(--on-dark-2); }
.hero__edition { position: absolute; top: 28%; inset-inline-start: -4%; font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 9vw, 7rem); line-height: 1; color: var(--gold); font-style: italic; transform: rotate(-6deg); text-shadow: 0 6px 30px rgba(0,0,0,.25); pointer-events: none; }
/* شريط المهرجان أسفل البطل */
.hero__fest { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; padding: 20px 0 26px; border-top: 1px solid var(--line-dark); text-decoration: none; color: inherit; }
.hero__fest b.num { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; color: var(--gold); line-height: 1; }
.hero__fest strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; }
.hero__fest span { color: var(--on-dark-2); font-size: .9rem; }
.hero__fest .count { justify-self: end; display: inline-flex; align-items: center; gap: 12px; font-weight: 600; color: var(--gold); white-space: nowrap; }
.count [data-countdown]:not([hidden]) + .count__alt { display: none; }
.hero__fest .count svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
[dir="rtl"] .hero__fest .count svg { transform: scaleX(-1); }
.hero__fest:hover .count svg { transform: translateX(5px); }
[dir="rtl"] .hero__fest:hover .count svg { transform: scaleX(-1) translateX(5px); }
/* دخول البطل */


/* ---------- الشريط المتحرك للفنون ---------- */
.is-off, .is-off * { animation-play-state: paused !important; }

/* =====================================================================
   البيان والأرقام
   ===================================================================== */
.statement__grid { display: grid; grid-template-columns: 220px 1fr; gap: 24px clamp(30px, 6vw, 100px); }
.statement__grid > .eyebrow { align-self: start; margin-top: 16px; }
.statement__text { font-family: var(--font-serif); font-weight: 500; font-size: clamp(1.45rem, 2.7vw, 2.2rem); line-height: 1.75; color: var(--ink); }
:root[data-lang="en"] .statement__text { line-height: 1.35; letter-spacing: -.01em; }
.statement__text em { font-style: normal; color: var(--blue); }
.statement__more { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; margin-top: 18px; color: var(--muted); }
.figures { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(56px, 8vw, 96px); border-top: 1px solid var(--ink); }
.figures > div { padding: 26px 22px 0 0; display: grid; gap: 8px; align-content: start; }
[dir="rtl"] .figures > div { padding: 26px 0 0 22px; }
.figures b { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1; color: var(--blue); }
.figures span { color: var(--muted); font-size: .92rem; max-width: 22ch; }

/* =====================================================================
   المهرجان (قسم داكن)
   ===================================================================== */
.fest { padding-block: clamp(84px, 11vw, 150px); overflow: hidden; isolation: isolate; }
.fest::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .14; background: url("../img/photos/fest-theatre-dusk.webp") center / cover no-repeat; }
.fest::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--night) 0%, rgba(12,26,58,.86) 40%, var(--night) 100%); }
.fest__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 6vw, 96px); align-items: center; }
.fest__num { font-family: var(--font-display); font-weight: 800; font-size: clamp(11rem, 30vw, 26rem); line-height: .8; color: transparent; -webkit-text-stroke: 2px var(--gold); letter-spacing: -.04em; user-select: none; }
.fest h2 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; margin-top: 14px; }
.fest__date { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--gold); margin-top: 12px; }
.fest__lead { color: var(--on-dark-2); font-size: 1.06rem; max-width: 54ch; margin-top: 16px; }
.countbox { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 10px 20px; border: 1px solid rgba(224,178,30,.45); border-radius: 4px; font-family: var(--font-display); font-weight: 600; color: var(--gold); }
.countbox::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.strip { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 12px; margin-top: clamp(56px, 7vw, 88px); }
.strip figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 3; background: var(--night-2); }
.strip figure:first-child { grid-row: span 2; aspect-ratio: auto; }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.strip figcaption { position: absolute; inset: auto 0 0; padding: 30px 14px 10px; font-size: .78rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.unesco { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-dark); color: var(--on-dark-2); font-size: .95rem; }
.unesco b { color: var(--on-dark); font-family: var(--font-display); }

/* =====================================================================
   ما نفعله (صفوف تحريرية)
   ===================================================================== */
.work-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.work-item { display: grid; grid-template-columns: 1.1fr 1fr 240px; gap: 18px 40px; align-items: center; padding: clamp(26px, 3.6vw, 44px) 0; border-bottom: 1px solid var(--line); }
.work-item__n { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--gold-deep); }
.work-item h3 { font-size: clamp(1.5rem, 2.8vw, 2.3rem); font-weight: 800; transition: color .35s var(--ease), transform .5s var(--ease); }
.work-item p { color: var(--muted); }
.work-item figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--sand); }
.work-item figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
[dir="ltr"] 
/* =====================================================================
   الحكاية (خط زمني)
   ===================================================================== */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 140px; width: 1px; background: var(--line); }
.tl { display: grid; grid-template-columns: 140px 1fr 260px; gap: 18px 48px; padding: 30px 0; position: relative; }
.tl::before { content: ""; position: absolute; top: 44px; inset-inline-start: 134px; width: 13px; height: 13px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px var(--sand); }
.tl__year { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 2.6vw, 2.2rem); color: var(--blue); line-height: 1.2; padding-inline-end: 24px; }
.tl__body { padding-inline-start: 24px; }
.tl__body h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 6px; }
.tl__body p { color: var(--muted); }
.tl figure { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tl figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.tl figure img:only-child { grid-column: 1 / -1; }
.quote { margin: clamp(48px, 7vw, 90px) 0 0; padding: clamp(28px, 4vw, 48px); background: var(--night-ui); color: var(--on-dark); border-radius: var(--radius); display: grid; grid-template-columns: auto 1fr; gap: 20px 32px; align-items: center; }
.quote::before { content: "“"; font-family: Georgia, serif; font-size: 7rem; line-height: .6; color: var(--gold); }
[dir="rtl"] .quote::before { content: "”"; }
.quote p { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 2.6vw, 2.1rem); line-height: 1.5; }
.quote small { display: block; margin-top: 10px; color: var(--on-dark-2); font-size: .9rem; font-family: var(--font-body); font-weight: 400; }

/* =====================================================================
   الإصدارات والأرشيف
   ===================================================================== */
.books { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); align-items: start; }
.book { display: grid; gap: 6px; align-content: start; margin: 0; }
.book img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px 4px 4px 2px; background: var(--sand);
  box-shadow: 0 0 0 1px rgba(14,20,36,.06), 0 14px 24px -14px rgba(14,20,36,.5); transition: transform .5s var(--ease), box-shadow .5s var(--ease); margin-bottom: 10px; }
.book b { font-family: var(--font-display); font-weight: 600; font-size: .9rem; line-height: 1.45; }
.book > span { font-size: .78rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 1000px) { .books { grid-template-columns: repeat(3, minmax(0, 1fr)); } .shead--row { grid-template-columns: 1fr; align-items: start; } }
@media (max-width: 560px) { .books { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* الأرشيف: شبكة متساوية كورقة تماس مصوّر، والتعليق ظاهر تحت كل صورة */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 20px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 40%; border-radius: 2px; background: var(--line); }
.gallery figcaption { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .86rem; line-height: 1.5; color: var(--muted); }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; } .gallery figcaption { font-size: .8rem; } }

/* =====================================================================
   الأخبار
   ===================================================================== */
.news { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0 clamp(28px, 4vw, 56px); align-items: start; }
.news-card:first-child { grid-row: span 3; }
.news-card:not(:first-child) { grid-template-columns: 132px 1fr; column-gap: 18px; row-gap: 6px; padding: 18px 0; border-bottom: 1px solid var(--line); align-content: start; }
.news-card:not(:first-child):nth-child(2) { padding-top: 0; }
.news-card:not(:first-child) .news__img { grid-row: span 3; aspect-ratio: 1; margin: 0; }
.news-card:not(:first-child) .news__play { display: none; }
.news-card:not(:first-child) .news-card__sum { -webkit-line-clamp: 2; }
.news-card { position: relative; display: grid; gap: 12px; }
.news-card:first-child h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.news__img { position: relative; aspect-ratio: 16 / 11; border-radius: var(--radius); display: grid; place-items: center; overflow: hidden; margin-bottom: 4px; background: linear-gradient(150deg, var(--a, #1e46a0), var(--b, #0c1a3a)); color: rgba(255,255,255,.85); }
.news__img svg { width: 22%; height: 22%; }
.news__img.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.news__play { position: absolute; inset-inline-start: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; background: rgba(12,26,58,.82); color: #fff; font-size: .78rem; font-weight: 600; padding: 6px 12px 6px 10px; border-radius: 4px; }
.news__play i { width: 0; height: 0; border-block: 6px solid transparent; border-inline-start: 10px solid #fff; }
[dir="rtl"] .news__play i { border-inline-start: 0; border-inline-end: 10px solid #fff; transform: scaleX(-1); }
.news-card.is-urgent .news__img { box-shadow: inset 0 -4px 0 var(--terra); }
.news-card h3 { font-size: 1.16rem; line-height: 1.45; font-weight: 700; }
.news-card__link { color: inherit; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .5s var(--ease); }
[dir="rtl"] .news-card__link { background-position: 100% 100%; }
.news-card__link::after { content: ""; position: absolute; inset: 0; }
.news-card:hover .news-card__link { background-size: 100% 1.5px; }
.news-card__sum { color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news__all { display: flex; justify-content: center; margin-top: 48px; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; font-size: .78rem; color: var(--muted); }
.chip { color: var(--blue); font-weight: 600; }
.badge { font-size: .7rem; font-weight: 700; padding: 2px 9px; border-radius: 4px; }
.badge--urgent { background: var(--terra); color: #fff; }
.badge--pinned { background: var(--gold); color: var(--night); }

/* =====================================================================
   الدعوة للمشاركة + التواصل
   ===================================================================== */
.cta { padding-block: clamp(84px, 10vw, 140px); }
.cta__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(30px, 6vw, 96px); align-items: end; }
.cta h2 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); font-weight: 800; }
.cta h2 .hl { color: var(--gold); }
.ways { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line-dark); }
.ways li { display: grid; grid-template-columns: 1fr; gap: 4px 18px; padding: 22px 0; border-bottom: 1px solid var(--line-dark); }
.ways .n { font-family: var(--font-display); font-weight: 800; color: var(--gold); font-size: 1.1rem; grid-row: span 2; }
.ways b { font-family: var(--font-display); font-size: 1.2rem; }
.ways span { color: var(--on-dark-2); }
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 6vw, 96px); align-items: start; }
.contact h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; margin: 14px 0 22px; }
.info { margin: 26px 0 0; display: grid; gap: 0; border-top: 1px solid var(--ink); }
.info > div { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.info dt { color: var(--muted); font-size: .88rem; }
.info dd { margin: 0; font-weight: 500; }
.info a { text-decoration: none; border-bottom: 1px solid var(--line); }
.info a:hover { border-color: var(--blue); color: var(--blue); }
.form { display: grid; gap: 18px; background: var(--surface); padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: var(--radius); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: flex; flex-direction: column; gap: 7px; }
.lbl { font-size: .88rem; font-weight: 500; }
input, textarea, select { font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; min-height: 50px; width: 100%; transition: border-color .25s, box-shadow .25s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent); }
textarea { min-height: 140px; resize: vertical; }
.ok { font-size: .92rem; background: color-mix(in srgb, var(--turq) 14%, transparent); color: var(--turq-deep); padding: 12px 16px; border-radius: 4px; border-inline-start: 3px solid var(--turq); }
.ok.is-error { background: color-mix(in srgb, var(--terra) 12%, transparent); color: var(--terra); border-color: var(--terra); }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.form__privacy { font-size: .82rem; color: var(--muted); }
/* صفحات نصية (الخصوصية) */
.phero--small { padding-bottom: clamp(40px, 5vw, 64px); }
.phero--small h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); max-width: 22ch; }
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); font-weight: 700; margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-inline-start: 22px; display: grid; gap: 10px; }
.prose b { color: var(--ink); }
.prose a { color: var(--blue); }

/* =====================================================================
   ترويسات الصفحات الداخلية
   ===================================================================== */
.phero { padding: calc(var(--hdr) + clamp(56px, 8vw, 110px)) 0 clamp(56px, 7vw, 90px); overflow: hidden; isolation: isolate; }
.phero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--night); }
.phero__mark { position: absolute; z-index: -1; inset-inline-end: 5%; bottom: -10%; width: min(26vw, 320px); color: rgba(247,242,232,.045); }
.phero h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); font-weight: 800; max-width: 16ch; margin-top: 16px; }
.phero .lead, .phero p.lead { color: var(--on-dark-2); font-size: 1.08rem; max-width: 60ch; margin-top: 18px; }
.phero .note { color: var(--on-dark-2); margin-top: 10px; }
.crumbs { font-size: .84rem; color: var(--on-dark-2); }
.crumbs a { color: var(--on-dark); text-decoration: none; border-bottom: 1px solid var(--line-dark); }
/* صفحة المهرجان: عمودان، النص وصورة المسرح في قوس */
.phero--fest { padding-bottom: clamp(64px, 8vw, 110px); }
.phero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.phero--fest h1 { font-size: clamp(2.5rem, 5.2vw, 4.6rem); max-width: 14ch; }
.phero__media { margin: 0; position: relative; justify-self: center; width: min(100%, 440px); }
.arch { aspect-ratio: 4 / 5; border-radius: 999px 999px 10px 10px; overflow: hidden; background: var(--night-2);
  outline: 1px solid rgba(224,178,30,.45); outline-offset: 12px; }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.ed-badge { position: absolute; inset-inline-start: -28px; bottom: 56px; width: 122px; height: 122px; border-radius: 50%;
  display: grid; place-content: center; text-align: center; background: var(--gold); color: var(--night); border: 6px solid var(--night); }
.ed-badge b { font-family: var(--font-display); font-weight: 800; font-size: 2.8rem; line-height: 1; }
.ed-badge span { font-size: .78rem; font-weight: 700; }
.phero__media figcaption { margin-top: 22px; text-align: center; font-size: .82rem; color: var(--on-dark-2); }
.facts { display: grid; grid-template-columns: repeat(3, auto); width: fit-content; max-width: 100%; margin: 32px 0 0;
  border: 1px solid var(--line-dark); border-radius: var(--radius); background: rgba(247,242,232,.04); }
.facts div { padding: 14px 22px; }
.facts div + div { border-inline-start: 1px solid var(--line-dark); }
.facts dt { font-size: .76rem; color: var(--on-dark-2); }
.facts dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; white-space: nowrap; }
.phero .countbox { margin-top: 22px; }
.countline { display: inline-block; margin-top: 18px; color: var(--gold); font-weight: 600; }
.countline:empty { display: none; }

/* محاور المهرجان */
.tracks { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.track { padding: 30px 26px 34px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
[dir="rtl"] .track { padding: 30px 0 34px 26px; }
.track__n { font-family: var(--font-display); font-weight: 700; color: var(--gold-deep); }
.track h3 { font-size: 1.5rem; font-weight: 800; }
.track p { color: var(--muted); }
.restore { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 14px; align-items: end; margin-top: 18px; }
.restore figure { margin: 0; }
.restore img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.restore figcaption { font-size: .8rem; color: var(--muted); margin-top: 6px; }

/* ملخّص أيام البرنامج */
.pdaycards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; margin-bottom: 8px; }
.pdaycard { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; transition: border-color .3s, transform .5s var(--ease); }
.pdaycard:hover { border-color: var(--blue); }
.pdaycard__n { font-size: .74rem; font-weight: 600; color: var(--gold-deep); }
:root[data-lang="en"] .pdaycard__n { text-transform: uppercase; letter-spacing: .12em; }
.pdaycard h3 { font-size: 1.18rem; font-weight: 700; }
.pdaycard__meta { font-size: .84rem; color: var(--muted); }
.pdaycard ul { list-style: none; margin: 8px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: .86rem; }
.pdaycard li { display: flex; gap: 10px; }
.pdaycard li time { color: var(--blue); font-weight: 600; flex: none; }
.pdaycard__go { margin-top: auto; padding-top: 10px; font-size: .84rem; font-weight: 600; color: var(--blue); }
.pdaycard.is-tba { background: transparent; border-style: dashed; }
.is-dark .pdaycard { background: rgba(247,242,232,.04); border-color: var(--line-dark); color: var(--on-dark); }
.is-dark .pdaycard:hover { border-color: var(--gold); }
.is-dark .pdaycard__n, .is-dark .pdaycard li time, .is-dark .pdaycard__go { color: var(--gold); }
.is-dark .pdaycard__meta { color: var(--on-dark-2); }
.is-dark .pdaycard ul { border-color: var(--line-dark); }

/* الزيارة */
.visit { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(30px, 6vw, 96px); align-items: start; }
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 2px; min-height: 60px; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.6rem; line-height: 1; color: var(--gold-deep); flex: none; transition: transform .35s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { padding: 0 2px 22px; color: var(--muted); }
.faq details > p.ph { margin: 0 0 22px; padding: 6px 10px; display: inline-block; color: var(--ph-fg); }

/* =====================================================================
   صفحة البرنامج
   ===================================================================== */
.pbar { position: sticky; top: var(--hdr); z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.pdays { display: flex; gap: 6px; overflow-x: auto; padding-block: 12px; scrollbar-width: thin; }
.pday { flex: 1 0 auto; min-width: 88px; display: flex; flex-direction: column; align-items: center; padding: 8px 10px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; line-height: 1.3; text-decoration: none; transition: border-color .25s, background .25s, color .25s; }
.pday:hover { border-color: var(--blue); }
.pday__wd, .pday__mm, .pday__date { font-size: .72rem; color: var(--muted); }
.pday__dd { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.pday[aria-selected="true"] { background: var(--night-ui); border-color: var(--night-ui); color: var(--ivory); }
.pday[aria-selected="true"] span { color: var(--gold); }
.pday.is-tba:not([aria-selected="true"]) { border-style: dashed; color: var(--muted); }
.block--prog { padding-block: 28px clamp(64px, 9vw, 110px); }
.ptools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.psearch { flex: 1 1 260px; }
.psearch input { min-height: 46px; background: var(--surface); border-radius: 4px; padding-inline: 20px; }
.ptimes { display: flex; flex-wrap: wrap; gap: 6px; }
.ptime, .pchip, .nfilters button { font: inherit; font-size: .86rem; font-weight: 500; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0 16px; min-height: 42px; cursor: pointer; transition: border-color .25s, background .25s, color .25s; }
.ptime:hover:not(:disabled), .pchip:hover, .nfilters button:hover { border-color: var(--blue); }
.ptime:disabled { opacity: .4; cursor: default; }
.pchip[aria-pressed="true"], .nfilters button[aria-pressed="true"] { background: var(--night-ui); border-color: var(--night-ui); color: var(--ivory); }
.nfilters button.is-urgent { color: var(--terra); }
.nfilters button.is-urgent[aria-pressed="true"] { background: var(--terra); border-color: var(--terra); color: #fff; }
.pprint { flex: none; }
.pfilters { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-block: 14px; border-block: 1px solid var(--line); margin-bottom: 22px; }
.pchips { display: flex; flex-wrap: wrap; gap: 6px; }
.pside { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pfam { flex-direction: row; align-items: center; gap: 8px; font-size: .88rem; cursor: pointer; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.pfam input { width: 18px; height: 18px; min-height: 0; accent-color: #1e46a0; }
.pvenue-sel { width: auto; min-height: 42px; padding: 0 14px; font-size: .88rem; background: var(--surface); border-radius: 4px; }
.pnow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding: 16px 20px; margin-bottom: 20px; background: var(--night-ui); color: var(--on-dark); border-radius: var(--radius); }
.pnow b { color: var(--gold); }
.pnow .btn { margin-inline-start: auto; }
.pprint-title { display: none; }
.phour { display: grid; grid-template-columns: 110px 1fr; gap: 0 26px; }
.phour__t { padding-top: 16px; font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--blue); direction: ltr; text-align: end; }
.pitems { list-style: none; margin: 0; padding: 0; border-inline-start: 1px solid var(--line); }
.pitem { display: grid; grid-template-columns: 120px 1fr auto; gap: 4px 22px; align-items: start; padding: 18px 0; padding-inline-start: 24px; border-bottom: 1px solid var(--line); transition: background .3s; }
.pitem:hover { background: color-mix(in srgb, var(--sand) 60%, transparent); }
.pitem:last-child { border-bottom-color: transparent; }
.pitem__time { direction: ltr; text-align: end; line-height: 1.4; }
[dir="ltr"] .pitem__time { text-align: start; }
.pitem__time time { font-weight: 700; font-size: 1.04rem; color: var(--ink); display: block; }
.pitem__time span { font-size: .8rem; color: var(--muted); }
.pitem__main h4 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pitem__main p { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.pitem__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: .78rem; }
.ptag { font-weight: 600; padding: 2px 10px; border-radius: 4px; background: color-mix(in srgb, currentColor 12%, transparent); white-space: nowrap; }
.ptag--general { color: var(--muted); } .ptag--poetry { color: var(--blue); } .ptag--theatre { color: var(--terra); }
.ptag--music { color: var(--turq-deep); } .ptag--art { color: var(--gold-deep); } .ptag--books { color: #7a4f8a; } .ptag--talk { color: #4a5568; } .ptag--cinema { color: #9a3b5b; }
.pvenue { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); white-space: nowrap; }
.pvenue svg { width: 14px; height: 14px; }
.pitem.is-now { background: color-mix(in srgb, var(--gold) 14%, transparent); box-shadow: inset 3px 0 0 var(--gold); }
[dir="rtl"] .pitem.is-now { box-shadow: inset -3px 0 0 var(--gold); }
.pitem.is-past { opacity: .5; }
.pnow-badge { background: var(--gold); color: var(--night); font-weight: 700; padding: 2px 9px; border-radius: 4px; }
.ptba { text-align: center; padding: 64px 20px; border: 1px dashed var(--line); border-radius: var(--radius); display: grid; gap: 6px; color: var(--muted); }
.ptba b { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); }
.pempty, .nempty { text-align: center; color: var(--muted); padding: 40px 0; }
.fam-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--terra); flex: none; }
.legend { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--muted); font-size: .88rem; }

/* =====================================================================
   صفحة الأخبار
   ===================================================================== */
.block--news { padding-block: 36px clamp(64px, 9vw, 110px); }
.nfilters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.block--news .note { margin-bottom: 28px; }
.nfeatured { display: grid; gap: 24px; margin-bottom: 24px; }
.nfeatured:empty { display: none; }
.nlist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; align-items: start; }
.story { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: calc(var(--hdr) + 24px); }
.story.is-urgent { border-inline-start: 3px solid var(--terra); }
.story.is-target { outline: 2px solid var(--gold); outline-offset: 4px; }
.story--featured { display: grid; grid-template-columns: 1.25fr 1fr; align-items: stretch; }
.story--featured .news__img { aspect-ratio: auto; min-height: 300px; margin: 0; border-radius: 0; }
.story__media { position: relative; aspect-ratio: 16 / 9; background: var(--night); display: grid; place-items: center; }
.story--featured .story__media { aspect-ratio: auto; min-height: 320px; }
.story__media video, .story__media iframe, .story__media img, .story__media .yt { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.story__media video { object-fit: contain; background: #000; }
.story__media img { object-fit: cover; }
.story__err { color: var(--gold-soft); padding: 24px; text-align: center; font-size: .92rem; max-width: 42ch; }
.yt { padding: 0; cursor: pointer; background: #000; }
.yt__play { position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: rgba(12,26,58,.82); border: 1.5px solid rgba(255,255,255,.85); transition: background .3s; }
.yt__play::after { content: ""; position: absolute; top: 50%; left: 50%; margin: -11px 0 0 -6px; border-block: 11px solid transparent; border-left: 18px solid #fff; }
.yt:hover .yt__play { background: var(--gold); }
.story__body { padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; gap: 10px; }
.story__title { font-size: 1.35rem; line-height: 1.45; font-weight: 700; }
.story--featured .story__title { font-size: clamp(1.6rem, 2.8vw, 2.3rem); font-weight: 800; }
.story__sum { color: var(--muted); }
.story__more summary { cursor: pointer; color: var(--blue); font-weight: 600; min-height: 44px; display: flex; align-items: center; list-style: none; }
.story__more summary::-webkit-details-marker { display: none; }
.story__more summary::after { content: "+"; margin-inline-start: 8px; font-size: 1.2rem; }
.story__more[open] summary::after { content: "−"; }
.story__more p + p, .story__more summary + p { margin-top: 10px; }
.story__copy { align-self: flex-start; font: inherit; font-size: .84rem; color: var(--muted); background: none; border: 0; padding: 0; min-height: 44px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* =====================================================================
   التذييل
   ===================================================================== */
.footer { background: var(--night); color: var(--on-dark-2); font-size: .92rem; overflow: hidden; }
.footer__motto { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 11vw, 9rem); line-height: 1; color: var(--on-dark); padding-block: clamp(56px, 8vw, 100px) 30px; letter-spacing: -.01em; }
.footer__motto .hl { color: var(--gold); }
.footer__top { display: grid; grid-template-columns: 1.5fr .8fr 1fr 1.4fr; gap: 40px; padding: 40px 0 48px; border-top: 1px solid var(--line-dark); }
.footer__brand p { margin-top: 18px; max-width: 36ch; }
.footer .small { font-size: .82rem; margin-top: 8px; }
.footer nav { display: flex; flex-direction: column; gap: 2px; }
.footer nav a { padding: 6px 0; text-decoration: none; color: var(--on-dark-2); transition: color .25s; }
.footer nav a:hover { color: var(--gold); }
.footer h4 { color: var(--on-dark); font-size: 1rem; margin-bottom: 10px; }
.newsletter { display: grid; gap: 12px; }
.newsletter__row { display: flex; gap: 8px; }
.newsletter input { background: rgba(247,242,232,.06); border-color: var(--line-dark); color: var(--on-dark); border-radius: 4px; padding-inline: 18px; }
.newsletter .ok { background: rgba(224,178,30,.16); color: var(--gold-soft); }
.footer__bottom { border-top: 1px solid var(--line-dark); padding-block: 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .84rem; }
.footer .brand__mark { color: var(--on-dark); }
.footer__end { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; }
.footer__login { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-dark); border-radius: 4px;
  color: var(--on-dark); text-decoration: none; font-weight: 600; transition: border-color .25s, color .25s; }
.footer__login svg { width: 15px; height: 15px; color: var(--gold); }
.footer__login:hover { border-color: var(--gold); color: var(--gold); }

/* =====================================================================
   أقسام الدورة 13: تنبيه البرنامج، معرض الكتاب، الإعلانات، الباحثون والإعلام
   ===================================================================== */
.pnotice { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 22px; padding: 12px 16px; border-radius: var(--radius); font-size: .9rem;
  background: rgba(224,178,30,.1); border: 1px solid rgba(224,178,30,.35); color: var(--on-dark); max-width: 760px; }
.pnotice::before { content: "i"; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: var(--night); font: 800 .75rem/1 Georgia, serif; }
.pnotice--dark { margin: 20px 0 0; }

.visit__map { margin: 26px 0 0; }
.visit__map img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--sand); }
.visit__map figcaption { font-size: .8rem; color: var(--muted); margin-top: 8px; }

.bookfair { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.bookfair__poster { margin: 0; }
.bookfair__poster img { width: 100%; border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(12, 26, 58, .5); }
.bookfair h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; margin-top: 12px; }
.bookfair__lead { color: var(--muted); font-size: 1.05rem; margin-top: 14px; max-width: 56ch; }
.bookfair__photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 28px; }
.bookfair__photos figure { margin: 0; overflow: hidden; border-radius: 4px; }
.bookfair__photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .9s var(--ease); }

.films__grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.films__main video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); }
.films__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.film { width: 100%; display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center; padding: 8px; font: inherit; text-align: start; cursor: pointer;
  color: var(--on-dark); background: rgba(247,242,232,.04); border: 1px solid var(--line-dark); border-radius: var(--radius); transition: border-color .25s, background .25s; }
.film img { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; background: var(--night-2); }
.film b { display: block; font-family: var(--font-display); font-weight: 600; font-size: .95rem; }
.film small { color: var(--on-dark-2); font-size: .78rem; }
.film:hover { border-color: rgba(224,178,30,.6); }
.film.is-active { border-color: var(--gold); background: rgba(224,178,30,.1); }

.press { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(30px, 6vw, 96px); align-items: start; }
.press h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 800; margin: 12px 0 14px; }
.logos-dl { margin-top: 34px; }
.logos-dl h3 { font-size: 1.05rem; margin-bottom: 10px; }
.logos-dl ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.logos-dl a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); text-decoration: none; font-size: .9rem; transition: border-color .25s; }
.logos-dl a:hover { border-color: var(--blue); }
.logos-dl small { margin-inline-start: auto; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; }
.logo-chip { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; background: #fbf9f4; border: 1px solid #e4ddcf; }   /* ثابت في الوضعين ليظهر كل شعار على خلفيته الصحيحة */
.logo-chip--mark-ivory, .logo-chip--mark-gold { background: #0c1a3a; border-color: #0c1a3a; }
.logo-chip img { width: 26px; height: 26px; object-fit: contain; }
.factsheet { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.factsheet > div { display: grid; grid-template-columns: 130px 1fr; gap: 4px 18px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.factsheet > div:last-child { border-bottom: 0; }
.factsheet dt { font-size: .82rem; color: var(--muted); font-weight: 600; padding-top: 2px; }
.factsheet dd { margin: 0; font-size: .95rem; }
.factsheet a { color: var(--blue); text-decoration: none; }
.factsheet a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .bookfair, .films__grid, .press { grid-template-columns: 1fr; }
  .bookfair__poster { max-width: 420px; }
  .films__list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .film { grid-template-columns: 1fr; gap: 6px; }
  .film img { width: 100%; }
  .factsheet > div { grid-template-columns: 1fr; }
  .bookfair__photos { grid-template-columns: 1fr 1fr; }
  .bookfair__photos figure:last-child { grid-column: 1 / -1; }
}

/* ---------- الظهور عند التمرير ---------- */
/* لا ظهور متحرك عند التمرير: المحتوى ظاهر من البداية */
/* ---------- طبقة تحريرية ---------- */
.hero__lead, .fest__lead, .phero .lead, .shead p, .work-item p, .tl__body p, .quote p, .bookfair__lead, .statement__more p,
.story__sum, .story__more p, .prose p, .prose li, .track p, .faq details > p { font-family: var(--font-serif); }
.hero__lead, .fest__lead, .phero .lead { font-size: 1.12rem; }
.quote p { font-weight: 600; }
.link-arrow { min-height: 44px; border-bottom-width: 1px; }
.is-dark .link-arrow { color: var(--on-dark); }
.link-arrow:hover { color: var(--gold-deep); }
.is-dark .link-arrow:hover { color: var(--gold); }
.actions { align-items: center; gap: 14px 24px; }
figcaption { font-family: var(--font-serif); }
/* انتقال ناعم بين الصفحات */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; animation-timing-function: var(--ease); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .rise { opacity: 1; transform: none; }
  .gate-mask img:first-child { opacity: 1; }
}

/* ---------- الشاشات الأصغر ---------- */
@media (max-width: 1100px) {
  .work-item { grid-template-columns: 1fr 200px; }
  .work-item p { grid-column: 1; }
  .work-item figure { grid-row: span 2; grid-column: 2; }
  .tl { grid-template-columns: 120px 1fr; }
  .tl figure { grid-column: 2; padding-inline-start: 24px; max-width: 520px; }
  .timeline::before { inset-inline-start: 120px; } .tl::before { inset-inline-start: 114px; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero__grid, .fest__grid, .cta__grid, .contact, .visit, .statement__grid, .phero__grid { grid-template-columns: 1fr; }
  .phero__media { width: min(100%, 360px); margin-top: 8px; }
  .arch { aspect-ratio: 1 / 1; }
  .hero__gate { width: min(76vw, 380px); margin-top: 8px; }
  .hero__edition { font-size: clamp(3.4rem, 14vw, 5rem); }
  .statement__more { grid-column: 1; }
  .fest__num { font-size: clamp(8rem, 40vw, 14rem); }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip figure:first-child { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
  .news, .nlist, .story--featured { grid-template-columns: 1fr; }
  .story--featured .story__media { aspect-ratio: 16 / 9; min-height: 0; }
  .tracks { grid-template-columns: 1fr 1fr; }
  .restore { grid-template-columns: 1fr 1fr; }
  .restore figure:last-child { grid-column: 1 / -1; }
  .pitem { grid-template-columns: 1fr; gap: 4px; }
  .pitem__time { display: flex; gap: 8px; align-items: baseline; text-align: start; }
  [dir="rtl"] .pitem__time { justify-content: flex-end; }
  .pitem__time time { display: inline; }
  .pitem__meta { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
@media (max-width: 640px) {
  html { font-size: 100%; }
  html[data-size="1"] { font-size: 112%; } html[data-size="2"] { font-size: 125%; }
  .bar { min-height: 64px; }
  .brand__en { display: none; }
  :root[data-lang="en"] .brand__en { display: block; } :root[data-lang="en"] .brand__ar { display: none; }
  .tools .tool--size { display: none; }
  .hero__fest { grid-template-columns: auto 1fr; }
  .hero__fest .count { grid-column: 1 / -1; justify-self: start; }
  .figures { grid-template-columns: 1fr 1fr; }
  .figures > div:nth-child(n+3) { margin-top: 18px; }
  .statement__more { grid-template-columns: 1fr; }
  .work-item { grid-template-columns: 1fr; gap: 10px; }
  .work-item p, .work-item figure { grid-column: auto; grid-row: auto; }
  .timeline::before, .tl::before { display: none; }
  .tl { grid-template-columns: 1fr; gap: 8px; padding: 24px 0; border-top: 1px solid var(--line); }
  .tl__year, .tl__body, .tl figure { padding: 0; grid-column: auto; }
  .quote { grid-template-columns: 1fr; }
  .quote::before { font-size: 5rem; }
  .tracks, .row2, .footer__top { grid-template-columns: 1fr; }
  .info > div { grid-template-columns: 1fr; gap: 2px; }
  .newsletter__row { flex-direction: column; }
  .facts { grid-template-columns: 1fr; width: 100%; }
  .facts div + div { border-inline-start: 0; border-top: 1px solid var(--line-dark); }
  .phour { grid-template-columns: 1fr; }
  .phour__t { text-align: start; padding: 18px 0 6px; font-size: 1.4rem; }
  [dir="rtl"] .phour__t { text-align: end; }
  .pitems { border-inline-start: 0; }
  .pitem { padding-inline-start: 0; }
  .pfilters { flex-direction: column; align-items: stretch; }
  .shead--row { grid-template-columns: 1fr; }
}

/* ---------- ترويسة الهاتف: الشعار والأزرار في سطر واحد دائماً ---------- */
@media (max-width: 640px) {
  .bar { gap: 10px; }
  .brand { gap: 8px; min-width: 0; }
  .brand__mark { width: 36px; height: 36px; }
  .brand__mark svg { width: 32px; height: 32px; }
  .brand__ar { font-size: .95rem; white-space: nowrap; }
  .tools { gap: 4px; flex: none; }
  .tool { min-width: 38px; min-height: 38px; padding: 0 8px; }
  .tool--theme, .menu-btn { width: 38px; height: 38px; }
}
@media (max-width: 380px) {
  :root { --gutter: 14px; }
  .brand__ar { font-size: .86rem; }
}

/* ---------- الطباعة: برنامج اليوم المختار فقط ---------- */
@media print {
  @page { margin: 14mm; }
  html { font-size: 11pt; }
  body { background: #fff; color: #000; }
  header.site, .footer, .skip, [data-page]:not([data-page="programme"]), .pbar, .ptools, .pfilters, .pnow, .legend, .phero { display: none !important; }
  .pprint-title { display: block; font-size: 16pt; margin-bottom: 4mm; text-align: center; }
  .pitem { break-inside: avoid; padding-block: 2.5mm; }
  .pitem.is-past { opacity: 1; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
