/* ══════════════════════════════════════════════════════
   DARFURERRS — Main Stylesheet
   الإصلاحات:
   ١. الهيدر ثابت دائماً (fixed) لا تختفي القائمة أبداً
   ٢. مسافة تعويضية تمنع المحتوى من الاختباء خلف الهيدر
   ٣. حذف المربع الأزرق المجهول (كان .state-popup)
   ٤. زر العودة للأعلى يعمل صحيحاً
   ٥. الصور كلها من مجلد pics/ بأسماء واضحة
   ══════════════════════════════════════════════════════ */

/* ── VARIABLES ──────────────────────────────────────── */
:root {
  --blue:   #0B3C6D;
  --green:  #2E8B57;
  --gold:   #C9A227;
  --white:  #FFFFFF;
  --light:  #F5F7FA;
  --text:   #2d3748;
  --muted:  #718096;
  --border: #e2e8f0;
  --shadow:    0 4px 24px rgba(11,60,109,0.10);
  --shadow-lg: 0 8px 40px rgba(11,60,109,0.15);
  --radius:    14px;
  --radius-sm: 8px;
  --tr: all 0.3s ease;

  /* ارتفاع شريط التنبيه + الناف — يُحسب بـ JS أيضاً */
  --alert-h: 40px;
  --nav-h:   72px;
  --header-h: calc(var(--alert-h) + var(--nav-h)); /* 112px */
}

/* Dark mode */
body.dark-mode {
  --white:  #1e2a3a;
  --light:  #16213e;
  --text:   #e2e8f0;
  --muted:  #a0aec0;
  --border: #2d3748;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  background: #0f172a;
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; font-size: 16px; }
body  { font-family: 'Cairo','IBM Plex Sans Arabic',sans-serif; background: var(--white); color: var(--text); line-height: 1.7; overflow-x: hidden; transition: background .3s, color .3s; }
body.ltr { font-family: 'Poppins','Inter',sans-serif; direction: ltr; }
body.rtl { direction: rtl; }
img   { max-width: 100%; height: auto; display: block; }
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; }
.container { max-width: 1260px; margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }

/* ── LOADER ─────────────────────────────────────────── */
#loader { position: fixed; inset: 0; background: var(--blue); z-index: 9999; display: flex; align-items: center; justify-content: center; transition: opacity .5s; }
#loader.hidden { opacity: 0; pointer-events: none; }
.loader-inner  { text-align: center; }
.loader-logo   { display: flex; align-items: center; gap: 16px; justify-content: center; margin-bottom: 24px; }
.loader-text   { color: white; font-size: 2rem; font-weight: 900; letter-spacing: 4px; }
.loader-bar    { width: 220px; height: 4px; background: rgba(255,255,255,.2); border-radius: 2px; overflow: hidden; }
.loader-fill   { height: 100%; background: var(--gold); border-radius: 2px; animation: loadBar 1.8s ease forwards; }
@keyframes loadBar { from{width:0} to{width:100%} }

/* ══════════════════════════════════════════════════════
   FIXED HEADER — الإصلاح الأساسي
   الشريط الأحمر + القائمة في حاوية واحدة ثابتة fixed
   لا تختفيان أبداً عند التمرير
   ══════════════════════════════════════════════════════ */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;   /* فوق كل شيء */
  display: flex;
  flex-direction: column;
}

/* شريط التنبيه داخل الهيدر الثابت */
.alert-bar {
  background: linear-gradient(90deg, #c0392b, #e74c3c);
  color: white;
  padding: 10px 0;
  font-size: .88rem;
  height: var(--alert-h);
  display: flex;
  align-items: center;
}
.alert-inner    { display: flex; align-items: center; gap: 16px; max-width: 1260px; margin: 0 auto; padding: 0 24px; overflow: hidden; width: 100%; }
.alert-label    { background: rgba(255,255,255,.2); padding: 3px 12px; border-radius: 20px; white-space: nowrap; font-weight: 700; font-size: .82rem; flex-shrink: 0; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
/* ── شريط الأخبار التلفزيوني ── */
.ticker-wrap    { flex: 1; overflow: hidden; position: relative; cursor: pointer; }
.ticker-wrap::before,
.ticker-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 2; pointer-events: none;
}
.ticker-wrap::before { right: 0; background: linear-gradient(to left, var(--blue), transparent); }
.ticker-wrap::after  { left: 0;  background: linear-gradient(to right, var(--blue), transparent); }
.ticker         {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  will-change: transform;
  /* JS يتولى الحركة — لا animation هنا */
}
.ticker-item    {
  flex-shrink: 0;
  padding: 0 6px;
  font-size: .88rem;
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.ticker-sep {
  display: inline-block;
  width: 6px; height: 6px;
  background: rgba(255,255,255,.5);
  border-radius: 50%;
  margin: 0 18px;
  flex-shrink: 0;
  vertical-align: middle;
}
.ticker-urgent {
  color: #FFD700;
  font-weight: 700;
}
/* إيقاف مؤقت عند hover */
.ticker-wrap:hover .ticker { transition: none; }

/* شريط الوقت في التيكر */
.ticker-time {
  font-size: .75rem;
  background: rgba(255,255,255,.15);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .05em;
  flex-shrink: 0;
}

/* القائمة الرئيسية داخل الهيدر الثابت */
.navbar {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  box-shadow: var(--shadow);
  height: var(--nav-h);
  /* لا position: sticky هنا — الـ fixed-header يتكفل بالثبات */
}
body.dark-mode .navbar { background: #1e2a3a; border-color: #2d3748; }
.nav-container  { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 24px; }
/* ── شعار الـ navbar ── */
.nav-logo {
  display: flex;
  align-items: center;  /* يضبط الصورة والنص على نفس المحور */
  gap: 10px;
}

.logo-icon {
  width: 95px;
  height: 95px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.nav-container {
  align-items: center;  /* يضمن توسيط كل عناصر الـ navbar عمودياً */
}
/* ── شعار الـ loader — غيّر الحجم هنا فقط ── */
.loader-logo img { width: 90px; height: 90px; object-fit: contain; border-radius: 4px; }
.logo-ar        { font-size: 1.15rem; font-weight: 900; color: var(--blue); letter-spacing: 1px; }
body.dark-mode .logo-ar { color: #90cdf4; }
.logo-sub       { font-size: .80rem; color: var(--muted); display: block; line-height: 1.2; max-width: 200px; }
.nav-menu       { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-link       { padding: 7px 13px; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; font-size: .86rem; transition: var(--tr); white-space: nowrap; }
.nav-link:hover,
.nav-link.active { background: var(--blue); color: white; }
.nav-actions    { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lang-btn,
.dark-btn       { background: var(--light); border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 7px 14px; font-weight: 700; font-size: .84rem; cursor: pointer; transition: var(--tr); color: var(--text); }
.lang-btn:hover,
.dark-btn:hover { background: var(--blue); color: white; border-color: var(--blue); }
.hamburger      { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--tr); }

/* ══════════════════════════════════════════════════════
   HEADER SPACER — المسافة التعويضية
   تمنع أول قسم من الاختباء خلف الهيدر الثابت
   ارتفاعها = ارتفاع الهيدر الكلي (يُحدَّث بـ JS)
   ══════════════════════════════════════════════════════ */
.header-spacer {
  height: var(--header-h); /* 112px افتراضي */
  display: block;
}

/* ── BUTTONS ────────────────────────────────────────── */
.btn           { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 50px; font-weight: 700; font-size: .9rem; cursor: pointer; border: 2px solid transparent; transition: var(--tr); text-decoration: none; }
.btn-primary   { background: var(--gold); color: #1a1a1a; border-color: var(--gold); }
.btn-primary:hover  { background: #b8911f; border-color: #b8911f; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,162,39,.35); }
.btn-secondary { background: var(--blue); color: white; }
.btn-secondary:hover { background: #0a3260; transform: translateY(-2px); }
.btn-outline   { background: transparent; color: white; border-color: rgba(255,255,255,.6); }
.btn-outline:hover   { background: white; color: var(--blue); }
.btn-full      { width: 100%; justify-content: center; }

/* ── SECTION HEADERS ────────────────────────────────── */
.section-header  { text-align: center; margin-bottom: 60px; }
.section-badge   { display: inline-flex; align-items: center; gap: 8px; background: var(--light); color: var(--blue); padding: 6px 18px; border-radius: 50px; font-size: .85rem; font-weight: 700; margin-bottom: 16px; border: 1px solid var(--border); }
.section-header h2 { font-size: clamp(1.8rem,4vw,2.6rem); font-weight: 900; color: var(--blue); margin-bottom: 16px; line-height: 1.3; }
.section-header p  { color: var(--muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }
body.dark-mode .section-header h2 { color: #90cdf4; }
body.dark-mode .section-badge     { background: #2d3748; color: #90cdf4; border-color: #3d4a5c; }

/* ── HERO ───────────────────────────────────────────── */
.hero          { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; padding: 100px 24px; }
.hero-bg       { position: absolute; inset: 0; }
.hero-map-bg   { width: 100%; height: 100%; object-fit: cover; opacity: .12; filter: grayscale(30%); }
.hero-overlay  { position: absolute; inset: 0; background: linear-gradient(135deg,rgba(11,60,109,.92) 0%,rgba(11,60,109,.75) 40%,rgba(46,139,87,.6) 100%); }
.hero-content  { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; text-align: center; }
.hero-badge    { display: inline-flex; align-items: center; gap: 8px; background: rgba(201,162,39,.2); color: var(--gold); padding: 8px 20px; border-radius: 50px; font-size: .9rem; font-weight: 700; margin-bottom: 24px; border: 1px solid rgba(201,162,39,.4); backdrop-filter: blur(4px); }
.hero-title    { font-size: clamp(2rem,5vw,3.4rem); font-weight: 900; color: white; line-height: 1.25; margin-bottom: 24px; text-shadow: 0 2px 20px rgba(0,0,0,.3); }
.hero-desc     { font-size: 1.15rem; color: rgba(255,255,255,.88); margin-bottom: 40px; max-width: 680px; margin-left: auto; margin-right: auto; }
.hero-btns     { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.hero-scroll   { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.6); font-size: 1.5rem; animation: bounce 2s infinite; z-index: 1; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ── STATISTICS ─────────────────────────────────────── */
.stats-section { background: linear-gradient(135deg,var(--blue),#1a6b9a); padding: 80px 0; }
.stats-section .section-badge { background: rgba(255,255,255,.15); color: white; border-color: rgba(255,255,255,.2); }
.stats-section h2 { color: white; }
.stats-grid    { display: grid; grid-template-columns: repeat(4,1fr); gap: 24px; }
.stat-card     { background: rgba(255,255,255,.12); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); padding: 36px 24px; text-align: center; transition: var(--tr); }
.stat-card:hover { background: rgba(255,255,255,.18); transform: translateY(-6px); }
.stat-icon     { font-size: 2.2rem; color: var(--gold); margin-bottom: 16px; }
.stat-num      { font-size: 2.6rem; font-weight: 900; color: white; line-height: 1; margin-bottom: 8px; }
.stat-label    { color: rgba(255,255,255,.8); font-size: .95rem; font-weight: 600; margin-bottom: 16px; }
.stat-bar      { height: 4px; background: rgba(255,255,255,.2); border-radius: 2px; overflow: hidden; }
.stat-fill     { height: 100%; background: var(--gold); border-radius: 2px; }

/* ── MAP SECTION ────────────────────────────────────── */
.map-section   { background: var(--light); }
.map-layout    { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.map-container { display: grid; grid-template-columns: 1fr 220px; gap: 20px; align-items: start; }
.map-photo-container {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--light);
  min-height: 80px;
  max-height: 90%;
  align-self: stretch;
  display: flex;
  align-items: center;
}
.map-photo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.darfur-map    { position: relative; background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 20px; overflow: hidden; }
body.dark-mode .darfur-map { background: #1e2a3a; }
.darfur-svg    { width: 100%; cursor: pointer; }
.darfur-state  { cursor: pointer; transition: opacity .3s, filter .3s; }
.darfur-state:hover { opacity: 1 !important; filter: brightness(1.15); }
.map-pin       { cursor: pointer; transition: var(--tr); }
.map-tooltip   { position: absolute; background: var(--blue); color: white; padding: 6px 12px; border-radius: 6px; font-size: .8rem; pointer-events: none; opacity: 0; transition: opacity .2s; white-space: nowrap; z-index: 10; }
.map-reference-img { border-radius: 10px; box-shadow: var(--shadow); width: 100%; }
.map-caption   { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.map-info      { background: white; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
body.dark-mode .map-info { background: #1e2a3a; }
.map-info-default { text-align: center; padding: 32px 0; color: var(--muted); }
.map-info-default i { font-size: 3rem; color: var(--blue); margin-bottom: 16px; opacity: .4; }
.map-info-default h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 12px; }
.map-legend    { margin-top: 32px; border-top: 1px solid var(--border); padding-top: 20px; }
.legend-item   { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .88rem; }
.legend-dot    { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.state-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.state-stat    { background: var(--light); border-radius: 10px; padding: 16px; text-align: center; }
.state-stat .num { font-size: 1.5rem; font-weight: 900; color: var(--blue); }
.state-stat .lbl { font-size: .78rem; color: var(--muted); margin-top: 4px; }

/* ── GALLERY ────────────────────────────────────────── */
.gallery-section { background: var(--white); }
.gallery-grid    { display: grid; grid-template-columns: repeat(4,1fr); grid-template-rows: 260px 200px; gap: 16px; }
.gallery-item    { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; background: #1a1a2e; }
.gallery-item.large { grid-column: 1 / 3; grid-row: 1 / 2; }
.gallery-item img,
.gallery-item video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; display: block; }
.gallery-item:hover img,
.gallery-item:hover video { transform: scale(1.06); }
.gallery-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent,rgba(11,60,109,.85)); color: white; padding: 24px 16px 16px; font-weight: 700; font-size: .95rem; transform: translateY(100%); transition: transform .3s; }
.gallery-item:hover .gallery-overlay { transform: translateY(0); }
/* شارة الفيديو */
.gallery-video-badge {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,.65); color: #fff;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; backdrop-filter: blur(4px);
  pointer-events: none;
}
/* تحريك الفيديو عند hover */
.gallery-item[data-type="video"] .gallery-video-thumb {
  transition: opacity .3s;
}
.gallery-item[data-type="video"]:hover .gallery-video-badge {
  opacity: 0;
  transition: opacity .2s;
}
/* أيقونة play في وسط البطاقة */
.gallery-item[data-type="video"] .gallery-overlay {
  background: linear-gradient(transparent 30%, rgba(0,0,0,.75));
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* ── EMERGENCY ROOMS ────────────────────────────────── */
.rooms-section { background: var(--light); }
.rooms-grid    { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 24px; }
.room-card     { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--tr); border: 1px solid var(--border); }
.room-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
body.dark-mode .room-card { background: #1e2a3a; }
.room-img      { height: 180px; display: flex; align-items: center; justify-content: center; position: relative; }
.room-img-icon { font-size: 4rem; color: rgba(255,255,255,.3); }
.room-state-badge { position: absolute; top: 12px; inset-inline-start: 12px; background: var(--gold); color: #1a1a1a; padding: 4px 12px; border-radius: 20px; font-size: .78rem; font-weight: 700; }
.room-body     { padding: 24px; }
.room-name     { font-size: 1.1rem; font-weight: 800; color: var(--blue); margin-bottom: 8px; }
body.dark-mode .room-name { color: #90cdf4; }
.room-meta     { display: flex; gap: 16px; margin-bottom: 16px; }
.room-meta-item { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.room-meta-item i { color: var(--green); }
.room-update   { font-size: .78rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; margin-bottom: 16px; }
.room-btn      { display: block; text-align: center; background: var(--blue); color: white; padding: 10px; border-radius: var(--radius-sm); font-weight: 700; font-size: .88rem; transition: var(--tr); }
.room-btn:hover { background: var(--green); }

/* ── SECTORS ────────────────────────────────────────── */
.response-section { background: var(--white); }
.sectors-grid     { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.sector-card      { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 24px; text-align: center; transition: var(--tr); box-shadow: var(--shadow); }
.sector-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: var(--blue); }
body.dark-mode .sector-card { background: #1e2a3a; }
.sector-icon  { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 2rem; }
.sector-card h3 { font-size: 1.05rem; font-weight: 800; color: var(--blue); margin-bottom: 8px; }
.sector-card p  { font-size: .88rem; color: var(--muted); line-height: 1.6; }
body.dark-mode .sector-card h3 { color: #90cdf4; }

/* ── PROJECTS ───────────────────────────────────────── */
.projects-section { background: var(--light); }
.projects-grid    { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 24px; }
.project-card     { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--tr); border: 1px solid var(--border); cursor: pointer; }
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
body.dark-mode .project-card { background: #1e2a3a; }
.project-img     { height: 200px; overflow: hidden; position: relative; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project-card:hover .project-img img { transform: scale(1.06); }
.project-status  { position: absolute; top: 12px; inset-inline-start: 12px; padding: 4px 14px; border-radius: 20px; font-size: .78rem; font-weight: 700; }
.status-active   { background: #d4edda; color: #155724; }
.status-ongoing  { background: #fff3cd; color: #856404; }
.status-completed{ background: #d1ecf1; color: #0c5460; }
.status-urgent   { background: #f8d7da; color: #721c24; }
.project-body    { padding: 24px; }
.project-title   { font-size: 1.05rem; font-weight: 800; color: var(--blue); margin-bottom: 8px; }
.project-desc    { font-size: .88rem; color: var(--muted); margin-bottom: 16px; line-height: 1.6; }
.project-footer  { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 14px; }
.project-beneficiaries { font-size: .82rem; color: var(--muted); }
.project-beneficiaries strong { color: var(--blue); font-size: 1rem; }
.project-location { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
body.dark-mode .project-title { color: #90cdf4; }

/* ── STORIES ────────────────────────────────────────── */
.stories-section { background: var(--white); }
.stories-grid    { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.story-card      { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--tr); border: 1px solid var(--border); padding: 28px; }
.story-card.featured { padding: 0; }
.story-card:hover    { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
body.dark-mode .story-card { background: #1e2a3a; }
.story-img   { height: 240px; overflow: hidden; }
.story-img img { width: 100%; height: 100%; object-fit: cover; }
.story-content { padding: 24px; }
.story-tag   { display: inline-block; background: var(--light); color: var(--blue); padding: 3px 12px; border-radius: 20px; font-size: .78rem; font-weight: 700; margin-bottom: 12px; }
.story-card h3 { font-size: 1rem; font-weight: 800; color: var(--blue); margin-bottom: 10px; line-height: 1.4; }
.story-card p  { font-size: .88rem; color: var(--muted); line-height: 1.65; }
body.dark-mode .story-card h3 { color: #90cdf4; }

/* ── REPORTS ────────────────────────────────────────── */
.reports-section { background: var(--light); }
.reports-filter  { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.filter-btn      { padding: 8px 20px; border-radius: 50px; border: 2px solid var(--border); background: var(--white); color: var(--text); font-weight: 600; font-size: .85rem; cursor: pointer; transition: var(--tr); }
.filter-btn.active,
.filter-btn:hover { background: var(--blue); color: white; border-color: var(--blue); }
body.dark-mode .filter-btn { background: #1e2a3a; color: #e2e8f0; border-color: #2d3748; }
.reports-grid    { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 20px; }
.report-card     { background: var(--white); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; gap: 16px; align-items: flex-start; border: 1px solid var(--border); transition: var(--tr); }
.report-card:hover { transform: translateY(-4px); border-color: var(--blue); }
body.dark-mode .report-card { background: #1e2a3a; }
.report-icon     { width: 48px; height: 48px; border-radius: 10px; background: linear-gradient(135deg,#ff6b6b,#ee5a24); display: flex; align-items: center; justify-content: center; color: white; font-size: 1.2rem; flex-shrink: 0; }
.report-body h4  { font-size: .95rem; font-weight: 800; color: var(--blue); margin-bottom: 6px; line-height: 1.3; }
.report-body p   { font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.report-meta     { display: flex; gap: 12px; font-size: .75rem; color: var(--muted); }
body.dark-mode .report-body h4 { color: #90cdf4; }

/* ── NEWS ───────────────────────────────────────────── */
.news-section { background: var(--white); }
.news-grid    { display: grid; grid-template-columns: repeat(auto-fill,minmax(320px,1fr)); gap: 24px; }
.news-card    { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: var(--tr); }
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
body.dark-mode .news-card { background: #1e2a3a; }
.news-img     { height: 200px; overflow: hidden; position: relative; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.news-card:hover .news-img img { transform: scale(1.06); }
.news-cat     { position: absolute; top: 12px; inset-inline-start: 12px; background: var(--blue); color: white; padding: 4px 12px; border-radius: 20px; font-size: .78rem; font-weight: 700; }
.news-cat.urgent { background: #e74c3c; }
.news-body    { padding: 24px; }
.news-date    { font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.news-body h3 { font-size: 1rem; font-weight: 800; color: var(--blue); margin-bottom: 8px; line-height: 1.4; }
.news-body p  { font-size: .85rem; color: var(--muted); line-height: 1.6; }
body.dark-mode .news-body h3 { color: #90cdf4; }

/* ── PARTNERS ───────────────────────────────────────── */
.partners-section { background: var(--light); }
.partners-grid    { display: grid; grid-template-columns: repeat(6,1fr); gap: 20px; }
.partner-card     { background: var(--white); border-radius: var(--radius); padding: 28px 16px; text-align: center; box-shadow: var(--shadow); transition: var(--tr); border: 1px solid var(--border); }
.partner-card:hover { transform: translateY(-4px); border-color: var(--blue); }
body.dark-mode .partner-card { background: #1e2a3a; }
.partner-logo-text { font-size: 1.3rem; font-weight: 900; color: var(--blue); margin-bottom: 8px; letter-spacing: 1px; }
.partner-name      { font-size: .72rem; color: var(--muted); line-height: 1.3; }

/* ── VOLUNTEER ──────────────────────────────────────── */
.volunteer-section { background: linear-gradient(135deg,var(--green),#1f5e3a); padding: 80px 0; }
.volunteer-inner   { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.volunteer-text .section-badge { background: rgba(255,255,255,.2); color: white; border-color: rgba(255,255,255,.3); }
.volunteer-text h2 { color: white; font-size: 2.2rem; margin-bottom: 16px; }
.volunteer-text p  { color: rgba(255,255,255,.85); margin-bottom: 24px; font-size: 1rem; }
.volunteer-perks   { list-style: none; }
.volunteer-perks li { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.9); margin-bottom: 10px; font-size: .95rem; }
.volunteer-perks li i { color: var(--gold); }
.volunteer-form { background: white; border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-lg); }
.form-row       { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group     { margin-bottom: 16px; }
.form-group label  { display: block; font-weight: 700; font-size: .88rem; color: var(--text); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea { width: 100%; padding: 11px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: .9rem; background: var(--white); color: var(--text); transition: var(--tr); outline: none; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--blue); }
.form-group textarea { resize: vertical; }

/* ── CONTACT ────────────────────────────────────────── */
.contact-section { background: var(--white); }
.contact-grid    { display: grid; grid-template-columns: 1fr 1.6fr; gap: 60px; align-items: start; }
.contact-item    { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.contact-icon    { width: 48px; height: 48px; background: var(--light); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--blue); flex-shrink: 0; }
.contact-item strong { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 4px; }
.contact-item p  { font-weight: 700; color: var(--text); font-size: 1rem; }
.social-links    { display: flex; gap: 12px; margin-top: 24px; }
.social-link     { width: 44px; height: 44px; border-radius: 10px; background: var(--light); display: flex; align-items: center; justify-content: center; color: var(--blue); font-size: 1.1rem; transition: var(--tr); }
.social-link:hover { background: var(--blue); color: white; }
.contact-form    { background: var(--light); border-radius: var(--radius); padding: 40px; }
body.dark-mode .contact-form { background: #1e2a3a; }

/* ── FOOTER ─────────────────────────────────────────── */
.footer       { background: var(--blue); color: white; }
.footer-top   { padding: 70px 0 50px; }
.footer-grid  { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; }
.footer-logo  { font-size: 1.35rem; font-weight: 900; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; letter-spacing: 1px; }
.footer-brand p  { color: rgba(255,255,255,.75); font-size: .9rem; line-height: 1.7; }
.footer-links h4,
.footer-contact h4 { font-size: 1rem; font-weight: 800; margin-bottom: 20px; color: var(--gold); }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a { color: rgba(255,255,255,.75); font-size: .9rem; transition: var(--tr); }
.footer-links ul li a:hover { color: white; padding-inline-start: 8px; }
.footer-contact p { color: rgba(255,255,255,.75); font-size: .9rem; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.footer-social    { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a  { width: 38px; height: 38px; border-radius: 8px; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; color: white; transition: var(--tr); }
.footer-social a:hover { background: var(--gold); color: #1a1a1a; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; text-align: center; color: rgba(255,255,255,.6); font-size: .88rem; }

/* ══════════════════════════════════════════════════════
   BACK TO TOP BUTTON — زر العودة للأعلى (يعمل صحيحاً)
   - position: fixed تجعله ثابتاً في الزاوية
   - JS يضيف .visible عند التمرير
   - onclick يستدعي window.scrollTo مباشرة
   ══════════════════════════════════════════════════════ */
.back-top {
  position: fixed;
  bottom: 32px;
  inset-inline-end: 32px;   /* يمين عربي / يسار إنجليزي */
  width: 48px;
  height: 48px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: var(--shadow-lg);
  transition: var(--tr);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  z-index: 900;              /* أقل من الهيدر (1000) */
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-top:hover {
  background: var(--green);
  transform: translateY(-4px);
}

/* ── TOAST ──────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 90px;
  inset-inline-end: 24px;
  background: var(--blue);
  color: white;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9rem;
  z-index: 3000;
  transform: translateX(120%);
  transition: transform .3s, visibility .3s;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  max-width: 300px;
  visibility: hidden;
  min-width: 0;
}
.toast.show {
  visibility: visible;
  pointer-events: auto;
}
.toast.show { transform: translateX(0); }

/* ── DARK MODE EXTRAS ───────────────────────────────── */
body.dark-mode .alert-bar  { /* يبقى أحمر */ }
body.dark-mode .volunteer-form { background: #1e2a3a; }
body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea { background: #16213e; border-color: #2d3748; color: #e2e8f0; }

/* ── SCROLL ANIMATIONS ──────────────────────────────── */
[data-aos] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
[data-aos].aos-animated { opacity: 1; transform: translateY(0); }

/* ── MOBILE MENU ────────────────────────────────────── */
body.dark-mode .nav-menu.open { background: #1e2a3a; }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media(max-width:1100px) {
  .stats-grid    { grid-template-columns: repeat(2,1fr); }
  .map-layout    { grid-template-columns: 1fr; }
  .map-container { grid-template-columns: 1fr 160px; }
  .footer-grid   { grid-template-columns: 1fr 1fr; gap: 32px; }
  .partners-grid { grid-template-columns: repeat(3,1fr); }
}
@media(max-width:900px) {
  :root { --nav-h: 64px; }
  .nav-menu {
    display: none;
    position: fixed;
    top: 0; inset-inline-start: 0;
    width: 80%; max-width: 320px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 80px 24px 40px;
    box-shadow: var(--shadow-lg);
    z-index: 700;
    gap: 4px;
    overflow-y: auto;
  }
  .nav-menu.open { display: flex; }
  .hamburger     { display: flex; }
  .sectors-grid  { grid-template-columns: repeat(2,1fr); }
  .stories-grid  { grid-template-columns: 1fr; }
  .story-card.featured { /* عادي في الموبايل */ }
  .volunteer-inner { grid-template-columns: 1fr; }
  .contact-grid    { grid-template-columns: 1fr; }
  .gallery-grid    { grid-template-columns: repeat(2,1fr); grid-template-rows: auto; }
  .gallery-item.large { grid-column: 1 / 3; }
  .map-container { grid-template-columns: 1fr; }
  .form-row      { grid-template-columns: 1fr; }
  section        { padding: 60px 0; }
}
@media(max-width:640px) {
  :root { --nav-h: 60px; }
  .hero-btns     { flex-direction: column; align-items: center; }
  .stats-grid    { grid-template-columns: 1fr 1fr; }
  .sectors-grid  { grid-template-columns: 1fr; }
  .projects-grid,
  .rooms-grid,
  .news-grid     { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid   { grid-template-columns: 1fr; }
  .gallery-grid  { grid-template-columns: 1fr; }
  .gallery-item.large { grid-column: 1; }
  .reports-grid  { grid-template-columns: 1fr; }
  .back-top      { bottom: 20px; inset-inline-end: 16px; width: 42px; height: 42px; }
}

/* إخفاء أي عنصر ثابت فارغ غير معروف */
.back-top + div:empty { display: none !important; }

/* ── زر مشاهدة المزيد — المعرض ── */
.gallery-more-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  padding: 12px 28px;
  border: 2px solid var(--blue);
  border-radius: 30px;
  transition: all .3s;
}
.gallery-more-btn:hover {
  background: var(--blue);
  color: #fff;
}
.gallery-more-btn i {
  font-size: 1.1rem;
  animation: bounce 1.8s infinite;
}
