/* ==========================================================
   Sahafa — قالب صحفي احترافي
   ترويسة ثلاثية · أشرطة أقسام بعرض الشاشة · شبكة 1140
   ========================================================== */

:root {
    --primary: #7a1c2b;
    --primary-dark: #5c141f;
    --primary-light: #a63449;
    --primary-soft: #fbeef0;

    --ink: #212529;
    --ink-2: #55606d;
    --ink-3: #8a929d;

    --line: #d7d7d7;
    --line-soft: #ececec;

    --band-light: #ffffff;
    --band-gray: #f7f7f7;
    --band-dark: #101114;
    --logobar: #f5f5f5;

    --max: 1140px;
    --font: "Segoe UI", Tahoma, "Cairo", "Noto Naskh Arabic", system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
    --ink: #e9ebee; --ink-2: #a7aeb8; --ink-3: #79808a;
    --line: #2d3138; --line-soft: #24272d;
    --band-light: #14161a; --band-gray: #1a1d22; --band-dark: #0a0b0d;
    --logobar: #1a1d22; --primary-soft: #341219;
}

* { box-sizing: border-box; }
body {
    margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.65;
    color: var(--ink); background: var(--band-light); direction: rtl;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.5; font-weight: 700; }
button { font-family: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 15px; }

/* ==========================================================
   1 · شريط العاجل (أعلى الصفحة)
   ========================================================== */
.ticker { background: var(--primary); color: #fff; font-size: 14px; }
.ticker .wrap { display: flex; align-items: center; height: 34px; padding-inline-start: 0; }
.ticker .tag {
    background: rgba(0, 0, 0, .22); height: 34px; padding: 0 16px; display: flex; align-items: center;
    font-weight: 700; font-size: 12.5px; letter-spacing: .5px; white-space: nowrap; flex-shrink: 0;
}
.ticker-track { flex: 1; overflow: hidden; height: 34px; padding-inline-start: 14px; }
.ticker-items { display: flex; align-items: center; gap: 48px; height: 34px; white-space: nowrap; animation: tkr 45s linear infinite; }
.ticker-items a { color: #fff; }
.ticker-items a:hover { color: #f3c9cf; }
.ticker:hover .ticker-items { animation-play-state: paused; }
@keyframes tkr { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ==========================================================
   2 · شريط الشعار
   ========================================================== */
.logobar { background: var(--logobar); border-bottom: 2px solid var(--primary); }
.logobar .wrap { display: flex; align-items: center; gap: 20px; min-height: 104px; }
.logo { flex-shrink: 0; }
.logo img { max-height: 72px; width: auto; }
.logo .txt strong { display: block; font-size: 34px; font-weight: 900; line-height: 1; color: var(--primary); letter-spacing: -1.2px; }
.logo .txt span { display: block; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.logobar .spacer { flex: 1; }
.logobar .ad { max-width: 468px; }

.head-tools { display: flex; align-items: center; gap: 8px; }
.tool-btn {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
    background: var(--band-light); cursor: pointer; display: grid; place-items: center;
    font-size: 14px; color: var(--ink-2); flex-shrink: 0;
}
.tool-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.social-links { display: flex; gap: 5px; }
.social-links a {
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    font-size: 13px; background: var(--band-light); border: 1px solid var(--line); color: var(--ink-2);
}
.social-links a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.search-box { position: relative; }
.search-box input {
    padding: 8px 34px 8px 13px; border: 1px solid var(--line); border-radius: 4px;
    background: var(--band-light); font-family: inherit; font-size: 13.5px; width: 180px; color: var(--ink);
    transition: width .2s, border-color .2s;
}
.search-box input:focus { outline: none; width: 230px; border-color: var(--primary); }
.search-box button {
    position: absolute; inset-inline-end: 5px; top: 50%; transform: translateY(-50%);
    border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--ink-3);
}

/* سطر رئيس التحرير */
.editor-line {
    border-bottom: 1px solid var(--line-soft); background: var(--band-light);
    font-size: 13.5px; color: var(--ink-2);
}
.editor-line .wrap { display: flex; align-items: center; gap: 10px; height: 40px; }
.editor-line b { color: var(--ink); font-weight: 700; }

/* ==========================================================
   3 · شريط القائمة
   ========================================================== */
.main-nav { background: var(--band-light); border-bottom: 1px solid var(--line); z-index: 60; }
.main-nav.is-sticky { position: sticky; top: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.main-nav .wrap { display: flex; align-items: center; position: relative; }
.sn-menu { display: flex; list-style: none; margin: 0; padding: 0; flex: 1; flex-wrap: wrap; }
.sn-menu > li { position: static; }
.sn-menu > li > a {
    display: block; padding: 17px 16px; font-weight: 700; font-size: 16.5px;
    color: var(--ink); white-space: nowrap; position: relative;
}
.sn-menu > li > a::after {
    content: ""; position: absolute; inset-inline: 10px; bottom: 0; height: 3px;
    background: var(--primary); transform: scaleX(0); transition: transform .18s;
}
.sn-menu > li:hover > a { color: var(--primary); }
.sn-menu > li:hover > a::after { transform: scaleX(1); }

.sn-menu > li.has-children { position: relative; }
.sn-menu .sub-menu {
    position: absolute; top: 100%; inset-inline-start: 0; background: var(--band-light);
    border: 1px solid var(--line); border-top: 3px solid var(--primary);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .16); min-width: 200px; padding: 5px;
    list-style: none; margin: 0; display: none; z-index: 75;
}
.sn-menu li:hover > .sub-menu { display: block; }
.sn-menu .sub-menu a { display: block; padding: 9px 14px; font-size: 14px; }
.sn-menu .sub-menu a:hover { background: var(--primary-soft); color: var(--primary); }

/* اللوحة المنسدلة بالصور */
.mega {
    position: absolute; top: 100%; inset-inline: 0; z-index: 70; display: none;
    background: var(--band-light); border: 1px solid var(--line); border-top: 3px solid var(--primary);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
}
.sn-menu > li.mega-parent:hover .mega { display: block; }
.mega-inner { padding: 20px 15px 22px; }
.mega-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; margin-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.mega-head span { font-weight: 800; font-size: 15px; color: var(--primary); }
.mega-head a { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.mega-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.mega-card .ph { display: block; aspect-ratio: 3/2; overflow: hidden; background: var(--band-gray); margin-bottom: 9px; }
.mega-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.mega-card:hover .ph img { transform: scale(1.07); }
.mega-card .tt { display: block; font-size: 14px; font-weight: 700; line-height: 1.55; }
.mega-card:hover .tt { color: var(--primary); }
.mega-card .dt { display: block; font-size: 11px; color: var(--ink-3); margin-top: 5px; }

.nav-extra { display: flex; align-items: center; gap: 6px; }
.menu-toggle { display: none; }

/* ==========================================================
   4 · أشرطة الأقسام بعرض الشاشة
   ========================================================== */
.band { padding: 34px 0; background: var(--band-light); }
.band.gray { background: var(--band-gray); }
.band.dark { background: var(--band-dark); }
.band.tight { padding: 24px 0; }

.band.dark,
.band.dark h2,
.band.dark h3,
.band.dark a { color: #f2f3f5; }
.band.dark .sec-head { border-bottom-color: rgba(255, 255, 255, .16); }
.band.dark .news-line { border-bottom-color: rgba(255, 255, 255, .12); }
.band.dark .card p,
.band.dark .card .meta,
.band.dark .news-line .m { color: #a8afba; }
.band.dark .card h3 a:hover,
.band.dark .news-line:hover h3 { color: var(--primary-light); }

/* عنوان الشريط */
.sec-head {
    display: flex; align-items: center; gap: 12px;
    border-bottom: 2px solid var(--line); padding-bottom: 12px; margin-bottom: 22px;
}
.sec-head h2 {
    margin: 0; font-size: 24px; font-weight: 800; position: relative; padding-inline-start: 14px;
}
.sec-head h2::before {
    content: ""; position: absolute; inset-inline-start: 0; top: 50%; transform: translateY(-50%);
    width: 5px; height: 24px; background: var(--primary);
}
.sec-head .spacer { flex: 1; }
.sec-head .more { font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.band.dark .sec-head .more { color: var(--primary-light); }

/* ==========================================================
   5 · البطاقات
   ========================================================== */
.cards { display: grid; gap: 24px; }
.cards.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.card { display: flex; flex-direction: column; }
.card .thumb { position: relative; display: block; aspect-ratio: 3/2; overflow: hidden; background: var(--band-gray); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.card:hover .thumb img { transform: scale(1.06); }
.card .cat-badge { position: absolute; top: 0; inset-inline-start: 0; }
.card .body { padding: 11px 0 0; flex: 1; display: flex; flex-direction: column; }
.card h3 { font-size: 16.5px; margin: 0 0 7px; line-height: 1.6; font-weight: 700; }
.card h3 a:hover { color: var(--primary); }
.card p { font-size: 13.5px; color: var(--ink-2); margin: 0 0 8px; flex: 1; }
.card .meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }

.cat-badge {
    display: inline-block; background: var(--primary); color: #fff;
    font-size: 11.5px; font-weight: 700; padding: 4px 12px;
}

/* الخبر الكبير */
.lead { display: block; }
.lead .ph { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--band-gray); }
.lead .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.lead:hover .ph img { transform: scale(1.04); }
.lead .cat-badge { position: absolute; top: 0; inset-inline-start: 0; }
.lead h2 { font-size: 26px; margin: 14px 0 8px; line-height: 1.55; font-weight: 800; }
.lead:hover h2 { color: var(--primary); }
.lead p { font-size: 15px; color: var(--ink-2); margin: 0 0 8px; }
.lead .meta { font-size: 12.5px; color: var(--ink-3); }

/* سطر خبر: نص يمين + صورة يسار */
.news-line {
    display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); align-items: flex-start;
}
.news-line:first-child { padding-top: 0; }
.news-line:last-child { border-bottom: 0; padding-bottom: 0; }
.news-line .tx { flex: 1; min-width: 0; }
.news-line h3 { font-size: 16px; margin: 0 0 6px; line-height: 1.6; font-weight: 700; }
.news-line:hover h3 { color: var(--primary); }
.news-line p { font-size: 13px; color: var(--ink-2); margin: 0 0 5px; }
.news-line .m { font-size: 11.5px; color: var(--ink-3); }
.news-line .ph { width: 112px; height: 76px; flex-shrink: 0; overflow: hidden; order: 2; background: var(--band-gray); }
.news-line .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-line:hover .ph img { transform: scale(1.07); }

/* سطر نصي فقط */
.news-text { padding: 11px 0; border-bottom: 1px dashed var(--line); }
.news-text:last-child { border-bottom: 0; }
.news-text h3 { font-size: 15.5px; margin: 0 0 4px; font-weight: 700; line-height: 1.6; padding-inline-start: 16px; position: relative; }
.news-text h3::before { content: ""; position: absolute; inset-inline-start: 0; top: 11px; width: 6px; height: 6px; background: var(--primary); }
.news-text .m { font-size: 11.5px; color: var(--ink-3); padding-inline-start: 16px; }

/* قائمة مرقّمة */
.ranked .rk { display: flex; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); align-items: center; }
.ranked .rk:first-child { padding-top: 0; }
.ranked .rk:last-child { border-bottom: 0; }
.ranked .rk .tx { flex: 1; min-width: 0; }
.ranked .rk h4 { font-size: 15px; margin: 0 0 4px; line-height: 1.6; font-weight: 700; }
.ranked .rk:hover h4 { color: var(--primary); }
.ranked .rk .m { font-size: 11.5px; color: var(--ink-3); }
.ranked .rk .no {
    order: 2; font-size: 30px; font-weight: 900; color: var(--primary);
    line-height: 1; min-width: 38px; text-align: center; opacity: .85;
}
.band.dark .ranked .rk .no { color: var(--primary-light); }

/* ==========================================================
   6 · الصدارة
   ========================================================== */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; }
.hero-side .it { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.hero-side .it:first-child { padding-top: 0; }
.hero-side .it:last-child { border-bottom: 0; }
.hero-side .it .tx { flex: 1; min-width: 0; }
.hero-side .it h4 { font-size: 15.5px; margin: 0 0 5px; line-height: 1.6; font-weight: 700; }
.hero-side .it:hover h4 { color: var(--primary); }
.hero-side .it .m { font-size: 11.5px; color: var(--ink-3); }
.hero-side .it .ph { width: 96px; height: 68px; flex-shrink: 0; overflow: hidden; order: 2; background: var(--band-gray); }
.hero-side .it .ph img { width: 100%; height: 100%; object-fit: cover; }

/* سلايدر */
.slider { position: relative; overflow: hidden; }
.slider-track { display: flex; transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.slide { min-width: 100%; }
.slide .ph { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--band-gray); }
.slide .ph img { width: 100%; height: 100%; object-fit: cover; }
.slide .cat-badge { position: absolute; top: 0; inset-inline-start: 0; }
.slide h2 { font-size: 26px; margin: 14px 0 8px; line-height: 1.55; font-weight: 800; }
.slide .m { font-size: 12.5px; color: var(--ink-3); }
.slider-nav {
    position: absolute; top: 32%; z-index: 5; width: 40px; height: 40px; border: 0;
    background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; font-size: 19px;
    display: grid; place-items: center; opacity: 0; transition: opacity .2s, background .2s;
}
.slider:hover .slider-nav { opacity: 1; }
.slider-nav:hover { background: var(--primary); }
.slider-nav.prev { inset-inline-end: 0; }
.slider-nav.next { inset-inline-start: 0; }
.slider-dots { position: absolute; bottom: 10px; inset-inline-start: 12px; z-index: 5; display: flex; gap: 6px; }
.slider-dots button { width: 9px; height: 9px; border: 0; padding: 0; cursor: pointer; background: rgba(255, 255, 255, .55); }
.slider-dots button.on { background: #fff; width: 24px; }

/* ==========================================================
   7 · الكتّاب
   ========================================================== */
.writers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.writer { display: flex; gap: 13px; align-items: center; }
.writer img { width: 70px; height: 70px; border-radius: 50%; flex-shrink: 0; border: 3px solid var(--primary); }
.writer .nm { display: block; font-size: 14px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.band.dark .writer .nm { color: var(--primary-light); }
.writer h4 { font-size: 14.5px; margin: 0; line-height: 1.6; font-weight: 700; }

/* ==========================================================
   8 · التخطيط والشريط الجانبي
   ========================================================== */
.layout { display: grid; gap: 30px; padding: 28px 0; align-items: start; }
.layout.with-sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
.layout.sidebar-right { grid-template-columns: 320px minmax(0, 1fr); }
.layout.sidebar-right .content { order: 2; }

.widget { margin-bottom: 30px; }
.widget-head { border-bottom: 2px solid var(--line); padding-bottom: 10px; margin-bottom: 15px; font-size: 18px; font-weight: 800; position: relative; padding-inline-start: 13px; }
.widget-head::before { content: ""; position: absolute; inset-inline-start: 0; top: 2px; width: 5px; height: 20px; background: var(--primary); }

.tabs-head { display: flex; border: 1px solid var(--line); margin-bottom: 14px; }
.tabs-head button { flex: 1; padding: 10px 6px; border: 0; background: var(--band-gray); cursor: pointer; font-size: 13.5px; font-weight: 700; color: var(--ink-2); border-inline-start: 1px solid var(--line); }
.tabs-head button:first-child { border-inline-start: 0; }
.tabs-head button.on { background: var(--primary); color: #fff; }
.tab-pane { display: none; }
.tab-pane.on { display: block; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud a { padding: 5px 13px; background: var(--band-gray); border: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-2); }
.tag-cloud a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { border-bottom: 1px solid var(--line-soft); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a { display: flex; align-items: center; gap: 10px; padding: 11px 0; font-weight: 700; font-size: 14.5px; }
.cat-list .dot { width: 9px; height: 9px; flex-shrink: 0; }
.cat-list .count { margin-inline-start: auto; font-size: 12px; color: var(--ink-3); }

.ad-box { text-align: center; margin-bottom: 26px; }

/* ==========================================================
   9 · صفحة المقال
   ========================================================== */
.article-page { background: var(--band-gray); padding: 26px 0 42px; }
.article-box { max-width: 860px; margin: 0 auto; background: var(--band-light); padding: 34px 42px 30px; border: 1px solid var(--line-soft); }
.article-cat { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.article-box h1.article-title { font-size: 34px; line-height: 1.5; margin: 0 0 18px; font-weight: 800; }
.article-byline {
    display: flex; align-items: center; gap: 13px; flex-wrap: wrap; padding: 14px 0; margin-bottom: 22px;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2);
}
.article-byline .who { display: flex; align-items: center; gap: 11px; }
.article-byline .who img { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; }
.article-byline .who .lbl { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.article-byline .who .nm { font-weight: 800; color: var(--ink); font-size: 14.5px; }
.article-byline .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.article-byline .bit { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }

.featured-figure { margin: 0 0 26px; }
.featured-figure figcaption { font-size: 12.5px; color: var(--ink-3); padding: 9px 2px 0; text-align: center; }

.article-body { font-size: 18.5px; line-height: 2.1; }
.article-body p { margin: 0 0 1.25em; }
.article-body > p:first-of-type { font-size: 19.5px; }
.article-body h2 { font-size: 25px; margin: 1.7em 0 .6em; padding-inline-start: 14px; border-inline-start: 5px solid var(--primary); }
.article-body h3 { font-size: 21px; margin: 1.5em 0 .5em; color: var(--primary-dark); }
[data-theme="dark"] .article-body h3 { color: var(--primary-light); }
.article-body figure { margin: 1.6em 0; }
.article-body figcaption { font-size: 12.5px; color: var(--ink-3); text-align: center; padding: 8px 0; }
.article-body blockquote {
    margin: 1.6em 0; padding: 18px 22px; background: var(--primary-soft);
    border-inline-start: 5px solid var(--primary); font-size: 19px; color: var(--primary-dark); font-weight: 600;
}
[data-theme="dark"] .article-body blockquote { color: #f0d0d6; }
.article-body ul, .article-body ol { padding-inline-start: 26px; margin: 0 0 1.3em; }
.article-body li { margin-bottom: .55em; }
.article-body ul li::marker, .article-body ol li::marker { color: var(--primary); font-weight: 800; }
.article-body a { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15.5px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 11px 14px; }
.article-body th { background: var(--primary-soft); font-weight: 800; color: var(--primary-dark); }
.article-body hr { border: 0; border-top: 2px solid var(--line); margin: 2.2em 0; }
.sn-embed { position: relative; padding-bottom: 56.25%; height: 0; margin: 1.6em 0; background: var(--band-gray); }
.sn-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.article-foot { margin-top: 30px; padding-top: 20px; border-top: 2px solid var(--line); display: flex; flex-direction: column; gap: 18px; }
.article-foot .ttl { display: block; font-size: 13px; font-weight: 800; color: var(--ink-2); margin-bottom: 9px; }
.share-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.share-bar button, .share-bar a {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 17px;
    background: var(--band-gray); border: 1px solid var(--line-soft); font-size: 13px;
    font-weight: 700; cursor: pointer; color: var(--ink-2);
}
.share-bar button:hover, .share-bar a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

.adjacent { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.adjacent a { padding: 15px 18px; background: var(--band-gray); border: 1px solid var(--line-soft); }
.adjacent a:hover { border-color: var(--primary); }
.adjacent span { display: block; font-size: 11.5px; color: var(--primary); font-weight: 800; margin-bottom: 5px; }
.adjacent b { font-size: 15px; font-weight: 700; line-height: 1.6; }

/* ==========================================================
   10 · الأرشيف والترقيم
   ========================================================== */
.archive-head { background: var(--primary); color: #fff; padding: 22px 24px; margin-bottom: 24px; }
.archive-head h1 { margin: 0 0 5px; font-size: 27px; color: #fff; }
.archive-head p { margin: 0; opacity: .9; font-size: 14.5px; }

.sn-pagination { margin: 30px 0; }
.sn-pagination ul { display: flex; gap: 6px; justify-content: center; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.sn-pagination a, .sn-pagination span {
    display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 13px;
    border: 1px solid var(--line); font-size: 14.5px; font-weight: 700; color: var(--ink-2);
}
.sn-pagination a:hover { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.sn-pagination .active span { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ==========================================================
   11 · التذييل
   ========================================================== */
.site-footer { background: #16171a; color: #9aa1ab; padding: 40px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 30px; }
.site-footer h4 { color: #fff; font-size: 16px; margin: 0 0 14px; padding-bottom: 9px; border-bottom: 2px solid rgba(255, 255, 255, .12); position: relative; }
.site-footer h4::after { content: ""; position: absolute; bottom: -2px; inset-inline-start: 0; width: 46px; height: 2px; background: var(--primary-light); }
.site-footer a { color: #9aa1ab; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; font-size: 14px; }
.site-footer .social-links a { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .12); color: #d3d7dd; }
.site-footer .social-links a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 0; font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.footer-bottom .spacer { flex: 1; }

.to-top { position: fixed; bottom: 22px; inset-inline-start: 22px; width: 44px; height: 44px; background: var(--primary); color: #fff; border: 0; cursor: pointer; font-size: 18px; display: none; place-items: center; z-index: 90; }
.to-top.show { display: grid; }
.read-progress { position: fixed; top: 0; inset-inline-start: 0; height: 3px; background: var(--primary-light); width: 0; z-index: 200; transition: width .1s; }

.error-page { text-align: center; padding: 70px 20px; }
.error-page .code { font-size: 110px; font-weight: 900; line-height: 1; color: var(--primary); }
.btn-primary { display: inline-block; padding: 11px 28px; background: var(--primary); color: #fff; border: 0; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.author-box { display: flex; gap: 16px; padding: 18px; background: var(--band-gray); margin: 22px 0; align-items: flex-start; border-inline-start: 4px solid var(--primary); }
.author-box img { width: 66px; height: 66px; border-radius: 50%; flex-shrink: 0; }
.author-box h4 { margin: 0 0 5px; font-size: 16.5px; }
.author-box p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* ==========================================================
   12 · الاستجابة
   ========================================================== */
@media (max-width: 1100px) {
    .mega-grid { grid-template-columns: repeat(4, 1fr); }
    .hero-grid { grid-template-columns: 1fr; }
    .writers { grid-template-columns: repeat(2, 1fr); }
    .cards.c5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
    .layout.with-sidebar, .layout.sidebar-right { grid-template-columns: 1fr; }
    .layout.sidebar-right .content { order: 0; }
    .cards.c4, .cards.c5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .mega { display: none !important; }
}
@media (max-width: 700px) {
    body { font-size: 15.5px; }
    .cards.c2, .cards.c3, .cards.c4, .cards.c5 { grid-template-columns: 1fr; }
    .writers { grid-template-columns: 1fr; }
    .band { padding: 24px 0; }
    .sec-head h2 { font-size: 20px; }
    .lead h2, .slide h2 { font-size: 20px; }
    .news-line .ph { width: 96px; height: 68px; }
    .news-line p { display: none; }
    .article-page { padding: 0 0 26px; background: var(--band-light); }
    .article-box { padding: 20px 15px 24px; border: 0; max-width: 100%; }
    .article-box h1.article-title { font-size: 24px; }
    .article-byline { gap: 9px; font-size: 12.5px; }
    .article-byline .dot { display: none; }
    .article-body { font-size: 17.5px; }
    .article-body h2 { font-size: 21px; }
    .adjacent { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .logobar .wrap { min-height: 76px; gap: 12px; }
    .logo img { max-height: 52px; }
    .logo .txt strong { font-size: 26px; }
    .logobar .search-box, .logobar .ad { display: none; }

    .menu-toggle { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); background: var(--band-gray); cursor: pointer; font-size: 17px; color: var(--ink); }
    .main-nav .wrap { flex-wrap: wrap; }
    .sn-menu { display: none; flex-direction: column; width: 100%; }
    .sn-menu.open { display: flex; }
    .sn-menu > li > a { padding: 12px 4px; border-bottom: 1px solid var(--line-soft); }
    .sn-menu > li > a::after { display: none; }
    .sn-menu .sub-menu { position: static; display: block; border: 0; box-shadow: none; padding-inline-start: 16px; }
}

@media print {
    .ticker, .logobar, .main-nav, .site-footer, .share-bar, .to-top,
    .read-progress, .sidebar, .adjacent, .editor-line { display: none !important; }
    .layout { grid-template-columns: 1fr !important; }
    .article-box { border: 0; padding: 0; max-width: 100%; }
}
