/*
Theme Name: آخر الأخبار
Theme URI: https://akher.news/
Description: ثيم أخبار عربي RTL بهوية جريدة آخر الأخبار
Version: 3.9.2
Text Domain: akher
Language: ar
*/

/* =========================================================
   1) المتغيرات (الألوان والخطوط بتتحدث من الـ Customizer)
   ========================================================= */
:root {
  --navy: #0A1F44;
  --navy-2: #14336B;
  --red: #D62828;
  --red-2: #B51E1E;
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --text: #1B2433;
  --muted: #5F6B7E;
  --border: #E2E7F0;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(10, 31, 68, .08);
  --shadow-hover: 0 14px 30px rgba(10, 31, 68, .16);
  --glass: rgba(255, 255, 255, .6);
  --glass-border: rgba(255, 255, 255, .85);
  --font-body: "Readex Pro", sans-serif;
  --font-heading: "Noto Kufi Arabic", sans-serif;
  --fs-article: 18px;
}
[data-theme="dark"] {
  --bg: #0A1322;
  --surface: #121E36;
  --text: #EEF2F8;
  --muted: #A7B3C8;
  --border: #22345A;
  --shadow: 0 6px 20px rgba(0, 0, 0, .3);
  --shadow-hover: 0 14px 30px rgba(0, 0, 0, .45);
  --glass: rgba(18, 30, 54, .55);
  --glass-border: rgba(255, 255, 255, .08);
}

/* =========================================================
   2) الأساس
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-body), "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-heading), sans-serif; line-height: 1.5; margin: 0; }
p { margin: 0 0 1rem; }
.container { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }
.meta { color: var(--muted); font-size: .88rem; }
/* إخفاء بصري آمن: لا يستخدم left:-9999px لأنه في الصفحات RTL يوسّع عرض المستند ويُصغّر الصفحة في وضع Desktop site على الهاتف */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  word-wrap: normal;
}
.infinite-sentinel { height: 1px; }
[data-latest-status] { text-align: center; min-height: 1.5rem; margin-top: .8rem; color: var(--muted); }

/* =========================================================
   3) الأزرار والشارات
   ========================================================= */
.btn {
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  padding: .42rem .95rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: .88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s, border-color .2s;
}
.btn:hover { background: var(--red); border-color: var(--red); }
.btn--cta { background: var(--red); border-color: var(--red); font-weight: 700; }
.btn--cta:hover { background: var(--red-2); }
.btn--ghost { color: var(--text); border: 1px solid var(--border); background: var(--surface); }
.btn--ghost:hover { color: #fff; background: var(--red); border-color: var(--red); }
.btn-solid {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border: 0;
  padding: .6rem 1.2rem;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn-solid:hover { background: var(--red-2); }
.chip {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: .15rem .75rem;
  border-radius: 999px;
  line-height: 1.7;
}
.chip:hover { background: var(--red-2); }
.chip--navy { background: var(--navy); }

/* =========================================================
   4) الهيدر
   ========================================================= */
.site-header {
  position: static;
  z-index: 50;
  width: 100%;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  box-shadow: 0 6px 22px rgba(10, 31, 68, .3);
}
.site-header.is-sticky { position: sticky; top: 0; }
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .85rem;
}
.site-branding { min-width: 0; }
.site-title { margin: 0; font-size: 1.35rem; font-weight: 800; }
.site-title a, .site-branding a { color: #fff; }
.custom-logo { max-height: 56px; width: auto; }
.header-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-width: 0; }
.header-search {
  display: flex;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  overflow: hidden;
}
.header-search input {
  background: transparent;
  border: 0;
  color: #fff;
  padding: .42rem 1rem;
  width: 220px;
  min-width: 0;
  font: inherit;
  font-size: .9rem;
  outline: none;
}
.header-search input::placeholder { color: rgba(255, 255, 255, .7); }
.header-search button {
  background: var(--red);
  border: 0;
  color: #fff;
  padding: 0 1rem;
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
}
.menu-toggle { display: none; }
.main-nav { border-top: 1px solid rgba(255, 255, 255, .12); }
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: .6rem 0;
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.main-nav a {
  display: block;
  padding: .35rem .95rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  opacity: .92;
}
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a {
  background: rgba(255, 255, 255, .14);
  opacity: 1;
}

/* شريط العاجل: حركة مستمرة لأحدث المقالات */
.breaking { background: var(--red); color: #fff; padding: .62rem 0; overflow: hidden; }
.breaking__inner { display: flex; gap: 1rem; align-items: center; min-width: 0; }
.breaking__label {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  background: #fff;
  color: var(--red);
  font-weight: 900;
  padding: .2rem .9rem;
  border-radius: 8px;
  white-space: nowrap;
}
.breaking__track {
  direction: ltr;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 700;
}
.breaking__items {
  display: flex;
  width: max-content;
  animation: akher-breaking-scroll 32s linear infinite !important;
  animation-play-state: running !important;
  will-change: transform;
}
.breaking__group {
  direction: rtl;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2.4rem;
  padding-inline-end: 2.4rem;
}
.breaking__group a {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: #fff;
  text-decoration: none;
}
.breaking__group a::after {
  content: "•";
  color: rgba(255,255,255,.8);
  font-size: 1.2em;
}
.breaking__group a:hover { text-decoration: underline; }
@keyframes akher-breaking-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}
/* يظل شريط العاجل متحركًا باستمرار حتى عند المرور عليه أو التركيز داخله. */
.breaking__items,
.breaking:hover .breaking__items,
.breaking:focus-within .breaking__items {
  animation-play-state: running !important;
}

/* =========================================================
   5) الصفحة الرئيسية
   ========================================================= */
.home { padding-block: 2rem 1rem; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.hero-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-height: 440px;
}
.tile {
  position: relative;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: var(--navy);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  isolation: isolate;
  min-width: 0;
}
.tile img, .tile .no-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform .5s ease;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 31, 68, 0) 25%, rgba(10, 31, 68, .9) 100%);
}
.tile:hover img { transform: scale(1.04); }
.tile__body { padding: clamp(1rem, 2.2vw, 1.65rem); width: 100%; }
.tile__title { font-size: 1.1rem; line-height: 1.5; margin: .5rem 0 .4rem; color: #fff; overflow-wrap: anywhere; }
.tile .meta { color: rgba(255, 255, 255, .8); }
.tile--xl { min-height: 440px; }
.tile--xl .tile__title { font-size: 2rem; line-height: 1.45; }
.tile--sm { min-height: 0; height: 100%; }
.tile--sm .tile__title { font-size: 1.02rem; }

/* عنوان القسم */
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.6rem 0 1.2rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--border);
}
.sec-head h2 {
  position: relative;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  padding-inline-start: .9rem;
  min-width: 0;
}
[data-theme="dark"] .sec-head h2 { color: #fff; }
.sec-head h2::before {
  content: "";
  position: absolute;
  inset-block: .2rem;
  inset-inline-start: 0;
  width: 5px;
  background: var(--red);
  border-radius: 3px;
}
.sec-head a { color: var(--red); font-weight: 700; font-size: .92rem; white-space: nowrap; }
.sec-head a:hover { text-decoration: underline; }
.sec-head--glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-bottom-width: 1px;
  border-radius: 14px;
  padding: .7rem 1rem;
  margin-top: 2.4rem;
}

/* الكروت */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}
.grid-3 > * { min-width: 0; }
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card__img { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.card__img img, .card__img .no-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__img .chip { position: absolute; top: .8rem; inset-inline-start: .8rem; z-index: 1; }
.card__body { display: flex; flex-direction: column; gap: .35rem; flex: 1; padding: .95rem 1.05rem 1.1rem; min-width: 0; }
.card__title { font-size: 1.06rem; line-height: 1.6; overflow-wrap: anywhere; }
.card:hover .card__title { color: var(--red); }
.card .meta { margin-top: auto; }

/* بديل الصورة */
.no-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: rgba(255, 255, 255, .35);
  font-family: var(--font-heading), sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
}

/* القائمة المدمجة */
.list { display: grid; gap: .9rem; }
.list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.list-item:hover { transform: translateX(-3px); }
.list-item > a:first-child {
  flex-shrink: 0;
  width: 120px;
  height: 82px;
  border-radius: 11px;
  overflow: hidden;
}
.list-item img { width: 100%; height: 100%; object-fit: cover; }
.list-item > div { min-width: 0; }
.list-item h3 { font-size: 1rem; line-height: 1.6; margin: 0 0 .2rem; overflow-wrap: anywhere; }
.list-item h3 a:hover { color: var(--red); }

/* =========================================================
   6) الإعلانات
   ========================================================= */
.ad-slot {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 1.5rem auto;
  padding: 0;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}
.ad-slot:empty { display: none; }
.ad-slot img, .ad-slot iframe, .ad-slot ins { max-width: 100%; }

/* =========================================================
   7) الفوتر
   ========================================================= */
.site-footer {
  margin-top: 3.5rem;
  padding: 2.5rem 0 1.5rem;
  background: linear-gradient(180deg, var(--navy), #061430);
  color: #CFD8E8;
  border-top: 4px solid var(--red);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-grid > * { min-width: 0; }
.site-footer h4 { color: #fff; margin-bottom: .8rem; font-size: 1.05rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-footer a:hover { color: #FFB4B4; }
.social { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.social a {
  background: rgba(255, 255, 255, .1);
  border-radius: 999px;
  padding: .3rem .85rem;
  font-size: .88rem;
  font-weight: 600;
}
.social a:hover { background: var(--red); color: #fff; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  text-align: center;
  font-size: .9rem;
}
.footer-credit {
  margin-top: .45rem;
  color: rgba(207, 216, 232, .78);
  font-size: .78rem;
  letter-spacing: .02em;
  direction: ltr;
  unicode-bidi: isolate;
}

/* =========================================================
   8) الأرشيف والبحث وصفحة 404
   ========================================================= */
.archive-wrap { padding-block: 0 2rem; }
.page-head {
  margin: 2rem 0 0;
  padding: 2rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.page-head h1 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); color: #fff; margin: .3rem 0; }
.page-head p { color: rgba(255, 255, 255, .8); margin: 0; }
/* ترقيم الصفحات: صف أفقي بلا نقاط أو قوائم عمودية */
.pagination {
  width: 100%;
  margin: 2.5rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
  direction: rtl;
}
.pagination > ul.page-numbers,
.pagination .nav-links,
.pagination .nav-links ul.page-numbers {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto;
  max-width: 100%;
}
.pagination li {
  display: inline-flex;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.pagination li::before,
.pagination li::marker { content: none !important; display: none !important; }
.pagination a.page-numbers,
.pagination span.page-numbers {
  min-width: 42px;
  min-height: 42px;
  padding: .5rem .85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.pagination span.page-numbers.current,
.pagination a.page-numbers:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
@media (max-width: 480px) {
  .pagination > ul.page-numbers,
  .pagination .nav-links,
  .pagination .nav-links ul.page-numbers { gap: .3rem; }
  .pagination a.page-numbers,
  .pagination span.page-numbers { min-width: 36px; min-height: 38px; padding: .4rem .6rem; }
}
.search-form { display: flex; gap: .5rem; margin-top: 1rem; }
.search-form input {
  flex: 1;
  min-width: 0;
  padding: .75rem 1rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.search-form button {
  padding: .75rem 1.3rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}
.notfound { text-align: center; padding: 4rem 1rem 3rem; }
.notfound__code {
  font-family: var(--font-heading), sans-serif;
  font-size: 7rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--navy), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.notfound h1 { font-size: 1.8rem; margin: 1rem 0 .6rem; }
.notfound p { color: var(--muted); }
.notfound .search-form { max-width: 520px; margin: 1.5rem auto; }
.notfound__links { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1rem; }
.notfound__links a {
  padding: .5rem 1rem;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.notfound__links a:hover { border-color: var(--red); color: var(--red); }

/* =========================================================
   9) صفحة المقال
   ========================================================= */
.article { max-width: 820px; margin: 0 auto; padding: 1.2rem 0 2.5rem; min-width: 0; }
.article-head {
  padding: 1.4rem 1.6rem 1.5rem;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.breadcrumbs { font-size: .88rem; color: var(--muted); margin: 0 0 .9rem; }
.breadcrumbs a:hover { color: var(--red); }
.article-head h1 {
  margin: .7rem 0 1rem;
  font-size: clamp(1.55rem, 4vw, 2.3rem);
  line-height: 1.5;
  color: var(--navy);
  overflow-wrap: anywhere;
}
[data-theme="dark"] .article-head h1 { color: #fff; }
.article-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; color: var(--muted); font-size: .93rem; }
.author-link { color: var(--red); font-weight: 700; }
.author-link:hover { text-decoration: underline; }
.article-tools { margin-top: 1rem; }
.article-hero { margin: 1.5rem 0 1.8rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.article-hero img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.article-content {
  font-size: var(--fs-article);
  line-height: 2;
  overflow-wrap: anywhere;
}
.article-content p { margin: 0 0 1.2rem; }
.article-content h2 { margin: 2rem 0 .8rem; font-size: 1.5rem; color: var(--navy); }
[data-theme="dark"] .article-content h2 { color: #fff; }
.article-content h3 { margin: 1.6rem 0 .6rem; font-size: 1.25rem; }
.article-content img, .article-content figure { max-width: 100%; height: auto; margin: 1.5rem auto; border-radius: 12px; }
.article-content blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.4rem;
  font-weight: 600;
  background: var(--surface);
  border-inline-start: 5px solid var(--red);
  border-radius: 12px;
}
.article-content a { color: var(--red); text-decoration: underline; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.article-content td, .article-content th { border: 1px solid var(--border); padding: .5rem .7rem; }
.article-footer { margin-top: 2rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.tags a {
  padding: .25rem .8rem;
  font-size: .88rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.tags a:hover { border-color: var(--red); color: var(--red); }

/* شريط المشاركة */
.ak-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
  margin-bottom: 2rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.ak-share__label { font-weight: 800; color: var(--navy); }
[data-theme="dark"] .ak-share__label { color: #fff; }
.ak-share__list { display: flex; flex-wrap: wrap; gap: .5rem; flex: 1; }
.ak-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .5rem 1.05rem;
  color: #fff;
  font: inherit;
  font-size: .88rem;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.ak-share__btn:hover { transform: translateY(-2px); opacity: .9; }
.ak-share__btn svg { fill: currentColor; flex-shrink: 0; }
.ak-share__btn span { line-height: 1; }
.ak-share__btn--wa   { background: #25D366; }
.ak-share__btn--x    { background: #111827; }
.ak-share__btn--fb   { background: #1877F2; }
.ak-share__btn--tg   { background: #229ED9; }
.ak-share__btn--copy { background: var(--surface); color: var(--navy); border: 1px solid var(--border); }
[data-theme="dark"] .ak-share__btn--copy { color: #fff; }
.ak-share__btn--copy:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* بوكس الكاتب تحت المقال */
.ak-author {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin: 0 0 2.4rem;
  padding: 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--red);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.ak-author__avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--red);
}
.ak-author__body { flex: 1; min-width: 0; }
.ak-author__tag { font-size: .78rem; font-weight: 700; color: var(--red); }
.ak-author__name { margin: .15rem 0 .25rem; font-size: 1.15rem; }
.ak-author__name a { color: var(--navy); }
[data-theme="dark"] .ak-author__name a { color: #fff; }
.ak-author__name a:hover { color: var(--red); }
.ak-author__bio { margin: 0; color: var(--muted); font-size: .93rem; }
.ak-author__btn {
  flex-shrink: 0;
  padding: .5rem 1.05rem;
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  background: var(--navy);
  border-radius: 999px;
}
.ak-author__btn:hover { background: var(--red); }

.topics { margin-top: 1rem; }

/* =========================================================
   10) صفحة الكاتب
   ========================================================= */
.ak-author-page { padding-bottom: 1rem; }
.ak-profile {
  position: relative;
  margin-top: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.ak-profile__cover {
  height: 150px;
  background:
    radial-gradient(circle at 88% 30%, rgba(214, 40, 40, .6), transparent 38%),
    radial-gradient(circle at 8% 100%, rgba(255, 255, 255, .14), transparent 45%),
    linear-gradient(135deg, var(--navy), var(--navy-2));
}
.ak-profile__main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.3rem;
  margin-top: -60px;
  padding: 0 1.8rem;
}
.ak-profile__avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  border: 5px solid var(--surface);
  box-shadow: 0 10px 26px rgba(10, 31, 68, .25);
}
.ak-profile__info { flex: 1; min-width: 220px; padding-bottom: .4rem; }
.ak-profile__tag {
  display: inline-block;
  padding: .15rem .75rem;
  color: #fff;
  font-size: .76rem;
  font-weight: 700;
  background: var(--red);
  border-radius: 999px;
}
.ak-profile__name { margin: .5rem 0 .3rem; font-size: clamp(1.5rem, 4vw, 2.1rem); color: var(--navy); }
[data-theme="dark"] .ak-profile__name { color: #fff; }
.ak-profile__bio { max-width: 640px; margin: 0; color: var(--muted); }
.ak-profile__stats {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1rem;
  padding: 1.4rem 1.8rem 1.6rem;
  border-top: 1px solid var(--border);
}
.ak-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: .7rem 1.1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.ak-stat strong { font-family: var(--font-heading), sans-serif; font-size: 1.4rem; line-height: 1.2; color: var(--red); }
.ak-stat span { font-size: .88rem; color: var(--muted); }
.ak-stat--link:hover { background: var(--surface); border-color: var(--red); }
.ak-author-page__head { margin-top: 2.4rem; }

/* =========================================================
   11) وضع القراءة المبسط
   ========================================================= */
/* =========================================================
   12) الموبايل
   ========================================================= */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .tile--xl { min-height: 390px; }
  .hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; min-height: 0; }
  .tile--sm { min-height: 210px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-search input { width: 160px; }
}
@media (max-width: 760px) {
  .container, .home, .archive-wrap, .site-footer .container { width: calc(100% - 24px); }
  .header-main { flex-wrap: wrap; gap: .6rem; padding-block: .6rem; }
  .site-branding { flex: 1 1 auto; }
  .custom-logo { max-height: 42px; }
  .site-title { font-size: 1.1rem; }
  .header-actions { width: 100%; flex-wrap: nowrap; gap: .4rem; }
  .header-search { flex: 1 1 0; min-width: 0; }
  .header-search input { width: 100%; padding: .4rem .7rem; }
  .header-search button { padding: 0 .75rem; }
  .header-actions .btn { padding: .38rem .65rem; font-size: .8rem; flex-shrink: 0; }
  .header-actions [data-notify-toggle],
  .header-actions .btn--cta { display: none; }
  .menu-toggle { display: inline-block; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: .2rem; padding-bottom: .8rem; }
  .main-nav.open a { display: block; }
  .article-head h1 { font-size: 1.7rem; }
  .page-head h1 { font-size: 1.5rem; }
  .sec-head h2 { font-size: 1.2rem; }
}
@media (max-width: 640px) {
  .article-head { padding: 1.05rem; border-radius: 18px; }
  .article-content { font-size: calc(var(--fs-article) * .94); }
  .ak-share { flex-direction: column; align-items: stretch; }
  .ak-share__list { justify-content: center; }
  .ak-share__btn { flex: 1 1 calc(50% - .5rem); }
  .ak-author { flex-direction: column; text-align: center; padding: 1.2rem; }
  .ak-author__btn { width: 100%; text-align: center; }
  .ak-profile__cover { height: 110px; }
  .ak-profile__main { flex-direction: column; align-items: center; text-align: center; padding: 0 1.2rem; margin-top: -54px; }
  .ak-profile__avatar img { width: 104px; height: 104px; }
  .ak-profile__info { min-width: 0; }
  .ak-profile__bio { margin-inline: auto; }
  .ak-profile__stats { justify-content: center; padding: 1.2rem; }
  .ak-stat { flex: 1 1 110px; min-width: 110px; }
}
@media (max-width: 560px) {
  .hero-side, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .tile--xl { min-height: 290px; }
  .tile--sm { min-height: 190px; }
  .tile--xl .tile__title { font-size: 1.35rem; }
  .tile--sm .tile__title { font-size: .98rem; }
  .grid-3 { gap: .8rem; }
  .list-item > a:first-child { width: 96px; height: 68px; }
  .footer-grid { grid-template-columns: 1fr; }
  .notfound__code { font-size: 5rem; }
}


/* =========================================================
   13) تحسينات العرض المتجاوب ومنع الحركة الأفقية
   ========================================================= */
html { max-width: 100%; overflow-x: clip; }
body { max-width: 100%; overflow-x: clip; }
.container, .home, .archive-wrap, main, section, article { min-width: 0; }
.container { max-width: 100%; }
.home-section, .hero-grid, .hero-side, .grid-3, .list { min-width: 0; max-width: 100%; }
.hero-grid > *, .hero-side > *, .grid-3 > *, .list-item > * { min-width: 0; }
.tile__body, .card__body, .list-item > div { min-width: 0; overflow-wrap: anywhere; }
.card, .tile, .list-item { max-width: 100%; }
.breaking__inner { min-width: 0; }
.breaking__track { min-width: 0; flex: 1 1 auto; }
.ad-slot { width: 100%; }
.ad-slot iframe, .ad-slot ins, .ad-slot img { max-width: 100% !important; }

/* زر الوضع الليلي بالأيقونة فقط */
.header-actions .theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
}
.theme-icon { display: none; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon--moon { display: block; fill: currentColor; stroke: none; }
[data-theme="dark"] .theme-icon--moon { display: none; }
[data-theme="dark"] .theme-icon--sun { display: block; }

/* عناوين H2 و H3 داخل المقال بتأثير زجاجي شفاف */
.article-content h2,
.article-content h3 {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  padding: .75rem 1rem;
  margin: 1.8rem 0 .9rem;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-inline-start: 4px solid var(--red);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  backdrop-filter: blur(14px) saturate(135%);
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}
.article-content h2 { font-size: 1.42rem; font-weight: 800; }
.article-content h3 { font-size: 1.2rem; font-weight: 700; }
[data-theme="dark"] .article-content h2,
[data-theme="dark"] .article-content h3 { color: #f3f6fc; }

@media (max-width: 760px) {
  .container, .home, .archive-wrap, .site-footer .container { width: calc(100% - 24px); }
  .header-main { align-items: center; }
  .header-actions { width: 100%; display: flex; align-items: center; }
  .header-search { flex: 1 1 0; width: auto; }
  .header-search input { min-width: 0; width: 100%; }
  .header-actions .theme-toggle { flex: 0 0 40px; width: 40px; min-width: 40px; height: 40px; }
  .header-actions .menu-toggle { flex: 0 0 auto; }
  .main-nav, .main-nav.open { max-width: 100%; }
  .main-nav ul { min-width: 0; }
  .main-nav li, .main-nav a { max-width: 100%; overflow-wrap: anywhere; }
  .home { padding-top: 1rem; }
  .hero-grid { gap: .75rem; }
  .tile--xl { min-height: 300px; }
  .hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .tile--sm { min-height: 155px; height: auto; }
  .tile--sm .tile__body { padding: .75rem; }
  .tile--sm .tile__title { font-size: .92rem; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .card__body { padding: .75rem; }
  .card__title { font-size: .95rem; }
  .list-item { gap: .7rem; }
  .list-item > a:first-child { flex: 0 0 96px; width: 96px; }
}
@media (max-width: 560px) {
  .hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--xl { min-height: 255px; }
  .tile--xl .tile__title { font-size: 1.15rem; }
  .tile--sm { min-height: 145px; }
  .tile--sm .tile__title { font-size: .84rem; line-height: 1.45; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card__img { aspect-ratio: 5 / 4; }
  .sec-head { gap: .5rem; }
  .sec-head h2 { font-size: 1.05rem; }
  .sec-head a { font-size: .8rem; }
  .article-content h2 { font-size: 1.18rem; padding: .65rem .8rem; }
  .article-content h3 { font-size: 1.04rem; padding: .6rem .8rem; }
  .article-content { overflow-wrap: anywhere; word-break: normal; }
  .article-content pre, .article-content iframe, .article-content video { max-width: 100%; }
}
@media (max-width: 360px) {
  .container, .home, .archive-wrap, .site-footer .container { width: calc(100% - 18px); }
  .header-actions { gap: .25rem; }
  .header-actions .btn { padding-inline: .45rem; }
  .theme-icon { width: 19px; height: 19px; }
  .tile--sm .tile__title { font-size: .78rem; }
  .card__title { font-size: .88rem; }
}


/* قائمة الموبايل بأيقونة واضحة مع حالات فتح وإغلاق يمكن الوصول إليها */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0 !important;
  border-radius: 12px;
}
.menu-icon { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu-icon--close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon--open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-icon--close { display: block; }
@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .header-actions .menu-toggle { flex: 0 0 42px; width: 42px; min-width: 42px; }
  .main-nav { display: none !important; width: calc(100% - 24px); padding: .45rem .75rem .75rem; margin-inline: auto; border: 1px solid rgba(255,255,255,.16); border-radius: 0 0 14px 14px; background: var(--navy); box-shadow: 0 12px 24px rgba(0,0,0,.2); }
  .main-nav.open { display: block !important; }
  .main-nav ul { display: flex; flex-direction: column; flex-wrap: nowrap; gap: .15rem; padding: 0; margin: 0; }
  .main-nav li { width: 100%; }
  .main-nav a { display: block; width: 100%; padding: .7rem .8rem; border-radius: 9px; }
}


/* =========================================================
   14) إصلاح نهائي لواجهة الهاتف وكروت الأخبار والقائمة
   ========================================================= */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip !important;
}
body, .site-header, .site-header > *, .home, .home-section,
.hero-grid, .hero-side, .grid-3, .breaking, .breaking__inner {
  min-width: 0;
  max-width: 100%;
}
.home, .container.home {
  width: min(1200px, calc(100% - 24px));
  margin-inline: auto;
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.card {
  aspect-ratio: 1 / 1;
  min-height: 0;
  height: auto;
}
.card__img {
  flex: 0 0 54%;
  min-height: 0;
  aspect-ratio: auto;
}
.card__body {
  flex: 1 1 46%;
  min-height: 0;
  overflow: hidden;
  padding: .8rem .9rem .75rem;
  gap: .2rem;
}
.card__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  line-height: 1.45;
  font-size: clamp(.82rem, 1.2vw, 1rem);
  overflow-wrap: anywhere;
}
.card .meta {
  flex: 0 0 auto;
  margin-top: auto;
  font-size: .76rem;
  white-space: nowrap;
}
/* قائمة ثابتة وواضحة فوق المحتوى على الشاشات الصغيرة */
@media (max-width: 760px) {
  .header-main { width: calc(100% - 24px); }
  .header-actions { min-width: 0; }
  .main-nav, .main-nav.open {
    position: relative;
    z-index: 1005;
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    margin: 0 auto .65rem !important;
    overflow: visible;
  }
  .main-nav:not(.open) { display: none !important; }
  .main-nav.open { display: block !important; }
  .main-nav ul { width: 100%; }
  .main-nav a { white-space: normal; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .card { aspect-ratio: 1 / 1; }
  .card__img { flex-basis: 53%; }
  .card__body { padding: .6rem .65rem .55rem; }
  .card__title { -webkit-line-clamp: 3; font-size: clamp(.78rem, 3.1vw, .94rem); line-height: 1.42; }
  .card .meta { font-size: .7rem; }
  .hero-grid, .hero-side { width: 100%; }
  .tile, .card { transform: none; }
}
@media (max-width: 380px) {
  .grid-3 { gap: .55rem; }
  .card__body { padding: .5rem; }
  .card__title { font-size: .76rem; }
}


/* =========================================================
   15) إصلاح عرض الصفحة الرئيسية والقائمة - إصدار 3.5
   ========================================================= */
/* ووردبريس يضيف class=home إلى BODY؛ لا يجب تقييد عرض BODY كأنه صندوق المحتوى. */
html, body { width: 100%; max-width: 100%; margin-inline: 0; }
body.home { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
main.container.home {
  display: block;
  width: min(1600px, calc(100% - 48px)) !important;
  max-width: 1600px !important;
  margin: 0 auto !important;
  padding: 2rem 0 1rem;
}
body.home .site-header,
body.home .site-footer,
body.home .breaking { width: 100%; max-width: none; }
body.home .home-section,
body.home .hero-grid,
body.home .grid-3 { width: 100%; max-width: 100%; }

/* قائمة الهاتف: مساحة ظاهرة مستقلة أسفل الهيدر */
@media (max-width: 760px) {
  body.home { padding: 0 !important; }
  main.container.home {
    width: calc(100% - 24px) !important;
    max-width: none !important;
    padding: 1rem 0 1rem;
  }
  .site-header { position: relative; z-index: 1000; }
  .header-main { width: calc(100% - 24px); }
  .header-actions { width: 100%; min-width: 0; flex-wrap: nowrap; }
  .main-nav {
    display: none !important;
    position: relative;
    z-index: 1001;
    width: calc(100% - 24px) !important;
    max-width: none !important;
    margin: 0 auto .75rem !important;
    padding: .5rem .7rem !important;
    background: #102b58;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0,0,0,.22);
  }
  .main-nav.open { display: block !important; visibility: visible !important; }
  .main-nav ul, .main-nav .menu {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    gap: .2rem !important;
  }
  .main-nav li { display: block; width: 100%; }
  .main-nav a { display: block !important; width: 100%; padding: .7rem .85rem !important; color: #fff !important; white-space: normal; }
  .main-nav.open:empty { min-height: 0; }
}
@media (min-width: 761px) {
  main.container.home { width: min(1600px, calc(100% - 48px)) !important; }
}

/* =========================================================
   16) تثبيت الحركة الأفقية على الهواتف فقط - إصدار 3.6
   ========================================================= */
@media (max-width: 760px) {
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overscroll-behavior-x: none;
  }
  body {
    position: relative;
    inset-inline: auto !important;
    touch-action: pan-y pinch-zoom;
  }
  .site-header,
  .site-header > *,
  .breaking,
  .breaking__inner,
  main.container.home,
  .home-section,
  .hero-grid,
  .hero-side,
  .grid-3,
  .list,
  .site-footer,
  .site-footer .container {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  main.container.home {
    width: calc(100% - 24px) !important;
    margin-inline: auto !important;
  }
  .home-section,
  .hero-grid,
  .hero-side,
  .grid-3,
  .list {
    overflow-x: clip;
  }
  .breaking__track {
    overflow-x: hidden !important;
    touch-action: pan-y;
  }
  .ad-slot,
  .ad-slot iframe,
  .ad-slot ins,
  .ad-slot img,
  .ad-slot video {
    box-sizing: border-box !important;
    max-width: 100% !important;
  }
  img, video, iframe, embed, object {
    max-inline-size: 100% !important;
  }
}

/* منع تأثيرات hover التي تظل عالقة بعد اللمس على الهواتف */
@media (hover: none) and (pointer: coarse) {
  .card:hover,
  .list-item:hover,
  .tile:hover,
  .tile:hover img,
  .card:hover .card__title {
    transform: none !important;
  }
  .card:hover,
  .list-item:hover {
    box-shadow: var(--shadow) !important;
  }
}


/* =========================================================
   17) تكبير كروت الأخبار قليلًا وحذف شارة القسم من كروت الأرشيف - 3.7
   ========================================================= */
.grid-3 { gap: 1rem; }
.archive-wrap { width: min(1320px, calc(100% - 32px)); }
@media (max-width: 760px) {
  .container, .home, .archive-wrap, .site-footer .container {
    width: calc(100% - 16px) !important;
  }
  main.container.home { width: calc(100% - 16px) !important; }
  .grid-3 { gap: .55rem !important; }
  .card__body { padding: .68rem .7rem .62rem; }
  .card__title { font-size: clamp(.8rem, 3.2vw, .96rem); }
}


/* إصدار 3.8: نقل البحث إلى قائمة الهاتف الجانبية */
.mobile-nav-search { display: none; }
@media (max-width: 760px) {
  .header-actions > .header-search { display: none !important; }
  .main-nav .mobile-nav-search {
    display: flex !important;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    gap: 0;
    margin: 0 0 .65rem;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 12px;
    background: rgba(255,255,255,.12);
  }
  .main-nav .mobile-nav-search input {
    display: block;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    height: 44px;
    padding: .55rem .8rem;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    font: inherit;
    text-align: right;
  }
  .main-nav .mobile-nav-search input::placeholder { color: rgba(255,255,255,.72); }
  .main-nav .mobile-nav-search button {
    flex: 0 0 auto;
    min-width: 64px;
    padding: 0 .9rem;
    border: 0;
    color: #fff;
    background: var(--red, #c9232b);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
  }
}


/* =========================================================
   18) إصلاح الرئيسية في وضع سطح المكتب على الهاتف + ترتيب هيدر الهاتف - 3.9
   ========================================================= */
/* بعض متصفحات الهاتف عند تفعيل Desktop site تستخدم عرض layout viewport مختلفًا؛
   اجعل حاوية الرئيسية محسوبة من عرض نافذة العرض نفسها لا من عرض عنصر أب. */
body.home main.container.home {
  display: block !important;
  width: min(1600px, calc(100vw - 48px)) !important;
  max-width: 1600px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  box-sizing: border-box !important;
}
body.home main.container.home > .hero-grid,
body.home main.container.home > .home-section,
body.home main.container.home > .sec-head,
body.home main.container.home > .list {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
.mobile-nav-theme-toggle { display: none; }
@media (max-width: 760px) {
  /* الشعار/اسم الموقع في منتصف الهيدر */
  .site-header .header-main {
    position: relative !important;
    justify-content: flex-start !important;
    min-height: 76px;
    padding-top: .8rem;
    padding-bottom: .8rem;
  }
  .site-header .site-branding {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 2;
    width: max-content;
    max-width: 48%;
    text-align: center;
    white-space: nowrap;
  }
  .site-branding .custom-logo-link { display: inline-flex; justify-content: center; }
  .site-branding .custom-logo { max-width: 100%; max-height: 48px; object-fit: contain; }
  .site-branding .site-title { font-size: clamp(.95rem, 4vw, 1.25rem); overflow: hidden; text-overflow: ellipsis; }
  .site-header .header-actions {
    position: relative;
    z-index: 3;
    width: 100% !important;
    justify-content: flex-start !important;
    padding-top: 3.2rem;
    flex-wrap: nowrap !important;
  }
  .header-actions > .theme-toggle { display: none !important; }
  .main-nav .mobile-nav-theme-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: 100%;
    min-height: 44px;
    margin: 0 0 .6rem;
    padding: .55rem .85rem !important;
    border-radius: 10px;
    color: #fff;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    font: inherit;
    text-align: right;
  }
  .main-nav .mobile-nav-theme-toggle .theme-icon { display: inline-block !important; width: 20px; height: 20px; }
  [data-theme="dark"] .main-nav .mobile-nav-theme-toggle .theme-icon--moon { display: none !important; }
  [data-theme="dark"] .main-nav .mobile-nav-theme-toggle .theme-icon--sun { display: inline-block !important; }
  body.home main.container.home {
    width: calc(100vw - 16px) !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}


/* =========================================================
   19) تحسين شعار الهيدر وقابلية النقر - 4.0
   ========================================================= */
.site-branding { position: relative; }
.site-branding .custom-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  line-height: 0;
  text-decoration: none;
  pointer-events: auto;
}
.site-branding .custom-logo {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 240px !important;
  max-height: 64px !important;
  object-fit: contain;
  object-position: center;
}
@media (max-width: 760px) {
  /* رفع الشعار فوق طبقة أدوات الهيدر حتى يستقبل النقرات بشكل صحيح */
  .site-header .site-branding {
    z-index: 8 !important;
    pointer-events: auto !important;
    max-width: 58% !important;
  }
  .site-header .site-branding .custom-logo-link {
    width: 100%;
    min-height: 48px;
    padding: 3px 6px;
  }
  .site-header .site-branding .custom-logo {
    max-width: min(190px, 56vw) !important;
    max-height: 58px !important;
    width: auto !important;
    height: auto !important;
  }
  .site-header .header-actions { z-index: 3 !important; }
}
