/* =========================================================
   hero-map.css — أنماط خريطة الفروع في قسم البطل
   ملف مستقل: لا يعدّل style.css، ويُحمَّل بعده في index.html
   ========================================================= */
@media (min-width: 901px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; }
}

/* خريطة فروع المملكة في البطل (تُرسم من js/hero-map.js) */
.hero-visual {
  position: relative;
  /* تمتد الخريطة لحافة الشاشة (الجهة اليسرى) لتملأ المساحة الفاضية بجانب الحاوية */
  margin-inline-end: calc((min(92vw, 1180px) - 100vw) / 2 + 16px);
}
.sa-map {
  --sa-bg:     var(--c-asphalt);   /* خلفية البطل: تُستخدم لإطار أسماء الفروع في البحر */
  --sa-land:   var(--c-asphalt-2); /* لون اليابسة */
  --sa-edge:   #9A7658;            /* حدود المملكة */
  --sa-text:   var(--c-paper-2);   /* أسماء الفروع */
  --sa-strong: var(--c-paper);
  --sa-hub:    #E8763F;            /* مركز الرياض */
  --fs: 14.5px;                    /* حجم أسماء الفروع الفعلي بالبكسل */
  --fs-hub: 17px;
  width: 100%;
}
.sa-map__head { display: flex; align-items: center; gap: 10px; min-height: 28px; margin-bottom: 6px; }
.sa-map__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c-paper); flex: none; }
.sa-map__title { font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; color: var(--c-paper); }
.sa-map__count { font-size: 0.86rem; color: rgba(250,246,241,0.68); }
.sa-map__svg { display: block; width: 100%; height: auto; max-height: min(88vh, 940px); overflow: visible; direction: ltr; } /* ltr: عشان محاذاة الأسماء (start/end) تشتغل صح داخل صفحة RTL */
.sa-map__land { fill: var(--sa-land); stroke: var(--sa-edge); stroke-width: 1.6; stroke-linejoin: round; }
.sa-map__lb {
  font-size: calc(var(--fs) / var(--sa-k, 1)); fill: var(--sa-text); font-family: inherit;
  paint-order: stroke; stroke: var(--sa-land); stroke-width: calc(4px / var(--sa-k, 1)); stroke-linejoin: round;
}
.sa-map__lb--sea { stroke: var(--sa-bg); }
.sa-map__hb {
  font-size: calc(var(--fs-hub) / var(--sa-k, 1)); font-weight: 600; fill: var(--sa-strong); font-family: inherit;
  paint-order: stroke; stroke: var(--sa-land); stroke-width: calc(4px / var(--sa-k, 1)); stroke-linejoin: round;
}
.sa-map__dash { stroke-dasharray: 6 6; animation: sa-flow 1.4s linear infinite; }
@keyframes sa-flow { to { stroke-dashoffset: -24; } }
.sa-map__pulse { transform-box: fill-box; transform-origin: center; animation: sa-ping 2.2s ease-out infinite; }
@keyframes sa-ping { from { transform: scale(1); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }
.sa-map [data-r] { transition: opacity .35s; }
.sa-map .sa-off { opacity: 0 !important; pointer-events: none; }

.sa-map__chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.sa-map__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid rgba(250,246,241,0.24); background: transparent;
  color: var(--c-paper); font: 500 0.8rem var(--f-body); cursor: pointer;
  transition: background .2s, border-color .2s;
}
.sa-map__chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--k); flex: none; }
.sa-map__chip:hover { border-color: var(--k); }
.sa-map__chip[aria-pressed="true"] {
  border-color: var(--k);
  background: rgba(250,246,241,0.10);
  box-shadow: inset 0 0 0 1px var(--k);
}
.sa-map__chip:focus-visible { outline: 2px solid var(--c-paper); outline-offset: 2px; }

/* الشاشات الكبيرة: أزرار المناطق فوق المساحة الفاضية أسفل يسار الخريطة (على البحر الأحمر) */
@media (min-width: 1500px) {
  .sa-map { position: relative; }
  .sa-map__chips { position: absolute; left: 0; bottom: 0; margin-top: 0; flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .sa-map__dash, .sa-map__pulse { animation: none; }
  .sa-map [data-r] { transition: none; }
}

/* الجوال: الخريطة بعرض الشاشة، فنصغّر الأسماء قليلًا ونستخدم ترتيبًا مخصوصًا للفروع */
@media (max-width: 900px) {
  .hero-visual { margin-inline-end: 0; }
}
@media (max-width: 640px) {
  .sa-map { --fs: 11px; --fs-hub: 13px; }
}
@media (max-width: 380px) {
  .sa-map { --fs: 10px; --fs-hub: 12px; }
}
