/* سوق العز — نظام التصميم للموقع
   الهوية: أخضر الليل + ذهب «عز» + شريط السدو (النسيج البدوي) كعنصر مميز وحيد */
:root {
  --night: #133A2C;     /* خلفية الرأس والتذييل */
  --green: #1F5C45;     /* اللون الأساسي */
  --green-soft: #E2ECE6;
  --gold: #D4A84B;      /* الشعار والأزرار الرئيسية */
  --gold-deep: #A9822F;
  --sand: #EADFC8;      /* أقسام مميزة */
  --wool: #FCFAF6;      /* خلفية الصفحة */
  --ink: #1A2420;
  --ink-soft: #4C5852;
  --line: #DDD3BE;
  --sadu-red: #A23E2A;  /* يُستخدم داخل شريط السدو فقط */
  --radius: 14px;
  --display: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --body: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --logo: 'Aref Ruqaa', serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--wool);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.85;
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: 4px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.35; margin: 0; }
h2 { font-size: clamp(28px, 4.6vw, 40px); }
h3 { font-size: 21px; }
p { margin: 0; }

/* ---------- شريط السدو ---------- */
.sadu {
  height: 40px;
  background-color: var(--night);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='40'%3E%3Crect width='48' height='40' fill='%23133A2C'/%3E%3Crect width='48' height='4' fill='%23D4A84B'/%3E%3Crect y='36' width='48' height='4' fill='%23D4A84B'/%3E%3Cpath d='M0 4h12l-6 8zM12 4h12l-6 8zM24 4h12l-6 8zM36 4h12l-6 8z' fill='%23A23E2A'/%3E%3Cpath d='M0 36h12l-6-8zM12 36h12l-6-8zM24 36h12l-6-8zM36 36h12l-6-8z' fill='%23A23E2A'/%3E%3Cpath d='M24 13l9 7-9 7-9-7z' fill='%23F3E9D2'/%3E%3Cpath d='M24 17l4 3-4 3-4-3z' fill='%23A23E2A'/%3E%3Cpath d='M0 13l9 7-9 7zM48 13l-9 7 9 7z' fill='%23F3E9D2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 48px 40px;
}
.sadu.thin { height: 20px; background-size: 24px 20px; }

/* ---------- الرأس ---------- */
.topbar { background: var(--night); color: #fff; }
.topbar .container { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.logo img { width: 40px; height: 40px; border-radius: 11px; }
.logo span { font-family: var(--logo); font-size: 26px; line-height: 1; padding-bottom: 6px; }
.nav { display: none; gap: 28px; margin-inline-start: 24px; }
.nav a { color: #DCE6E0; text-decoration: none; font-size: 15px; }
.nav a:hover, .nav a[aria-current] { color: var(--gold); }
.topbar .btn { margin-inline-start: auto; }
@media (min-width: 820px) { .nav { display: flex; } }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: var(--radius);
  font-family: var(--body); font-weight: 700; font-size: 16px;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn.sm { min-height: 42px; padding: 0 18px; font-size: 14px; border-radius: 11px; }
.btn.gold { background: var(--gold); color: var(--night); }
.btn.gold:hover { background: #E0B85E; }
.btn.green { background: var(--green); color: #fff; }
.btn.green:hover { background: #24694F; }
.btn.ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn.outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn[aria-disabled="true"] { cursor: default; }
@media (max-width: 560px) { .topbar .btn { display: none; } }

/* ---------- البطل (الصفحة الرئيسية) ---------- */
.hero { background: var(--night); color: #fff; position: relative; overflow: hidden; }
.hero .container { position: relative; padding-top: 48px; padding-bottom: 72px; }
.hero-mark {
  position: absolute; inset-inline-end: -40px; top: 50%; transform: translateY(-46%);
  font-family: var(--logo); font-size: clamp(260px, 42vw, 520px); line-height: 1;
  color: var(--gold); opacity: .1; pointer-events: none; user-select: none;
}
.hero h1 { font-size: clamp(48px, 9vw, 92px); line-height: 1.15; color: #fff; }
.hero h1 .gold { color: var(--gold); display: block; font-size: .5em; margin-top: 10px; line-height: 1.4; }
.hero .lead { max-width: 34em; margin-top: 24px; font-size: 19px; color: #D3DED8; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 40px 0 0; padding: 0; list-style: none; color: #C4D2CB; font-size: 15px; }
.hero .facts li { display: flex; align-items: center; gap: 10px; }
.hero .facts li::before { content: ''; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); flex: none; }

/* ---------- أقسام عامة ---------- */
.section { padding: 80px 0; }
.section.sand { background: var(--sand); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { margin-top: 12px; color: var(--ink-soft); font-size: 18px; }

/* الأقسام والسلالات */
.herds { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.herd { padding: 24px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.herd h3 { font-size: 28px; color: var(--green); }
.breeds { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breeds li { font-size: 15px; padding: 3px 14px; border-radius: 999px; background: var(--green-soft); color: var(--green); }
@media (min-width: 820px) {
  .herds { grid-template-columns: repeat(2, 1fr); column-gap: 56px; }
  .herd { grid-template-columns: 120px 1fr; align-items: baseline; }
}

/* خطوات العمل (تسلسل فعلي) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; counter-reset: step; }
.steps li { position: relative; padding-inline-start: 72px; counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute; inset-inline-start: 0; top: -4px;
  width: 52px; height: 52px; display: grid; place-items: center;
  font-family: var(--display); font-size: 24px; font-weight: 700;
  color: var(--night); background: var(--gold);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.steps li:not(:last-child)::after {
  content: ''; position: absolute; inset-inline-start: 25px; top: 56px; bottom: -28px; width: 2px; background: var(--line);
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ink-soft); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .steps li { padding: 76px 0 0; }
  .steps li::before { top: 0; }
  .steps li:not(:last-child)::after { inset-inline-start: 60px; inset-inline-end: -20px; top: 25px; bottom: auto; width: auto; height: 2px; }
}

/* المميزات */
.features { display: grid; gap: 36px 56px; }
.feature h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.feature h3::before { content: ''; width: 12px; height: 12px; background: var(--gold); transform: rotate(45deg); flex: none; }
.feature p { color: var(--ink-soft); padding-inline-start: 24px; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .features { grid-template-columns: repeat(3, 1fr); } }

/* العمولة والحاسبة */
.commission { display: grid; gap: 40px; align-items: center; }
.commission .big { font-family: var(--display); font-size: clamp(96px, 16vw, 160px); line-height: 1; color: var(--green); }
.commission .copy p { margin-top: 14px; color: var(--ink-soft); font-size: 18px; }
.commission .copy a { display: inline-block; margin-top: 16px; font-weight: 700; }
.calc { background: var(--wool); border: 2px solid var(--ink); border-radius: 20px; padding: 28px; display: grid; gap: 16px; }
.calc h3 { font-size: 22px; }
.calc .row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.calc label { font-size: 14px; font-weight: 700; color: var(--ink-soft); display: block; margin-bottom: 6px; }
.calc input, .calc select {
  width: 100%; height: 54px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  font-family: var(--body); font-size: 20px; padding: 0 14px; color: var(--ink);
}
.calc input:focus, .calc select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.calc select { font-size: 16px; }
.calc output { display: block; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 17px; color: var(--ink-soft); }
.calc output b { display: block; font-family: var(--display); font-size: 40px; color: var(--green); line-height: 1.3; }
@media (min-width: 880px) { .commission { grid-template-columns: 1.1fr 1fr; gap: 72px; } }

/* الدول */
.countries { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); margin: 0; padding: 0; list-style: none; }
.countries li { padding: 18px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; padding-inline-end: 20px; }
.countries b { font-family: var(--display); font-size: 22px; font-weight: 500; }
.countries span { color: var(--ink-soft); font-size: 15px; }
@media (min-width: 820px) { .countries { grid-template-columns: repeat(3, 1fr); } }

/* الأسئلة */
.faq { max-width: 780px; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 0; display: flex; justify-content: space-between; gap: 16px;
  font-weight: 700; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--display); font-size: 28px; line-height: 1; color: var(--gold-deep); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--ink-soft); max-width: 62ch; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* دعوة التحميل الأخيرة */
.closing { background: var(--green); color: #fff; padding: 72px 0; }
.closing .container { display: grid; gap: 24px; align-items: center; }
.closing h2 { color: #fff; }
.closing p { color: #D3E3DA; margin-top: 10px; font-size: 18px; }
@media (min-width: 820px) { .closing .container { grid-template-columns: 1fr auto; } }

/* ---------- التذييل ---------- */
.footer { background: var(--night); color: #C4D2CB; padding: 48px 0 32px; font-size: 15px; }
.footer .container { display: grid; gap: 28px; }
.footer .logo span { font-size: 30px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer a { color: #E6EEE9; text-decoration: none; }
.footer a:hover { color: var(--gold); }
.footer .small { font-size: 13px; color: #94A89E; }
@media (min-width: 820px) { .footer .container { grid-template-columns: 1fr auto; align-items: start; } }

/* ---------- صفحات المحتوى (الشروط والخصوصية والعمولة) ---------- */
.page-head { background: var(--night); color: #fff; padding: 40px 0 44px; }
.page-head h1 { font-size: clamp(34px, 6vw, 52px); }
.page-head p { color: #B9C9C0; margin-top: 8px; font-size: 15px; }
.doc { display: grid; gap: 40px; padding: 48px 0 80px; }
.toc { font-size: 15px; }
.toc b { display: block; font-family: var(--display); font-size: 17px; margin-bottom: 10px; }
.toc ol { margin: 0; padding: 0 20px 0 0; display: grid; gap: 6px; color: var(--ink-soft); }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--green); text-decoration: underline; }
.prose { max-width: 66ch; }
.prose section { padding: 8px 0 28px; scroll-margin-top: 24px; }
.prose section + section { border-top: 1px solid var(--line); padding-top: 28px; }
.prose h2 { font-size: 24px; color: var(--green); margin-bottom: 10px; }
.prose p { color: #34403A; }
.doc-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
@media (min-width: 900px) {
  .doc { grid-template-columns: 240px 1fr; gap: 64px; }
  .toc { position: sticky; top: 24px; align-self: start; }
}

/* ---------- صفحة الإعلان ---------- */
.ad { display: grid; gap: 32px; padding: 32px 0 72px; }
.gallery .main { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: 20px; background: var(--sand); }
.gallery .empty { display: grid; place-items: center; color: var(--ink-soft); }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; }
.thumbs button { padding: 0; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; flex: none; }
.thumbs button[aria-pressed="true"] { border-color: var(--gold); }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.ad-info { display: grid; gap: 18px; align-content: start; }
.ad-info h1 { font-size: clamp(26px, 4vw, 36px); }
.ad-price { font-family: var(--display); font-size: 38px; color: var(--green); line-height: 1.2; }
.ad-price small { display: block; font-family: var(--body); font-size: 14px; color: var(--ink-soft); }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; border-top: 1px solid var(--line); }
.specs div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: 13px; color: var(--ink-soft); }
.specs dd { margin: 0; font-weight: 700; }
.ad-desc { white-space: pre-line; color: #34403A; }
.ad-actions { display: grid; gap: 10px; }
.safety { background: var(--sand); border-radius: var(--radius); padding: 16px 18px; font-size: 15px; color: #4A3F28; }
.safety b { display: block; font-family: var(--display); margin-bottom: 4px; color: var(--ink); }
.ad-state { text-align: center; padding: 72px 0; display: grid; gap: 20px; justify-items: center; }
.ad-state p { font-size: 19px; color: var(--ink-soft); }
@media (min-width: 900px) { .ad { grid-template-columns: 1.15fr 1fr; gap: 56px; padding-top: 48px; } }
