:root {
  --dark: #111827;
  --accent: #16a34a;
  --accent-dark: #15803d;
  --bg: #f9fafb;
  --border: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --btn-bg: #53d899;
  --btn-text: #0b1f17;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
}

a { color: inherit; }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Header ===== */
.site-header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dark);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: bold;
}
.logo b { color: var(--accent); }
.logo-icon { font-size: 1.3rem; }
.nav { display: flex; gap: 4px; }
.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 6px;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--accent); }

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 44px 0 24px;
}
.hero-badge {
  display: inline-block;
  background: #dcfce7;
  color: var(--accent-dark);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: 1.7rem;
  line-height: 1.5;
  margin-bottom: 10px;
}
.hero p { color: var(--muted); }

/* ===== Cards ===== */
.tools {
  display: grid;
  gap: 18px;
  padding: 20px 0;
}
@media (min-width: 700px) {
  .tools { grid-template-columns: repeat(3, 1fr); }
}
.card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }
.card h2 { font-size: 1.3rem; margin-bottom: 4px; }
.rating { color: #d97706; font-weight: bold; }
.short { color: var(--muted); margin: 6px 0; }
.price { font-weight: bold; margin: 10px 0 14px; }
.top-badge {
  position: absolute;
  top: -12px;
  inset-inline-start: 16px;
  background: var(--dark);
  color: #fff;
  font-size: 0.8rem;
  padding: 3px 12px;
  border-radius: 999px;
}

.btn {
  display: block;
  text-align: center;
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s;
}
.btn:hover { background: var(--accent-dark); color: #fff; }

.read-more {
  display: block;
  text-align: center;
  margin-top: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.read-more:hover { color: var(--accent); }

/* ===== Affiliate Notes & Hints ===== */
.affiliate-note {
  background: var(--bg);
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--accent);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 18px;
  font-size: 0.92rem;
  color: var(--text);
}
.affiliate-hint { font-size: 0.88rem; margin-top: 6px; color: var(--text); }

/* ===== Footer ===== */
.site-footer {
  background: var(--dark);
  color: #d1d5db;
  margin-top: 50px;
  padding-top: 36px;
}
.footer-grid {
  display: grid;
  gap: 24px;
  padding-bottom: 24px;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 2fr 1fr; }
}
.footer-col h3 { color: #fff; margin-bottom: 10px; font-size: 1.05rem; }
.footer-col p { font-size: 0.92rem; }
.footer-col a {
  display: block;
  color: #d1d5db;
  text-decoration: none;
  padding: 3px 0;
  font-size: 0.92rem;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #374151;
  padding: 18px 16px;
  text-align: center;
  font-size: 0.85rem;
}
.disclosure {
  color: #9ca3af;
  margin-bottom: 8px;
}

/* Container خاص بالجدول باش يكون Responsive 100% وفي نفس الوقت RTL */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 25px 0;
  direction: rtl; /* ضروري باش يبدا الجدول من اليمين لليسار */
}

/* تنسيق الجدول بدقة */
.guide-content table {
  width: 100%;
  border-collapse: collapse;
  direction: rtl;
  text-align: right;
  font-size: 0.95rem;
  background-color: var(--card-background-color, #fff);
  margin: 0;
}

.guide-content th, 
.guide-content td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--muted-border-color, #e2e8f0);
  text-align: right !important; /* ضمان بقاء النص محاذياً للأنظار يميناً */
}

.guide-content th {
  background-color: var(--card-background-color, #f8fafc);
  font-weight: bold;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.guide-content tr:hover {
  background-color: rgba(0, 0, 0, 0.01);
}

