/* =====================================================================
   Yemen News Pro — Design System (RTL-first)
   نظام تصميم احترافي للأخبار العربية | متجاوب وسريع
   ===================================================================== */

/* ---------- 1. Design Tokens ---------- */
:root{
  /* Brand */
  --brand:#c8102e;            /* أحمر تحريري */
  --brand-700:#9c0c23;
  --brand-50:#fbe9ec;
  --accent:#0a6e63;           /* تركواز ثانوي للروابط/الوسوم */

  /* Ink & Surfaces (Light) */
  --ink:#15171a;
  --ink-2:#3a3f46;
  --ink-3:#6b7280;
  --line:#e6e8eb;
  --line-2:#f0f2f4;
  --bg:#ffffff;
  --bg-soft:#f6f7f9;
  --bg-card:#ffffff;

  /* Feedback */
  --live:#e11d2a;
  --ok:#0a8f4f;

  /* Type */
  --font-body:"Tajawal","Segoe UI",system-ui,Arial,sans-serif;
  --font-head:"Cairo","Tajawal",system-ui,Arial,sans-serif;

  --fs-xs:.78rem;
  --fs-sm:.86rem;
  --fs-base:1rem;
  --fs-md:1.08rem;
  --fs-lg:1.25rem;
  --fs-xl:1.6rem;
  --fs-2xl:2.1rem;
  --fs-3xl:2.7rem;
  --lh-tight:1.28;
  --lh:1.85;

  /* Space & Shape */
  --container:1240px;
  --gap:24px;
  --radius:14px;
  --radius-sm:9px;
  --shadow-sm:0 1px 2px rgba(16,20,28,.06),0 1px 3px rgba(16,20,28,.05);
  --shadow:0 6px 24px rgba(16,20,28,.08);
  --shadow-lg:0 18px 50px rgba(16,20,28,.14);

  --header-h:66px;
  --ease:cubic-bezier(.4,0,.2,1);
}

/* ---------- 2. Dark Mode ---------- */
html[data-theme="dark"]{
  --ink:#e8eaed;
  --ink-2:#b9bfc7;
  --ink-3:#8a9099;
  --line:#262a30;
  --line-2:#1d2126;
  --bg:#0f1115;
  --bg-soft:#161a20;
  --bg-card:#161a20;
  --brand-50:#2a1418;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow:0 6px 24px rgba(0,0,0,.45);
  --shadow-lg:0 18px 50px rgba(0,0,0,.55);
  color-scheme:dark;
}

/* ---------- 3. Reset & Base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important}}
body{
  margin:0;direction:rtl;text-align:right;
  font-family:var(--font-body);font-size:var(--fs-base);line-height:var(--lh);
  color:var(--ink);background:var(--bg);
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
img,svg,video{max-width:100%;height:auto;display:block}
img{background:var(--line-2)} /* يمنع قفزة CLS قبل التحميل */
a{color:inherit;text-decoration:none;transition:color .15s var(--ease)}
a:hover{color:var(--brand)}
h1,h2,h3,h4{font-family:var(--font-head);line-height:var(--lh-tight);margin:0;font-weight:800}
p{margin:0 0 1.15em}
ul,ol{margin:0;padding:0}
button{font-family:inherit;cursor:pointer}
:focus-visible{outline:3px solid var(--brand);outline-offset:2px;border-radius:4px}
.container{max-width:var(--container);margin-inline:auto;padding-inline:18px}
.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- 4. Header ---------- */
.site-top{background:var(--bg);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:90;
  backdrop-filter:saturate(120%) blur(6px)}
.topbar{display:flex;align-items:center;justify-content:space-between;height:var(--header-h);gap:18px}
.brand{display:flex;align-items:center;gap:10px;flex-shrink:0}
.brand .logo{font-family:var(--font-head);font-weight:800;font-size:1.5rem;color:var(--ink);letter-spacing:-.5px;white-space:nowrap}
.brand .logo b{color:var(--brand)}
.brand .custom-logo-link{display:inline-flex;align-items:center;line-height:0}
/* احتياطي إضافي فوق القيد الـ inline */
.site-top .brand img,.site-top .brand .custom-logo{max-height:var(--logo-h,42px);width:auto;object-fit:contain}
/* تبديل لوجو الوضع الفاتح/الداكن */
.logo-dark{display:none}
html[data-theme="dark"] .logo-light{display:none}
html[data-theme="dark"] .logo-dark{display:inline-block}
/* هيدر بلوجو في المنتصف */
.ynp-header-centered .topbar{flex-direction:column;height:auto;gap:6px;padding-block:10px}
.ynp-header-centered .brand{max-width:none;justify-content:center}
.ynp-header-centered .nav-main{justify-content:center;flex:none;width:100%}
.ynp-header-centered .top-actions{position:absolute;inset-inline-start:18px;top:14px}
.ynp-header-centered{position:relative}
.nav-main{display:flex;align-items:center;gap:4px;flex:1;overflow:hidden}
.nav-main a{padding:9px 13px;border-radius:8px;font-weight:600;font-size:.95rem;white-space:nowrap;color:var(--ink-2)}
.nav-main a:hover,.nav-main a.active{background:var(--brand-50);color:var(--brand)}
.top-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
.icon-btn{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;border:1px solid var(--line);
  background:var(--bg-soft);color:var(--ink-2)}
.icon-btn:hover{border-color:var(--brand);color:var(--brand)}
.menu-toggle{display:none}

/* Mobile drawer */
.drawer-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.5);opacity:0;visibility:hidden;
  transition:.25s var(--ease);z-index:120}
.drawer{position:fixed;top:0;right:-320px;width:300px;max-width:85vw;height:100%;background:var(--bg);
  z-index:130;transition:right .3s var(--ease);box-shadow:var(--shadow-lg);padding:18px;overflow-y:auto}
body.drawer-open .drawer{right:0}
body.drawer-open .drawer-backdrop{opacity:1;visibility:visible}
.drawer a{display:block;padding:12px 10px;border-radius:8px;font-weight:600;border-bottom:1px solid var(--line-2)}
.drawer a:hover{background:var(--brand-50);color:var(--brand)}

/* ---------- 5. Breaking-news ticker ---------- */
.breaking{display:flex;align-items:stretch;background:var(--ink);color:#fff;border-radius:var(--radius-sm);
  overflow:hidden;margin:16px 0;box-shadow:var(--shadow-sm)}
.breaking .label{display:flex;align-items:center;gap:8px;background:var(--brand);padding:0 16px;font-weight:800;
  font-size:.9rem;white-space:nowrap;flex-shrink:0}
.breaking .label .dot{width:8px;height:8px;border-radius:50%;background:#fff;animation:pulse 1.4s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.25}}
.breaking .track{display:flex;align-items:center;gap:42px;padding:11px 16px;white-space:nowrap;
  animation:ticker 38s linear infinite;will-change:transform}
.breaking:hover .track{animation-play-state:paused}
.breaking .track a{color:#fff;font-weight:600;font-size:.92rem}
.breaking .track a::before{content:"•";color:var(--brand);margin-left:14px}
@keyframes ticker{from{transform:translateX(-0%)}to{transform:translateX(100%)}}

/* ---------- 6. Layout grids ---------- */
.layout{display:grid;grid-template-columns:1fr 320px;gap:34px;margin:24px 0 40px}
@media(max-width:980px){.layout{grid-template-columns:1fr}}
.section-head{display:flex;align-items:center;justify-content:space-between;margin:30px 0 16px}
.section-head h2{font-size:var(--fs-xl);position:relative;padding-right:16px}
.section-head h2::before{content:"";position:absolute;right:0;top:50%;transform:translateY(-50%);
  width:5px;height:1.05em;background:var(--brand);border-radius:3px}
.section-head .more{font-size:.85rem;font-weight:700;color:var(--brand)}

/* ---------- 7. Cards ---------- */
.cards{display:grid;gap:var(--gap)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}
@media(max-width:760px){.grid-3,.grid-4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:480px){.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}}

.card{background:var(--bg-card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;
  display:flex;flex-direction:column;transition:transform .2s var(--ease),box-shadow .2s var(--ease),border-color .2s}
.card:hover{transform:translateY(-3px);box-shadow:var(--shadow);border-color:transparent}
.card .thumb{position:relative;aspect-ratio:16/9;overflow:hidden;background:var(--line-2);display:block}
.card .thumb img{width:100%;height:100%;object-fit:cover;object-position:center;transition:transform .4s var(--ease)}
.card:hover .thumb img{transform:scale(1.05)}
/* بديل موحّد عند غياب الصورة البارزة (يمنع البطاقات المكسورة) */
.card .thumb.is-empty{background:
  linear-gradient(135deg,var(--brand) 0%,var(--brand-700) 100%)}
.card .thumb.is-empty::after{content:attr(data-letter);position:absolute;inset:0;display:grid;place-items:center;
  font-family:var(--font-head);font-weight:800;font-size:2.4rem;color:rgba(255,255,255,.9)}
.card .cat{position:absolute;top:10px;right:10px;background:var(--brand);color:#fff;font-size:.72rem;
  font-weight:700;padding:4px 10px;border-radius:6px}
.card .body{padding:14px 15px 16px;display:flex;flex-direction:column;gap:8px;flex:1}
.card .body h3{font-size:1.05rem;line-height:1.4}
.card .body h3 a{display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.card .meta{margin-top:auto;display:flex;align-items:center;gap:10px;font-size:var(--fs-xs);color:var(--ink-3)}
.card .meta time::before{content:"🕐 ";opacity:.6}

/* Hero / featured */
.hero{display:grid;grid-template-columns:1.65fr 1fr;gap:var(--gap)}
@media(max-width:760px){.hero{grid-template-columns:1fr}}
.hero-main{position:relative;border-radius:var(--radius);overflow:hidden;aspect-ratio:16/10;min-height:300px}
.hero-main img{width:100%;height:100%;object-fit:cover}
.hero-main .overlay{position:absolute;inset:0;background:linear-gradient(0deg,rgba(8,10,14,.92) 0%,rgba(8,10,14,.15) 55%,transparent)}
.hero-main .caption{position:absolute;inset-block-end:0;padding:26px;color:#fff}
.hero-main .cat{display:inline-block;background:var(--brand);font-size:.74rem;font-weight:800;padding:5px 12px;
  border-radius:7px;margin-bottom:12px}
.hero-main h2{color:#fff;font-size:clamp(1.4rem,3.2vw,2.05rem);line-height:1.3}
.hero-side{display:grid;gap:14px;grid-template-rows:repeat(3,1fr)}
.hero-side .mini{display:grid;grid-template-columns:118px 1fr;gap:12px;background:var(--bg-card);
  border:1px solid var(--line);border-radius:var(--radius-sm);overflow:hidden;transition:.2s var(--ease)}
.hero-side .mini:hover{box-shadow:var(--shadow);transform:translateY(-2px)}
.hero-side .mini .t{aspect-ratio:1/1}
.hero-side .mini .t img{width:100%;height:100%;object-fit:cover}
.hero-side .mini .x{padding:11px 12px 11px 0;align-self:center}
.hero-side .mini h4{font-size:.95rem;line-height:1.45;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}

/* List item (category lists) */
.post-row{display:grid;grid-template-columns:200px 1fr;gap:18px;padding:18px 0;border-bottom:1px solid var(--line)}
@media(max-width:560px){.post-row{grid-template-columns:130px 1fr;gap:13px}}
.post-row .t{border-radius:var(--radius-sm);overflow:hidden;aspect-ratio:16/10;background:var(--line-2);display:block}
.post-row .t img{width:100%;height:100%;object-fit:cover;object-position:center}
.post-row .t.is-empty{background:linear-gradient(135deg,var(--brand),var(--brand-700))}
.post-row .t.is-empty::after{content:attr(data-letter);position:absolute;inset:0;display:grid;place-items:center;
  font-family:var(--font-head);font-weight:800;font-size:1.8rem;color:rgba(255,255,255,.9)}
.post-row .t.is-empty{position:relative}
.post-row h3{font-size:1.2rem;margin-bottom:8px;line-height:1.4}
@media(max-width:560px){.post-row h3{font-size:1rem}}
.post-row .excerpt{color:var(--ink-2);font-size:.92rem;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:8px}
.post-row .meta{font-size:var(--fs-xs);color:var(--ink-3);display:flex;gap:12px}

/* ---------- 8. Sidebar widgets ---------- */
.widget{background:var(--bg-card);border:1px solid var(--line);border-radius:var(--radius);padding:18px;margin-bottom:22px}
.widget-title{font-size:1.05rem;font-weight:800;margin-bottom:14px;padding-bottom:10px;border-bottom:2px solid var(--brand);display:inline-block}
.ranked{list-style:none}
.ranked li{display:flex;gap:13px;padding:11px 0;border-bottom:1px solid var(--line-2)}
.ranked li:last-child{border-bottom:0}
.ranked .num{font-family:var(--font-head);font-weight:800;font-size:1.5rem;color:var(--brand);width:30px;flex-shrink:0;text-align:center;opacity:.85}
.ranked a{font-weight:600;font-size:.94rem;line-height:1.5}
.tags-cloud{display:flex;flex-wrap:wrap;gap:8px}
.tags-cloud a{background:var(--bg-soft);border:1px solid var(--line);padding:6px 12px;border-radius:20px;
  font-size:.82rem;font-weight:600;color:var(--ink-2)}
.tags-cloud a:hover{background:var(--brand);color:#fff;border-color:var(--brand)}

/* ---------- 9. Single article ---------- */
.article-head{max-width:760px;margin:30px auto 0}
.article-head .crumb{font-size:.82rem;color:var(--ink-3);margin-bottom:14px}
.article-head .crumb a{color:var(--brand);font-weight:600}
.article-head h1{font-size:clamp(1.7rem,4.5vw,2.55rem);line-height:1.28;margin-bottom:16px}
.article-head .standfirst{font-size:1.15rem;color:var(--ink-2);line-height:1.7;margin-bottom:20px;font-weight:500}
.byline{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 0;border-block:1px solid var(--line);margin-bottom:22px}
.byline .avatar{width:46px;height:46px;border-radius:50%;object-fit:cover;background:var(--line)}
.byline .who{font-weight:700}
.byline .who small{display:block;font-weight:400;color:var(--ink-3);font-size:.8rem}
.byline .share{margin-inline-start:auto;display:flex;gap:8px}
.byline .share a{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:var(--bg-soft);
  border:1px solid var(--line);color:var(--ink-2)}
.byline .share a:hover{background:var(--brand);color:#fff;border-color:var(--brand)}

.featured-media{max-width:920px;margin:0 auto 8px;border-radius:var(--radius);overflow:hidden}
.featured-media img{width:100%}
.featured-media figcaption{font-size:.82rem;color:var(--ink-3);padding:8px 4px;text-align:center}
.featured-media .media-caption{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;
  background:var(--bg-soft);border:1px solid var(--line);border-top:0;padding:8px 14px;text-align:right}
.featured-media .media-caption .src{font-weight:700;color:var(--ink-2);white-space:nowrap}

.article-body{max-width:760px;margin:26px auto 0;font-size:var(--fs-md);line-height:var(--lh)}
.article-body p{margin-bottom:1.3em}
.article-body h2{font-size:1.55rem;margin:1.6em 0 .6em}
.article-body h3{font-size:1.28rem;margin:1.4em 0 .5em}
.article-body a{color:var(--accent);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.article-body img{border-radius:var(--radius-sm);margin:1.5em 0}
.article-body blockquote{margin:1.6em 0;padding:16px 22px;border-right:4px solid var(--brand);background:var(--bg-soft);
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;font-size:1.1rem;font-weight:500}
.article-body ul,.article-body ol{margin:0 0 1.3em;padding-right:1.4em}
.article-body li{margin-bottom:.5em}

/* In-content ad slot */
.ad-slot{margin:26px auto;max-width:760px;text-align:center;min-height:90px;display:grid;place-items:center;
  background:var(--bg-soft);border:1px dashed var(--line);border-radius:var(--radius-sm);color:var(--ink-3);font-size:.8rem}
.ad-slot.filled{background:transparent;border:0;min-height:0}

/* Source attribution box (مشروع، يظهر/يختفي من اللوحة) */
.source-box{max-width:760px;margin:24px auto;padding:14px 18px;background:var(--bg-soft);border:1px solid var(--line);
  border-radius:var(--radius-sm);font-size:.9rem;color:var(--ink-2)}
.source-box b{color:var(--ink)}
.source-box a{color:var(--brand);font-weight:700}

/* Tags row + related */
.article-tags{max-width:760px;margin:26px auto 0;display:flex;flex-wrap:wrap;gap:8px}
.related{margin-top:40px}

/* ---------- 10. Footer ---------- */
.site-foot{background:var(--ink);color:#cfd4da;margin-top:50px;padding:46px 0 0}
html[data-theme="dark"] .site-foot{background:#0a0c10;border-top:1px solid var(--line)}
.foot-grid{display:grid;grid-template-columns:1.4fr repeat(3,1fr);gap:30px}
@media(max-width:760px){.foot-grid{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.foot-grid{grid-template-columns:1fr}}
.foot-grid h4{color:#fff;font-size:1rem;margin-bottom:14px}
.foot-grid a{color:#cfd4da;display:block;padding:5px 0;font-size:.9rem}
.foot-grid a:hover{color:#fff}
.foot-brand .logo{font-family:var(--font-head);font-weight:800;font-size:1.6rem;color:#fff}
.foot-brand p{font-size:.88rem;line-height:1.8;margin-top:10px;color:#aab1b9}
.foot-bottom{border-top:1px solid rgba(255,255,255,.1);margin-top:34px;padding:18px 0;text-align:center;
  font-size:.82rem;color:#8c939b}

/* ---------- 11. Pagination & misc ---------- */
.pagination{display:flex;gap:8px;justify-content:center;margin:36px 0;flex-wrap:wrap}
.pagination a,.pagination span{min-width:42px;height:42px;display:grid;place-items:center;border-radius:10px;
  border:1px solid var(--line);font-weight:700;background:var(--bg-card)}
.pagination .current{background:var(--brand);color:#fff;border-color:var(--brand)}
.pagination a:hover{border-color:var(--brand);color:var(--brand)}

/* Back to top */
.to-top{position:fixed;inset-block-end:22px;inset-inline-start:22px;width:46px;height:46px;border-radius:50%;
  background:var(--brand);color:#fff;display:grid;place-items:center;box-shadow:var(--shadow);border:0;
  opacity:0;visibility:hidden;transform:translateY(12px);transition:.25s var(--ease);z-index:80}
.to-top.show{opacity:1;visibility:visible;transform:none}

/* Reading progress */
.read-progress{position:fixed;top:0;right:0;height:3px;background:var(--brand);width:0;z-index:100;transition:width .1s linear}

/* Performance: defer offscreen long lists only (تقدير ارتفاع صغير لتفادي فجوات بيضاء) */
.cv-auto{content-visibility:auto;contain-intrinsic-size:auto 320px}

/* ---------- 13. Load More ---------- */
.load-more-wrap{text-align:center;margin:34px 0}
.load-more{display:inline-flex;align-items:center;gap:9px;padding:13px 34px;border-radius:30px;border:0;
  background:var(--brand);color:#fff;font-weight:700;font-size:1rem;font-family:var(--font-head);
  box-shadow:var(--shadow);transition:.2s var(--ease)}
.load-more:hover{background:var(--brand-700);transform:translateY(-2px)}
.load-more:disabled{opacity:.55;cursor:default;transform:none}
.load-more .spin{width:16px;height:16px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;
  border-radius:50%;animation:spin .7s linear infinite;display:none}
.load-more.loading .spin{display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- 14. Comments ---------- */
.ynp-comments{max-width:760px;margin:34px auto 0}
.ynp-comments .comments-title{font-size:1.4rem;margin-bottom:18px;padding-bottom:10px;border-bottom:2px solid var(--brand);display:inline-block}
.ynp-comments .comment-list{list-style:none}
.ynp-comments .comment-body{background:var(--bg-card);border:1px solid var(--line);border-radius:var(--radius);
  padding:16px 18px;margin-bottom:14px}
.ynp-comments .comment-author{display:flex;align-items:center;gap:10px;font-weight:700;margin-bottom:8px}
.ynp-comments .comment-author img{width:40px;height:40px;border-radius:50%}
.ynp-comments .comment-meta{font-size:.8rem;color:var(--ink-3)}
.ynp-comments .children{list-style:none;margin-inline-start:24px;border-inline-start:2px solid var(--line);padding-inline-start:16px}
.ynp-comments .comment-form{background:var(--bg-card);border:1px solid var(--line);border-radius:var(--radius);padding:20px;margin-top:20px}
.ynp-comments .comment-form input,.ynp-comments .comment-form textarea{width:100%;padding:12px 14px;border:1px solid var(--line);
  border-radius:10px;background:var(--bg);color:var(--ink);font-family:inherit;font-size:1rem;margin-bottom:14px}
.ynp-comments .comment-form .submit{background:var(--brand);color:#fff;border:0;padding:12px 30px;border-radius:10px;
  font-weight:700;cursor:pointer;width:auto}
.comments-closed{max-width:760px;margin:24px auto;text-align:center;color:var(--ink-3);font-size:.92rem}

/* ---------- 15. Author box / E-E-A-T ---------- */
.author-box{max-width:760px;margin:30px auto 0;display:flex;gap:18px;align-items:flex-start;
  background:var(--bg-soft);border:1px solid var(--line);border-radius:var(--radius);padding:20px}
.author-box .author-avatar img,.author-avatar img{width:72px;height:72px;border-radius:50%;object-fit:cover;background:var(--line);flex-shrink:0}
.author-name{font-family:var(--font-head);font-weight:800;font-size:1.15rem;color:var(--ink)}
.author-role{display:block;font-size:.85rem;color:var(--brand);font-weight:700;margin-top:2px}
.author-bio{margin:.6em 0 .4em;font-size:.94rem;color:var(--ink-2);line-height:1.7}
.author-social{display:flex;gap:8px;margin-top:6px}
.author-social a{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;background:var(--bg-card);
  border:1px solid var(--line);color:var(--ink-2);font-weight:700}
.author-social a:hover{background:var(--brand);color:#fff;border-color:var(--brand)}

.author-header{display:flex;gap:22px;align-items:center;background:var(--bg-soft);border:1px solid var(--line);
  border-radius:var(--radius);padding:26px;margin:24px 0}
.author-header h1{font-size:1.7rem}
.author-avatar-lg img{width:96px;height:96px;border-radius:50%;object-fit:cover;background:var(--line)}
@media(max-width:560px){.author-header{flex-direction:column;text-align:center;align-items:center}}

/* ---------- 16. Mobile hardening ---------- */
@media(max-width:768px){
  :root{--gap:16px}
  .container{padding-inline:14px}
  .hero{gap:14px}
  .hero-side{grid-template-rows:none;gap:12px}
  .layout{gap:24px;margin:18px 0 30px}
  .section-head{margin:24px 0 14px}
  .section-head h2{font-size:1.35rem}
  .article-body{font-size:1.05rem}
}
@media(max-width:600px){
  body{font-size:.97rem}
  .breaking .label{padding:0 12px;font-size:.82rem}
  .breaking .track a{font-size:.85rem}
  .hero-main{min-height:220px;aspect-ratio:16/11}
  .hero-main .caption{padding:16px}
  .hero-main h2{font-size:1.2rem}
  .hero-side .mini{grid-template-columns:104px 1fr}
  .card .body h3{font-size:.98rem}
  .article-head h1{font-size:1.5rem}
  .article-head .standfirst{font-size:1.02rem}
  .byline{gap:8px}
  .byline .share{margin-inline-start:0;width:100%;justify-content:flex-start}
  .featured-media .media-caption{flex-direction:column;gap:4px}
  .author-box{flex-direction:column;text-align:center;align-items:center}
  .author-social{justify-content:center}
  .related .grid-4{grid-template-columns:1fr 1fr}
  .foot-grid{gap:22px}
  .article-body img,.article-body iframe,.article-body table,.wp-block-embed{max-width:100%!important;height:auto}
  .article-body pre{overflow-x:auto}
}
@media(max-width:380px){
  .grid-4,.related .grid-4{grid-template-columns:1fr}
  .hero-side .mini{grid-template-columns:88px 1fr}
}

/* مصدر/إسناد المقال (نقلاً عن) */
.source-credit{max-width:760px;margin:22px auto;padding:16px 18px;background:var(--bg-soft);
  border:1px solid var(--line);border-radius:var(--radius);border-inline-start:4px solid var(--brand)}
.source-credit .label{font-size:.78rem;font-weight:700;color:var(--brand);letter-spacing:.5px}
.source-credit .name{font-family:var(--font-head);font-weight:800;font-size:1.1rem;margin:4px 0}
.source-credit .desc{font-size:.92rem;color:var(--ink-2);line-height:1.7;margin:6px 0}
.source-credit .links{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.source-credit .links a{font-size:.82rem;font-weight:700;color:var(--brand);background:var(--bg-card);
  border:1px solid var(--line);padding:5px 12px;border-radius:20px}

/* ---------- 12. Responsive header ---------- */
@media(max-width:880px){
  .nav-main{display:none}
  .menu-toggle{display:grid}
}
