/* ===================================================================
   نظام إدارة الخيول — الهوية البصرية
   طابع: مزيج بين الأصالة والحداثة
   =================================================================== */

/* ---------- الخطوط ---------- */
@import url('https://fonts.googleapis.com/css2?family=Aref+Ruqaa:wght@400;700&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* ---------- المتغيرات / Design Tokens ---------- */
:root {
  /* الألوان */
  --ink: #1C1410;          /* بني شبه أسود */
  --ink-soft: #3A2E25;
  --sand: #EFE5D0;         /* رملي */
  --parchment: #FAF6EE;    /* رق فاتح */
  --parchment-2: #F4EDDF;
  --clay: #A8623C;         /* نحاسي/طيني - اللون المميز */
  --clay-deep: #8A4E2E;
  --oasis: #3E5641;        /* أخضر الواحة */
  --oasis-deep: #2C3E2F;
  --gold: #C9A24B;         /* ذهبي */
  --gold-soft: #E0C988;
  --line: rgba(28, 20, 16, 0.12);
  --line-soft: rgba(28, 20, 16, 0.07);

  /* الخطوط */
  --font-display: 'Aref Ruqaa', serif;
  --font-body: 'IBM Plex Sans Arabic', sans-serif;

  /* المقاسات */
  --maxw: 1160px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(28, 20, 16, 0.06);
  --shadow: 0 14px 40px rgba(28, 20, 16, 0.10);
  --shadow-lg: 0 30px 70px rgba(28, 20, 16, 0.16);

  /* المسافات */
  --section-y: clamp(64px, 9vw, 128px);
}

/* ---------- إعادة الضبط ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.75;
  font-weight: 400;
  font-size: 17px;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- أدوات عامة ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--clay);
  text-transform: none;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1.5px;
  background: var(--clay);
  display: inline-block;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; color: var(--ink); }

.section-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.section-lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 620px;
  line-height: 1.85;
}

.section-head { margin-bottom: clamp(40px, 6vw, 68px); }
.section-head.center { text-align: center; }
.section-head.center .section-lead { margin-inline: auto; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 15px 30px;
  border-radius: 100px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--clay);
  color: #fff;
  box-shadow: 0 10px 24px rgba(168, 98, 60, 0.30);
}
.btn-primary:hover { background: var(--clay-deep); transform: translateY(-2px); box-shadow: 0 16px 34px rgba(168, 98, 60, 0.40); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-light {
  background: var(--parchment);
  color: var(--ink);
}
.btn-light:hover { background: #fff; transform: translateY(-2px); }

/* ===================================================================
   الهيدر / التنقل
   =================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 238, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 42px; height: 42px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.brand-text span { font-size: 0.7rem; color: var(--clay); font-weight: 500; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 9px 15px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--clay); background: var(--parchment-2); }
.nav-links a.active { color: var(--clay); }

.nav-cta { margin-inline-start: 8px; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .3s; }

/* ===================================================================
   الفوتر
   =================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--sand);
  padding-top: 72px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
  gap: 40px 34px;
  padding-bottom: 52px;
  border-bottom: 1px solid rgba(239, 229, 208, 0.12);
}
.footer-brand .brand-text strong { color: var(--parchment); }
.footer-about { margin-top: 20px; color: rgba(239, 229, 208, 0.62); max-width: 360px; font-size: 0.96rem; line-height: 1.8; }
.footer-col h2 { font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; color: var(--gold-soft); margin-bottom: 18px; }
.footer-col a { display: block; padding: 6px 0; color: rgba(239, 229, 208, 0.66); font-size: 0.95rem; transition: color .2s; }
.footer-col a:hover { color: var(--parchment); }
.footer-contact { margin-top: 20px; }
.fc-link { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.fc-link svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--gold-soft); }
.fc-link span { font-size: 0.92rem; }
.fc-link:hover svg { color: var(--gold); }
.footer-bottom {
  padding: 26px 0;
  text-align: center;
  color: rgba(239, 229, 208, 0.45);
  font-size: 0.85rem;
}

/* ---------- زخرفة فاصلة (الخيط الذهبي) ---------- */
.divider-pattern {
  height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='28' viewBox='0 0 60 28'%3E%3Cpath d='M0 14h22l8-8 8 8h22' fill='none' stroke='%23C9A24B' stroke-width='1' opacity='0.4'/%3E%3Ccircle cx='30' cy='14' r='2.5' fill='%23C9A24B' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.8;
}

/* ===================================================================
   حركات الظهور عند التمرير
   =================================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===================================================================
   استجابة الجوال
   =================================================================== */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--parchment);
    padding: 16px 24px 28px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    transition: transform .35s ease;
    z-index: 90;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--line-soft); }
  .nav-cta { margin: 14px 8px 0; }
  .nav-cta .btn { width: 100%; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .container { padding-inline: 18px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .fc-link { justify-content: flex-start; }
}

/* ============================================================
   مكوّنات الصفحات التجارية (Landing Pages)
   ============================================================ */

/* جدول مقارنة */
.cmp-table-wrap { overflow-x: auto; margin: 1.8em 0; -webkit-overflow-scrolling: touch; }
.cmp-table {
  width: 100%; min-width: 560px; border-collapse: collapse;
  font-size: 1rem; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cmp-table th {
  background: var(--ink); color: var(--parchment);
  padding: 15px 18px; text-align: start;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
}
.cmp-table th:first-child { background: var(--ink-soft); }
.cmp-table td {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  color: var(--ink-soft); background: var(--parchment); line-height: 1.65;
}
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-table tr:nth-child(even) td { background: var(--parchment-2); }
.cmp-table td:first-child { font-weight: 600; color: var(--ink); }
.cmp-table .yes { color: var(--oasis); font-weight: 600; }
.cmp-table .no  { color: var(--clay-deep); }

/* شبكة بطاقات عامة */
.lp-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 1.6em 0; }
.lp-card {
  background: var(--parchment); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}
.lp-card h3 {
  font-family: var(--font-display); font-size: 1.14rem;
  color: var(--ink); margin: 0 0 10px;
}
.lp-card p { color: var(--ink-soft); font-size: 0.99rem; line-height: 1.75; margin: 0; }
.lp-card-ic {
  width: 42px; height: 42px; border-radius: 11px;
  background: rgba(168, 98, 60, 0.12); color: var(--clay);
  display: grid; place-items: center; margin-bottom: 14px;
}
.lp-card-ic svg { width: 22px; height: 22px; }

/* صندوق "الخلاصة" — يخدم محركات الإجابة والذكاء الاصطناعي */
.lp-answer {
  background: rgba(201, 162, 75, 0.09);
  border-inline-start: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 22px 26px; margin: 1.6em 0;
}
.lp-answer strong {
  display: block; font-family: var(--font-display);
  font-size: 1.06rem; color: var(--ink); margin-bottom: 8px;
}
.lp-answer p { margin: 0; color: var(--ink-soft); line-height: 1.8; font-size: 1.01rem; }

/* قائمة مزايا مصغّرة داخل الصفحات */
.lp-points { list-style: none; padding: 0; margin: 1.2em 0; }
.lp-points li {
  position: relative; padding: 11px 34px 11px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft); line-height: 1.7;
}
.lp-points li:last-child { border-bottom: none; }
.lp-points li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 15px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(62, 86, 65, 0.13) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E5641' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.lp-points li strong { color: var(--ink); font-weight: 600; }

/* روابط ذات صلة أسفل الصفحة */
.lp-related { margin: 2em 0 0; }
.lp-related h2 { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); margin-bottom: 14px; }
.lp-related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.lp-related a {
  display: block; padding: 13px 18px;
  background: var(--parchment-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius); color: var(--ink-soft);
  text-decoration: none; font-size: 0.98rem; transition: all .18s ease;
}
.lp-related a:hover { background: var(--parchment); border-color: var(--clay); color: var(--clay-deep); }

/* ---------- الأسئلة الشائعة (متاحة لكل الصفحات) ---------- */
.faq-wrap { max-width: 820px; margin-inline: auto; }
.faq-list { display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: var(--parchment); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .25s, box-shadow .25s; }
.faq-item[open] { border-color: rgba(168, 98, 60, 0.3); box-shadow: var(--shadow-sm); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; cursor: pointer; list-style: none; user-select: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q { font-family: var(--font-display); font-size: 1.12rem; color: var(--ink); line-height: 1.5; }
.faq-icon { position: relative; width: 22px; height: 22px; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; background: var(--clay); border-radius: 2px; transition: transform .3s; }
.faq-icon::before { top: 10px; left: 0; width: 22px; height: 2.5px; }
.faq-icon::after { top: 0; left: 10px; width: 2.5px; height: 22px; }
.faq-item[open] .faq-icon::after { transform: rotate(90deg); opacity: 0; }
.faq-a { padding: 0 26px 24px; }
.faq-a p { color: var(--ink-soft); line-height: 1.85; font-size: 1rem; }
.faq-a a { color: var(--clay); font-weight: 500; }
.faq-a a:hover { text-decoration: underline; }
@media (max-width: 520px) {
  .faq-item summary { padding: 18px 20px; }
  .faq-q { font-size: 1.02rem; }
  .faq-a { padding: 0 20px 20px; }
}

/* ---------- صندوق الربط بالنظام ---------- */
.system-link {
  display: flex; gap: 16px; align-items: flex-start;
  background: rgba(201, 162, 75, 0.1);
  border: 1px solid rgba(201, 162, 75, 0.3);
  border-radius: var(--radius-lg);
  padding: 22px 26px; margin: 1.8em 0;
}
.system-link-ic { flex-shrink: 0; width: 44px; height: 44px; border-radius: 11px; background: var(--gold); color: var(--ink); display: grid; place-items: center; }
.system-link-ic svg { width: 24px; height: 24px; }
.system-link strong { display: block; font-family: var(--font-display); font-size: 1.12rem; color: var(--ink); margin-bottom: 5px; }
.system-link p { font-size: 0.98rem; color: var(--ink-soft); margin: 0; line-height: 1.7; }
.system-link a { color: var(--clay-deep); font-weight: 600; }

/* ---------- الدعوة الختامية (متاحة لكل الصفحات) ---------- */
.cta-band {
  padding-block: clamp(56px, 8vw, 96px);
  background:
    radial-gradient(ellipse at 30% 0%, rgba(201, 162, 75, 0.18), transparent 60%),
    linear-gradient(135deg, var(--clay-deep), var(--clay));
  color: #fff; text-align: center;
}
.cta-inner { max-width: 680px; }
.cta-band h2 { font-size: clamp(2rem, 4.5vw, 3rem); color: #fff; margin-bottom: 16px; }
.cta-band p { font-size: 1.1rem; color: rgba(255, 255, 255, 0.9); margin-bottom: 32px; line-height: 1.8; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-ghost-light { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); }

/* الدعوة داخل الهيرو تُحاذى للبداية لا للمنتصف */
.page-hero-inner .cta-actions { justify-content: flex-start; }

/* قسم بخلفية بديلة لتفصل بين الأقسام المتتابعة */
.section-alt { background: var(--parchment-2); }

/* بطاقة الحل القابلة للنقر */
a.lp-card { text-decoration: none; display: block; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
a.lp-card:hover { transform: translateY(-3px); border-color: var(--clay); box-shadow: var(--shadow); }
a.lp-card h3 { color: var(--ink); }
a.lp-card:hover h3 { color: var(--clay-deep); }
