:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #f59e0b;
  --bg: #ffffff;
  --bg-alt: #f4f7f6;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --good: #16a34a;
  --mid: #d97706;
  --bad: #dc2626;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Tajawal", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; }
p { margin: 0 0 .8em; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 860px; }
.muted { color: var(--muted); font-size: .9em; }

/* ---------- أزرار ---------- */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--primary-dark); }
.btn-sm { padding: 7px 14px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--bad); border: 1px solid var(--bad); }
.btn-ghost:hover { background: #fef2f2; }
.link { color: var(--primary); font-weight: 700; }

/* ---------- الهيدر ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-size: 1.6rem; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.logo-sub { color: var(--accent); }
.logo-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 1.2rem;
}
.main-nav { display: flex; align-items: center; gap: 22px; font-weight: 500; }
.main-nav a:not(.btn):hover { color: var(--primary); }
.menu-toggle { display: none; background: none; border: 0; font-size: 1.8rem; cursor: pointer; color: var(--text); }

/* ---------- الواجهة ---------- */
.hero {
  background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
  color: #fff;
  padding: 80px 0 70px;
  text-align: center;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
.hero p { font-size: 1.15rem; opacity: .9; max-width: 620px; margin: 0 auto 28px; }
.search { display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.search input {
  flex: 1; min-width: 0;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font: inherit;
}
.hero .btn { background: var(--accent); color: #1f2937; }
.hero .btn:hover { background: #fbbf24; }
.hero-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-top: 24px; opacity: .9; font-size: .95rem; }

/* ---------- الأقسام ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 28px; }
.section-head { display: flex; flex-direction: column; gap: 4px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
a.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(15,23,42,.1); }
.card h2 { font-size: 1.25rem; }
.card h3 { font-size: 1.1rem; }

.category { display: block; }
.cat-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.category p { color: var(--muted); font-size: .92rem; margin: 0; }

.country { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.flag { font-size: 2rem; }

/* ---------- الفلاتر ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  border: 1px solid var(--border);
  background: #fff;
  padding: 6px 16px;
  border-radius: 999px;
  font: inherit; font-size: .9rem;
  cursor: pointer;
}
.chip.active, .chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- قائمة الشركات ---------- */
.broker-list { display: flex; flex-direction: column; gap: 14px; }
.broker-row {
  display: grid;
  grid-template-columns: 36px 64px 1fr 150px;
  align-items: center;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow);
}
.broker-row.is-warning { border-color: #fecaca; background: #fffafa; }
.rank { font-weight: 800; font-size: 1.3rem; color: var(--muted); text-align: center; }
.broker-logo {
  width: 64px; height: 64px; border-radius: 14px;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 1.2rem;
  direction: ltr;
}
.broker-logo.lg { width: 96px; height: 96px; font-size: 1.8rem; }
.broker-info h3 { margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.broker-info h3 a:hover { color: var(--primary); }
.broker-info p { color: var(--muted); font-size: .95rem; margin-bottom: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .78rem; font-weight: 700;
  background: #ecfdf5; color: var(--primary);
  padding: 2px 10px; border-radius: 6px;
  direction: ltr;
}
.tag-soft { background: #f1f5f9; color: var(--muted); direction: rtl; }
.tag-bad { background: #fef2f2; color: var(--bad); direction: rtl; }

.broker-score { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.score {
  font-weight: 800; font-size: 1.5rem;
  color: #fff; border-radius: 10px;
  padding: 2px 14px;
}
.score.small { font-size: .85rem; padding: 1px 8px; border-radius: 6px; }
.score.big { font-size: 2.2rem; padding: 6px 20px; }
.score.good { background: var(--good); }
.score.mid { background: var(--mid); }
.score.bad { background: var(--bad); }
.stars { color: var(--accent); letter-spacing: 2px; font-size: .95rem; }
.stars .off { color: #cbd5e1; }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* ---------- الأرقام ---------- */
.stats { background: var(--text); color: #fff; padding: 48px 0; text-align: center; }
.stats strong { display: block; font-size: 2.6rem; font-weight: 800; color: var(--accent); }
.stats span { opacity: .85; }

/* ---------- الخدمات ---------- */
.service-icon { font-size: 2.2rem; margin-bottom: 10px; }
.service p { color: var(--muted); }

/* ---------- آراء المستخدمين ---------- */
.user-review { display: flex; flex-direction: column; }
.user-review p { flex: 1; font-size: .95rem; }
.ur-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ur-foot { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; }
.ur-foot a { color: var(--primary); font-weight: 700; }

/* ---------- المقالات ---------- */
.article { padding: 0; overflow: hidden; }
.article-thumb {
  height: 150px;
  display: grid; place-items: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, #ccfbf1, #f0fdfa);
}
.article-body { padding: 20px; }
.article-body p { color: var(--muted); font-size: .95rem; }

/* ---------- الأسئلة الشائعة ---------- */
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 14px 0;
  list-style: none;
  display: flex; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--primary); font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--muted); padding-bottom: 10px; }

/* ---------- النشرة ---------- */
.newsletter { background: var(--primary); color: #fff; padding: 56px 0; text-align: center; }
.newsletter p { opacity: .9; }
.newsletter .btn { background: var(--accent); color: #1f2937; }
.form-note { margin-top: 14px; font-weight: 700; }

/* ---------- الفوتر ---------- */
.site-footer { background: #0b1220; color: #cbd5e1; padding-top: 52px; }
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { color: #fff; font-size: 1.05rem; }
.footer-grid a:not(.logo) { display: block; padding: 3px 0; }
.footer-grid a:hover { color: #fff; }
.disclaimer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid #1e293b;
  font-size: .85rem;
  color: #94a3b8;
}
.copyright { padding: 18px 16px 26px; font-size: .85rem; color: #64748b; }

.whatsapp {
  position: fixed; bottom: 20px; left: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: grid; place-items: center; font-size: 1.6rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.whatsapp[hidden] { display: none; }

/* ---------- صفحة التقييم ---------- */
.breadcrumbs { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.breadcrumbs a { color: var(--primary); }
.alert {
  background: #fef2f2; color: var(--bad);
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 700;
  margin-bottom: 20px;
}
.review-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.review-hero h1 { font-size: 1.9rem; }
.review-hero p { color: var(--muted); margin: 0; }
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td { padding: 10px 4px; border-bottom: 1px solid var(--border); text-align: right; }
.facts th { color: var(--muted); font-weight: 500; width: 45%; }
.bad-text { color: var(--bad); font-weight: 700; }
.pros, .cons { list-style: none; padding: 0; margin: 0 0 14px; }
.pros li, .cons li { padding: 5px 0; }
.pros li::before { content: "✔ "; color: var(--good); font-weight: 800; }
.cons li::before { content: "✘ "; color: var(--bad); font-weight: 800; }
#reviewRoot .section-title { margin-top: 40px; }
#reviewRoot > p { margin-top: 30px; }

/* ---------- الجوال ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute; top: 68px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px 0; }
  .main-nav .btn { text-align: center; margin-top: 8px; }

  .hero { padding: 56px 0 48px; }
  .section { padding: 48px 0; }
  .section-title { font-size: 1.5rem; }
  .grid-2 { grid-template-columns: 1fr; }

  .broker-row {
    grid-template-columns: 52px 1fr;
    gap: 12px 14px;
    padding: 16px;
  }
  .broker-row .rank { display: none; }
  .broker-row .broker-logo { width: 52px; height: 52px; font-size: 1rem; }
  .broker-row .broker-score {
    grid-column: 1 / -1;
    flex-direction: row; justify-content: space-between;
    border-top: 1px solid var(--border); padding-top: 12px;
  }

  .review-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .search { flex-direction: column; }
}
