/* ===============================
   SDG Content - تصميم مستقل وجذاب
   لا يؤثر على بقية الصفحات
   =============================== */

.sdg-page {
  background: radial-gradient(circle at top left, #eef2ff 0, #f9fafb 40%, #ecfeff 100%);
  padding-top: 90px; /* إزاحة للأسفل حتى لا يختفي العنوان خلف الهيدر */
}

/* ========== Hero ========== */
.sdg-hero {
  position: relative;
  padding: 4.75rem 0 2.75rem 0; /* زيادة المسافة العلوية حتى لا يلتصق بالهيدر */
  /* خلفية أغمق قليلاً حتى يبرز العنوان الأبيض */
  background: radial-gradient(circle at 0% 0%, #bfdbfe 0, #dbeafe 35%, #c7d2fe 70%, #9ca3af 100%);
  overflow: hidden;
}

.sdg-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(59, 130, 246, 0.30) 0%, transparent 55%),
    radial-gradient(circle at 82% 78%, rgba(16, 185, 129, 0.28) 0%, transparent 55%),
    radial-gradient(circle at 50% 120%, rgba(244, 114, 182, 0.28) 0%, transparent 60%);
  opacity: 0.85;
  pointer-events: none;
}

.sdg-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #1f2933;
  padding: 3.75rem 1.5rem 2.75rem; /* زيادة المسافة العلوية لإنزال العنوان قليلاً */
}

.sdg-hero-inner::before {
  /* هالة متدرجة متحركة خلف العنوان */
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 460px;
  height: 460px;
  transform: translate(-50%, -55%) rotate(0deg);
  background:
    conic-gradient(
      from 210deg,
      rgba(59, 130, 246, 0.1),
      rgba(129, 140, 248, 0.28),
      rgba(56, 189, 248, 0.24),
      rgba(244, 114, 182, 0.20),
      rgba(56, 189, 248, 0.24),
      rgba(129, 140, 248, 0.28),
      rgba(59, 130, 246, 0.1)
    );
  opacity: 0.9;
  filter: blur(8px);
  animation: sdgTitleAura 6s linear infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes sdgTitleAura {
  0% {
    transform: translate(-50%, -55%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -55%) rotate(360deg);
  }
}

.sdg-hero-title {
  font-size: 2.6rem;
  font-weight: 600; /* تخفيف عرض الخط */
  margin-bottom: 0.85rem;
  color: #ffffff;
  text-shadow:
    0 0 12px rgba(15, 23, 42, 0.75),
    0 0 24px rgba(15, 23, 42, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
  position: relative;
  display: inline-block;
  padding: 0.25rem 1.75rem;
  border-radius: 999px;
  /* خلفية أفتح وأقرب لألوان SDG (أزرق + أخضر) */
  background: linear-gradient(120deg, rgba(59, 130, 246, 0.95), rgba(16, 185, 129, 0.9));
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.45),
    0 0 0 1px rgba(191, 219, 254, 0.7);
}

.sdg-hero-subtitle {
  font-size: 1.05rem;
  margin: 0 0 0.85rem 0;
  color: #4b5563;
}

.sdg-hero-meta .badge {
  font-size: 0.85rem;
}

/* ========== محتوى الصفحة ========== */
.sdg-content-area {
  padding: 3rem 0 4rem 0;
  position: relative; /* لربط ::before بنفس القسم */
  overflow: hidden; /* لإخفاء الخطوط الزائدة */
}

/* تأثير خطوط مائلة خفيفة ومتحركة على الصفحة كاملة */
.sdg-content-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
      135deg,
      rgba(59, 130, 246, 0.06) 0px,
      rgba(59, 130, 246, 0.06) 1px,
      transparent 1px,
      transparent 20px
    );
  animation: sdgLinesMove 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes sdgLinesMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(20px, 20px);
  }
}

.sdg-intro-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.98));
  border-radius: 16px;
  box-shadow: 0 14px 45px rgba(15, 23, 42, 0.15);
  border: 1px solid rgba(129, 140, 248, 0.35);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  z-index: 1; /* فوق خطوط الخلفية */
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.sdg-intro-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.25);
  border-color: rgba(129, 140, 248, 0.6);
}

.sdg-intro-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.2) 0, transparent 50%);
  opacity: 0.75;
  pointer-events: none;
}

.sdg-intro-text {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1.1rem; /* تكبير حجم خط المحتوى أسفل العنوان */
  line-height: 1.9;
  font-weight: 600; /* جعله عريضاً */
  color: #111827;
}

.sdg-grid-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  border-radius: 20px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.40);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  z-index: 1; /* فوق خطوط الخلفية */
}

.sdg-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 65px rgba(15, 23, 42, 0.22);
}

.sdg-grid-card-body {
  padding: 1.75rem 1.75rem 2rem 1.75rem;
}

/* إزالة التأثير من الكارد لأننا نريده في الصفحة كاملة */
.sdg-grid-card::before {
  display: none;
}

.sdg-grid-card-body {
  position: relative;
  z-index: 1; /* محتوى الجدول فوق تأثير الخطوط */
}

/* تمرير أفقي واضح لجدول SDG عند كثرة الأعمدة */
.sdg-grid-card-body .table-responsive {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0.5rem;
}

.sdg-note {
  font-size: 12px;
  color: #6b7280;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* ========== جداول الإكسل ========== */
.sdg-grid-table {
  min-width: max-content;
  width: max-content;
  border-collapse: collapse;
}

.sdg-grid-table tbody tr:nth-child(odd) td {
  background-color: #ffffff;
}

.sdg-grid-table tbody tr:nth-child(even) td {
  background-color: #f9fafb;
}

.sdg-grid-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 12px;
  font-size: 13px;
  vertical-align: top;
  color: #111827;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  /* عرض المحتوى بالكامل: التفاف النص بدل القص */
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  min-width: 100px;
  max-width: 320px;
}

.sdg-grid-table td:hover {
  background-color: #e0f2fe;
  box-shadow: inset 0 0 0 1px #38bdf8;
}

/* تلميح التمرير الأفقي */
.sdg-table-hint {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* ========== استجابة الجوال ========== */
@media (max-width: 768px) {
  .sdg-hero {
    padding: 2.5rem 0 2rem 0;
  }

  .sdg-hero-title {
    font-size: 1.8rem;
  }

  .sdg-grid-card-body {
    padding: 1.25rem 1.25rem 1.75rem 1.25rem;
  }

  .sdg-grid-table {
    min-width: max-content;
    width: max-content;
  }

  .sdg-grid-table td {
    max-width: 260px;
  }
}

/* لا يوجد أي تنسيق خاص بالفوتر هنا؛
   صفحات SDG تستخدم نفس فوتر الموقع (homepage-custom.css + style.css) */
