/* ═══ 📰 شريط الأخبار المتحرك ══════════════════════════════════════════ */
body.has-ticker{--ticker-h:42px}
body.has-ticker--bottom{--ticker-h:0px;padding-block-end:42px}
.news-ticker{
  position:fixed;top:var(--header-h);inset-inline:0;z-index:49;height:42px;overflow:hidden;
  background:linear-gradient(90deg,#16382A,#1B4B36 60%,#16382A);
  color:#fff;border-block-end:1px solid rgba(214,160,63,.35);
  box-shadow:0 6px 18px rgba(18,58,42,.18)
}
.news-ticker--bottom{top:auto;bottom:0;border-block-end:none;border-block-start:1px solid rgba(214,160,63,.35)}
.news-ticker__inner{
  display:flex;align-items:center;gap:0;height:100%;
  max-width:none;padding-inline:0
}
.news-ticker__label{
  flex:none;display:inline-flex;align-items:center;gap:7px;height:100%;text-decoration:none;
  padding-inline:16px;background:var(--gold);color:#1A1206;
  font-size:12.5px;font-weight:800;letter-spacing:.02em;white-space:nowrap
}
.news-ticker__label:hover,.news-ticker__label:focus-visible{filter:brightness(1.06);color:#1A1206}
/* 🔁 تثبيت المسار على الحافة اليسرى (ltr) حتى يبقى الشريط مغطّى في الاتجاهين:
   في RTL الطبيعي يلتصق المسار بالحافة اليمنى، فأي إزاحة لليسار تُفرغ النافذة
   (كان الشريط يظهر فارغاً عند اختيار الاتجاه «يمين»). */
.news-ticker__viewport{
  flex:1 1 auto;min-width:0;overflow:hidden;position:relative;height:100%;
  direction:ltr;
  mask-image:linear-gradient(to left,transparent,#000 24px,#000 calc(100% - 24px),transparent)
}
[dir="rtl"] .news-ticker__group,
[dir="rtl"] .news-ticker__item{direction:rtl}
[dir="ltr"] .news-ticker__group,
[dir="ltr"] .news-ticker__item{direction:ltr}
.news-ticker__track{
  display:flex;align-items:center;height:100%;width:max-content;direction:ltr;
  animation:tk-scroll var(--tk-dur,30s) linear infinite;will-change:transform
}
.news-ticker[data-dir="right"] .news-ticker__track{animation-direction:reverse}
/* الإيقاف عند مرور المؤشر فقط — كان :focus-within يُبقي الشريط متوقفاً بعد النقر
   على رابط خبر (يبقى التركيز داخل الشريط) فلا تعود الحركة أبداً. */
.news-ticker[data-pause="1"]:hover .news-ticker__track{animation-play-state:paused}
/* الإزاحة تُحسب بالجافاسكربت بعرض نسخة واحدة (--tk-shift) لضمان حلقة سلسة */
@keyframes tk-scroll{from{transform:translateX(0)}to{transform:translateX(var(--tk-shift, -50%))}}
.news-ticker__group{display:flex;align-items:center;flex:none}
.news-ticker__item{
  display:inline-flex;align-items:center;gap:8px;padding-inline:18px;
  font-size:13px;white-space:nowrap;color:rgba(255,255,255,.94)
}
.news-ticker__item a{color:#fff;font-weight:700}
.news-ticker__item a:hover{color:var(--gold-300)}
.news-ticker__item b{color:var(--gold-300);font-size:11px;font-weight:700}
.news-ticker__dot{width:6px;height:6px;border-radius:50%;background:var(--gold);flex:none}
.news-ticker__all{
  flex:none;height:100%;display:inline-flex;align-items:center;padding-inline:14px;
  font-size:12px;font-weight:800;color:var(--gold-300);white-space:nowrap;
  border-inline-start:1px solid rgba(255,255,255,.14)
}
.news-ticker__all:hover{color:#fff}
@media (prefers-reduced-motion:reduce){.news-ticker__track{animation:none}}

/* 📱 الموبايل: إخفاء زر «كل الأخبار» لتفريغ المساحة للأخبار المتحركة */
@media (max-width:620px){
  .news-ticker__all{display:none}
  .news-ticker__label{padding-inline:10px;font-size:11px;gap:5px}
  .news-ticker__item{font-size:12.5px;padding-inline:12px;gap:6px}
  .news-ticker__item b{font-size:10.5px}
}
@media (max-width:400px){
  .news-ticker__label{font-size:10px;padding-inline:8px}
}
