/* أساسيات عامة */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ألوان مساعدة */
:root {
  --accent: #1F3A5F;
  --accent-soft: rgba(31, 58, 95, 0.45);
  --accent-bg: rgba(31, 58, 95, 0.18);
  --gold: #FBC02D;
}

/* صفحة الـ FAQ */
.faq-page {
  min-height: 100vh;
  padding: 24px 12px 16px;  /* تقليل الفراغ أسفل الصفحة */
  background: radial-gradient(circle at top, #1a237e 0, #0b1020 45%, #02030a 100%);
  color: #fff;
  direction: rtl;
  text-align: right;
}

/* حاويات بعرض مريح */
.site-header,
.faq-hero,
.faq-tabs,
.faq-group,
.faq-footer {
  max-width: 1000px;
  margin: 0 auto;
}

/* الهيدر */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap; /* مهم للجوال */
}

/* الشعار */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo-img {
  height: 38px;
  width: auto;
  display: block;
}

.site-logo-text {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* سويتشر اللغة */
.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}

.lang-switcher a {
  text-decoration: none;
  padding: 4px 11px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(7, 10, 30, 0.55);
  white-space: nowrap;
  transition: 0.2s ease;
}

.lang-switcher a:hover {
  border-color: var(--accent);
  background: rgba(7, 10, 30, 0.75);
}

.lang-switcher a.active {
  background: linear-gradient(135deg, var(--gold), #ffb300);
  color: #111;
  border-color: transparent;
}

/* الهيرو */
.faq-hero {
  margin-bottom: 20px;
}

.faq-hero h1 {
  font-size: 1.31rem;   /* حجم الهاتف */
  margin: 0 0 8px;
}

.faq-hero p {
  margin: 0 0 14px;
  opacity: 0.9;
  font-size: 0.9rem;
}

.faq-search input {
  width: 100%;
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(12px);
  font-size: 0.9rem;
}

.faq-search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* Tabs – موبايل أولاً (سكرول أفقي) */
.faq-tabs {
  margin-bottom: 18px;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.faq-tabs::-webkit-scrollbar {
  height: 3px;
}

.faq-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}

.faq-tabs .tab {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--accent-soft);
  padding: 6px 12px;
  background: var(--accent-bg);
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: 0.25s ease;
}

.faq-tabs .tab:hover {
  border-color: var(--accent);
  opacity: 0.95;
}

.faq-tabs .tab.active {
  background: linear-gradient(135deg, var(--gold), #ffca2c);
  color: #111;
  border-color: transparent;
}

/* مجموعة الأسئلة */
.faq-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: rgba(10, 14, 35, 0.85);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.faq-item:hover {
  border-color: var(--accent);
}

.faq-question {
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: none;
  color: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 10px;
  transition: 0.25s;
}

.faq-question:hover {
  background: rgba(31, 58, 95, 0.25);
}

.faq-question span:first-child {
  font-weight: 600;
  font-size: 0.95rem;
}

.faq-question .icon {
  font-weight: 700;
  opacity: 0.8;
  flex-shrink: 0;
}

.faq-answer {
  padding: 0 14px 12px;
  font-size: 0.9rem;
  line-height: 1.7;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: none;
}

/* RTL / LTR دعم */
.faq-page { direction: rtl; text-align: right; }
.faq-page.ltr { direction: ltr; text-align: left; }

/* شاشات متوسطة وكبيرة */
@media (min-width: 768px) {
  .faq-page {
    padding: 32px 16px 20px; /* مسافة بسيطة أسفل الصفحة في الديسكتوب */
  }

  .faq-hero h1 {
    font-size: 1.2rem;  /* أكبر قليلاً على الويب */
  }

  .faq-question span:first-child {
    font-size: 1rem;
  }

  .faq-answer {
    font-size: 0.95rem;
  }

  .site-logo-img {
    height: 35px;
  }

  .site-logo-text {
    font-size: 1.5rem;
  }

  /* في الديسكتوب نخلي التبويبات تلتف بدل السكول */
  .faq-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

/* شاشات كبيرة جدًا */
@media (min-width: 1200px) {
  .faq-page {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* فرض خط كايرو لكل شيء */
html, body, * {
  font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* الفوتر */
.faq-footer {
  margin-top: 20px;
  padding: 10px 0 0;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.9;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.faq-footer p {
  margin: 0;
}

.faq-footer .footer-meta {
  margin-bottom: 4px;
}

.faq-footer .footer-links {
  margin-top: 0;
}

.faq-footer a {
  text-decoration: none;
  color: rgba(255,255,255,0.9);
}

.faq-footer .sep {
  margin: 0 4px;
  opacity: 0.6;
}
/* محتوى الصفحات القانونية (سياسة الخصوصية / الشروط) */
.legal-content {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-section {
  background: rgba(10, 14, 35, 0.9);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  padding: 14px 16px;
  font-size: 0.9rem;
  line-height: 1.8;
}

.legal-section h2 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.legal-section p {
  margin: 0 0 6px;
}

.legal-section ul {
  margin: 0 0 6px;
  padding-right: 18px;
}

.legal-section li {
  margin-bottom: 3px;
}

/* في النسخ LTR */
.faq-page.ltr .legal-section ul {
  padding-right: 0;
  padding-left: 18px;
}
/* زر العودة إلى الأعلى */
.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #FBC02D, #ffb300);
  color: #111;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 50;
}

.back-to-top:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* في الشاشات الصغيرة نرفع الزر شوي */
@media (max-width: 600px) {
  .back-to-top {
    bottom: 72px; /* حتى ما يختلط مع أزرار النظام أسفل الشاشة */
    right: 12px;
  }
}
/* زر العودة إلى الأعلى */
.back-to-top {
  position: fixed;
  bottom: 16px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #FBC02D, #ffb300);
  color: #111;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 50;
}

/* الوضع الطبيعي: LTR → على اليمين */
.faq-page.ltr .back-to-top {
  right: 16px;
}

/* العربية فقط: RTL → على اليسار */
.faq-page:not(.ltr) .back-to-top {
  left: 16px;
}

/* هوفر */
.back-to-top:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

/* عندما يظهر */
.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* تحسين في الموبايل */
@media (max-width: 600px) {
  .faq-page.ltr .back-to-top {
    bottom: 72px;
    right: 12px;
  }
  .faq-page:not(.ltr) .back-to-top {
    bottom: 72px;
    left: 12px;
  }
}
/* Breadcrumb / فتات الخبز */
.breadcrumb {
  max-width: 1000px;
  margin: 0 auto 12px;
  font-size: 0.8rem;
  opacity: 0.85;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb .sep {
  opacity: 0.6;
  margin: 0 4px;
}

.breadcrumb .current {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

/* في الموبايل نخلي المسافة تحتها أقل شوي */
@media (max-width: 600px) {
  .breadcrumb {
    font-size: 0.78rem;
    margin-bottom: 8px;
  }
}
/* إزالة ألوان الروابط من شعار الموقع */
.brand {
    color: inherit !important;
}

.brand * {
    color: inherit !important;
}
/* حجم نص "تواصل معنا" */
.hero-title {
    font-size: 2.1rem;          /* يمكنك تكبير الرقم أو تصغيره */
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
}
a {
    color: #fdbb1d;
}