/*
Theme Name: Athar24 News
Theme URI: https://athar24.com/
Author: أثر24
Description: قالب إخباري عربي احترافي لموقع أثر24 (خبر يترك أثراً): تصميم RTL متجاوب، قسم «الرئيسية» للمقالات المختارة بخيار «إظهار في الرئيسية»، «مستجدات الساعة» و«أثر 24 TV» كمحتوى مستقل، «خبر خاص» و«ضيف أثر»، أقسام المجتمع والسياسة والرياضة ومال وأعمال والثقافة وعدالة وجاليتنا، «كتاب أثر 24»، ومساحات إعلانية تدار من الودجات. الإعدادات في: المظهر ← تخصيص ← إعدادات أثر24.
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: athar24-news
Tags: news, rtl-language-support, right-sidebar, custom-logo, custom-menu, featured-images, theme-options, threaded-comments, translation-ready
*/

:root {
	--red: #d71920;
	--red-dark: #b5121a;
	--ink: #14213d;
	--text: #2b3445;
	--muted: #6b7486;
	--line: #e3e7ee;
	--paper: #fff;
	--soft: #f4f6f9;
	--navy: #11284a;
	--navy-2: #0b1d38;
	--dark: #0b1d38;
	--radius: 8px;
	--shadow: 0 8px 26px rgba(10, 20, 35, .09);
	--font: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
	--font-body: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--soft); color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.75; direction: rtl; text-align: right; }
h1, h2, h3, h4, .brand-word, .primary-menu a, .section-head h2, .category-tag, .breaking-label, .btn { font-family: var(--font); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
.icon { width: 1.15em; height: 1.15em; fill: currentColor; vertical-align: -.2em; flex: none; }
.container { width: min(1240px, calc(100% - 32px)); margin-inline: auto; }
.screen-reader-text { position: absolute !important; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; top: 8px; right: 8px; left: auto; width: auto; height: auto; clip: auto; z-index: 999; background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 6px; box-shadow: var(--shadow); }
:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }

/* ---------- Top bar ---------- */
.site-top { background: var(--dark); color: #d8dde3; font-size: 12.5px; }
.top-inner { min-height: 36px; display: flex; align-items: center; gap: 16px; }
.top-date { margin-inline-end: auto; }
.top-links { display: flex; list-style: none; margin: 0; padding: 0; gap: 16px; }
.top-links a { color: #e3e6eb; }
.social-links { display: flex; align-items: center; gap: 6px; }
.social-links a { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #fff; transition: background .2s, transform .2s; }
.social-links--top a:hover { background: var(--red); color: #fff; }
.social-links--big { flex-wrap: wrap; gap: 8px; }
.social-links--big a, .social-links--footer a { width: 40px; height: 40px; background: var(--soft); color: var(--ink); }
.social-links--footer a { background: rgba(255, 255, 255, .08); color: #fff; }
.social-links--big a:hover, .social-links--footer a:hover { background: var(--red); color: #fff; transform: translateY(-2px); }

/* ---------- Masthead ---------- */
.masthead { padding: 18px 0; background: #fff; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-tv { width: 58px; height: 58px; border-radius: 50%; background: #e51e2a; color: #fff; display: grid; place-items: center; font: 800 21px/1 Arial, sans-serif; letter-spacing: -1px; position: relative; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15); flex: none; }
.brand-tv::after { content: ""; position: absolute; width: 17px; height: 17px; left: 3px; bottom: 5px; background: #111; border-radius: 3px; }
.brand-text { display: flex; flex-direction: column; }
.brand-word { font-size: 42px; line-height: 1.05; font-weight: 800; letter-spacing: -1px; }
.brand-meta { font-size: 11.5px; line-height: 1.5; color: var(--muted); margin-top: 4px; }
.custom-logo-link { display: inline-block; line-height: 0; }
.custom-logo-link img { max-height: 76px; width: auto; max-width: 320px; }

/* ---------- Ads ---------- */
.ad-slot { position: relative; display: flex; justify-content: center; align-items: center; margin: 20px auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad-slot img { display: block; margin: 0 auto; }
.ad-slot iframe { max-width: 100%; }
.ad-mark { position: absolute; top: 0; left: 0; font-size: 10px; line-height: 1; padding: 3px 6px; background: rgba(0, 0, 0, .45); color: #fff; border-bottom-right-radius: 4px; z-index: 1; pointer-events: none; }
.ad-label { display: none; }
.ad-slot--header { margin: 4px auto 14px; max-width: 970px; }
.ad-slot--empty a { display: flex; flex-direction: column; justify-content: center; width: 100%; min-height: 90px; padding: 10px; border: 2px dashed #cfd4da; border-radius: 8px; color: #8a919a; font-size: 13px; background: repeating-linear-gradient(-45deg, #fafbfc, #fafbfc 10px, #f3f4f6 10px, #f3f4f6 20px); }
.ad-slot--empty small { display: block; font-size: 11px; color: #a3a9b1; }
.ad-slot--empty.ad-slot--header a { min-height: 76px; }
.ad-slot--side { margin-top: 0; }
.ad-slot--side.ad-slot--empty a { min-height: 250px; }
.ad-slot--inline { margin: 26px auto; clear: both; }
.ad-slot--wide { margin: 18px auto; }

/* ---------- Navigation ---------- */
.main-nav { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.admin-bar .main-nav { top: 32px; }
.nav-inner { display: flex; align-items: center; min-height: 50px; gap: 4px; }
.nav-home, .search-toggle, .menu-toggle { display: grid; place-items: center; width: 46px; height: 50px; color: #fff; background: transparent; border: 0; cursor: pointer; flex: none; }
.nav-home { background: var(--navy-2); }
.nav-home:hover, .search-toggle:hover { color: #fff; background: rgba(0, 0, 0, .14); }
.menu-toggle { display: none; }
.primary-menu { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; flex: 1; }
.primary-menu li { position: relative; margin: 0; }
.primary-menu > li > a { display: block; padding: 12px 15px; color: #fff; font-weight: 600; font-size: 14.5px; line-height: 26px; }
.primary-menu > li > a:hover, .primary-menu > .current-menu-item > a, .primary-menu > .current-menu-ancestor > a, .primary-menu > .current-category-ancestor > a { background: var(--red-dark); color: #fff; }
.primary-menu .menu-item-has-children > a::after { content: "▾"; font-size: 11px; margin-inline-start: 5px; opacity: .8; }
.primary-menu .sub-menu { display: none; position: absolute; top: 100%; right: 0; min-width: 210px; list-style: none; margin: 0; padding: 6px 0; background: #fff; box-shadow: var(--shadow); border-top: 3px solid var(--red-dark); border-radius: 0 0 8px 8px; z-index: 60; }
.primary-menu li:hover > .sub-menu, .primary-menu li:focus-within > .sub-menu { display: block; }
.primary-menu .sub-menu a { display: block; padding: 8px 16px; color: var(--ink); font-size: 14px; }
.primary-menu .sub-menu a:hover { background: var(--soft); color: var(--red); }
.header-search { background: var(--navy-2); padding: 14px 0; }
.search-form { display: flex; gap: 0; max-width: 640px; }
.header-search .search-form { margin-inline: auto; }
.search-field { flex: 1; min-width: 0; border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0; padding: 10px 14px; background: #fff; color: var(--ink); }
.search-submit { display: flex; align-items: center; gap: 6px; border: 0; border-radius: 8px 0 0 8px; background: var(--ink); color: #fff; padding: 0 18px; cursor: pointer; font-weight: 700; }
.search-submit:hover { background: #000; }

/* ---------- Breaking ticker ---------- */
.breaking { background: #fff; border-bottom: 1px solid var(--line); }
.breaking-inner { display: flex; align-items: center; min-height: 44px; gap: 14px; overflow: hidden; }
.breaking-label { flex: none; display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; padding: 5px 14px; font-size: 13px; font-weight: 800; border-radius: 4px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(215, 25, 32, .7); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(229, 30, 42, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 30, 42, 0); } }
.breaking-viewport { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.breaking-track { display: flex; white-space: nowrap; width: max-content; font-size: 14px; font-weight: 700; }
.breaking-track a { color: var(--ink); padding-inline-start: 8px; }
.breaking-track a::before { content: "●"; font-size: 8px; color: var(--red); margin-inline-end: 10px; vertical-align: 2px; }
.breaking-track a:hover { color: var(--red); }
.breaking-track.is-moving { animation: ticker var(--ticker-duration, 40s) linear infinite; }
.breaking-viewport:hover .breaking-track, .breaking-track:focus-within { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .breaking-track.is-moving { animation: none; } .pulse { animation: none; } }

/* ---------- Layout ---------- */
.site-main { padding: 24px 0 56px; }
.two-column { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.sidebar { position: sticky; top: 70px; }
.empty-state { text-align: center; padding: 60px 16px; background: var(--soft); border-radius: var(--radius); margin-bottom: 30px; }
.big-404 { font: 800 90px/1 var(--font); color: var(--red); margin: 0; }
.btn { display: inline-block; background: var(--red); color: #fff; padding: 10px 22px; border-radius: 8px; font-weight: 700; }
.btn:hover { background: var(--red-dark); color: #fff; }

/* ---------- Hero ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; margin-bottom: 34px; }
.hero-side { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 16px; }
.hero-main, .story-card { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--navy); isolation: isolate; }
.hero-main { min-height: 470px; }
.story-card { min-height: 227px; }
.hero-main img, .story-card img, .hero-main .no-thumb, .story-card .no-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; z-index: -2; }
.hero-main:hover img, .story-card:hover img { transform: scale(1.05); }
.hero-main::after, .story-card::after { content: ""; position: absolute; inset: 30% 0 0; background: linear-gradient(180deg, transparent, rgba(5, 10, 20, .9)); z-index: -1; }
.hero-copy { position: absolute; bottom: 0; inset-inline: 0; padding: 26px; color: #fff; }
.hero-title { margin: 0; color: #fff; }
.hero-title a:hover { color: #fff; text-decoration: underline; text-underline-offset: 5px; }
.hero-main .hero-title { font-size: clamp(22px, 2.6vw, 34px); line-height: 1.45; }
.story-card .hero-title { font-size: 16px; line-height: 1.6; }
.story-card .hero-copy { padding: 14px; }
.hero-excerpt { margin: 8px 0 0; color: #e3e6ea; font-size: 15px; max-width: 640px; }
.hero-copy .post-meta { color: #d6dbe0; }

/* ---------- Common bits ---------- */
.category-tag { display: inline-block; background: var(--red); color: #fff; padding: 2px 10px; border-radius: 3px; font-size: 12px; font-weight: 600; line-height: 1.9; margin-bottom: 8px; }
a.category-tag:hover { background: var(--red-dark); color: #fff; }
.post-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.post-meta time { display: inline-flex; align-items: center; gap: 4px; }
.meta-author::before { content: "✎ "; }
.no-thumb { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, #11284a, #d71920); color: rgba(255, 255, 255, .35); font: 800 20px var(--font); }
.play-badge { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; background: rgba(215, 25, 32, .92); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); z-index: 2; }

/* ---------- Sections ---------- */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 3px solid var(--ink); margin: 0 0 18px; }
.section-head h2 { position: relative; margin: 0; background: var(--red); color: #fff; font-size: 18px; padding: 6px 16px 4px; border-radius: 6px 6px 0 0; }
.section-head h2 a, .section-head h2 a:hover { color: #fff; }
.section-more { font-size: 13px; color: var(--muted); font-weight: 700; padding-bottom: 4px; }
.news-section { margin-bottom: 38px; }
.news-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.home-columns .news-grid, .news-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-grid--related { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.news-grid--related .news-title { font-size: 14.5px; }
.news-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line); transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.news-thumb { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--soft); overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-card:hover .news-thumb img { transform: scale(1.05); }
.news-body { padding: 13px 14px 15px; }
.news-title { margin: 0; font-size: 16px; line-height: 1.65; font-weight: 600; }
.excerpt { color: #59616b; font-size: 14px; margin: 8px 0 0; }

.feature-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; }
.feature-main .news-card { height: 100%; }
.feature-main .news-title { font-size: 21px; line-height: 1.55; font-weight: 800; }
.feature-list { display: grid; gap: 14px; align-content: start; }
.list-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.list-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.list-thumb { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; background: var(--soft); }
.list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-thumb .no-thumb { font-size: 11px; }
.list-thumb .play-badge { width: 28px; height: 28px; top: 6px; right: 6px; }
.list-title { margin: 0; font-size: 15px; line-height: 1.6; font-weight: 600; }
.list-item .post-meta { margin-top: 2px; font-size: 12px; }

.news-section--dark { background: var(--navy); border-radius: 14px; padding: 20px 20px 22px; color: #e6e9ee; }
.news-section--dark .section-head { border-color: rgba(255, 255, 255, .25); }
.news-section--dark .section-more { color: #c3cad3; }
.news-section--dark .news-card { background: #1a2b48; box-shadow: none; }
.news-section--dark .news-title a { color: #fff; }
.news-section--dark .post-meta { color: #aab3c0; }

/* ---------- Sidebar ---------- */
.sidebar-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 22px; }
.widget-title { margin: -16px -16px 14px; padding: 10px 16px; font-size: 16px; background: var(--ink); color: #fff; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 3px solid var(--red); }
.sidebar-box ul { list-style: none; padding: 0; margin: 0; }
.sidebar-box li { border-bottom: 1px solid var(--line); padding: 8px 0; }
.sidebar-box li:last-child { border-bottom: 0; }
.numbered-list { list-style: none; counter-reset: n; margin: 0; padding: 0; }
.numbered-list li { counter-increment: n; position: relative; padding: 10px 44px 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14.5px; line-height: 1.6; }
.numbered-list li:last-child { border-bottom: 0; }
.numbered-list li::before { content: counter(n); position: absolute; right: 0; top: 10px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--soft); color: var(--red); font: 800 15px var(--font); }
.numbered-list .post-meta { display: flex; font-weight: 400; margin-top: 2px; }
.sidebar-box .list-item { margin-bottom: 12px; }

/* ---------- Archive ---------- */
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs .sep { opacity: .6; }
.archive-header { border-bottom: 3px solid var(--ink); margin-bottom: 22px; padding-bottom: 12px; }
.archive-heading { margin: 0; font-size: clamp(24px, 3vw, 34px); }
.archive-heading span { color: var(--red); }
.archive-description { color: var(--muted); margin-top: 6px; }
.archive-description p { margin: 0; }
.search-again { margin-top: 12px; }
.archive-lead { margin-bottom: 26px; }
.archive-lead .hero-main { min-height: 400px; }
.archive-list { display: grid; gap: 20px; align-content: start; }
.archive-item { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.archive-item .news-thumb { border-radius: var(--radius); }
.archive-title { font-size: 20px; line-height: 1.55; margin: 0 0 4px; }
.empty-note { background: var(--soft); padding: 20px; border-radius: var(--radius); }
.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.page-numbers { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; font-weight: 700; }
.page-numbers.current { background: var(--red); color: #fff; border-color: var(--red); }
a.page-numbers:hover { border-color: var(--red); }

/* ---------- Single ---------- */
.single-header { margin-bottom: 18px; }
.single-title { font-size: clamp(25px, 3.4vw, 38px); line-height: 1.5; margin: 6px 0 10px; font-weight: 800; }
.single-lead { font-size: 19px; color: #444b55; margin: 0 0 12px; line-height: 1.85; }
.single-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.single-meta .post-meta { margin: 0; }
.share-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.share-title { font-weight: 700; color: var(--ink); font-size: 14px; }
.share-bar a, .share-copy { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; border: 0; cursor: pointer; transition: transform .15s, opacity .15s; }
.share-bar a:hover, .share-copy:hover { transform: translateY(-2px); color: #fff; opacity: .9; }
.share-facebook { background: #1877f2; }
.share-whatsapp { background: #25d366; }
.share-x { background: #111; }
.share-telegram { background: #229ed9; }
.share-copy { background: #6b727c; }
.copied { position: absolute; bottom: 110%; white-space: nowrap; background: var(--ink); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.single-featured { margin: 0 0 22px; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.single-featured img { display: block; width: 100%; max-height: 620px; object-fit: cover; }
.single-featured figcaption, .wp-caption-text, figcaption { font-size: 13px; color: var(--muted); padding: 8px 12px; }
.entry-content { font-size: 18.5px; line-height: 2.05; color: #262b32; overflow-wrap: anywhere; }
.entry-content > * { margin-top: 0; margin-bottom: 1.15em; }
.entry-content h2 { font-size: 25px; margin-top: 1.4em; }
.entry-content h3 { font-size: 21px; margin-top: 1.3em; }
.entry-content a { color: var(--red); text-decoration: underline; text-underline-offset: 4px; }
.entry-content blockquote { margin: 26px 0; padding: 14px 22px; border-right: 5px solid var(--red); background: var(--soft); border-radius: 8px 0 0 8px; font-size: 19px; }
.entry-content ul, .entry-content ol { padding-right: 1.5em; padding-left: 0; }
.entry-content img { border-radius: 8px; }
.entry-content iframe, .entry-content video { max-width: 100%; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 8px 10px; }
.alignwide { margin-inline: -40px; }
.alignfull { margin-inline: calc(50% - 50vw); max-width: 100vw; }
.aligncenter { margin-inline: auto; display: block; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.single-footer { margin: 26px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tag-list span { font-weight: 700; color: var(--ink); }
.tag-list a { background: var(--soft); padding: 2px 12px; border-radius: 20px; font-size: 13px; }
.tag-list a:hover { background: var(--red); color: #fff; }
.related { margin-top: 30px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 30px 0; }
.post-navigation a { display: block; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); height: 100%; }
.post-navigation .nav-next { text-align: left; }
.nav-sub { display: block; font-size: 12px; color: var(--muted); }
.nav-t { display: block; font-weight: 700; color: var(--ink); line-height: 1.6; }
.page-links { margin: 20px 0; font-weight: 700; }
.page-article { max-width: 860px; margin-inline: auto; }

/* ---------- Comments ---------- */
.comments-area { margin-top: 30px; border-top: 3px solid var(--ink); padding-top: 14px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-right: 30px; }
.comment-body { padding: 14px; background: var(--soft); border-radius: var(--radius); margin-bottom: 12px; }
.comment-author img { border-radius: 50%; margin-left: 8px; vertical-align: middle; }
.comment-metadata { font-size: 12px; color: var(--muted); }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.comment-form .submit { background: var(--red); color: #fff; border: 0; border-radius: 8px; padding: 10px 22px; font-weight: 700; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #cfd5dc; padding: 40px 0 18px; margin-top: 10px; border-top: 4px solid var(--red); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
.site-footer h3, .site-footer .widget-title { color: #fff; margin: 0 0 14px; font-size: 17px; background: none; padding: 0; border: 0; }
.site-footer p { font-size: 14px; color: #aab2bc; }
.footer-brand .brand, .footer-brand .brand:hover { color: #fff; }
.footer-brand .brand-meta { color: #9aa3ad; }
.footer-brand .custom-logo-link img { max-height: 64px; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .3)); }
.footer-menu { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 20px; }
.footer-menu li { padding: 4px 0; break-inside: avoid; font-size: 14px; }
.footer-menu a { color: #cfd5dc; }
.footer-menu a:hover { color: #fff; }
.site-footer .sidebar-box { background: transparent; border: 0; padding: 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid #2c343e; margin-top: 28px; padding-top: 14px; font-size: 12.5px; color: #8f98a3; }
.to-top { color: #cfd5dc; }

/* ---------- WordPress core ---------- */
.sticky .news-title::before { content: "★ "; color: var(--red); }
.bypostauthor > .comment-body { border-right: 3px solid var(--red); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wp-block-image figcaption { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.two-column { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
	.news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.home-columns .news-grid, .news-grid--3, .news-grid--related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.menu-toggle { display: grid; }
	.nav-inner { position: relative; justify-content: space-between; }
	.nav-home { order: 2; background: transparent; }
	.search-toggle { order: 3; }
	.primary-menu { display: none; position: absolute; top: 100%; right: 0; left: 0; flex-direction: column; background: var(--red); padding: 6px 0 12px; box-shadow: 0 12px 24px rgba(0, 0, 0, .25); max-height: calc(100vh - 110px); overflow-y: auto; }
	.primary-menu.is-open { display: flex; }
	.primary-menu > li > a { padding: 11px 18px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
	.primary-menu .sub-menu { position: static; display: none; box-shadow: none; border: 0; border-radius: 0; background: var(--red-dark); padding: 0; }
	.primary-menu .sub-menu a { color: #fff; padding-right: 34px; }
	.primary-menu .sub-menu a:hover { background: rgba(0, 0, 0, .12); color: #fff; }
	.primary-menu li:hover > .sub-menu { display: none; }
	.primary-menu li.sub-open > .sub-menu { display: block; }
	.hero-grid { grid-template-columns: 1fr; }
	.hero-main { min-height: 400px; }
	.two-column { grid-template-columns: 1fr; }
	.sidebar { position: static; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.footer-about { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
	body { font-size: 15.5px; }
	.container { width: min(100% - 24px, 1240px); }
	.top-links, .social-links--top { display: none; }
	.masthead { padding: 12px 0; }
	.masthead-inner { justify-content: center; }
	.brand-tv { width: 44px; height: 44px; font-size: 16px; }
	.brand-tv::after { width: 13px; height: 13px; }
	.brand-word { font-size: 32px; }
	.brand-meta { font-size: 10px; }
	.custom-logo-link img { max-height: 56px; max-width: 240px; }
	.breaking-inner { min-height: 40px; gap: 10px; }
	.breaking-label { font-size: 12px; padding: 4px 9px; }
	.breaking-track { font-size: 13px; }
	.site-main { padding-top: 16px; }
	.hero-grid { gap: 10px; margin-bottom: 26px; }
	.hero-main { min-height: 330px; }
	.hero-copy { padding: 16px; }
	.hero-main .hero-title { font-size: 21px; }
	.hero-excerpt { display: none; }
	.hero-side { gap: 10px; }
	.story-card { min-height: 180px; }
	.story-card .hero-copy { padding: 10px; }
	.story-card .hero-title { font-size: 13.5px; line-height: 1.55; }
	.story-card .category-tag { font-size: 10.5px; margin-bottom: 4px; }
	.story-card .post-meta { display: none; }
	.news-grid, .home-columns .news-grid, .news-grid--3, .news-grid--related { grid-template-columns: 1fr 1fr; gap: 12px; }
	.news-body { padding: 10px; }
	.news-title { font-size: 14px; line-height: 1.6; }
	.news-card .category-tag { font-size: 10.5px; margin-bottom: 4px; }
	.news-card .post-meta { font-size: 11px; }
	.feature-layout, .list-layout { grid-template-columns: 1fr; }
	.feature-main .news-title { font-size: 18px; }
	.list-item { grid-template-columns: 100px minmax(0, 1fr); }
	.list-title { font-size: 14px; }
	.news-section--dark { padding: 14px; margin-inline: -4px; }
	.section-head h2 { font-size: 16px; }
	.archive-item { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; }
	.archive-title { font-size: 15.5px; }
	.archive-item .excerpt, .archive-item .post-meta .meta-author { display: none; }
	.archive-item .category-tag { font-size: 10.5px; margin-bottom: 2px; }
	.archive-lead .hero-main { min-height: 300px; }
	.single-title { font-size: 24px; }
	.single-lead { font-size: 17px; }
	.entry-content { font-size: 17px; line-height: 1.95; }
	.alignwide { margin-inline: 0; }
	.alignright, .alignleft { float: none; margin: 0 0 1em; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; gap: 22px; }
	.footer-bottom { flex-direction: column; }
	.search-submit span { display: none; }
}
@media (max-width: 380px) {
	.news-grid, .home-columns .news-grid, .news-grid--3, .news-grid--related { grid-template-columns: 1fr; }
}
@media print {
	.site-top, .main-nav, .breaking, .sidebar, .ad-slot, .share-bar, .site-footer, .related, .comments-area, .post-navigation { display: none !important; }
	.two-column { display: block; }
}

/* =========================================================================
   Athar24 additions
   ====================================================================== */
.masthead-inner { justify-content: center; padding: 16px 0 10px; }
.brand { flex-direction: column; gap: 4px; text-align: center; }
.brand-logo { width: 230px; max-width: 70vw; height: auto; }
.brand-word { font-size: 40px; color: var(--navy); }
.brand-word::after { content: ""; display: block; width: 46px; height: 4px; background: var(--red); margin: 6px auto 0; border-radius: 2px; }
.topbar .search-form { width: 240px; order: 2; }
.topbar-inner { gap: 14px; }
.site-header { box-shadow: 0 1px 0 var(--line); }
.breaking-label { color: #fff; }
.breaking-track a time { color: var(--red); font-weight: 800; font-size: 12px; margin-inline-end: 6px; font-variant-numeric: tabular-nums; }

/* Home: the «الرئيسية» block — hero + 4 + grid */
.news-section--home .hero-grid { margin-bottom: 16px; }
.news-grid--home { margin-top: 2px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.news-section--home .section-head h2 { background: var(--navy); }

/* Half rows (خبر خاص / ضيف أثر) */
.half-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 38px; }
.half-row .news-section { margin-bottom: 0; min-width: 0; }
.half-layout { display: grid; gap: 14px; }
.half-layout > .news-card .news-title { font-size: 19px; font-weight: 800; }
.news-section--special .section-head h2 { background: var(--red); }
.news-section--guest .section-head h2 { background: var(--navy); }

/* مستجدات الساعة */
.news-section--flash { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 10px; }
.news-section--flash .section-head h2 { background: var(--red); }
.flash-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.flash-item { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 12px 0 12px; border-bottom: 1px dashed var(--line); }
.flash-item:nth-last-child(-n+2) { border-bottom: 0; }
.flash-item time { display: inline-block; font-size: 12px; font-weight: 800; color: var(--red); padding-top: 3px; font-variant-numeric: tabular-nums; }
.flash-item time::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-inline-end: 6px; vertical-align: 1px; }
.flash-title { font-weight: 700; font-size: 15.5px; line-height: 1.6; color: var(--ink); display: block; }
.flash-text { margin: 4px 0 0; font-size: 13.5px; color: #59616b; }
.flash-list--archive { grid-template-columns: 1fr; }
.flash-list--archive .flash-item { grid-template-columns: 120px minmax(0, 1fr); padding: 16px 0; }
.flash-list--archive .flash-item:nth-last-child(-n+2) { border-bottom: 1px dashed var(--line); }
.single-flash .entry-content { font-size: 18px; }

/* أثر 24 TV */
.news-section--tv .section-head h2 { background: var(--red); }
.news-section--tv .section-head h2::before { content: "▶"; font-size: 11px; margin-inline-end: 8px; vertical-align: 2px; }
.tv-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 16px; }
.tv-grid--even, .tv-grid--archive { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tv-grid--archive { gap: 18px; }
.tv-card { position: relative; border-radius: var(--radius); overflow: hidden; background: #1a2b48; color: #fff; display: flex; flex-direction: column; }
.tv-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #0b1d38; overflow: hidden; }
.tv-card--big .tv-thumb { aspect-ratio: auto; flex: 1; min-height: 300px; }
.tv-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tv-card:hover .tv-thumb img { transform: scale(1.05); }
.tv-thumb .play-badge { top: 50%; right: 50%; transform: translate(50%, -50%); width: 52px; height: 52px; }
.tv-card--big .tv-thumb .play-badge { width: 72px; height: 72px; }
.tv-body { padding: 12px 14px 14px; }
.tv-title { margin: 0; font-size: 15px; line-height: 1.6; color: #fff; }
.tv-card--big .tv-title { font-size: 20px; font-weight: 800; }
.tv-title a:hover { color: #ffd1d3; }
.tv-card .post-meta { color: #c3cad3; }
.tv-grid--archive .tv-card { background: var(--navy); }
.video-player { background: #000; border-radius: var(--radius); overflow: hidden; margin: 0 0 22px; }
.video-player .athar-embed, .video-player .athar-fb-video { position: relative; aspect-ratio: 16 / 9; }
.video-player iframe, .video-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-player .wp-video { position: absolute; inset: 0; width: 100% !important; height: 100%; }
.category-tag--tv { background: var(--navy); }
.single-video .related { background: var(--navy); border-radius: 14px; padding: 20px; color: #e6e9ee; }
.single-video .related .section-head { border-color: rgba(255,255,255,.25); }

/* كتاب أثر 24 */
.news-section--writers .section-head h2 { background: var(--navy); }
.writers-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.writer-card { background: #fff; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line); padding: 20px 16px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform .2s, box-shadow .2s; }
.writer-card:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.writer-avatar img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--soft); box-shadow: 0 0 0 2px var(--red); }
.writer-name { display: block; font-weight: 800; color: var(--red); font-size: 14px; }
.writer-title { margin: 0; font-size: 16px; line-height: 1.6; font-weight: 700; }
.writer-title::before { content: "“"; color: var(--red); font-size: 26px; line-height: 0; margin-inline-end: 4px; vertical-align: -8px; font-family: Georgia, serif; }
.writer-card .post-meta { justify-content: center; }
.single .writer-byline { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.single .writer-byline img { width: 56px; height: 56px; border-radius: 50%; }

/* Site main spacing */
.site-main { padding-top: 22px; }

@media (max-width: 1100px) {
	.tv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tv-card--big { grid-column: 1 / -1; }
	.tv-card--big .tv-thumb { aspect-ratio: 16 / 7; min-height: 0; }
	.writers-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.half-row { grid-template-columns: 1fr; gap: 0; margin-bottom: 0; }
	.half-row .news-section { margin-bottom: 38px; }
	.flash-list { grid-template-columns: 1fr; }
	.flash-item:nth-last-child(2) { border-bottom: 1px dashed var(--line); }
	.topbar .search-form { width: 100%; order: 3; }
}
@media (max-width: 680px) {
	.tv-grid, .tv-grid--even, .tv-grid--archive, .writers-grid { grid-template-columns: 1fr 1fr; }
	.tv-card--big .tv-thumb { aspect-ratio: 16 / 9; }
	.flash-item { grid-template-columns: 76px minmax(0, 1fr); }
	.brand-logo { width: 150px; }
	.brand-word { font-size: 32px; }
}
@media (max-width: 420px) {
	.tv-grid, .tv-grid--even, .tv-grid--archive, .writers-grid { grid-template-columns: 1fr; }
}

/* Badges (شارة الخبر) */
.news-badge { display: inline-block; vertical-align: middle; margin-inline-end: 6px; margin-bottom: 8px; padding: 2px 9px; border-radius: 3px; font: 800 11.5px/1.9 var(--font); color: #fff; background: var(--navy); letter-spacing: .2px; }
.news-badge--urgent { background: var(--red); animation: badge-blink 1.6s infinite; }
.news-badge--live { background: #c40000; }
.news-badge--live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #fff; margin-inline-end: 5px; animation: badge-blink 1s infinite; }
.news-badge--exclusive { background: #b8860b; }
.news-badge--scoop { background: #7a1fa2; }
.news-badge--analysis { background: #0e7490; }
.news-badge--opinion { background: #475569; }
.list-title .news-badge { margin-bottom: 0; font-size: 10.5px; }
.hero-copy .news-badge { box-shadow: 0 2px 8px rgba(0,0,0,.3); }
@keyframes badge-blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.news-source { margin: 0 0 14px; padding: 10px 14px; background: var(--soft); border-inline-start: 3px solid var(--red); border-radius: 6px; font-size: 14px; }

/* Footer policy links */
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0 2px; }
.legal-menu { display: flex; flex-wrap: wrap; gap: 6px 0; justify-content: center; margin: 0; padding: 0; list-style: none; }
.legal-menu li { display: flex; align-items: center; }
.legal-menu li + li::before { content: "·"; opacity: .45; margin: 0 10px; }
.legal-menu a { font-size: 13px; opacity: .85; }
.legal-menu a:hover { opacity: 1; color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.athar-review { background: #fff3cd; color: #7a4b00; padding: 1px 6px; border-radius: 4px; font-size: .9em; }

/* Home slider + flash rail */
.home-slider-row { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; margin-bottom: 8px; }
.home-slider-row--full { grid-template-columns: 1fr; }
.home-slider { position: relative; min-height: 440px; border-radius: var(--radius); overflow: hidden; background: var(--navy); }
.home-slides, .home-slide { position: absolute; inset: 0; }
.home-slide[hidden] { display: none; }
.home-slide .hero-main { position: absolute; inset: 0; min-height: 0; border-radius: 0; }
.home-slide.is-active .hero-main { animation: slide-in .6s ease; }
@keyframes slide-in { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.88); color: var(--navy); font: 800 26px/1 var(--font); cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.25); opacity: .9; }
.slider-btn:hover { background: var(--red); color: #fff; opacity: 1; }
.slider-prev { right: 14px; }
.slider-next { left: 14px; }
.slider-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 5; }
.slider-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: transform .2s, background .2s; }
.slider-dots button[aria-selected="true"] { background: var(--red); transform: scale(1.35); }
.home-slide .hero-copy { padding-bottom: 36px; }
.flash-rail { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 440px; max-height: 440px; }
.flash-rail-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--navy); color: #fff; }
.flash-rail-head h3 { margin: 0; font-size: 15px; color: #fff; display: flex; align-items: center; gap: 8px; }
.flash-rail-head a { font-size: 12px; color: #d6dbe0; }
.flash-rail-head a:hover { color: #fff; }
.flash-rail-list { list-style: none; margin: 0; padding: 4px 14px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.flash-rail-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; line-height: 1.55; }
.flash-rail-list li:last-child { border-bottom: 0; }
.flash-rail-list time { color: var(--red); font-weight: 800; font-size: 12px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.flash-rail-list a { font-weight: 600; color: var(--ink); }
.flash-rail-list a:hover { color: var(--red); }
@media (max-width: 1000px) {
	.home-slider-row { grid-template-columns: 1fr; }
	.flash-rail { min-height: 0; max-height: 300px; }
}
@media (max-width: 680px) {
	.home-slider { min-height: 360px; }
	.home-slide .hero-main .hero-title { font-size: 20px; }
	.slider-btn { width: 36px; height: 36px; font-size: 22px; }
}