
/* ══════════════════════════════════════════════
   NEWS PAGE v2  —  news.php redesign
   ══════════════════════════════════════════════ */

/* ── Breaking News Ticker ── */
.breaking-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 36px;
  background: rgba(200,16,46,.92);
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 10;
  backdrop-filter: blur(4px);
}
.breaking-label {
  flex-shrink: 0;
  padding: 0 14px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-left: 1px solid rgba(255,255,255,.3);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.breaking-track {
  flex: 1;
  overflow: hidden;
  height: 100%;
  display: flex;
  align-items: center;
}
.breaking-inner {
  display: flex;
  align-items: center;
  white-space: nowrap;
  /* RTL: يبدأ من اليمين ويتحرك للشمال — مدة 70 ثانية */
  animation: breakingScrollRTL 70s linear infinite;
  padding-left: 40px;
  direction: ltr; /* نبقي اتجاه التحريك LTR حتى يكون مضبوطاً */
}
/* نعكس ترتيب النصوص داخل السبان ليكون عربياً صحيحاً */
.breaking-inner a {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 0 16px;
  opacity: .95;
  transition: opacity .2s;
  direction: rtl;
  unicode-bidi: embed;
}
.breaking-inner a:hover { opacity: 1; text-decoration: underline; }
.breaking-sep { color: rgba(255,255,255,.45); font-size: 8px; padding: 0 4px; }
@keyframes breakingScrollRTL {
  /* يبدأ من اليمين (100%) ويمشي للشمال (-50% = نصف المحتوى المكرر) */
  0%   { transform: translateX(30%); }
  100% { transform: translateX(-50%); }
}

/* ── News Page Hero ── */
.news-page-hero {
  position: relative;
  background: var(--bg-leagues-bar) var(--hero-bg, none) no-repeat center/cover;
  padding-top: 36px;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.news-page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5,8,18,.5) 0%,
    rgba(5,8,18,.3) 40%,
    rgba(5,8,18,.92) 100%
  );
  z-index: 1;
}
.news-page-hero .container {
  position: relative;
  z-index: 2;
  padding: 24px var(--gap);
  width: 100%;
}
.news-page-hero__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: end;
}
@media (max-width: 900px) {
  .news-page-hero__grid { grid-template-columns: 1fr; }
  .nph-side { display: none; }
  .news-page-hero { min-height: 360px; }
}

.nph-main { display: block; text-decoration: none; color: #fff; position: relative; }
.nph-main__img { display: none; }
.nph-cat {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.nph-cat--small { font-size: 9px; padding: 2px 7px; margin-bottom: 0; }
.nph-main__title {
  font-size: clamp(20px, 2.8vw, 30px);
  font-weight: 900;
  line-height: 1.4;
  margin: 0 0 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.nph-main__excerpt {
  font-size: 14px;
  color: rgba(255,255,255,.8);
  line-height: 1.65;
  margin: 0 0 12px;
  max-width: 560px;
}
.nph-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(255,255,255,.75);
}
.nph-meta span { display: flex; align-items: center; gap: 4px; }
.nph-meta--sm { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 4px; }

.nph-side { display: flex; flex-direction: column; gap: 10px; }
.nph-side-card {
  display: flex;
  gap: 10px;
  background: rgba(5,8,18,.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.nph-side-card:hover { background: rgba(200,16,46,.3); border-color: rgba(255,255,255,.2); }
.nph-side-card__img { width: 90px; flex-shrink: 0; position: relative; overflow: hidden; }
.nph-side-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nph-side-card__placeholder {
  width: 100%;
  height: 70px;
  background: rgba(255,255,255,.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.nph-side-card__img .nph-cat { position: absolute; bottom: 4px; right: 4px; margin: 0; }
.nph-side-card__body {
  padding: 10px 10px 10px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}
.nph-side-card__title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── Filter Bar ── */
.news-filter-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 90;
  background: var(--bg-page);
  border-bottom: 2px solid var(--border);
  transition: box-shadow .2s;
}
.news-filter-bar.nfb--stuck { box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.news-filter-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 0 var(--gap);
  height: 44px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.news-filter-inner::-webkit-scrollbar { display: none; }
.nfb-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.nfb-tab:hover { color: var(--text-main); background: var(--bg-input); }
.nfb-tab--active { background: var(--accent); color: #fff !important; }
.nfb-count {
  background: rgba(255,255,255,.25);
  color: inherit;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}
.nfb-tab:not(.nfb-tab--active) .nfb-count { background: var(--bg-input); color: var(--text-muted); }

/* ── Section Header ── */
.news-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 12px;
  gap: 12px;
}
.news-section-head__inner { display: flex; align-items: center; gap: 10px; }
.news-section-head__icon { font-size: 20px; }
.news-section-head__title { font-size: 18px; font-weight: 900; margin: 0; color: var(--text-main); }
.news-section-head__count {
  font-size: 12px;
  background: var(--bg-input);
  color: var(--text-muted);
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.news-section-head__back { font-size: 13px; color: var(--accent); text-decoration: none; white-space: nowrap; }

/* ── Ad break inside grid ── */
.ng2-ad-break {
  grid-column: 1 / -1;
  margin: 4px 0;
}
.ng2-ad-break:empty { display: none; }

/* ── News Grid v2 ── */
.ng2-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding: 16px 0;
}
@media (max-width: 600px) {
  .ng2-grid { grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px 0; }
}
@media (max-width: 380px) {
  .ng2-grid { grid-template-columns: 1fr; }
}

.ng2-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  color: var(--text-main);
  text-decoration: none;
  transition: transform .22s, box-shadow .22s, border-color .22s;
  position: relative;
}
.ng2-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
  border-color: var(--accent);
}
.ng2-card:hover .ng2-card__title { color: var(--accent); }

.ng2-card__img {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  background: var(--bg-input);
}
.ng2-card__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.ng2-card:hover .ng2-card__img img { transform: scale(1.06); }
.ng2-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-muted);
}
.ng2-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,8,18,.45) 0%, transparent 60%);
  pointer-events: none;
}
.ng2-cat {
  position: absolute;
  top: 9px;
  right: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 12px;
  letter-spacing: .03em;
  z-index: 2;
}

.ng2-card__body { padding: 12px; }
.ng2-card__title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  margin: 0 0 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  color: var(--text-main);
  transition: color .2s;
}
.ng2-card__excerpt {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.ng2-card__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ng2-card__date,
.ng2-card__views,
.ng2-card__rt {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Empty */
.ng2-empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--text-muted); }
.ng2-empty__icon { font-size: 48px; margin-bottom: 12px; opacity: .5; }
.ng2-empty__text { font-size: 16px; margin-bottom: 12px; }
.ng2-empty__link { color: var(--accent); font-size: 13px; text-decoration: none; }

/* Load More */
.ng2-pagination { padding: 20px 0 30px; text-align: center; }
.ng2-load-more {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 13px 32px;
  border-radius: 30px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}
.ng2-load-more:hover { border-color: var(--accent); color: var(--accent); background: var(--bg-card); }
.ng2-load-more__icon { font-size: 18px; line-height: 1; }
.ng2-load-more__text { font-size: 13px; }
.ng2-load-more__count { font-size: 11px; opacity: .6; font-weight: 500; }

.ng2-progress-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; }
.ng2-progress-bar { width: 200px; height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; }
.ng2-progress-fill { height: 100%; background: var(--accent); border-radius: 4px; width: 0%; transition: width .4s ease; }
.ng2-progress-text { font-size: 13px; color: var(--text-muted); }
.ng2-all-loaded { font-size: 13px; color: var(--text-muted); padding: 10px; display: block; }

.ng2-classic-pages { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.ng2-page-btn {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-input);
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.ng2-page-btn:hover { border-color: var(--accent); color: var(--accent); }
.ng2-page-btn--active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── Sidebar Trending (with thumbnails) ── */
.sb-trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  text-decoration: none;
  transition: background .15s;
}
.sb-trending-item:hover { background: var(--bg-input); }
.sb-trending-item:last-child { border-bottom: none; }
.sb-trending-num {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sb-trending-num--top { background: var(--accent); color: #fff; }
.sb-trending-img {
  width: 52px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.sb-trending-body { flex: 1; min-width: 0; }
.sb-trending-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 4px;
}
.sb-trending-meta { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--text-muted); }
.sb-trending-cat { background: var(--bg-input); padding: 1px 6px; border-radius: 8px; font-weight: 600; }

/* ── Sidebar Category List ── */
.sb-cat-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-main);
  text-decoration: none;
  transition: background .15s, color .15s;
  gap: 6px;
}
.sb-cat-item:hover { background: var(--bg-input); }
.sb-cat-item--active { background: rgba(200,16,46,.12); color: var(--accent); font-weight: 700; }
.sb-cat-count {
  margin-right: auto;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-input);
  padding: 1px 8px;
  border-radius: 10px;
  color: var(--text-muted);
}
.sb-cat-item--active .sb-cat-count { background: var(--accent); color: #fff; }
