/* ===== تحميل الخط المخصص ===== */
/* خط Frutiger LT Arabic بوزن عريض للعناوين والنصوص */
@font-face {
  font-family: 'Frutiger LT Arabic';
  src: url('fonts/Frutiger LT Arabic 65 Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap; /* عرض نص بديل أثناء تحميل الخط */
}

/* ===== متغيرات الألوان الأساسية ===== */
/* تدرجات اللون الأزرق المستخدمة في كامل التصميم */
:root {
  --blue-900: #0a2340;       /* أزرق داكن جداً — للعناوين الرئيسية */
  --blue-800: #0f3358;       /* أزرق داكن — للنصوص الثانوية */
  --blue-700: #1a5490;       /* أزرق متوسط غامق */
  --blue-600: #2574bb;       /* اللون الأساسي — Pantone 3005 C */
  --blue-500: #1a8dce;       /* أزرق متوسط */
  --blue-400: #06a7e0;       /* اللون الثانوي — Pantone 2995 C */
  --blue-300: #5dc2ea;       /* أزرق فاتح */
  --blue-200: #a0daf2;       /* أزرق فاتح جداً */
  --blue-100: #d4eef9;       /* أزرق باهت — للحدود والخلفيات */
  --blue-50: #ecf7fc;        /* أزرق شفاف — لخلفيات الحقول */
  --white: #ffffff;
  --cream: #f5fafd;          /* لون الخلفية الرئيسية */
}

/* ===== إعادة تعيين التنسيقات الافتراضية ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== تنسيق الجسم الرئيسي ===== */
body {
  font-family: 'Frutiger LT Arabic', sans-serif;
  background-color: var(--cream);
  color: var(--blue-900);
  min-height: 100vh;
  overflow-x: hidden;
  /* نمط نقاط زخرفية في الخلفية */
  background-image: radial-gradient(circle, var(--blue-100) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* ===== دوائر زخرفية ثابتة في الخلفية ===== */
/* دوائر شبه شفافة تضيف عمقاً بصرياً للتصميم */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 168, 0.07);
  pointer-events: none; /* لا تتفاعل مع النقر */
  z-index: 0;
}
/* دائرة كبيرة في الأعلى */
body::before {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -150px;
}
/* دائرة متوسطة في الأسفل */
body::after {
  width: 400px;
  height: 400px;
  bottom: -80px;
  left: -120px;
}

/* دوائر زخرفية إضافية عبر HTML */
.bg-circle {
  position: fixed;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 168, 0.05);
  pointer-events: none;
  z-index: 0;
}
.bg-circle-1 { width: 300px; height: 300px; top: 40%; left: 10%; }
.bg-circle-2 { width: 250px; height: 250px; top: 20%; right: 20%; }
.bg-circle-3 { width: 350px; height: 350px; bottom: 20%; right: 5%; }

/* ===== زر تبديل اللغة (عربي / English) ===== */
/* يظهر ثابتاً في أعلى يسار الصفحة */
.lang-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 4px;
  background: var(--white);
  padding: 4px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(12, 29, 58, 0.1);
}
/* عكس الموقع عند التبديل للإنجليزية 
[dir="ltr"] .lang-toggle {
  left: auto;
  right: 20px;
}

/* تنسيق أزرار اللغة */
.lang-btn {
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  color: var(--blue-700);
  transition: all 0.3s ease;
}
/* الزر النشط (اللغة المختارة حالياً) */
.lang-btn.active {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: var(--white);
}

/* ===== الحاوية الرئيسية ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ===== العنوان الرئيسي (Header) ===== */
.header {
  text-align: center;
  padding: 80px 0 40px;
}

/* شعار الموقع — يظهر في الزاوية العلوية */
.header-logo {
  position: absolute;
  top: -80px;
  left: 20px;
  width: 250px;
  height: auto;
  z-index: 10;
}
/* عكس موقع الشعار في الوضع الإنجليزي 
[dir="ltr"] .header-logo {
  right: auto;
  left: 20px;
}*/

/* عنوان الصفحة الرئيسي مع تدرج لوني */
.header h1 {
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

/* ===== شارة Beta بجانب العنوان الرئيسي ===== */
/* توضّح للزائر أن الموقع في مرحلة تجريبية */
.beta-badge {
  display: inline-block;
  padding: 0.25em 0.75em;
  margin-inline-start: 0.4em;
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-400) 100%);
  color: #ffffff;
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 0.32em;          /* نسبة من حجم العنوان h1 */
  font-weight: 800;
  letter-spacing: 2px;
  border-radius: 999px;
  vertical-align: middle;
  line-height: 1;
  /* إلغاء تأثير background-clip:text الموروث من h1 */
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: #ffffff;
  box-shadow:
    0 3px 10px rgba(37, 116, 187, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.08);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
  position: relative;
  top: -0.25em;
  user-select: none;
  cursor: default;
  animation: beta-badge-glow 3s ease-in-out infinite;
}
/* تجميل خفيف: الشارة تلمع بشكل متقطع للفت الانتباه */
@keyframes beta-badge-glow {
  0%, 100% { box-shadow: 0 3px 10px rgba(37, 116, 187, 0.4), inset 0 1px 0 rgba(255,255,255,0.3), inset 0 -1px 0 rgba(0,0,0,0.08); }
  50%      { box-shadow: 0 3px 14px rgba(6, 167, 224, 0.65), inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(0,0,0,0.08); }
}
@media (prefers-reduced-motion: reduce) {
  .beta-badge { animation: none; }
}

/* الوصف أسفل العنوان */
.header p {
  font-size: 1.1rem;
  color: var(--blue-400);
  font-weight: 400;
}

/* ===== قسم معلومات المُرسل ===== */
/* بطاقة بيضاء تحتوي على حقول اختيار الافتتاحية وإدخال الاسم */
.sender-section {
  background: var(--white);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(12, 29, 58, 0.06);
  position: relative;
  overflow: hidden;
}
/* شريط ملون أعلى قسم المُرسل */
.sender-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-300), var(--blue-400));
}

/* عنوان قسم المُرسل مع أيقونة */
.sender-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--blue-800);
  margin-bottom: 20px;
}
.sender-title svg {
  width: 22px;
  height: 22px;
  fill: var(--blue-500);
}

/* صف الحقول (الافتتاحية + الاسم) جنباً إلى جنب */
.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

/* مجموعة حقل واحد (التسمية + الإدخال) */
.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--blue-700);
}

/* تنسيق حقول الإدخال والقوائم المنسدلة */
.form-group select,
.form-group input {
  padding: 12px 16px;
  border: 1.5px solid var(--blue-100);
  border-radius: 12px;
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 0.95rem;
  color: var(--blue-900);
  background: var(--blue-50);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
/* تأثير التركيز على الحقول */
.form-group select:focus,
.form-group input:focus {
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(37, 99, 168, 0.1);
}

/* معاينة اسم المُرسل كما سيظهر على البطاقة */
.sender-preview {
  padding: 12px 16px;
  background: var(--blue-50);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--blue-400);
  text-align: center;
  border: 1px dashed var(--blue-100);
}
/* عندما يكون هناك اسم مكتوب — تتغير المعاينة */
.sender-preview.has-name {
  color: var(--blue-700);
  font-weight: 500;
  border-style: solid;
  border-color: var(--blue-200);
  background: linear-gradient(135deg, var(--blue-50), var(--white));
}

/* ===== شريط تصفية البطاقات حسب الفئة ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}

/* أزرار الفلاتر (الكل، عيد الفطر، ...) */
.filter-btn {
  border: 1.5px solid var(--blue-100);
  background: var(--white);
  color: var(--blue-700);
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
/* تأثير التحويم على زر الفلتر */
.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(12, 29, 58, 0.08);
}
/* الزر النشط (الفئة المختارة حالياً) */
.filter-btn.active {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: var(--white);
  border-color: transparent;
}

/* عدّاد البطاقات بجانب اسم الفئة */
.filter-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.8rem;
}
.filter-btn:not(.active) .filter-count {
  background: var(--blue-50);
  color: var(--blue-400);
}

/* ===== شبكة عرض البطاقات ===== */
/* شبكة متجاوبة تعرض البطاقات بأعمدة تلقائية */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 320px);
  gap: 24px;
  margin-bottom: 48px;
  justify-content: center;
}

/* ===== تنسيق البطاقة الواحدة ===== */
.card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(12, 29, 58, 0.06);
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards; /* حركة ظهور من الأسفل */
}
/* تأثير التحويم على البطاقة — رفع وتكبير خفيف */
.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 32px rgba(12, 29, 58, 0.12);
}

/* حركة ظهور البطاقات */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* حاوية صورة البطاقة */
.card-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1126/2037; /* مطابق لأبعاد صور البطاقات */
  background: var(--blue-50);
}
.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
/* تكبير الصورة عند التحويم */
.card:hover .card-image-wrapper img {
  transform: scale(1.08);
}

/* شارة الفئة على زاوية البطاقة */
.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--blue-700);
  z-index: 2;
}
/* عكس موقع الشارة في الوضع الإنجليزي */
[dir="ltr"] .card-badge {
  right: auto;
  left: 12px;
}

/* طبقة تظليل تظهر عند التحويم على البطاقة */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 29, 58, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}
.card:hover .card-overlay {
  opacity: 1;
}
/* نص "عرض البطاقة" داخل طبقة التظليل */
.card-overlay span {
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 24px;
  border: 2px solid var(--white);
  border-radius: 50px;
}

/* عنصر بديل عند عدم توفر الصورة */
.card-image-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
}

/* معلومات البطاقة (الاسم والتاريخ) */
.card-info {
  padding: 16px 18px;
}
.card-info h3 {
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 4px;
}
.card-info .card-date {
  font-size: 0.82rem;
  color: var(--blue-400);
}

/* ===== حالة فارغة — عند عدم وجود بطاقات ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1; /* يمتد عبر كل الأعمدة */
}
.empty-state h3 {
  font-size: 1.3rem;
  color: var(--blue-700);
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--blue-400);
}

/* ===== نافذة عرض البطاقة المنبثقة (Modal) ===== */
/* الخلفية المعتمة خلف النافذة */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 29, 58, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.show {
  display: flex;
}

/* النافذة المنبثقة نفسها */
.modal {
  background: var(--white);
  border-radius: 20px;
  max-width: 360px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.2);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
/* حركة ظهور النافذة */
.modal-overlay.show .modal {
  transform: scale(1);
  opacity: 1;
}

/* زر إغلاق النافذة المنبثقة */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--blue-700);
  z-index: 10;
  transition: background 0.3s;
}
/* عكس موقع زر الإغلاق في الوضع الإنجليزي */
[dir="ltr"] .modal-close {
  right: auto;
  left: 12px;
}
.modal-close:hover {
  background: var(--white);
}

/* صورة البطاقة داخل النافذة */
.modal-image {
  width: 100%;
  aspect-ratio: 1126/2037;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
  display: block;
}

/* الافتتاحية (أخوكم، أختكم، ...) */
.modal-sender-prefix {
  color: #ffffff;
  pointer-events: none;
  z-index: 55;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}
/* اسم المُرسل */
.modal-sender-name {
  color: #ffffff;
  pointer-events: none;
  z-index: 55;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

/* عنصر بديل عند عدم توفر صورة البطاقة في النافذة */
.modal-image-fallback {
  width: 100%;
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  border-radius: 20px 20px 0 0;
}

/* حاوية الصورة داخل النافذة */
.modal-image-wrapper {
  position: relative;
}

/* محتوى النافذة أسفل الصورة */
.modal-body {
  padding: 24px;
}

/* عنوان البطاقة داخل النافذة */
.modal-title {
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue-900);
  margin-bottom: 6px;
}

/* فئة البطاقة */
.modal-category {
  font-size: 0.9rem;
  color: var(--blue-400);
  margin-bottom: 16px;
}

/* أزرار الإجراءات (تحميل البطاقة) */
.modal-actions {
  display: flex;
  gap: 12px;
}

/* تنسيق الزر العام */
.modal-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

/* زر التحميل بتدرج لوني */
.modal-btn-download {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: var(--white);
}
.modal-btn-download:hover {
  box-shadow: 0 4px 16px rgba(30, 77, 140, 0.3);
}
.modal-btn svg {
  width: 18px;
  height: 18px;
}

/* ===== أزرار التقييم (لايك / ديسلايك) ===== */
.rating-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 14px 24px;
  background: var(--blue-50);
  border-radius: 50px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* خط فاصل بين الزرين */
.rating-actions::before {
  content: '';
  position: absolute;
  width: 1.5px;
  height: 28px;
  background: var(--blue-100);
}

.rating-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(12, 29, 58, 0.08);
  position: relative;
}

.rating-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--blue-400);
  fill: none;
  transition: all 0.3s ease;
}

.rating-btn:hover {
  transform: scale(1.18);
}

.rating-btn:active {
  transform: scale(0.92);
}

/* لايك — عند التحويم */
.rating-btn-like:hover {
  background: #f0faf4;
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
}
.rating-btn-like:hover svg {
  stroke: #27ae60;
}

/* لايك — نشط */
.rating-btn-like.active {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  box-shadow: 0 4px 16px rgba(39, 174, 96, 0.4);
}
.rating-btn-like.active svg {
  stroke: var(--white);
  fill: var(--white);
}

/* ديسلايك — عند التحويم */
.rating-btn-dislike:hover {
  background: #fdf0ef;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}
.rating-btn-dislike:hover svg {
  stroke: #e74c3c;
}

/* ديسلايك — نشط */
.rating-btn-dislike.active {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  box-shadow: 0 4px 16px rgba(231, 76, 60, 0.4);
}
.rating-btn-dislike.active svg {
  stroke: var(--white);
  fill: var(--white);
}

/* ===== الفوتر (حقوق النشر) ===== */
.footer {
  text-align: center;
  padding: 24px 0;
  border-top: 1px solid var(--blue-100);
  color: var(--blue-400);
  font-size: 0.88rem;
}

/* ===== زر الاستبيان العائم (مقابل لزر الاقتراحات + زر × للإخفاء) ===== */
.survey-banner-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;        /* في RTL: أسفل اليمين (مقابل زر الاقتراحات على اليسار) */
  z-index: 1500;
}/*
[dir="ltr"] .survey-banner-wrap {
  right: auto;
  left: 24px;
}*/
.survey-banner {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px 13px 20px;
  background:
    linear-gradient(135deg, var(--blue-700) 0%, var(--blue-500) 55%, var(--blue-400) 100%);
  color: var(--white);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 -1px 0 rgba(0, 0, 0, 0.08) inset,
    0 10px 24px rgba(26, 84, 144, 0.35),
    0 3px 8px rgba(12, 29, 58, 0.15);
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
  overflow: hidden;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .survey-banner:hover {
    transform: translateY(-3px);
    filter: brightness(1.06);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.25) inset,
      0 -1px 0 rgba(0, 0, 0, 0.08) inset,
      0 16px 34px rgba(26, 84, 144, 0.5),
      0 6px 14px rgba(12, 29, 58, 0.2);
  }
}
.survey-banner:active {
  transform: scale(0.97) translateY(0);
  filter: brightness(0.95);
  transition-duration: 0.08s;
}
.survey-banner:focus-visible {
  outline: 3px solid var(--blue-300);
  outline-offset: 3px;
}
.survey-banner-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}
.survey-banner-text {
  display: inline-block;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(12, 29, 58, 0.2);
}
/* shimmer متطابق مع زر الاقتراحات */
.survey-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 1;
  animation: survey-banner-shimmer 4.5s ease-in-out 1.5s infinite;
}
@keyframes survey-banner-shimmer {
  0%   { left: -40%; }
  60%  { left: 140%; }
  100% { left: 140%; }
}
@media (prefers-reduced-motion: reduce) {
  .survey-banner::before { animation: none; display: none; }
  .survey-banner { transition: none; }
}
/* على الشاشات الصغيرة: زر دائري بالأيقونة فقط (مطابق لزر الاقتراحات) */
@media (max-width: 600px) {
  .survey-banner-wrap {
    bottom: 16px;
    right: 16px;
  }
  [dir="ltr"] .survey-banner-wrap {
    right: auto;
    left: 16px;
  }
  .survey-banner {
    width: 48px;
    height: 48px;
    padding: 0;
    gap: 0;
    justify-content: center;
  }
  .survey-banner-icon {
    width: 22px;
    height: 22px;
  }
  .survey-banner-text {
    display: none;
  }
}

/* ===== نافذة الاستبيان المنبثقة (تظهر بعد 30 ثانية) ===== */
.survey-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 35, 64, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: survey-popup-fadein 0.3s ease;
}
.survey-popup-overlay.active {
  display: flex;
}
@keyframes survey-popup-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.survey-popup {
  position: relative;
  background: var(--white);
  border-radius: 20px;
  padding: 36px 28px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(10, 35, 64, 0.3);
  animation: survey-popup-slidein 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes survey-popup-slidein {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.survey-popup-close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--blue-400);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}
.survey-popup-close:hover {
  background: var(--blue-50);
  color: var(--blue-700);
}
.survey-popup-icon {
  font-size: 3rem;
  margin-bottom: 8px;
  line-height: 1;
}
.survey-popup-title {
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blue-700);
  margin: 0 0 10px;
}
.survey-popup-text {
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 0.95rem;
  color: var(--blue-400);
  line-height: 1.6;
  margin: 0 0 22px;
}
.survey-popup-actions {
  display: flex;
  gap: 10px;
  flex-direction: column;
}
.survey-popup-btn {
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 0.25s ease;
}
.survey-popup-btn-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: var(--white);
  box-shadow: 0 4px 14px rgba(37, 116, 187, 0.35);
}
.survey-popup-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 116, 187, 0.45);
}
.survey-popup-btn-secondary {
  background: transparent;
  color: var(--blue-400);
  border: 1px solid var(--blue-100);
}
.survey-popup-btn-secondary:hover {
  background: var(--blue-50);
  color: var(--blue-700);
}
.survey-popup-dont-show {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: none;
  padding: 4px 8px;
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 0.82rem;
  color: #8a98a8;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}
.survey-popup-dont-show:hover {
  color: var(--blue-600);
}

/* ===== زر سياسة الاستخدام في الفوتر ===== */
.policy-btn {
  margin-top: 10px;
  padding: 8px 24px;
  border: 1.5px solid var(--blue-200);
  background: transparent;
  color: var(--blue-400);
  border-radius: 50px;
  cursor: pointer;
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}
.policy-btn:hover {
  background: var(--blue-600);
  color: var(--white);
  border-color: var(--blue-600);
}

/* ===== زر الاقتراحات العائم (Floating Pill Button) ===== */
/* تصميم فاخر: pill بتدرج عميق + ظل متعدد الطبقات + أيقونة طائرة ورقية */
.suggestion-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px 13px 20px;
  background:
    linear-gradient(135deg, var(--blue-700) 0%, var(--blue-500) 55%, var(--blue-400) 100%);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,             /* highlight داخلي علوي */
    0 -1px 0 rgba(0, 0, 0, 0.08) inset,                 /* ظل داخلي سفلي */
    0 10px 24px rgba(26, 84, 144, 0.35),                /* ظل أساسي */
    0 3px 8px rgba(12, 29, 58, 0.15);                   /* ظل تفصيلي قريب */
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
  overflow: hidden;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
/* في وضع LTR: انقل الزر لأسفل اليمين 
[dir="ltr"] .suggestion-fab {
  left: auto;
  right: 24px;
}*/
/* hover فقط على الأجهزة اللي فعلاً تدعم الفأرة (يمنع sticky hover على الجوال) */
@media (hover: hover) and (pointer: fine) {
  .suggestion-fab:hover {
    transform: translateY(-3px);
    filter: brightness(1.06);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.25) inset,
      0 -1px 0 rgba(0, 0, 0, 0.08) inset,
      0 16px 34px rgba(26, 84, 144, 0.5),
      0 6px 14px rgba(12, 29, 58, 0.2);
  }
}
.suggestion-fab:active {
  transform: scale(0.95) translateY(0);
  filter: brightness(0.95);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.15) inset,
    0 4px 12px rgba(26, 84, 144, 0.3);
  transition-duration: 0.08s;
}
.suggestion-fab:focus-visible {
  outline: 3px solid var(--blue-300);
  outline-offset: 3px;
}
.suggestion-fab-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}
.suggestion-fab-text {
  display: inline-block;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(12, 29, 58, 0.2);
}

/* ===== شريط لامع يمر على الزر (Shimmer) ===== */
.suggestion-fab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 1;
  animation: suggestion-fab-shimmer 4.5s ease-in-out 1.5s infinite;
}
@keyframes suggestion-fab-shimmer {
  0%   { left: -40%; }
  60%  { left: 140%; }
  100% { left: 140%; }
}

/* احترام تفضيل المستخدم لتقليل الحركات */
@media (prefers-reduced-motion: reduce) {
  .suggestion-fab::before {
    animation: none;
    display: none;
  }
  .suggestion-fab {
    transition: none;
  }
}
/* على الشاشات الصغيرة: زر دائري بالأيقونة فقط (بدون نص) */
@media (max-width: 600px) {
  .suggestion-fab {
    bottom: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
    padding: 0;
    gap: 0;
    justify-content: center;
  }
  [dir="ltr"] .suggestion-fab {
    left: auto;
    right: 16px;
  }
  .suggestion-fab-icon {
    width: 22px;
    height: 22px;
  }
  .suggestion-fab-text {
    display: none;
  }
}

/* ===== نافذة سياسة الاستخدام المنبثقة ===== */
/* الخلفية المعتمة */
.policy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 29, 58, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.policy-overlay.show {
  display: flex;
}

/* نافذة السياسة */
.policy-modal {
  background: var(--white);
  border-radius: 24px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: scale(0.2);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  box-shadow: 0 24px 60px rgba(12, 29, 58, 0.25);
}
.policy-overlay.show .policy-modal {
  transform: scale(1);
  opacity: 1;
}

/* هيدر النافذة — خلفية زرقاء متدرجة */
.policy-modal-header {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-700) 50%, var(--blue-500) 100%);
  padding: 0;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}
/* شريط سفلي شفاف */
.policy-modal-header::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.4), rgba(255,255,255,0.1));
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

/* محتوى الهيدر الداخلي */
.policy-modal-header-inner {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 14px;
  padding: 18px 20px 18px 60px;
  text-align: right;
}
[dir="ltr"] .policy-modal-header-inner {
  flex-direction: row;
  text-align: left;
  padding: 18px 60px 18px 20px;
}

/* أيقونة الهيدر */
.policy-modal-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
}
.policy-modal-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--white);
}

/* زر إغلاق نافذة السياسة */
.policy-modal-close {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(calc(-50% + 2px));
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--white);
  transition: all 0.25s ease;
  z-index: 10;
  backdrop-filter: blur(4px);
}
.policy-modal-close:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.6);
}

/* عنوان النافذة */
.policy-modal-title {
  font-family: 'Frutiger LT Arabic', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  margin: 0;
  line-height: 1.4;
}
.policy-modal-subtitle {
  font-size: 0.76rem;
  color: rgba(255,255,255,0.7);
  margin-top: 3px;
}

/* جسم النافذة (قابل للتمرير) */
.policy-modal-body {
  overflow-y: auto;
  padding: 24px 28px 28px;
  font-size: 0.88rem;
  font-family: Arial, sans-serif;
  font-weight: 400;
  color: var(--blue-800);
  line-height: 1.8;
  text-align: right;
  direction: rtl;
  flex: 1;
}
[dir="ltr"] .policy-modal-body {
  text-align: left;
  direction: ltr;
  font-family: Arial, sans-serif;
}

/* عناوين الأقسام */
.policy-modal-body h3 {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: Arial, sans-serif;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  padding: 10px 14px;
  border-radius: 10px;
  margin-top: 20px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.policy-modal-body h3:first-child {
  margin-top: 0;
}
.policy-modal-body h3::before {
  content: '◈';
  font-size: 0.7rem;
  opacity: 0.8;
  flex-shrink: 0;
  margin-top: 2px;
}

/* فقرات النص */
.policy-modal-body p {
  margin-bottom: 12px;
  color: var(--blue-800);
  font-weight: 400;
}

/* القوائم */
.policy-modal-body ul {
  margin: 8px 0 16px;
  padding-right: 0;
  padding-left: 0;
  list-style: none;
}
.policy-modal-body li {
  position: relative;
  padding-right: 22px;
  padding-left: 0;
  margin-bottom: 10px;
  color: var(--blue-800);
  border-bottom: 1px dashed var(--blue-100);
  padding-bottom: 10px;
}
[dir="ltr"] .policy-modal-body li {
  padding-right: 0;
  padding-left: 22px;
}
.policy-modal-body li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-300));
  flex-shrink: 0;
}
[dir="ltr"] .policy-modal-body li::before {
  right: auto;
  left: 0;
}
.policy-modal-body li:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* شريط تمرير مخصص */
.policy-modal-body::-webkit-scrollbar {
  width: 5px;
}
.policy-modal-body::-webkit-scrollbar-track {
  background: var(--blue-50);
}
.policy-modal-body::-webkit-scrollbar-thumb {
  background: var(--blue-200);
  border-radius: 10px;
}
.policy-modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--blue-400);
}

/* رسائل حالة محتوى السياسة (تحميل/خطأ) — بديل عن inline style */
.policy-status {
  text-align: center;
  padding: 20px;
}
.policy-status.is-loading {
  opacity: 0.7;
}
.policy-status.is-error {
  color: #c0392b;
}

/* ===== التصميم المتجاوب — شاشات الجوال ===== */
@media (max-width: 640px) {
  /* تصغير الشعار */
  .header-logo {
    width: 150px;
    top: -40px;
  }
  /* تقليل المسافات في الهيدر */
  .header {
    padding: 70px 0 28px;
  }
  .header h1 {
    font-size: 2rem;
  }
  .header p {
    font-size: 0.95rem;
  }
  /* تحويل صف الحقول إلى عمود */
  .form-row {
    flex-direction: column;
  }
  /* تصغير شبكة البطاقات */
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  /* تقليل حشو قسم المُرسل */
  .sender-section {
    padding: 20px;
  }
  /* تصغير النافذة المنبثقة */
  .modal {
    max-width: 55%;
    border-radius: 23px;
  }
  /* تحويل أزرار الإجراءات إلى عمود */
  .modal-actions {
    flex-direction: column;
  }
  .modal-body {
    padding: 14px;
  }
  .modal-title {
    font-size: 1rem;
    margin-bottom: 4px;
  }
  .modal-category {
    font-size: 0.75rem;
    margin-bottom: 10px;
  }
  .rating-actions {
    padding: 8px 16px;
    gap: 12px;
    margin-bottom: 12px;
  }
  .rating-btn {
    width: 32px;
    height: 32px;
  }
  .modal-btn {
    padding: 10px;
    font-size: 0.85rem;
  }
  /* تصغير نصوص اسم المُرسل */
  .modal-sender-prefix {
    font-size: 0.7rem;
  }
  .modal-sender-name {
    font-size: 0.9rem;
  }
}

/* ===== التصميم المتجاوب — الشاشات الكبيرة ===== */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
    padding: 0 48px;
  }
  .cards-grid {
    grid-template-columns: repeat(auto-fit, 320px);
    gap: 32px;
    justify-content: center;
  }
  .sender-section {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
  .modal {
    max-width: 400px;
  }
}

/* ===== التصميم المتجاوب — الشاشات الكبيرة جداً ===== */
@media (min-width: 1600px) {
  .container {
    max-width: 1600px;
    padding: 0 64px;
  }
  .cards-grid {
    gap: 40px;
  }
  .card {
    border-radius: 20px;
  }
  .header h1 {
    font-size: 3rem;
  }
  .header p {
    font-size: 1.2rem;
  }
  .modal {
    max-width: 440px;
  }
}

/* ===== بطاقة مقفلة (بدون صورة — قريباً) ===== */
.card-locked {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
