/* ============================================================
   Components — البطاقات والمكوّنات
   ============================================================ */

/* ===== Section Header (عنوان قسم أحمر) ===== */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-block: var(--sp-6) var(--sp-4);
}
.section-head__title {
  font-family: var(--font-head); font-weight: 800; font-size: var(--fs-xl);
  position: relative; padding-inline-start: var(--sp-3);
}
.section-head__title::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 50%;
  transform: translateY(-50%); width: 6px; height: 1.2em;
  background: var(--c-primary); border-radius: 3px;
}
.section-head__more { font-size: var(--fs-sm); color: var(--c-primary); font-weight: 700; }

/* ===== News Card ===== */
.card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { position: relative; aspect-ratio: 16/9; background: var(--c-surface-2); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__cat {
  position: absolute; inset-block-start: var(--sp-2); inset-inline-start: var(--sp-2);
  background: var(--c-primary); color: var(--c-on-primary);
  font-size: var(--fs-xs); font-weight: 700; padding: 2px var(--sp-2); border-radius: var(--radius-sm);
}
.card__body { padding: var(--sp-3) var(--sp-4) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.card__title { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-md); line-height: 1.5; }
.card:hover .card__title { color: var(--c-primary); }
.card__meta { margin-top: auto; font-size: var(--fs-xs); color: var(--c-muted); display: flex; gap: var(--sp-2); }

/* ===== Hero ===== */
.hero { display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--gap); margin-block: var(--sp-5); }
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; } }
.hero__main { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 360px; background: var(--c-surface-2); }
.hero__main img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero__overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--sp-6); gap: var(--sp-2);
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.35) 55%, transparent 100%);
}
.hero__cat { align-self: flex-start; background: var(--c-primary); color: #fff; font-size: var(--fs-xs); font-weight: 700; padding: 3px var(--sp-3); border-radius: var(--radius-sm); }
.hero__title { color: #fff; font-family: var(--font-head); font-weight: 800; font-size: var(--fs-hero); line-height: 1.35; }
.hero__meta { color: #d6dae6; font-size: var(--fs-sm); }

/* قائمة العناوين الساخنة المرقّمة */
.hotlist { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--sp-4); }
.hotlist__head { font-family: var(--font-head); font-weight: 800; color: var(--c-primary); margin-bottom: var(--sp-3); font-size: var(--fs-lg); }
.hotlist__item { display: flex; gap: var(--sp-3); padding-block: var(--sp-3); border-bottom: 1px solid var(--c-border); }
.hotlist__item:last-child { border-bottom: 0; }
.hotlist__num { color: var(--c-primary); font-weight: 800; font-size: var(--fs-lg); min-width: 1.5rem; text-align: center; }
.hotlist__title { font-size: var(--fs-sm); font-weight: 600; line-height: 1.5; }

/* ===== Breaking Strip ===== */
.breaking {
  display: flex; align-items: stretch; background: var(--c-surface);
  border: 1px solid var(--c-border); border-radius: var(--radius);
  overflow: hidden; margin-block: var(--sp-4); min-height: 48px;
}
.breaking__label {
  background: var(--c-primary); color: #fff; font-weight: 800; font-size: var(--fs-sm);
  display: flex; align-items: center; padding-inline: var(--sp-4); white-space: nowrap;
  position: relative;
}
.breaking__label::after { content: "●"; margin-inline-start: var(--sp-2); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.breaking__track { overflow: hidden; flex: 1; display: flex; align-items: center; }
.breaking__list { display: flex; gap: var(--sp-6); white-space: nowrap; padding-inline: var(--sp-4); animation: ticker-ltr 40s linear infinite; }
@media (hover: hover) and (pointer: fine) { .breaking__track:hover .breaking__list { animation-play-state: paused; } }
.breaking__list a { font-size: var(--fs-sm); font-weight: 600; }
.breaking__list a::before { content: "›"; color: var(--c-primary); margin-inline-end: var(--sp-2); font-weight: 800; }
@keyframes ticker-ltr { from { transform: translateX(50%); } to { transform: translateX(-50%); } }
@keyframes ticker-rtl { from { transform: translateX(-50%); } to { transform: translateX(50%); } }
[dir="rtl"] .breaking__list { animation-name: ticker-rtl; }

/* ===== Sidebar Widget ===== */
.widget { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--sp-4); margin-bottom: var(--sp-5); }
.widget__title { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-md); margin-bottom: var(--sp-3); padding-inline-start: var(--sp-3); position: relative; }
.widget__title::before { content: ""; position: absolute; inset-inline-start: 0; top: 50%; transform: translateY(-50%); width: 5px; height: 1em; background: var(--c-primary); border-radius: 3px; }
.rank-list__item { display: flex; gap: var(--sp-3); padding-block: var(--sp-3); border-bottom: 1px solid var(--c-border); }
.rank-list__item:last-child { border-bottom: 0; }
.rank-list__num { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-lg); color: var(--c-primary); min-width: 1.6rem; }
.rank-list__title { font-size: var(--fs-sm); font-weight: 600; line-height: 1.5; }
.rank-list__thumb { width: 64px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }

/* لوحة الترند السفلية */
.trend-panel { background: var(--c-bg-2); border: 1px solid var(--c-border); border-top: 3px solid var(--c-primary); border-radius: var(--radius); padding: var(--sp-5); margin-block: var(--sp-6); }

/* حالات */
.state { padding: var(--sp-6); text-align: center; color: var(--c-muted); border: 1px dashed var(--c-border); border-radius: var(--radius); }
.skeleton { background: linear-gradient(90deg, var(--c-surface) 25%, var(--c-surface-2) 50%, var(--c-surface) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-card { aspect-ratio: 16/9; }

/* مساحة إعلان (reserved height لمنع CLS) */
.ad-slot { background: var(--c-surface-2); border: 1px dashed var(--c-border); border-radius: var(--radius); display: grid; place-items: center; color: var(--c-muted); font-size: var(--fs-xs); margin-bottom: var(--sp-5); }
.ad-slot--side { min-height: 250px; }
.ad-slot--inline { min-height: 120px; margin-block: var(--sp-5); }

/* ===== المقال المفرد ===== */
.article { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--sp-6); }
.article__cat { display: inline-block; background: var(--c-primary); color: #fff; font-size: var(--fs-xs); font-weight: 700; padding: 3px var(--sp-3); border-radius: var(--radius-sm); margin-bottom: var(--sp-3); }
.article__title { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-2xl); line-height: 1.4; margin-bottom: var(--sp-3); }
.article__meta { color: var(--c-muted); font-size: var(--fs-sm); display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-4); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--c-border); }
.article__featured { border-radius: var(--radius); overflow: hidden; margin-bottom: var(--sp-5); }
.article__body { font-size: var(--fs-lg); line-height: 2; color: var(--c-text-2); }
.article__body p { margin-bottom: var(--sp-4); }
.article__body h2, .article__body h3 { color: var(--c-text); font-family: var(--font-head); margin-block: var(--sp-5) var(--sp-3); }
.article__body img { border-radius: var(--radius); margin-block: var(--sp-4); }

/* Breadcrumbs */
.crumbs { font-size: var(--fs-sm); color: var(--c-muted); margin-block: var(--sp-4); display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.crumbs a:hover { color: var(--c-primary); }
.crumbs span.sep { color: var(--c-border); }

/* ترقيم الصفحات */
.pagination { display: flex; gap: var(--sp-2); justify-content: center; margin-block: var(--sp-6); flex-wrap: wrap; }
.pagination a, .pagination span { padding: var(--sp-2) var(--sp-3); border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); font-size: var(--fs-sm); }
.pagination .current { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

.page-title { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-2xl); margin-block: var(--sp-6) var(--sp-2); padding-inline-start: var(--sp-3); border-inline-start: 6px solid var(--c-primary); }

/* ===== Topbar ===== */
.topbar { background: var(--c-bg-2); border-bottom: 1px solid var(--c-border); font-size: var(--fs-xs); }
.topbar__bar { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.topbar__social { display: flex; gap: var(--sp-2); }
.topbar__social a { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--c-surface); color: var(--c-text-2); font-weight: 700; font-size: 11px; }
.topbar__social a:hover { background: var(--c-primary); color: #fff; }
.topbar__date { color: var(--c-muted); }

/* ===== Category Block: list ===== */
.cat-list { display: grid; gap: var(--sp-2); }
.cat-list__item { display: flex; align-items: center; gap: var(--sp-3); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm); padding: var(--sp-2) var(--sp-3); }
.cat-list__item:hover { border-color: var(--c-primary); }
.cat-list__thumb { width: 72px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.cat-list__title { flex: 1; font-weight: 600; font-size: var(--fs-sm); }
.cat-list__meta { color: var(--c-muted); font-size: var(--fs-xs); white-space: nowrap; }

/* ===== Category Block: mixed ===== */
.cat-mixed { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--gap); }
.cat-mixed__lead { position: relative; min-height: 300px; border-radius: var(--radius); overflow: hidden; }
.cat-mixed__side { display: grid; gap: var(--sp-2); align-content: start; }
@media (max-width: 880px) { .cat-mixed { grid-template-columns: 1fr; } }

/* ===== Block engine shapes ===== */
.nblock { margin-block: var(--sp-5); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px){ .grid--4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .grid--4 { grid-template-columns: 1fr; } }

/* overlay cards */
.grid--overlay .ocard { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--c-surface-2); }
.grid--overlay .ocard img { width: 100%; height: 100%; object-fit: cover; }
.grid--overlay .ocard__t { position: absolute; inset-block-end: 0; inset-inline: 0; padding: var(--sp-4) var(--sp-3) var(--sp-3); color: #fff; font-weight: 700; font-size: var(--fs-sm); background: linear-gradient(to top, rgba(0,0,0,.9), transparent); }

/* simple list */
.nlist { display: grid; gap: var(--sp-1); }
.nlist li { border-bottom: 1px solid var(--c-border); }
.nlist li a { display: block; padding: var(--sp-2) 0; font-weight: 600; font-size: var(--fs-sm); }
.nlist li a::before { content: "‹"; color: var(--c-primary); margin-inline-end: var(--sp-2); font-weight: 800; }
.nlist li a:hover { color: var(--c-primary); }

/* horizontal slider/carousel */
.nslider { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--sp-2); }
.nslider__item { flex: 0 0 280px; scroll-snap-align: start; }
@media (max-width: 560px){ .nslider__item { flex-basis: 80%; } }

/* tall feature column */
.ntall { display: grid; gap: var(--sp-3); }
.ntall__lead { display: block; border-radius: var(--radius); overflow: hidden; position: relative; }
.ntall__lead img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.ntall__lead span, .ntall__row span { display: block; font-weight: 700; padding: var(--sp-2); font-size: var(--fs-sm); }
.ntall__lead span:first-of-type { position: absolute; inset-block-end: 0; inset-inline: 0; padding: var(--sp-4) var(--sp-3) var(--sp-3); background: linear-gradient(to top, rgba(0,0,0,.85), transparent); color: #fff !important; }
.ntall__row { display: flex; gap: var(--sp-2); align-items: center; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-sm); }
.ntall__row img { width: 80px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }

/* sections row */
.srow__col { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: var(--sp-3) var(--sp-4); }

/* ===== بلوكات بأعمدة (داخل البلوك نفسه) ===== */
.nblock--cols-2 > .grid { grid-template-columns: repeat(2,1fr); }
.nblock--cols-3 > .grid { grid-template-columns: repeat(3,1fr); }
.niframe { width:100%; }
@media (max-width:768px){
  .nblock--cols-2 > .grid, .nblock--cols-3 > .grid { grid-template-columns: 1fr; }
}

/* ===== عرض البلوك (أعمدة الصفحة جنبًا إلى جنب) ===== */
.nblocks { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: flex-start; }
.nblocks > .nblock { margin-block: 0; }
.nblock--w-full  { flex: 1 1 100%; }
.nblock--w-half  { flex: 1 1 calc(50% - var(--gap)); min-width: 0; }
.nblock--w-third { flex: 1 1 calc(33.333% - var(--gap)); min-width: 0; }
@media (max-width: 768px){
  .nblock--w-half, .nblock--w-third { flex-basis: 100%; }
}

/* ===== قواعد جهاز الويدجت (طبقة ثانية فوق الكشف الخادمي) ===== */
@media (max-width: 768px){ .nw-only-desktop { display: none !important; } }
@media (min-width: 769px){ .nw-only-mobile { display: none !important; } }
.nw-area { margin-block: var(--sp-4); }
.nw-area--header .nw, .nw-area--footer .nw { margin-block: var(--sp-2); }

/* ============================================================
   Sliders family (.nsl) — خفيفة وأنيقة، RTL، بلا مكتبات
   ============================================================ */
.nsl { position: relative; overflow: hidden; border-radius: var(--radius); }
.nsl__track { display: flex; transition: transform .55s cubic-bezier(.4,0,.2,1); will-change: transform; }
.nsl__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.55); color: #fff; font-size: 22px; line-height: 1;
  display: grid; place-items: center; transition: background .2s; backdrop-filter: blur(4px);
}
.nsl__nav:hover { background: var(--c-primary); }
.nsl__prev { inset-inline-start: 10px; }
.nsl__next { inset-inline-end: 10px; }
.nsl__dots { position: absolute; inset-block-end: 12px; inset-inline: 0; display: flex; gap: 7px; justify-content: center; z-index: 5; }
.nsl__dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; transition: .2s; }
.nsl__dots button.is-on { background: var(--c-primary); width: 22px; border-radius: 5px; }

/* hero slider */
.nsl--hero .nsl__slide { flex: 0 0 100%; position: relative; aspect-ratio: 16/7; background: var(--c-surface-2); display: block; }
.nsl--hero .nsl__slide img { width: 100%; height: 100%; object-fit: cover; }
.nsl__cap { position: absolute; inset-block-end: 0; inset-inline: 0; padding: var(--sp-6) var(--sp-5) var(--sp-5); background: linear-gradient(to top, rgba(0,0,0,.9), transparent); color: #fff; display: flex; flex-direction: column; gap: var(--sp-2); }
.nsl__cap strong { font-family: var(--font-head); font-size: clamp(1.1rem,2.5vw,1.8rem); font-weight: 800; line-height: 1.4; }
.nsl__chip { align-self: flex-start; background: var(--c-primary); color: #fff; font-size: var(--fs-xs); font-weight: 700; padding: 2px var(--sp-2); border-radius: var(--radius-sm); font-style: normal; }

/* cards slider */
.nsl--cards .nsl__cell { flex: 0 0 calc(100% / 3); padding-inline: calc(var(--gap) / 2); box-sizing: border-box; }
@media (max-width: 880px){ .nsl--cards .nsl__cell { flex-basis: 50%; } }
@media (max-width: 560px){ .nsl--cards .nsl__cell { flex-basis: 100%; } }

/* coverflow */
.nsl--coverflow { padding-block: var(--sp-4); }
.nsl--coverflow .nsl__cell { flex: 0 0 calc(100% / 3); padding-inline: var(--sp-2); box-sizing: border-box; transition: transform .45s, opacity .45s; opacity: .55; transform: scale(.82); }
.nsl--coverflow .nsl__cell.is-active { opacity: 1; transform: scale(1); }
.nsl__cf { display: block; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.nsl__cf img { width: 100%; height: 100%; object-fit: cover; }
.nsl__cf span { position: absolute; inset-block-end: 0; inset-inline: 0; padding: var(--sp-4) var(--sp-3) var(--sp-2); background: linear-gradient(to top, rgba(0,0,0,.85), transparent); color: #fff; font-weight: 700; font-size: var(--fs-sm); }
@media (max-width: 560px){ .nsl--coverflow .nsl__cell { flex-basis: 80%; } }

/* thumbs slider */
.nsl--thumbs .nsl__slide { flex: 0 0 100%; position: relative; aspect-ratio: 16/8; background: var(--c-surface-2); }
.nsl--thumbs .nsl__slide img { width: 100%; height: 100%; object-fit: cover; }
.nsl__thumbs { display: flex; gap: var(--sp-2); padding: var(--sp-2); background: var(--c-bg-2); overflow-x: auto; }
.nsl__thumb { flex: 0 0 84px; height: 56px; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; padding: 0; background: none; opacity: .6; transition: .2s; }
.nsl__thumb.is-on { border-color: var(--c-primary); opacity: 1; }
.nsl__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ticker */
.nsl--ticker { background: var(--c-surface); border: 1px solid var(--c-border); }
.nsl__ticker-track { display: flex; gap: var(--sp-6); white-space: nowrap; padding: var(--sp-3) var(--sp-4); animation: nslticker 18s linear infinite; }
@media (hover: hover) and (pointer: fine) { .nsl--ticker:hover .nsl__ticker-track { animation-play-state: paused; } }
.nsl__ticker-track a { font-weight: 600; font-size: var(--fs-sm); }
.nsl__ticker-track a::before { content: "•"; color: var(--c-primary); margin-inline-end: var(--sp-3); }
@keyframes nslticker { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* vertical */
.nsl--vertical { height: 280px; }
.nsl__vtrack { display: flex; flex-direction: column; transition: transform .5s ease; }
.nsl__vitem { display: flex; gap: var(--sp-2); align-items: center; padding: var(--sp-2); height: 70px; box-sizing: border-box; border-bottom: 1px solid var(--c-border); }
.nsl__vitem img { width: 70px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.nsl__vitem span { font-weight: 600; font-size: var(--fs-sm); line-height: 1.4; }

/* ============================================================
   تحسينات جمالية (تباين/خطوط/فراغات) — مطابقة أقرب للمرجع
   ============================================================ */
/* عناوين البطاقات أوضح وأثقل */
.card__title, .hotlist__title, .cat-list__title, .rank-list__title, .nlist li a { font-weight: 700; color: var(--c-text); }
.card__title { font-size: 1.02rem; line-height: 1.55; }
.card:hover .card__title, .cat-list__item:hover .cat-list__title, .nlist li a:hover { color: var(--c-primary); }

/* ترويسة الأقسام: خط أعرض + خلفية خفيفة */
.section-head { margin-block: var(--sp-4) var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 2px solid var(--c-border); }
.section-head__title { font-size: 1.35rem; font-weight: 800; letter-spacing: -.2px; }
.section-head__title::before { width: 5px; height: 1.05em; inset-inline-start: 0; }
.section-head__more { color: var(--c-primary); font-weight: 700; }

/* تقليل الفراغات بين البلوكات وضبط الإيقاع */
.nblock { margin-block: var(--sp-4); }
.nblocks { gap: 1.5rem 1.25rem; }
.layout { gap: var(--sp-5); margin-block: var(--sp-5); }

/* بطاقة أوضح حدودًا وظلًّا */
.card { border-color: var(--c-border); }
.card__media { background: #0e1219; }

/* قوائم بصور: ارتفاع متناسق ومحاذاة علوية */
.cat-list { align-content: start; }
.cat-list__item { padding: var(--sp-2); }
.cat-list__title { font-size: .92rem; line-height: 1.5; }

/* hotlist و rank-list: تباين أعلى للأرقام */
.hotlist__num, .rank-list__num { color: var(--c-primary); font-weight: 800; }
.hotlist__head { color: var(--c-text); border-inline-start: 4px solid var(--c-primary); padding-inline-start: var(--sp-2); }

/* ترويسة "أخبار ساخنة" الصفراء (كما في المرجع) */
.nblock--hero_split .hotlist .hotlist__head,
.hotlist--hot .hotlist__head { background: var(--c-accent); color: #1a1205; border-radius: var(--radius-sm) var(--radius-sm) 0 0; padding: var(--sp-2) var(--sp-3); border-inline-start: 0; margin: calc(-1*var(--sp-4)) calc(-1*var(--sp-4)) var(--sp-3); }

/* الهيرو: عنوان أكبر وأوضح */
.hero__title { font-size: clamp(1.5rem, 3vw, 2.3rem); text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.hero__overlay { background: linear-gradient(to top, rgba(0,0,0,.94) 0%, rgba(0,0,0,.4) 60%, transparent 100%); }

/* الهيدر: التنسيق الكامل (لوجو أكبر + أزرار Pill) موجود في base.css.
   لا نكرّره هنا حتى لا نُلغي تأثير :hover الخاص بالأزرار (نفس درجة التخصيص). */

/* إزالة الفراغ الزائد في الأعمدة الفارغة */
.nblock:empty { display: none; }
.layout__main > .nblocks > .nblock { align-self: flex-start; }


/* ===== زر مشاركة المقال (فوق قسم "اقرأ أيضًا") ===== */
.article__share {
  margin: var(--sp-6) 0;
  padding: var(--sp-4) var(--sp-4);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.article__share-label {
  font-weight: 800;
  color: var(--c-text);
  font-size: 1rem;
  white-space: nowrap;
}
.article__share-buttons {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--c-surface-2);
  color: var(--c-text);
  border: 3px solid var(--c-border);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  position: relative;
  flex-shrink: 0;
}
.share-btn svg { width: 40px; height: 40px; display: block; }
.share-btn:hover { transform: translateY(-3px); color: #fff; }
.share-btn--fb:hover { background: #1877f2; border-color: #1877f2; }
.share-btn--x:hover  { background: #000; border-color: #000; }
.share-btn--wa:hover { background: #25d366; border-color: #25d366; }
.share-btn--tg:hover { background: #229ed9; border-color: #229ed9; }
.share-btn--copy:hover { background: var(--c-primary); border-color: var(--c-primary); }
.share-btn__copied-msg {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--c-text);
  color: var(--c-bg);
  font-size: .78rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-sm, 6px);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 5;
}
.share-btn--copy.is-copied .share-btn__copied-msg {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 480px) {
  .article__share { gap: var(--sp-3); padding: var(--sp-3); }
  .share-btn { width: 84px; height: 84px; }
  .share-btn svg { width: 36px; height: 36px; }
}


/* ===== صفحة الكاتب (author.php) ===== */
.author-header {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-5);
  margin: var(--sp-5) 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.author-header__photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--c-primary);
  flex-shrink: 0;
}
.author-header__name {
  font-size: 1.4rem;
  color: var(--c-text);
  margin: 0 0 var(--sp-2);
}
.author-header__bio {
  color: var(--c-text-2);
  line-height: 1.8;
  margin: 0;
}
.article__meta a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.article__meta a:hover {
  color: var(--c-primary);
}

/* تعديل: صورة الكاتب دائرية بجانب الاسم والوظيفة */
.author-header {
        display: flex;
        align-items: center;
        gap: 20px;
        flex-direction: row;
}
.author-header__photo {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
}
.author-header__info {
        display: flex;
        flex-direction: column;
        justify-content: center;
}
.author-header__name {
        margin: 0 0 6px;
}
.author-header__bio {
        margin: 0;
}

/* تصميم جديد لصفحة الكاتب — كارت بروفايل بالصورة والاسم والعداد */
.author-header {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 28px 32px;
	background: rgba(255,255,255,0.03);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 16px;
	margin-bottom: 28px;
}
.author-header__avatar-wrap {
	flex-shrink: 0;
}
.author-header__photo {
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	border: 3px solid var(--c-primary);
}
.author-header__info {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.author-header__name {
	margin: 0;
	font-size: 1.6rem;
	font-weight: 800;
}
.author-header__bio {
	margin: 0;
	color: rgba(255,255,255,0.65);
	font-size: 0.95rem;
	line-height: 1.6;
}
.author-header__count {
	margin-top: 4px;
	display: inline-block;
	width: fit-content;
	font-size: 0.8rem;
	color: var(--c-accent);
	font-weight: 600;
}

/* شبكة 3 أعمدة لمقالات الكاتب */
.grid--3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
@media (max-width: 768px) {
	.author-header { flex-direction: column; text-align: center; }
	.grid--3 { grid-template-columns: 1fr; }
}

/* بايلاين المقال: صورة الكاتب + الاسم + التاريخ تحت العنوان */
.article__byline {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: var(--sp-4);
}
.article__byline-photo {
	width: 40px !important;
	height: 40px !important;
	max-width: 40px !important;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.article__byline-photo-link {
	display: inline-block;
	width: 40px;
	flex-shrink: 0;
}
.article__byline-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.article__byline-name {
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--c-text);
	text-decoration: none;
}
.article__byline-name:hover {
	color: var(--c-primary);
}
.article__byline-date {
	font-size: 0.78rem;
	color: var(--c-muted);
}

/* بايلاين المقال: صورة الكاتب + الاسم + التاريخ تحت العنوان */
.article__byline {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: var(--sp-4);
}
.article__byline-photo {
	width: 40px !important;
	height: 40px !important;
	max-width: 40px !important;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}
.article__byline-photo-link {
	display: inline-block;
	width: 40px;
	flex-shrink: 0;
}
.article__byline-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.article__byline-name {
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--c-text);
	text-decoration: none;
}
.article__byline-name:hover {
	color: var(--c-primary);
}
.article__byline-date {
	font-size: 0.78rem;
	color: var(--c-muted);
}

/* تحسين إمكانية الوصول: مساحات لمس كافية لروابط الفوتر */
.site-footer__grid a {
	display: inline-block;
	padding-block: 8px;
	min-height: 44px;
	line-height: 28px;
}

/* EGSharks Fix */
.section-head__title { color: var(--c-text); }


.section-head__title,.section-head__title *{color:#fff!important;}

.card__title,.cat-list__title,.rank-list__title{color:#fff!important;}
[data-theme="light"] .card__title,[data-theme="light"] .cat-list__title,[data-theme="light"] .rank-list__title{color:#14181f!important;}

.section-head__title{color:#fff!important;}
[data-theme="light"] .section-head__title{color:#fff!important;}

.ntall__lead,.ntall__lead span{color:#fff!important;}
[data-theme="light"] .ntall__lead,[data-theme="light"] .ntall__lead span{color:#14181f!important;}

.ntall__lead>span{position:absolute;inset-block-end:0;inset-inline:0;padding:var(--sp-4) var(--sp-3) var(--sp-3);background:linear-gradient(to top,rgba(0,0,0,.85),transparent);color:#fff!important;}
[data-theme="light"] .ntall__lead>span{color:#fff!important;}

.ntall__lead>span,.ntall__lead span{position:absolute;inset-block-end:0;inset-inline:0;padding:var(--sp-4) var(--sp-3) var(--sp-3);background:linear-gradient(to top,rgba(0,0,0,.88),transparent);color:#fff!important;font-weight:700;}
