/* ============================================================
   الصفحة الرئيسية (platform_home.html) — Hero + بحث + إحصائيات
   لا يوجد أي متغير CSS جديد بهذا الملف: كل الألوان تُعاد استخدامها من
   البلوك الموحّد المعرّف بـstyle.css (--ink, --ink-2, --ink-3, --text,
   --muted, --gold, --gold-soft, --line, --line-strong, --shadow, --green,
   --hover-bg, --header-h...). هذا الملف يضيف فقط تخطيط/مكوّنات خاصة
   بمحتوى الصفحة الرئيسية تحت الهيدر المشترك — لا يمسّ الهيدر نفسه.
   ============================================================ */

/* 01. Tokens — لا يوجد؛ إعادة استخدام كاملة للمصدر الموحّد أعلاه */

/* 02. Reset */
.home-page{ overflow-x:clip; }
.home-page svg{ display:block; }
.home-page ul{ list-style:none; margin:0; padding:0; }
.home-page button{ font-family:inherit; }

/* 03. Page */
.home-page{
  --home-max: 1180px;
}
.home-page .container{ max-width: var(--home-max); }

/* 04. Navbar — لا شيء (الهيدر المشترك بلا تغيير) */

/* 05. Hero */
.home-hero{
  position:relative;
  padding: clamp(40px, 7vw, 76px) 0 clamp(28px, 5vw, 48px);
  background:
    radial-gradient(circle at 75% 30%, rgba(121,183,110,.16), transparent 42%),
    radial-gradient(circle at 25% 70%, rgba(200,164,91,.07), transparent 34%),
    var(--surface);
  border-bottom: 1px solid var(--line);
  overflow:hidden;
}
.home-hero-grid{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  align-items:center;
  gap: clamp(24px, 4vw, 56px);
  min-height: 560px;
}
.home-hero-copy{ order:2; position:relative; z-index:2; }
.home-hero-art{ order:1; position:relative; }

/* Hero carousel — الشرائح متراكبة بنفس خلية الـgrid فتحجز الحاوية أعلى ارتفاع
   بينها تلقائيًا، فما يصير أي قفزة بالتخطيط عند تبديل الشريحة النشطة. */
.home-hero-carousel{
  display:grid;
}
.home-hero-slide{
  grid-area: 1 / 1;
  opacity:0;
  transition: opacity 450ms ease;
}
.home-hero-slide.is-active{
  opacity:1;
}
@media(prefers-reduced-motion: reduce){
  .home-hero-slide{ transition:none; }
}

.home-hero-badge{
  display:inline-flex; align-items:center; gap:9px;
  padding:8px 18px;
  border:1px solid var(--line-strong);
  border-radius:999px;
  background: var(--hover-bg);
  color: var(--gold-soft);
  font-size:.85rem; font-weight:700; letter-spacing:.2px;
}
.home-hero-badge-icon{
  display:flex; align-items:center; justify-content:center;
  width:18px; height:18px; flex:none;
  color: var(--gold);
}
.home-hero-badge-icon svg{ width:18px; height:18px; }

.home-hero-heading{
  display:flex; flex-direction:column;
  font-size: clamp(34px, 4.4vw, 64px);
  font-weight:700;
  line-height:1.12;
  letter-spacing:-1px;
  margin: 18px 0 14px;
  color: var(--text);
}
.home-hero-heading-accent{ color: var(--gold); }
.home-hero-description{
  font-size:17px;
  line-height:1.9;
  color: var(--muted);
  max-width:560px;
  margin:0 0 20px;
}

/* Quick icons row */
.home-hero-quick-icons{
  display:flex; gap:26px; flex-wrap:wrap;
  margin:0 0 22px;
}
.home-quick-icon{
  display:flex; flex-direction:column; align-items:center; gap:8px;
  font-size:.82rem; color: var(--muted); font-weight:700;
}
.home-quick-icon-mark{
  display:flex; align-items:center; justify-content:center;
  width:42px; height:42px; flex:none;
  border-radius:11px;
  background: var(--hover-bg);
}
.home-quick-icon-mark img{ width:20px; height:20px; }

.home-hero-note{
  font-size:.92rem;
  line-height:1.85;
  color: var(--muted);
  max-width:520px;
  margin:0 0 26px;
}
.home-hero-note-line{ display:block; }

/* 07. Buttons */
.home-hero-actions{
  display:flex; gap:14px; flex-wrap:wrap;
  margin-bottom:34px;
}
.home-btn{
  display:inline-flex; align-items:center; gap:9px;
  min-height:58px;
  padding-inline:30px;
  border-radius:6px;
  font-size:.98rem; font-weight:700;
  cursor:pointer;
  transition: transform 160ms ease, filter 160ms ease, background-color 160ms ease;
  text-decoration:none;
}
.home-btn svg{ width:19px; height:19px; flex:none; }
.home-btn-primary{
  background: var(--gold);
  color: var(--ink);
  border:1px solid var(--gold);
}
.home-btn-primary:hover{ filter:brightness(1.08); transform:translateY(-2px); color: var(--ink); }
.home-btn-secondary{
  background:transparent;
  color: var(--gold-soft);
  border:1px solid var(--gold);
}
.home-btn-secondary:hover{ background: var(--hover-bg); transform:translateY(-2px); color: var(--gold-soft); }
.home-btn:focus-visible{ outline:2px solid var(--gold); outline-offset:3px; }

/* 08. Feature strip / trust strip / closing quote */
.home-feature-strip{
  display:flex;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  background: var(--ink-2);
  margin: clamp(28px, 4vw, 44px) 0 22px;
}
.home-feature-strip-item{
  flex:1;
  display:flex; flex-direction:column; align-items:center;
  text-align:center;
  gap:10px;
  padding:28px 18px;
  border-inline-start:1px solid var(--line);
}
.home-feature-strip-item:first-child{ border-inline-start:0; }
.home-feature-strip-icon{
  display:flex; align-items:center; justify-content:center;
  width:44px; height:44px; flex:none;
  border-radius:12px;
  background: var(--hover-bg);
  color: var(--gold);
}
.home-feature-strip-icon svg{ width:22px; height:22px; }
.home-feature-strip-item strong{ color: var(--text); font-size:.98rem; font-weight:700; }
.home-feature-strip-item p{ margin:0; color: var(--muted); font-size:.82rem; line-height:1.6; }

.home-trust-strip{
  display:flex;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  background: var(--ink-2);
  margin: 0 0 clamp(32px, 5vw, 52px);
}
.home-trust-strip-item{
  flex:1;
  display:flex; align-items:center; gap:14px;
  padding:20px 22px;
  border-inline-start:1px solid var(--line);
}
.home-trust-strip-item:first-child{ border-inline-start:0; }
.home-trust-strip-icon{
  display:flex; align-items:center; justify-content:center;
  width:38px; height:38px; flex:none;
  border-radius:10px;
  background: var(--hover-bg);
  color: var(--green);
}
.home-trust-strip-icon svg{ width:19px; height:19px; }
.home-trust-strip-text{ display:flex; flex-direction:column; line-height:1.4; }
.home-trust-strip-text strong{ color: var(--text); font-size:.92rem; font-weight:700; }
.home-trust-strip-text small{ color: var(--muted); font-size:.78rem; }

.home-hero-quote{
  position:relative;
  display:flex; flex-direction:column; align-items:center; gap:16px;
  text-align:center;
  padding: 30px 20px clamp(36px, 5vw, 54px);
}
.home-hero-quote-icon{
  display:flex; align-items:center; justify-content:center;
  width:46px; height:46px; flex:none;
  border-radius:13px;
  background: var(--hover-bg);
  color: var(--gold);
}
.home-hero-quote-icon svg{ width:24px; height:24px; }
.home-hero-quote-lines{
  display:grid;
  max-width:560px;
}
.home-hero-quote-line{
  grid-area: 1 / 1;
  margin:0;
  color: var(--gold);
  font-size:1rem; font-weight:700;
  line-height:1.8;
  opacity:0;
  transition: opacity 450ms ease;
}
.home-hero-quote-line.is-active{ opacity:1; }
@media(prefers-reduced-motion: reduce){
  .home-hero-quote-line{ transition:none; }
}

.home-hero-dots{
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding-bottom: clamp(24px, 4vw, 40px);
}
.home-hero-dot{
  width:8px; height:8px; border-radius:999px;
  border:0; padding:0;
  background: var(--line-strong);
  cursor:pointer;
  transition: width 220ms ease, background-color 220ms ease;
}
.home-hero-dot.is-active{
  width:22px;
  background: var(--gold);
}

/* 06. Hero artwork */
.home-hero-art{
  min-height:520px;
  display:flex; align-items:flex-end; justify-content:center;
}
.home-hero-art-glow{
  position:absolute;
  inset:0;
  background: radial-gradient(circle at 55% 55%, rgba(121,183,110,.14), transparent 60%);
  pointer-events:none;
}
.home-hero-art-ring{
  position:absolute;
  inset-inline-end:auto;
  top:50%; left:50%;
  transform:translate(-50%,-50%);
  width:min(72vw, 560px);
  height:min(72vw, 560px);
  pointer-events:none;
}
.home-hero-horse{
  position:relative;
  z-index:2;
  width:min(40vw, 440px);
  height:auto;
  max-height:560px;
  object-fit:contain;
  pointer-events:none;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.35));
  -webkit-mask-image: linear-gradient(to bottom, black 72%, transparent 96%);
  mask-image: linear-gradient(to bottom, black 72%, transparent 96%);
}

/* 08b. Intent cards (توجيه بالنية تحت الهيرو) */
.home-intent-section{ padding: clamp(28px, 5vw, 48px) 0 clamp(12px, 3vw, 24px); }
.intent-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  align-items:start;
  gap:20px;
}
.intent-card{
  display:block;
  border-radius:18px;
  border:1px solid var(--line);
  background: var(--ink-2);
  overflow:hidden;
  transition: border-color 160ms ease, transform 160ms ease;
}
.intent-card:hover{ transform:translateY(-2px); }
.intent-card-face{
  display:flex;
  align-items:center;
  gap:16px;
  padding:26px 24px;
  cursor:pointer;
  list-style:none;
}
.intent-card-face::-webkit-details-marker{ display:none; }
.intent-card-icon{
  display:flex; align-items:center; justify-content:center;
  width:52px; height:52px; flex:none;
  border-radius:14px;
}
.intent-card-icon svg{ width:26px; height:26px; }
.intent-card-body{ display:flex; flex-direction:column; gap:4px; flex:1; text-align:start; }
.intent-card-body strong{ font-size:1.08rem; color: var(--text); }
.intent-card-body span{ font-size:.85rem; color: var(--muted); }
.intent-card-chevron{ width:18px; height:18px; color: var(--muted); flex:none; transition: transform 200ms ease; }

/* بطاقة "أبحث عن تدريب أو ركوب" — إجراء أساسي، الأبرز حجمًا ولونًا وموضعًا */
.intent-card-visitor{
  border:2px solid rgba(125,187,103,.55);
}
.intent-card-visitor .intent-card-face{ padding:30px 26px; }
.intent-card-visitor .intent-card-icon{
  width:58px; height:58px;
  background: var(--green); color: var(--ink);
}
.intent-card-visitor .intent-card-body strong{ font-size:1.18rem; }
.intent-card-visitor:hover{ border-color: var(--green); }

/* بطاقة "عندي مربط أو إسطبل" — إجراء ثانوي، أخف وزنًا لكنه واضح ومقروء بالكامل */
.intent-card-owner{ border-color: var(--line); }
.intent-card-owner .intent-card-icon{ background: var(--hover-bg); color: var(--gold); }
.intent-card-owner[open]{ border-color: var(--line-strong); }
.intent-card-owner[open] .intent-card-chevron{ transform:rotate(180deg); }

.intent-card-options{
  display:flex; flex-direction:column; gap:2px;
  padding:0 24px 20px;
}
.intent-card-option{
  display:flex; align-items:center; gap:10px;
  padding:13px 14px;
  border-radius:10px;
  color: var(--text);
  font-weight:700; font-size:.92rem;
  transition: background 140ms ease;
}
.intent-card-option:hover{ background: var(--hover-bg); }
.intent-card-option svg{ width:17px; height:17px; color: var(--gold); flex:none; }

@media(max-width: 767px){
  .intent-grid{ grid-template-columns:1fr; }
}

/* 09. Search panel */
.home-search-section{ position:relative; z-index:3; margin-top: -34px; }
.home-search-panel{
  display:flex;
  align-items:stretch;
  gap:10px;
  width:100%;
  min-height:96px;
  margin:0 auto;
  padding:10px;
  border:1px solid var(--line);
  border-radius:20px;
  background: var(--ink-3);
  box-shadow: var(--shadow);
}
.home-search-field{
  position:relative;
  display:flex; flex-direction:column; justify-content:center; gap:2px;
  flex:1 1 190px;
  min-width:150px;
  height:76px;
  padding:10px 16px;
  border:1px solid var(--line);
  border-radius:12px;
  background: var(--ink-2);
}
.home-field-label{
  display:flex; align-items:center; gap:6px;
  font-size:.72rem; color: var(--muted);
}
.home-field-label svg{ width:14px; height:14px; color: var(--gold); flex:none; }
.home-search-field select{
  width:100%; border:0; outline:0; background:transparent; color: var(--text);
  font-family:'Almarai', sans-serif; font-size:.95rem; font-weight:700;
  appearance:none; padding-inline-end:20px; cursor:pointer;
}
.home-search-field select option{ background: var(--ink-2); color: var(--text); }
.home-search-field select:focus-visible,
.home-search-field--query input:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:2px;
}
.home-field-chevron{
  position:absolute; inset-inline-end:14px; top:50%; transform:translateY(-50%);
  width:16px; height:16px; color: var(--muted); pointer-events:none;
}

.home-search-field--query{ flex:2 1 260px; }
.home-search-field--query input{
  width:100%; border:0; outline:0; background:transparent; color: var(--text);
  font-family:'Almarai', sans-serif; font-size:.95rem; font-weight:700;
}
.home-search-field--query input::placeholder{ color: var(--muted); font-weight:400; }

.home-search-submit{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  flex:0 0 auto;
  height:76px;
  padding-inline:28px;
  border:1px solid var(--gold);
  border-radius:12px;
  background: var(--gold);
  color: var(--ink);
  font-size:.95rem; font-weight:700;
  cursor:pointer;
  transition: filter 160ms ease, transform 160ms ease;
}
.home-search-submit svg{ width:17px; height:17px; }
.home-search-submit:hover{ filter:brightness(1.08); transform:translateY(-1px); }
.home-search-submit:focus-visible{ outline:2px solid var(--gold-soft); outline-offset:3px; }

.home-advanced-search{
  position:relative;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  flex:0 0 auto;
  height:76px;
  padding-inline:20px;
  border:1px solid var(--line);
  border-radius:12px;
  background:transparent;
  color: var(--muted);
  font-size:.88rem; font-weight:700;
  cursor:pointer;
  transition: color 160ms ease, border-color 160ms ease;
}
.home-advanced-search svg{ width:17px; height:17px; }
.home-advanced-search:hover{ color: var(--gold-soft); border-color: var(--line-strong); }
.home-advanced-search:focus-visible{ outline:2px solid var(--gold); outline-offset:3px; }
.home-advanced-note{
  position:absolute;
  bottom:-26px; inset-inline-end:0;
  font-size:.74rem; color: var(--gold-soft);
  opacity:0; transform:translateY(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events:none;
}
.home-advanced-note.is-visible{ opacity:1; transform:translateY(0); }

.home-search-clear{ text-align:center; margin-top:16px; }
.home-search-clear a{
  display:inline-flex; align-items:center; gap:6px;
  color: var(--muted); font-size:.85rem;
  border-bottom:1px dashed var(--line-strong);
  padding-bottom:2px;
}
.home-search-clear a:hover{ color: var(--gold-soft); }

/* 09b. بطاقات المرابط الموحّدة — صفحة الاستكشاف */
.stable-card{
  display:flex;
  flex-direction:column;
  height:100%;
  border-radius:16px;
  border:1px solid var(--line);
  background: var(--ink-2);
  overflow:hidden;
  transition: border-color 160ms ease, transform 160ms ease;
}
.stable-card:hover{ border-color: var(--line-strong); transform:translateY(-2px); }

.stable-card-media{
  position:relative;
  aspect-ratio: 16 / 10;
  background: var(--ink-3);
  overflow:hidden;
}
.stable-card-media-img{
  width:100%; height:100%; display:block;
  object-fit:cover;
}
.stable-card-media-img--logo{
  object-fit:contain;
  padding:22px;
  background: #ffffff;
  box-sizing:border-box;
}
.stable-card-media--placeholder{
  display:flex; align-items:center; justify-content:center;
}
.stable-card-media-icon{
  width:52px; height:52px;
  color: var(--line-strong);
}

.stable-card-body{
  display:flex;
  flex-direction:column;
  flex:1;
  padding:20px;
}
.stable-card-heading{
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
}
.stable-card-name{ margin:0; font-size:1.1rem; color: var(--text); }
.stable-card-location{
  display:flex; align-items:center; gap:6px;
  margin:8px 0 0; color: var(--muted); font-size:.88rem;
}
.stable-card-location svg{ width:15px; height:15px; color: var(--gold); flex:none; }
.stable-card-badges{ display:flex; gap:7px; flex-wrap:wrap; margin-top:14px; }
.stable-card-actions{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  margin-top:auto;
  padding-top:16px;
}
.stable-card-actions .btn-block{ flex:1; }

.home-search-clear-link{
  display:inline-flex; align-items:center; gap:6px;
  margin-top:14px;
  color: var(--gold-soft); font-size:.9rem; font-weight:700;
  border-bottom:1px dashed var(--line-strong);
  padding-bottom:2px;
}
.home-search-clear-link:hover{ color: var(--gold); }

/* 10. Stats */
.home-stats-section{ padding: clamp(40px, 6vw, 62px) 0 clamp(28px, 4vw, 40px); }
.home-stats-bar{
  display:flex;
  border:1px solid var(--line);
  border-radius:18px;
  overflow:hidden;
  background: var(--ink-2);
}
.home-stat{
  flex:1;
  display:flex; align-items:center; gap:14px;
  justify-content:center;
  padding:26px 18px;
  border-inline-start:1px solid var(--line);
}
.home-stat:first-child{ border-inline-start:0; }
.home-stat-icon{
  display:flex; align-items:center; justify-content:center;
  width:42px; height:42px; flex:none;
  border-radius:11px;
  background: var(--hover-bg);
  color: var(--gold);
}
.home-stat-icon svg{ width:22px; height:22px; }
.home-stat-body{ display:flex; flex-direction:column; }
.home-stat-body strong{ font-size:1.5rem; color: var(--text); font-weight:700; line-height:1.15; }
.home-stat-body span{ font-size:.8rem; color: var(--muted); }

.home-trust-line{
  display:flex; align-items:center; justify-content:center; gap:8px;
  margin: 22px 0 0;
  color: var(--muted); font-size:.85rem;
}
.home-trust-line svg{ width:16px; height:16px; color: var(--green); flex:none; }
.home-trust-dot{ color: var(--gold); }

.home-map-link{ display:inline-flex; align-items:center; gap:6px; }
.home-map-link svg{ width:15px; height:15px; }

.stable-card-rating{
  display:inline-flex; align-items:center; gap:5px;
  margin-top:8px;
  color: var(--gold); font-weight:700; font-size:.9rem;
}
.stable-card-rating svg{ width:15px; height:15px; }
.stable-card-rating-count{ color: var(--muted); font-weight:400; }

/* 11. Responsive */
@media(max-width: 1279px){
  .home-hero-horse{ width:min(38vw, 380px); }
}

@media(max-width: 991px){
  .home-hero-grid{
    grid-template-columns:1fr;
    gap:34px;
    min-height:auto;
    text-align:center;
  }
  .home-hero-copy{ order:1; }
  .home-hero-art{ order:2; min-height:360px; }
  .home-hero-description{ margin-inline:auto; }
  .home-hero-quick-icons{ justify-content:center; }
  .home-hero-note{ margin-inline:auto; }
  .home-hero-actions{ justify-content:center; }
  .home-hero-horse{ width:min(56vw, 380px); }
  .home-search-panel{ flex-wrap:wrap; }
  .home-search-field{ flex:1 1 45%; }
  .home-search-submit, .home-advanced-search{ flex:1 1 45%; }
}

@media(max-width: 767px){
  .home-stats-bar{ flex-wrap:wrap; }
  .home-stat{
    flex:1 1 50%;
    border-inline-start:0;
    border-bottom:1px solid var(--line);
  }
  .home-stat:nth-child(-n+2){ border-bottom:1px solid var(--line); }
  .home-stat:nth-child(odd){ border-inline-start:0; }
  .home-stat:nth-child(even){ border-inline-start:1px solid var(--line); }
  .home-stat:nth-last-child(-n+2){ border-bottom:0; }

  .home-feature-strip{ flex-direction:column; }
  .home-feature-strip-item{
    border-inline-start:0;
    border-bottom:1px solid var(--line);
  }
  .home-feature-strip-item:last-child{ border-bottom:0; }

  .home-trust-strip{ flex-direction:column; }
  .home-trust-strip-item{
    border-inline-start:0;
    border-bottom:1px solid var(--line);
  }
  .home-trust-strip-item:last-child{ border-bottom:0; }
}

@media(max-width: 640px){
  .home-hero-horse{ width:min(78vw, 340px); }
  .home-hero-quick-icons{ gap:16px; }
  .home-search-panel{ border-radius:16px; padding:8px; }
  .home-search-field,
  .home-search-submit, .home-advanced-search{ flex:1 1 100%; }
  .home-search-section{ margin-top:-18px; }
  .home-hero-actions{ flex-direction:column; align-items:stretch; }
  .home-btn{ justify-content:center; }
  .home-advanced-note{ position:static; opacity:1; transform:none; display:block; margin-top:8px; text-align:center; }
}

/* 12. Motion */
.home-hero-copy, .home-hero-art{
  opacity:0;
  transform:translateY(12px);
  animation: home-fade-up 620ms ease forwards;
}
.home-hero-art{ animation-delay:80ms; }
.home-hero-horse{ transform-origin:center bottom; animation: home-horse-in 700ms ease 120ms forwards; opacity:0; }

@keyframes home-fade-up{
  to{ opacity:1; transform:translateY(0); }
}
@keyframes home-horse-in{
  from{ opacity:0; transform:scale(.985); }
  to{ opacity:1; transform:scale(1); }
}

@media(prefers-reduced-motion: reduce){
  .home-hero-copy, .home-hero-art, .home-hero-horse{
    animation:none; opacity:1; transform:none;
  }
}

/* 14. WhatsApp floating button */
.home-whatsapp-fab{
  position:fixed;
  left:24px;
  bottom:24px;
  z-index:300;
  display:flex;
  align-items:center;
  justify-content:center;
  width:56px;
  height:56px;
  border-radius:50%;
  background:#25D366;
  color:#fff;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.home-whatsapp-fab svg{ width:29px; height:29px; }
.home-whatsapp-fab:hover{
  transform:translateY(-2px) scale(1.05);
  box-shadow: 0 26px 76px rgba(0,0,0,.3);
  color:#fff;
}
.home-whatsapp-fab:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:3px;
}
@media(max-width: 640px){
  .home-whatsapp-fab{
    left:16px;
    bottom:16px;
    width:52px;
    height:52px;
  }
  .home-whatsapp-fab svg{ width:27px; height:27px; }
}

/* 13. Accessibility */
.home-page a:focus-visible,
.home-page button:focus-visible,
.home-page select:focus-visible,
.home-page input:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:2px;
}
