/* ============================================================
   ELRASKA TECH — style.css v2.0 (نسخة نظيفة موحّدة)
   Dark (افتراضي) / Light عبر CSS Variables

   00 المتغيرات        08 الشريط الجانبي
   01 الأساس           09 صفحة المقال + أزرار التحميل
   02 أدوات عامة        10 الفوتر + زر الرجوع للأعلى
   03 الهيدر            11 الإطار الزجاجي الموحّد
   04 شريط الهاتف       12 لوحة التحكم + تسجيل الدخول
   05 السلايدر          13 صفحة الإعلانات /go/
   06 الأكثر مشاهدة     14 الحركات + تفضيلات الوصول
   07 الرئيسية + البطاقات
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

/* ============================================================
   00 المتغيرات
   ============================================================ */
:root,
html[data-theme="dark"] {
  color-scheme: dark;

  --bg-0: #0a0f1a;  --bg-1: #0e1524;  --bg-2: #131c2e;  --bg-3: #1a2438;

  --surface:       rgba(20, 29, 46, .78);
  --surface-2:     rgba(24, 35, 54, .93);
  --surface-solid: #131c2e;
  --soft:          rgba(255, 255, 255, .04);
  --soft-2:        rgba(255, 255, 255, .07);
  --soft-line:     rgba(255, 255, 255, .06);
  --input-bg:      rgba(10, 15, 26, .55);

  --line:   rgba(148, 180, 210, .12);
  --line-2: rgba(94, 234, 212, .28);

  --text:   #e8eef7;
  --text-2: #94a9c0;
  --text-3: #64748b;

  --cyan: #38bdf8;  --mint: #5eead4;  --mint-2: #99f6e4;

  --grad:      linear-gradient(120deg, #5eead4 0%, #38bdf8 100%);
  --grad-soft: linear-gradient(120deg, rgba(94,234,212,.12), rgba(56,189,248,.08));
  --grad-text: linear-gradient(100deg, #99f6e4, #5eead4 45%, #38bdf8);
  --on-grad:   #0a0f1a;
  --glow:      rgba(56, 189, 248, .28);
  --ring:      rgba(94, 234, 212, .12);

  --shadow:    0 8px 28px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04);
  --shadow-lg: 0 20px 55px rgba(0,0,0,.45);

  --frame-1: rgba(94, 234, 212, .62);
  --frame-2: rgba(56, 189, 248, .30);
  --frame-3: rgba(148, 180, 210, .10);

  --ok: #6ee7b7;     --ok-bg: rgba(52,211,153,.14);
  --warn: #fcd34d;   --warn-bg: rgba(251,191,36,.14);
  --info: #7dd3fc;   --info-bg: rgba(56,189,248,.14);
  --danger: #fca5a5; --danger-bg: rgba(248,113,113,.14);

  --overlay:         rgba(10, 15, 26, .72);
  --veil:            10, 15, 26;
  --header-scrolled: rgba(9, 16, 29, .98);
  --nav-scrolled:    rgba(16, 26, 43, .98);
  --go-bg:           #0e1626;
  --go-card:         rgba(30, 44, 68, .82);
  --fx-opacity:      1;

  --r: 14px; --r2: 18px; --r3: 24px; --r4: 30px; --full: 999px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t: all .3s var(--ease);
  --font: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;

  --bg-0: #eef3f8;  --bg-1: #f5f8fb;  --bg-2: #ffffff;  --bg-3: #e2eaf2;

  --surface:       rgba(255, 255, 255, .80);
  --surface-2:     rgba(255, 255, 255, .94);
  --surface-solid: #ffffff;
  --soft:          rgba(15, 31, 51, .04);
  --soft-2:        rgba(15, 31, 51, .07);
  --soft-line:     rgba(15, 31, 51, .08);
  --input-bg:      rgba(255, 255, 255, .92);

  --line:   rgba(15, 60, 90, .13);
  --line-2: rgba(13, 148, 136, .40);

  --text:   #0f1f33;
  --text-2: #3f5871;
  --text-3: #6f8599;

  --cyan: #0284c7;  --mint: #0d9488;  --mint-2: #0f766e;

  --grad:      linear-gradient(120deg, #2dd4bf 0%, #0ea5e9 100%);
  --grad-soft: linear-gradient(120deg, rgba(13,148,136,.10), rgba(2,132,199,.08));
  --grad-text: linear-gradient(100deg, #0f766e, #0891b2 50%, #0284c7);
  --on-grad:   #04111c;
  --glow:      rgba(14, 165, 233, .22);
  --ring:      rgba(13, 148, 136, .14);

  --shadow:    0 8px 26px rgba(20,50,80,.10), inset 0 1px 0 rgba(255,255,255,.6);
  --shadow-lg: 0 18px 50px rgba(20,50,80,.16);

  --frame-1: rgba(13, 148, 136, .55);
  --frame-2: rgba(2, 132, 199, .30);
  --frame-3: rgba(15, 60, 90, .10);

  --ok: #047857;     --ok-bg: rgba(16,185,129,.14);
  --warn: #b45309;   --warn-bg: rgba(245,158,11,.16);
  --info: #0369a1;   --info-bg: rgba(14,165,233,.14);
  --danger: #b91c1c; --danger-bg: rgba(239,68,68,.12);

  --overlay:         rgba(15, 31, 51, .55);
  --veil:            238, 243, 248;
  --header-scrolled: rgba(255, 255, 255, .97);
  --nav-scrolled:    rgba(255, 255, 255, .96);
  --go-bg:           #eef3f8;
  --go-card:         rgba(255, 255, 255, .86);
  --fx-opacity:      .55;
}

/* ============================================================
   01 الأساس
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 100px; }

body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.75;
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding: 86px 0 90px;              /* هاتف: هيدر فوق + شريط سفلي */
}

body.go-page,
body:has(.admin-wrapper),
body:has(.login-page) { padding: 0; }

a { color: var(--cyan); text-decoration: none; transition: var(--t); }
a:hover { color: var(--mint); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
select option { background: var(--surface-solid); color: var(--text); }
::placeholder { color: var(--text-3); }
::selection { background: var(--mint); color: var(--on-grad); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--grad); border-radius: 99px; }

.container { width: 100%; max-width: 1340px; margin: 0 auto; padding: 0 20px; }

/* خلفية هادئة */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  opacity: var(--fx-opacity);
  background:
    radial-gradient(1000px 620px at 12% -8%, rgba(56,189,248,.10), transparent 62%),
    radial-gradient(880px 560px at 90% 5%,   rgba(94,234,212,.08), transparent 62%),
    radial-gradient(760px 540px at 50% 105%, rgba(96,165,250,.06), transparent 65%);
}
.wave-fx {
  position: fixed; inset: -20%; z-index: -2; pointer-events: none;
  opacity: var(--fx-opacity); filter: blur(90px);
  background:
    radial-gradient(48% 34% at 22% 26%, rgba(56,189,248,.08), transparent 70%),
    radial-gradient(44% 32% at 78% 32%, rgba(94,234,212,.06), transparent 70%),
    radial-gradient(52% 36% at 50% 88%, rgba(96,165,250,.05), transparent 72%);
  animation: drift 30s ease-in-out infinite alternate;
}
.grid-fx {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: calc(.18 * var(--fx-opacity));
  background-image:
    linear-gradient(rgba(148,180,210,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,180,210,.06) 1px, transparent 1px);
  background-size: 70px 70px;
  -webkit-mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, #000 15%, transparent 78%);
          mask-image: radial-gradient(ellipse 85% 55% at 50% 0%, #000 15%, transparent 78%);
}

/* نعومة الانتقال بين الوضعين (كلاس مؤقت من JS) */
html.theme-switching, html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after {
  transition: background-color .4s var(--ease), border-color .4s var(--ease),
              color .4s var(--ease), box-shadow .4s var(--ease) !important;
}

@media (min-width: 881px) {
  html { scroll-padding-top: 185px; }
  body { padding: 174px 0 0; }        /* كمبيوتر: هيدر ثابت بصفين */
}

/* ============================================================
   02 أدوات عامة: أزرار / نماذج / تنبيهات / إعلانات
   ============================================================ */
.muted { color: var(--text-3); }
.ltr { direction: ltr; display: inline-block; }
.nowrap { white-space: nowrap; }
.empty-row { padding: 40px; text-align: center; color: var(--text-3); }

.btn-primary, .cta-button, .submit-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--grad); color: var(--on-grad); font-weight: 800;
  box-shadow: 0 8px 20px var(--glow); transition: var(--t);
}
.btn-primary:hover, .cta-button:hover, .submit-btn:hover {
  transform: translateY(-2px); color: var(--on-grad); box-shadow: 0 12px 28px var(--glow);
}
.cta-button { padding: 14px 32px; border-radius: var(--full); font-size: 1.02rem; font-weight: 900; position: relative; overflow: hidden; }
.cta-button::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(155deg, rgba(255,255,255,.35), transparent 55%); }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 14px; cursor: pointer; font-weight: 700;
  background: var(--soft); color: var(--text-2); border: 1px solid var(--line); transition: var(--t);
}
.btn-secondary:hover { background: var(--grad-soft); color: var(--mint); }
.btn-block { width: 100%; text-align: center; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 7px; color: var(--text-2); font-weight: 700; font-size: .9rem; }

.form-group input, .form-group select, .form-group textarea,
.filter-bar input, .filter-bar select, .forbidden-form input,
.newsletter-form input, .sheet-search input, .search-bar input {
  width: 100%; padding: 12px 15px; border-radius: 13px;
  background: var(--input-bg); border: 1px solid var(--line); color: var(--text); transition: var(--t);
}
:is(.form-group, .filter-bar, .forbidden-form, .newsletter-form, .sheet-search, .search-bar) :is(input, select, textarea):focus {
  outline: none; border-color: var(--line-2); box-shadow: 0 0 0 4px var(--ring);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.alert { padding: 13px 16px; border-radius: 13px; margin-bottom: 16px; font-size: .9rem; }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--danger-bg); color: var(--danger); }

.ad-slot { width: 100%; max-width: 1340px; margin: 0 auto 20px; padding: 0 20px; }
.ad-box, .ad-content {
  min-height: 90px; display: grid; place-items: center; text-align: center;
  color: var(--text-3); font-size: .86rem; font-weight: 700;
  background: var(--soft); border: 1.5px dashed var(--line); border-radius: var(--r2);
}
.ad-content { margin: 24px 0; padding: 20px; }
.ad-slot .ad-box, .top-ad-space .ad-content { margin: 0; }
.top-ad-space { max-width: 1340px; margin: 0 auto 16px; padding: 0 20px; }

@media (max-width: 880px) {
  .form-row { grid-template-columns: 1fr; }
  .ad-slot, .top-ad-space { padding: 0 14px; margin-bottom: 14px; }
  .ad-box, .ad-content { min-height: 80px; font-size: .8rem; border-radius: 14px; }
}

/* ============================================================
   03 الهيدر
   هاتف: صف واحد (الشعار). كمبيوتر: صفان ثابتان + حالة مصغّرة
   ============================================================ */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding-top: 10px; pointer-events: none; }
.site-header > .container { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; }
.header-top, .main-nav { pointer-events: auto; }

.header-top {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 54px; padding: 8px 14px; border-radius: 22px;
  background: var(--surface-2); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
}
/* =====================================================
   Brand Logo (image only, theme-aware)
   ===================================================== */

/* =====================================================
   Brand Logo (image + text, theme-aware)
   ===================================================== */

.brand-logo {
  direction: ltr;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
  color: var(--text);
}

.brand-logo:hover {
  color: var(--text);
}

.brand-logo-imgwrap {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.brand-logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: height .45s var(--ease);
}

.brand-logo-light {
  display: none;
}

html[data-theme="light"] .brand-logo-dark {
  display: none;
}

html[data-theme="light"] .brand-logo-light {
  display: block;
}

.brand-logo-text {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  direction: ltr;
  font-size: 1.40rem;
  font-weight: 900;
  letter-spacing: -.5px;
  line-height: 1;
}

.brand-name {
  color: var(--mint);
  font-weight: 900;
}

.brand-tech {
  color: var(--text);
  font-weight: 800;
}

/* عند السكرول */
html.is-scrolled .brand-logo-img {
  height: 38px;
}

html.is-scrolled .brand-logo-text {
  font-size: 1.15rem;
}

/* الهاتف: نخليو الصورة فقط باش ما يزحمش */
@media (max-width: 880px) {
  .brand-logo-img {
    height: 40px;
  }

  .brand-logo-text {
  display: inline-flex;
  font-size: 1rem;
  }
}





/* الوضع الفاتح */
html[data-theme="light"] .brand-tech {
  color: #172b3d;
}

html[data-theme="light"] .brand-mark-wrap {
  background: rgba(255,255,255,.72);
  border-color: rgba(8,145,178,.24);
}

/* الحالة المصغرة عند السكرول */
html.is-scrolled .logo-text {
  font-size: 1.18rem;
}

html.is-scrolled .brand-mark-wrap {
  width: 35px;
  height: 35px;
  padding: 4px;
  border-radius: 10px;
}

/* الهاتف */
@media (max-width: 880px) {
  .logo-text {
    font-size: 1.12rem;
  }

  .brand-mark-wrap {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }
}

.search-bar { display: none; flex: 1; max-width: 420px; position: relative; transition: max-width .45s var(--ease); }
.search-bar input { padding: 12px 46px 12px 18px; border-radius: var(--full); min-height: 44px; transition: var(--t), min-height .45s var(--ease), padding .45s var(--ease); }
.search-bar button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: transparent; border: 0; color: var(--text-2); cursor: pointer;
}
.search-bar button:hover { color: var(--mint); background: var(--grad-soft); }

.social-links { display: none; gap: 8px; }
.social-links a, .theme-toggle {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; cursor: pointer;
  background: var(--soft); border: 1px solid var(--line); color: var(--text-2);
  transition: var(--t), width .45s var(--ease), height .45s var(--ease), border-radius .45s var(--ease);
}
.social-links a:hover, .theme-toggle:hover { background: var(--grad); color: var(--on-grad); border-color: transparent; transform: translateY(-2px); }
.theme-toggle svg { width: 18px; height: 18px; }

/* بار الفئات */
.main-nav { display: none; }
.nav-container {
  display: flex; align-items: center; height: 64px; padding: 6px 8px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--full); box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  transition: background-color .45s var(--ease), border-color .45s var(--ease);
}
.nav-scroll { width: 100%; height: 100%; display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-links { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: max-content; margin: 0 auto; padding: 0 4px; }
.nav-link {
  display: flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: var(--full);
  color: var(--text-2); font-weight: 700; font-size: .92rem; white-space: nowrap; transition: var(--t);
}
.nav-link:hover { color: var(--mint); background: var(--grad-soft); }
.nav-link.active:not(.home-link) { color: var(--cyan); background: var(--grad-soft); }
.nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.home-link, .home-link:hover { background: var(--grad); color: var(--on-grad); font-weight: 800; padding: 11px 22px; box-shadow: 0 6px 18px var(--glow); }
.home-link:hover { transform: translateY(-1px); }
.menu-toggle { display: none; }

@media (min-width: 881px) {
  .site-header { padding-top: 12px; }

  /* حجاب خلف البار العلوي فقط: يمنع ظهور المحتوى من خلاله */
  .site-header::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 92px; z-index: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(var(--veil), .96), rgba(var(--veil), .72) 70%, transparent);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  }

  /* صفان بارتفاع ثابت: البار العلوي لا يحرّك بار الفئات أبداً */
  .site-header > .container { display: grid; grid-template-rows: 72px 64px; row-gap: 10px; align-items: start; }

  .header-top {
    width: 100%; max-width: 100%; margin: 0 auto;
    height: 72px; min-height: 72px; padding: 10px 18px; border-radius: var(--r4);
    transition: max-width .45s var(--ease), height .45s var(--ease), min-height .45s var(--ease),
                padding .45s var(--ease), border-radius .45s var(--ease),
                background-color .45s var(--ease), border-color .45s var(--ease), box-shadow .45s var(--ease);
  }
  .logo { font-size: 1.35rem; }
  .logo-icon { width: 40px; height: 40px; font-size: 1.1rem; border-radius: 12px; }
  .search-bar { display: block; }
  .social-links { display: flex; }

  .main-nav {
    display: block; height: 64px;
    opacity: var(--category-nav-opacity, 1);
    transform: translateY(var(--category-nav-shift, 0px));
    transition: opacity .08s linear, transform .18s var(--ease);
  }
  html.category-nav-hidden .main-nav { visibility: hidden; pointer-events: none; }

  /* الحالة المصغّرة عند النزول (JS يضيف is-scrolled على html) */
  html.is-scrolled .header-top {
    max-width: 1080px; height: 56px; min-height: 56px; padding: 7px 16px; border-radius: 18px;
    background: var(--header-scrolled); border-color: var(--line-2); box-shadow: var(--shadow-lg);
  }
  html.is-scrolled .logo { font-size: 1.17rem; }
  html.is-scrolled .logo-icon { width: 35px; height: 35px; font-size: .95rem; border-radius: 10px; }
  html.is-scrolled .search-bar { max-width: 390px; }
  html.is-scrolled .search-bar input { min-height: 39px; padding-top: 8px; padding-bottom: 8px; }
  html.is-scrolled .social-links a, html.is-scrolled .theme-toggle { width: 33px; height: 33px; border-radius: 10px; }
  html.is-scrolled .nav-container { background: var(--nav-scrolled); border-color: var(--line-2); }
}

/* ============================================================
   04 شريط الهاتف السفلي + Sheets + زر تبديل الوضع
   ============================================================ */
.mobile-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1100;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface-2); border-top: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
}
.mobile-bar-inner { display: flex; align-items: center; justify-content: space-around; }
.mbar-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 14px; border-radius: 14px; background: none; border: 0; cursor: pointer;
  color: var(--text-3); font-size: .67rem; font-weight: 800; transition: var(--t);
}
.mbar-item svg { width: 22px; height: 22px; }
.mbar-item:hover { color: var(--mint); }
.mbar-item.active { color: var(--on-grad); background: var(--grad); }

.sheet-overlay {
  display: none; position: fixed; inset: 0; z-index: 1150; opacity: 0;
  background: var(--overlay); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: opacity .3s var(--ease);
}
.sheet-overlay.open { display: block; opacity: 1; }

.sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1200; max-height: 78vh; overflow-y: auto;
  padding: 14px 18px calc(24px + env(safe-area-inset-bottom));
  background: var(--surface-2); border-top: 1px solid var(--line); border-radius: 28px 28px 0 0;
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  transform: translateY(100%); transition: transform .4s var(--ease);
}
.sheet.open { transform: translateY(0); }
.sheet-handle { width: 42px; height: 4px; margin: 0 auto 16px; background: var(--soft-2); border-radius: 99px; }
.sheet-title { font-size: 1.05rem; font-weight: 900; margin-bottom: 14px; text-align: center; color: var(--mint); }
.sheet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sheet-link {
  display: flex; align-items: center; gap: 10px; padding: 14px 15px; border-radius: 16px;
  background: var(--soft); border: 1px solid var(--line); color: var(--text-2); font-weight: 700; font-size: .92rem;
  cursor: pointer; text-align: right; width: 100%;
}
.sheet-link:hover, .sheet-link.active { background: var(--grad-soft); border-color: var(--line-2); color: var(--mint); }
.sheet-search { margin-bottom: 14px; position: relative; }
.sheet-search input { padding: 14px 46px 14px 16px; border-radius: var(--full); }
.sheet-search button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--text-2); cursor: pointer; padding: 8px; }

/* زر الوضع: يعرض الإجراء التالي (في الداكن ☀ "الوضع الفاتح" والعكس) */
[data-theme-toggle] .ico-moon, [data-theme-toggle] .lbl-dark { display: none; }
html[data-theme="light"] [data-theme-toggle] .ico-moon,
html[data-theme="light"] [data-theme-toggle] .lbl-dark { display: inline-flex; }
html[data-theme="light"] [data-theme-toggle] .ico-sun,
html[data-theme="light"] [data-theme-toggle] .lbl-light { display: none; }
[data-theme-toggle] svg { width: 18px; height: 18px; flex-shrink: 0; }

@media (max-width: 880px) {
  .mobile-bar { display: block; }
}
@media (max-width: 480px) {
  .sheet-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   05 السلايدر الرئيسي
   ============================================================ */
.hero-slider {
  position: relative; width: calc(100% - 40px); max-width: 1340px; height: 480px;
  margin: 8px auto 28px; border-radius: var(--r4); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--bg-2);
  
}
.slider-slides { position: relative; width: 100%; height: 100%; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility .8s; }
.slide.active { opacity: 1; visibility: visible; }
.slide-bg { position: absolute; inset: 0; }
.slide-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 8s var(--ease); }
.slide.active .slide-bg img { transform: scale(1); }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,10,18,.96) 8%, rgba(6,10,18,.55) 48%, rgba(6,10,18,.2) 100%); }
.slide-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 72px; }
.slide-badge { position: absolute; inset-inline-end: 0; inset-block-start: 0; z-index: 3; display: inline-flex; width: fit-content; padding: 6px 14px; margin: clamp(12px, 3vw, 24px); border-radius: var(--full); background: var(--grad); color: var(--on-grad); font-size: .8rem; font-weight: 800; }
.slide-title { max-width: 820px; margin-bottom: 12px; color: #fff; font-size: 2.1rem; font-weight: 900; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.slide-excerpt { max-width: 640px; margin-bottom: 14px; color: #d3e0ea; font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slide-meta { margin-bottom: 18px; color: #a9bccb; font-size: .86rem; }

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: 1.4rem;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: var(--t);
}
.slider-arrow:hover { background: var(--grad); color: var(--on-grad); border-color: transparent; }
.slider-prev { right: 18px; }
.slider-next { left: 18px; }
.slider-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 7px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--full); }
.dot { width: 8px; height: 8px; border: 0; border-radius: 99px; background: rgba(255,255,255,.3); cursor: pointer; padding: 0; transition: var(--t); }
.dot.active { width: 28px; background: var(--grad); }

@media (max-width: 880px) {
  .hero-slider { width: calc(100% - 28px); height: 360px; margin: 6px auto 22px; border-radius: 22px; }
  .slide-title { font-size: 1.3rem; }
  .slide-excerpt { display: none; }
  .slide-content { padding-bottom: 58px; }
  .slider-arrow { width: 40px; height: 40px; font-size: 1.2rem; }
  .slider-prev { right: 10px; } .slider-next { left: 10px; }
}
@media (max-width: 480px) {
  .hero-slider { width: calc(100% - 24px); height: 320px; }
  .slide-title { font-size: 1.15rem; }

  .slide-glass { padding: 18px 20px !important; border-radius: 18px !important; }
  .slide-title { font-size: 1.12rem; }
}

/* ═══════════ Modern Glass Hero Slider ═══════════ */
.hero-slider {
  border-radius: 30px;
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
}

.slide-overlay {
  background:
    linear-gradient(to top, rgba(6,10,18,.98) 4%, rgba(6,10,18,.72) 40%, rgba(6,10,18,.08) 80%),
    radial-gradient(120% 80% at 80% 10%, rgba(56,189,248,.12), transparent 55%);
}

.slide-content {
  justify-content: flex-end;
  padding-bottom: 56px;
  padding-inline: clamp(18px, 3.5vw, 40px);
}

.slide-glass {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 640px;
  padding: 26px 30px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 20px 50px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.12);
}

.slide-badge {
  margin-bottom: 0;
  padding: 7px 16px;
  font-size: .78rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  background: var(--grad);
  color: var(--on-grad);
  box-shadow: 0 8px 24px var(--glow);
}

.slide-title {
  margin-bottom: 2px;
  font-size: 2.2rem;
  background: linear-gradient(115deg, #fff 35%, #a5f3fc 70%, #5eead4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  line-height: 1.3;
}

.slide-excerpt {
  margin-bottom: 4px;
  color: rgba(226,232,240,.92);
}

.slide-meta {
  margin-bottom: 12px;
  color: rgba(165,180,207,.9);
}

.slide-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--full);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
}

.slider-arrow {
  width: 48px; height: 48px;
  font-size: 1.5rem;
  border-radius: 16px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.slider-arrow:hover {
  background: var(--grad);
  color: var(--on-grad);
  transform: translateY(-50%) scale(1.06);
}

.slider-dots {
  bottom: 18px;
  gap: 4px;
  padding: 9px 14px;
  background: rgba(10,15,26,.35);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dot {
  width: 7px; height: 7px;
  background: rgba(255,255,255,.35);
}
.dot.active {
  width: 26px;
  background: var(--grad);
  box-shadow: 0 0 12px var(--glow);
}

/* شريط التقدم الآلي */
.slide-progress {
  position: absolute;
  bottom: 0; left: 0;
  width: 0%; height: 4px;
  background: var(--grad);
  box-shadow: 0 0 14px var(--glow);
  border-radius: 0 6px 6px 0;
  z-index: 6;
}
.slide.active .slide-progress {
  animation: slideProgress 6s linear forwards;
}
@keyframes slideProgress {
  from { width: 0%; }
  to   { width: 100%; }
}

.hero-slider.auto-paused .slide-progress {
  animation-play-state: paused;
}
}

/* ============================================================
   06 الأكثر مشاهدة هذا الأسبوع (قائمة جانبية + سلايدر هاتف)
   ============================================================ */
.weekly-popular-box { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--shadow); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.weekly-box-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.weekly-kicker { display: block; margin-bottom: 3px; color: var(--cyan); font-size: .72rem; font-weight: 800; }
.weekly-box-header h3 { color: var(--text); font-size: 1rem; font-weight: 900; line-height: 1.4; }
.weekly-live-dot { position: relative; width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px var(--ring); }
.weekly-live-dot::after { content: ''; position: absolute; inset: -5px; border: 1px solid var(--line-2); border-radius: 50%; animation: weeklyPulse 2s ease-out infinite; }
.weekly-popular-list { padding: 8px 16px 14px; }
.weekly-popular-item { display: grid; grid-template-columns: 30px 72px minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--soft-line); color: var(--text); transition: var(--t); }
.weekly-popular-item:last-child { border-bottom: 0; }
.weekly-popular-item:hover { transform: translateX(-4px); color: var(--text); }
.weekly-rank { direction: ltr; color: var(--text-3); font-size: .95rem; font-weight: 900; font-variant-numeric: tabular-nums; transition: var(--t); }
.weekly-popular-item:first-child .weekly-rank, .weekly-popular-item:hover .weekly-rank { color: var(--mint); }
.weekly-thumb { width: 72px; height: 54px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--bg-2); }
.weekly-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.weekly-popular-item:hover .weekly-thumb img { transform: scale(1.08); }
.weekly-image-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: var(--grad-soft); color: var(--mint); font-size: 1.2rem; font-weight: 900; }
.weekly-item-info { min-width: 0; }
.weekly-item-info h4 { margin-bottom: 5px; color: var(--text); font-size: .82rem; font-weight: 800; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: var(--t); }
.weekly-popular-item:hover .weekly-item-info h4 { color: var(--mint); }
.weekly-item-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--text-3); font-size: .7rem; }

.weekly-mobile-section { display: none; margin: 0 0 10px; padding: 2px 0 18px; }
.weekly-mobile-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.weekly-mobile-header h2 { color: var(--text); font-size: 1.2rem; font-weight: 900; }
.weekly-swipe-hint { color: var(--text-3); font-size: .72rem; white-space: nowrap; }
.weekly-mobile-track { display: flex; gap: 14px; padding: 2px 2px 12px; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; touch-action: pan-x; }
.weekly-mobile-track::-webkit-scrollbar { display: none; }
.weekly-mobile-track:active { cursor: grabbing; }
.weekly-mini-card { flex: 0 0 min(82vw, 330px); scroll-snap-align: start; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); color: var(--text); }
.weekly-mini-card:hover { color: var(--text); border-color: var(--line-2); }
.weekly-mini-image { position: relative; height: 145px; overflow: hidden; background: var(--bg-2); }
.weekly-mini-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.weekly-mini-card:hover .weekly-mini-image img { transform: scale(1.06); }
.weekly-mini-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,10,18,.74), transparent 62%); }
.weekly-mini-rank { position: absolute; left: 12px; bottom: 10px; z-index: 2; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--grad); color: var(--on-grad); font-size: .95rem; font-weight: 900; box-shadow: 0 6px 16px var(--glow); }
.weekly-mini-body { padding: 15px; }
.weekly-category { display: inline-block; margin-bottom: 7px; color: var(--mint); font-size: .73rem; font-weight: 800; }
.weekly-mini-body h3 { min-height: 48px; margin-bottom: 12px; color: var(--text); font-size: .97rem; font-weight: 800; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.weekly-mini-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 11px; border-top: 1px solid var(--soft-line); color: var(--text-3); font-size: .72rem; }
.weekly-mobile-progress { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 3px; }
.weekly-mobile-progress span { width: 7px; height: 7px; border-radius: 99px; background: var(--soft-2); transition: width .3s var(--ease), background .3s var(--ease); }
.weekly-mobile-progress span.active { width: 24px; background: var(--grad); }

@media (max-width: 1024px) {
  .weekly-popular-box { display: none; }
  .weekly-mobile-section { display: block; }
}
@media (max-width: 480px) {
  .weekly-mini-card { flex-basis: 84vw; }
  .weekly-mini-image { height: 135px; }
  .weekly-mobile-header h2 { font-size: 1.08rem; }
}

/* ============================================================
   07 الرئيسية: التخطيط + البطاقات + Pagination
   ============================================================ */
.latest-section { padding: 28px 0 70px; }
.home-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.home-main { min-width: 0; }
.home-sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 184px; }
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.section-header h2 { font-size: 1.5rem; font-weight: 900; }
.section-header .star { color: var(--mint); }

.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: var(--t);
}
.post-card:hover { transform: translateY(-6px); border-color: var(--line-2); box-shadow: var(--shadow-lg); color: var(--text); }
.post-card-image { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.post-card:hover .post-card-image img { transform: scale(1.06); }
.post-card-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(6,10,18,.72), transparent 55%); }
.post-category-badge { position: absolute; top: 12px; right: 12px; z-index: 2; padding: 5px 12px; border-radius: var(--full); background: var(--surface-2); border: 1px solid var(--line-2); color: var(--mint); font-size: .75rem; font-weight: 800; backdrop-filter: blur(10px); }
.post-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.post-card-body h3 { margin-bottom: 10px; color: var(--text); font-size: 1.05rem; font-weight: 800; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: var(--t); }
.post-card:hover .post-card-body h3 { color: var(--mint); }
.post-card-body p { margin-bottom: 14px; color: var(--text-2); font-size: .9rem; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--soft-line); color: var(--text-3); font-size: .8rem; }
.post-meta-item { display: flex; align-items: center; gap: 5px; }

.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; width: fit-content; margin: 36px auto 0; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--full); }
.page-btn { min-width: 40px; height: 40px; padding: 0 14px; display: inline-grid; place-items: center; border-radius: var(--full); background: var(--soft); border: 1px solid transparent; color: var(--text-2); font-weight: 800; font-size: .9rem; transition: var(--t); }
.page-btn:hover { background: var(--grad-soft); color: var(--mint); }
.page-btn.active { background: var(--grad); color: var(--on-grad); }
.page-arrow { padding: 0 18px; }
.page-dots { color: var(--text-3); padding: 0 4px; }

@media (max-width: 1200px) { .home-layout { grid-template-columns: 1fr 290px; } }
@media (max-width: 1024px) { .home-layout { grid-template-columns: 1fr; } .home-sidebar { position: static; } }
@media (max-width: 880px) { .latest-section { padding: 20px 0 40px; } .posts-grid { grid-template-columns: 1fr; } .section-header h2 { font-size: 1.3rem; } }

/* ============================================================
   08 الشريط الجانبي
   ============================================================ */
.sidebar-posts, .social-panel, .newsletter-box, .stats-grid, .sidebar-ad {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.sidebar-posts { padding: 18px; }
.sidebar-title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--mint); font-size: 1rem; font-weight: 800; }
.sidebar-article { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--soft-line); color: var(--text); transition: var(--t); }
.sidebar-article:last-child { border-bottom: 0; }
.sidebar-article:hover { transform: translateX(-4px); color: var(--text); }
.sidebar-article img { width: 72px; height: 54px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex-shrink: 0; }
.sidebar-article-info h4 { margin-bottom: 4px; color: var(--text); font-size: .86rem; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-article:hover .sidebar-article-info h4 { color: var(--mint); }
.sidebar-article-info span { color: var(--text-3); font-size: .75rem; }
.view-all-btn { display: block; margin-top: 12px; padding: 11px; text-align: center; background: var(--grad-soft); border: 1px solid var(--line); border-radius: var(--r2); color: var(--text-2); font-size: .86rem; font-weight: 700; }
.view-all-btn:hover { border-color: var(--line-2); color: var(--mint); }

.social-panel { padding: 18px; }
.social-panel-title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--mint); font-weight: 800; }
.social-panel-item { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 10px 12px; background: var(--soft); border: 1px solid var(--soft-line); border-radius: 12px; color: var(--text-2); transition: var(--t); }
.social-panel-item:hover { background: var(--grad-soft); transform: translateX(-4px); color: var(--text); }
.social-panel-item .name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.social-panel-item .icon, .sheet-link .icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-size: .8rem; }
.icon-youtube { background: #ff0033; color: #fff; }
.icon-telegram { background: #29a9eb; color: #fff; }
.icon-facebook { background: #1877f2; color: #fff; }
.icon-instagram { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); color: #fff; }
.icon-x { background: #111; color: #fff; }

.newsletter-box { padding: 22px; text-align: center; background: linear-gradient(150deg, rgba(94,234,212,.08), rgba(56,189,248,.04)), var(--surface); }
.newsletter-icon { width: 50px; height: 50px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--grad); border-radius: 16px; font-size: 1.4rem; color: var(--on-grad); }
.newsletter-box h3 { margin-bottom: 6px; font-size: 1rem; font-weight: 800; }
.newsletter-box p { margin-bottom: 14px; color: var(--text-3); font-size: .85rem; }
.newsletter-form input { margin-bottom: 10px; border-radius: 12px; }
.newsletter-form button { width: 100%; padding: 12px; background: var(--grad); color: var(--on-grad); border: 0; border-radius: 12px; font-weight: 800; cursor: pointer; transition: var(--t); }
.newsletter-form button:hover { transform: translateY(-2px); }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px; }
.stat-item { padding: 14px 8px; text-align: center; background: var(--soft); border: 1px solid var(--soft-line); border-radius: 12px; }
.stat-value { font-size: 1.35rem; font-weight: 900; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { margin-top: 2px; color: var(--text-3); font-size: .75rem; }
.sidebar-ad { min-height: 240px; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--text-3); border-style: dashed; }

/* ============================================================
   09 صفحة المقال + أزرار التحميل
   ============================================================ */
.article-page { padding: 8px 0 70px; }
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.article-layout > *, .article-main, .article-content { min-width: 0; }
.article-main { position: relative; max-width: 100%; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r4); box-shadow: var(--shadow); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }

.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 18px 24px 0; color: var(--text-3); font-size: .85rem; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover, .breadcrumb .current { color: var(--mint); }
.article-featured-image { margin: 16px 24px 0; aspect-ratio: 21 / 9; overflow: hidden; border-radius: var(--r3); border: 1px solid var(--line); }
.article-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.article-header { padding: 22px 24px 18px; border-bottom: 1px solid var(--soft-line); }
.article-header h1 { margin-bottom: 14px; font-size: 1.9rem; font-weight: 900; line-height: 1.4; }
.article-meta-full { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-3); font-size: .88rem; }
.meta-item { display: flex; align-items: center; gap: 6px; }
.article-id-tag strong { color: var(--mint); cursor: pointer; padding: 2px 8px; border-radius: 8px; background: var(--grad-soft); border: 1px solid var(--line-2); transition: var(--t); }
.article-id-tag strong:hover { background: var(--grad); color: var(--on-grad); }

.article-content { padding: 24px; width: 100%; max-width: 100%; overflow: hidden; overflow-wrap: anywhere; color: var(--text-2); font-size: 1.05rem; line-height: 2; }
.article-content h2 { margin: 28px 0 14px; padding-right: 14px; border-right: 4px solid var(--mint); color: var(--text); font-size: 1.4rem; font-weight: 900; }
.article-content h3 { margin: 22px 0 12px; color: var(--text); font-size: 1.2rem; font-weight: 800; }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin: 14px 0; padding-right: 22px; }
.article-content li { margin-bottom: 8px; list-style: disc; }
.article-content ol li { list-style: decimal; }
.article-content strong { color: var(--text); font-weight: 800; }
.article-content a { color: var(--mint); text-decoration: underline; text-underline-offset: 3px; }
.article-content img, .article-content video { max-width: 100%; height: auto; margin: 20px 0; border-radius: var(--r2); border: 1px solid var(--line); }
.article-content iframe { max-width: 100%; }
.article-content blockquote { margin: 20px 0; padding: 16px 20px; border-right: 4px solid var(--mint); border-radius: 0 var(--r2) var(--r2) 0; background: var(--grad-soft); color: var(--text); font-style: italic; }
.article-content table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; -webkit-overflow-scrolling: touch; }
.article-content th, .article-content td { padding: 10px; border: 1px solid var(--line); text-align: right; }
.article-content th { background: var(--soft); color: var(--text); }
.article-content pre { max-width: 100%; overflow-x: auto; padding: 14px; border-radius: var(--r); background: var(--input-bg); border: 1px solid var(--line); white-space: pre-wrap; }
.article-content code { padding: 2px 6px; border-radius: 6px; background: var(--soft-2); color: var(--mint); font-size: .92em; }
.article-content pre code { padding: 0; background: none; }
.youtube-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin: 22px 0; border-radius: var(--r2); border: 1px solid var(--line); }
.youtube-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.share-box { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 18px 24px; border-top: 1px solid var(--soft-line); }
.share-label { color: var(--text-2); font-weight: 800; }
.share-btn { padding: 8px 16px; border-radius: 10px; color: #fff; font-size: .84rem; font-weight: 800; }
.share-btn:hover { color: #fff; opacity: .9; transform: translateY(-2px); }
.share-fb { background: #1877f2; } .share-x { background: #111; } .share-tg { background: #29a9eb; } .share-wa { background: #25d366; }

.related-articles { padding: 24px; border-top: 1px solid var(--soft-line); background: var(--soft); }
.related-articles h3 { margin-bottom: 16px; font-size: 1.15rem; font-weight: 900; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.related-card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); color: var(--text); transition: var(--t); }
.related-card:hover { transform: translateY(-4px); border-color: var(--line-2); color: var(--text); }
.related-card img { aspect-ratio: 16 / 10; object-fit: cover; }
.related-card-body { padding: 12px; }
.related-card-body h4 { margin-bottom: 4px; font-size: .88rem; font-weight: 800; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.comments-section { padding: 24px; border-top: 1px solid var(--soft-line); }
.comments-section h3 { margin-bottom: 16px; font-size: 1.15rem; font-weight: 900; }
.comment-form { position: relative; margin-bottom: 24px; padding: 20px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r3); }
.honeypot-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.comments-list { display: flex; flex-direction: column; gap: 12px; }
.comment-item { position: relative; padding: 16px; background: var(--soft); border: 1px solid var(--soft-line); border-radius: var(--r2); }
.comment-author { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.comment-name { color: var(--mint); font-weight: 800; }
.comment-date { color: var(--text-3); font-size: .8rem; }
.comment-text { color: var(--text-2); line-height: 1.7; }

.article-sidebar { display: flex; flex-direction: column; gap: 18px; }
.sticky-sidebar { position: sticky; top: 184px; }

/* أزرار التحميل داخل المقال (الألوان تأتي inline من PHP) */
.go-btn-wrap { display: block; text-align: center; margin: 24px 0; }
.go-btn-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 30px 0 10px; padding-top: 24px; border-top: 1px dashed var(--line); }
.go-btn {
  --go-c: #5eead4; --go-c2: #2dd4bf; --go-t: #0a0f1a; --go-glow: rgba(94,234,212,.38);
  position: relative; display: inline-flex; align-items: center; gap: 12px; overflow: hidden; isolation: isolate;
  padding: 15px 30px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(135deg, var(--go-c) 0%, var(--go-c2) 100%);
  color: var(--go-t) !important; font-weight: 900; font-size: 1.02rem; text-decoration: none !important;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 28px var(--go-glow), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), filter .35s var(--ease);
}
.go-btn::before { content: ''; position: absolute; top: -40%; bottom: -40%; left: -60%; width: 36%; z-index: 1; pointer-events: none; transform: skewX(-20deg); background: linear-gradient(115deg, transparent, rgba(255,255,255,.45), transparent); transition: left .7s var(--ease); }
.go-btn:hover { transform: translateY(-4px) scale(1.03); box-shadow: 0 18px 42px var(--go-glow), inset 0 1px 0 rgba(255,255,255,.35); filter: saturate(1.15); }
.go-btn:hover::before { left: 130%; }
.go-btn:active { transform: translateY(-1px) scale(.99); }
.go-btn-icon { z-index: 2; display: inline-flex; font-size: 1.25rem; line-height: 1; }
.go-btn:hover .go-btn-icon { animation: goBounce .7s var(--ease) infinite; }
.go-btn-text { z-index: 2; }
.go-btn-arrow { z-index: 2; opacity: .85; transition: transform .35s var(--ease); }
.go-btn:hover .go-btn-arrow { transform: translateX(-5px); }

@media (max-width: 1200px) { .article-layout { grid-template-columns: 1fr 280px; } }
@media (max-width: 1024px) { .article-layout { grid-template-columns: 1fr; } .sticky-sidebar { position: static; } }
@media (max-width: 880px) {
  .article-header h1 { font-size: 1.4rem; }
  .article-content, .article-header, .comments-section, .related-articles, .share-box, .breadcrumb { padding-left: 16px; padding-right: 16px; }
  .article-featured-image { margin-left: 16px; margin-right: 16px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) { .go-btn { width: 100%; justify-content: center; padding: 15px 20px; } }
@media (max-width: 480px) { .related-grid { grid-template-columns: 1fr; } }

/* ============================================================
   10 الفوتر + زر الرجوع للأعلى
   ============================================================ */
.site-footer { margin-top: 50px; padding: 48px 0 0; background: var(--surface); border-top: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; padding-bottom: 34px; }
.footer-desc { margin: 12px 0 18px; color: var(--text-3); font-size: .9rem; line-height: 1.8; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #fff; transition: var(--t); }
.footer-social a:hover { transform: translateY(-3px); color: #fff; }
.footer-col h4 { margin-bottom: 16px; color: var(--mint); font-size: 1rem; font-weight: 800; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-3); font-size: .9rem; }
.footer-col ul li a:hover { color: var(--mint); padding-right: 4px; }
.footer-bottom { padding: 18px 0; border-top: 1px solid var(--soft-line); text-align: center; color: var(--text-3); font-size: .86rem; }

.scroll-top-btn {
  --p: 0%;
  position: fixed; right: 24px; bottom: 24px; z-index: 1120;
  width: 54px; height: 54px; padding: 2px; display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: conic-gradient(var(--mint) var(--p), var(--soft-2) 0);
  box-shadow: 0 12px 30px rgba(0,0,0,.3), 0 0 22px var(--glow);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(16px) scale(.9);
  transition: opacity .3s ease, visibility .3s ease, transform .35s var(--ease), box-shadow .3s ease;
}
.scroll-top-btn.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.scroll-top-inner { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); color: var(--mint); background: var(--surface-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background .3s ease, color .3s ease; }
.scroll-top-btn.is-visible:hover { transform: translateY(-4px) scale(1.05); }
.scroll-top-btn:hover .scroll-top-inner { background: var(--grad); color: var(--on-grad); }
.scroll-top-btn:hover svg { animation: stArrow .9s ease-in-out infinite; }
.scroll-top-btn:active { transform: translateY(-1px) scale(.96); }

@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .site-footer { margin-bottom: 0; }
  .scroll-top-btn { right: 14px; bottom: calc(82px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }
}

/* ============================================================
   11 الإطار الزجاجي الموحّد (حدّ متدرج يتوهج في الزوايا)
   ============================================================ */
.header-top, .nav-container, .hero-slider, .weekly-popular-box, .sidebar-posts, .post-card,
.article-main, .newsletter-box, .social-panel, .stats-grid, .sidebar-ad, .related-card,
.comment-form, .comment-item, .pagination, .weekly-mini-card, .go-card, .login-box { position: relative; }

.header-top::before, .nav-container::before, .hero-slider::before, .weekly-popular-box::before,
.sidebar-posts::before, .post-card::before, .article-main::before, .newsletter-box::before,
.social-panel::before, .stats-grid::before, .sidebar-ad::before, .related-card::before,
.comment-form::before, .comment-item::before, .pagination::before, .weekly-mini-card::before,
.go-card::before, .login-box::before {
  content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  border-radius: inherit; padding: 1px; opacity: .95;
  background: linear-gradient(135deg, var(--frame-1) 0%, var(--frame-2) 28%, var(--frame-3) 52%, var(--frame-2) 78%, var(--frame-1) 100%);
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  transition: opacity .35s var(--ease), filter .35s var(--ease);
}
.post-card:hover::before, .related-card:hover::before, .weekly-mini-card:hover::before,
.comment-item:hover::before, .sidebar-posts:hover::before, .weekly-popular-box:hover::before,
.newsletter-box:hover::before, .social-panel:hover::before, .stats-grid:hover::before {
  opacity: 1; filter: brightness(1.35) saturate(1.2); animation: frameShift 5s linear infinite;
}

/* ============================================================
   12 لوحة التحكم + تسجيل الدخول
   ============================================================ */
.admin-wrapper { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px; background: var(--surface-2); border-left: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.admin-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px; border-bottom: 1px solid var(--line); font-weight: 900; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.admin-nav a, .admin-theme-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-radius: 12px; border: 0; background: transparent; text-align: right; cursor: pointer; color: var(--text-2); font-weight: 700; font-size: .92rem; transition: var(--t); }
.admin-nav a:hover, .admin-nav a.active, .admin-theme-toggle:hover { background: var(--grad-soft); color: var(--mint); }
.admin-theme-toggle { border: 1px dashed var(--line); margin-top: 6px; }
.admin-nav .nav-logout { margin-top: auto; color: var(--danger); }
.nav-badge { margin-right: auto; padding: 2px 8px; background: #ef4444; color: #fff; border-radius: 99px; font-size: .7rem; }

.admin-main { padding: 28px; }
.page-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.page-header h1 { font-size: 1.45rem; font-weight: 900; }
.page-subtitle { margin-top: 4px; color: var(--text-3); font-size: .88rem; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); transition: var(--t); }
.stat-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.stat-card-icon { width: 48px; height: 48px; display: grid; place-items: center; background: var(--grad-soft); border-radius: 14px; color: var(--mint); font-size: 1.25rem; }
.stat-card-info h3 { font-size: 1.5rem; font-weight: 900; }
.stat-card-info p { margin-top: 2px; color: var(--text-3); font-size: .84rem; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.form-side-wrap { display: flex; flex-direction: column; gap: 18px; }
.side-form { padding: 18px; }

.data-table-wrapper { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden; }
.table-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.table-header h3 { font-size: 1rem; font-weight: 800; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 13px 16px; border-bottom: 1px solid var(--soft-line); text-align: right; }
.data-table th { background: var(--soft); color: var(--text-2); font-size: .85rem; font-weight: 700; }
.data-table tr:hover { background: var(--soft); }

.btn-action { display: inline-block; padding: 6px 12px; border: 0; border-radius: 9px; font-size: .82rem; font-weight: 700; cursor: pointer; transition: var(--t); }
.btn-action:hover { transform: translateY(-2px); }
.btn-edit { background: var(--info-bg); color: var(--info); }
.btn-delete { background: var(--danger-bg); color: var(--danger); }
.btn-approve { background: var(--ok-bg); color: var(--ok); }
.action-buttons { display: flex; flex-wrap: wrap; gap: 6px; }

.status-badge { display: inline-block; padding: 4px 11px; border-radius: 99px; font-size: .76rem; font-weight: 800; }
.status-published { background: var(--ok-bg); color: var(--ok); }
.status-draft { background: var(--warn-bg); color: var(--warn); }
.status-pending { background: var(--info-bg); color: var(--info); }
.status-spam { background: var(--danger-bg); color: var(--danger); }

.filter-bar, .tabs-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.filter-bar input { flex: 1; min-width: 200px; width: auto; }
.filter-bar select { width: auto; }
.tabs-bar a { padding: 9px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--full); color: var(--text-2); font-weight: 700; font-size: .88rem; }
.tabs-bar a.active { background: var(--grad); color: var(--on-grad); border-color: transparent; }

.admin-form { max-width: 980px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r4); }
.form-box { margin-bottom: 18px; padding: 18px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r3); }
.form-box legend { padding: 0 8px; color: var(--mint); font-weight: 800; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.image-upload-area { padding: 28px; text-align: center; color: var(--text-2); background: var(--input-bg); border: 2px dashed var(--line); border-radius: var(--r3); cursor: pointer; transition: var(--t); }
.image-upload-area:hover { background: var(--grad-soft); border-color: var(--line-2); }
.image-preview { display: none; margin-top: 14px; max-width: 300px; border-radius: var(--r2); }
.current-image img { max-width: 280px; border-radius: var(--r2); border: 1px solid var(--line); }
.remove-image { display: block; margin-top: 8px; color: var(--danger); font-size: .86rem; }
.thumb { width: 62px; height: 44px; object-fit: cover; border-radius: 8px; }
.thumb-empty { display: grid; place-items: center; background: var(--soft-2); color: var(--text-3); font-size: .74rem; }

.slug-preview { margin-top: 10px; padding: 10px 12px; direction: ltr; text-align: left; color: var(--text-3); font-size: .8rem; background: var(--grad-soft); border: 1px dashed var(--line-2); border-radius: 10px; overflow-wrap: anywhere; }
.slug-preview strong { color: var(--mint); }

.order-buttons { display: flex; align-items: center; justify-content: center; gap: 5px; direction: ltr; }
.order-btn { width: 28px; height: 28px; display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--line); border-radius: 8px; color: var(--mint); font-weight: 900; }
.order-btn:hover { background: var(--grad); color: var(--on-grad); }
.order-number { min-width: 22px; text-align: center; color: var(--text-3); font-size: .8rem; font-weight: 800; }

.forbidden-words-box { margin-bottom: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r3); }
.forbidden-form { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px; border-bottom: 1px solid var(--soft-line); }
.forbidden-form input { flex: 1; min-width: 200px; width: auto; }
.forbidden-list { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px; }
.forbidden-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--danger-bg); border-radius: 10px; color: var(--danger); }

/* نموذج أزرار التحميل في الأدمن */
.go-box .go-help { font-size: .86rem; line-height: 1.7; margin-bottom: 14px; }
.go-box code { padding: 2px 8px; border-radius: 6px; background: var(--grad-soft); color: var(--mint); font-weight: 800; }
.go-row { position: relative; padding: 16px; margin-bottom: 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; }
.go-row-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.go-row-title { font-weight: 800; color: var(--mint); }
.go-shortcode { display: inline-block; direction: ltr; padding: 5px 12px; border-radius: 10px; background: var(--grad-soft); border: 1px dashed var(--line-2); color: var(--mint); font-family: monospace; font-weight: 800; }
.go-row-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; }
.go-row-grid-3 { display: grid; grid-template-columns: 1.4fr .7fr .8fr 1.2fr; gap: 14px; margin-top: 12px; align-items: end; }
.go-color-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.go-color-wrap input[type="color"] { width: 46px; height: 40px; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; }
.go-preset { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--soft-2); cursor: pointer; transition: var(--t); }
.go-preset:hover { transform: scale(1.18); }
.go-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.go-check { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; color: var(--text-2); font-weight: 700; }
.go-preview { margin-top: 14px; padding: 16px; text-align: center; background: var(--input-bg); border: 1px dashed var(--line); border-radius: 14px; }
.go-link-url { display: inline-block; direction: ltr; margin-top: 10px; color: var(--text-3); font-size: .8rem; overflow-wrap: anywhere; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-box { width: 100%; max-width: 420px; padding: 36px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r4); box-shadow: var(--shadow-lg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.login-logo { margin-bottom: 24px; text-align: center; }
.login-logo h1 { font-size: 1.7rem; font-weight: 900; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.login-logo p { margin-top: 4px; color: var(--text-3); }
.login-back { margin-top: 16px; text-align: center; font-size: .86rem; }

@media (max-width: 1200px) { .dashboard-grid { grid-template-columns: 1fr 320px; } }
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .admin-wrapper { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-nav .nav-logout { margin-top: 0; }
  .admin-nav a, .admin-theme-toggle { width: auto; }
}
@media (max-width: 880px) {
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .admin-main { padding: 16px; }
  .go-row-grid, .go-row-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .dashboard-stats { grid-template-columns: 1fr; } }

/* ============================================================
   13 صفحة الإعلانات /go/
   ============================================================ */
body.go-page { background: var(--go-bg); }
.go-header { position: sticky; top: 0; z-index: 500; padding: 12px 0; background: var(--surface-2); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.go-header-in { max-width: 1500px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.go-header-in .go-actions { display: flex; align-items: center; gap: 10px; }
.go-back-link { padding: 8px 16px; border-radius: var(--full); background: var(--soft); border: 1px solid var(--line); color: var(--text-2); font-size: .86rem; font-weight: 700; }
.go-back-link:hover { background: var(--grad-soft); color: var(--mint); }

.go-ad { max-width: 1500px; margin: 16px auto; padding: 0 20px; text-align: center; }
.go-ad-ph { min-height: 90px; display: grid; place-items: center; background: var(--soft); border: 1.5px dashed var(--line); border-radius: 16px; color: var(--text-3); font-size: .85rem; font-weight: 700; }
.go-ad-ph-tall { min-height: 600px; line-height: 1.9; }

.go-wrap { max-width: 1500px; margin: 0 auto; padding: 0 20px 30px; display: grid; grid-template-columns: 170px minmax(0, 1fr) 170px; gap: 22px; align-items: start; }
.go-side-sticky { position: sticky; top: 90px; }
.go-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.go-card { padding: 26px; background: var(--go-card); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.go-intro { text-align: center; }
.go-title { font-size: 1.7rem; font-weight: 900; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.go-sub { margin-top: 8px; color: var(--text-2); font-size: .95rem; }

.go-steps-nav { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; }
.go-dot { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--soft-2); border: 2px solid var(--line-2); color: var(--text); font-weight: 900; font-size: .9rem; transition: var(--t); }
.go-dot.active { background: var(--grad); border-color: transparent; color: var(--on-grad); transform: scale(1.08); box-shadow: 0 0 18px var(--glow); }
.go-dot.done { background: var(--grad-soft); border-color: var(--line-2); color: var(--mint); font-size: 0; }
.go-dot.done::after { content: '✓'; font-size: 1rem; font-weight: 900; }
.go-dot-line { width: 40px; height: 3px; border-radius: 9px; background: var(--line-2); }

.go-step { text-align: center; transition: var(--t); }
.go-step.go-locked { opacity: .5; filter: grayscale(.35); pointer-events: none; }
.go-step.go-active { border-color: var(--line-2); box-shadow: 0 0 0 1px var(--line-2), 0 14px 40px var(--ring); }
.go-step.go-done { opacity: .78; }
.go-step-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; }
.go-step-num { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--grad-soft); border: 1px solid var(--line-2); color: var(--mint); font-weight: 900; font-size: .88rem; }
.go-step-title { font-size: 1.05rem; font-weight: 800; color: var(--text); }

.go-bar { width: 100%; height: 14px; border-radius: 99px; background: var(--input-bg); border: 1px solid var(--line); overflow: hidden; }
.go-bar-fill { position: relative; overflow: hidden; height: 100%; width: 0%; border-radius: 99px; background: var(--grad); box-shadow: 0 0 16px var(--glow); }
.go-bar-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: goShine 1.4s linear infinite; }
.go-timer { margin: 16px 0 8px; font-size: 2.5rem; font-weight: 900; font-variant-numeric: tabular-nums; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.go-timer.done { animation: goPop .4s var(--ease); }
.go-hint { color: var(--text-2); font-size: .94rem; margin-bottom: 20px; min-height: 22px; }

.go-next { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 220px; padding: 14px 40px; border: 1px solid var(--line); border-radius: var(--full); background: var(--soft-2); color: var(--text-2); font-size: 1.04rem; font-weight: 900; cursor: not-allowed; transition: var(--t); }
.go-next.ready { background: var(--grad); color: var(--on-grad); border-color: transparent; cursor: pointer; box-shadow: 0 10px 28px var(--glow); animation: goPulse 1.8s ease-in-out infinite; }
.go-next.ready:hover { transform: translateY(-3px); }
.go-next.loading { opacity: .7; cursor: wait; }
.go-next-arrow { transition: transform .3s var(--ease); }
.go-next.ready:hover .go-next-arrow { transform: translateY(4px); }

.go-final { border-color: var(--line-2); }
.go-final-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: 260px; padding: 18px 46px; border-radius: 18px; background: var(--soft-2); color: var(--text-2) !important; font-size: 1.14rem; font-weight: 900; cursor: not-allowed; transition: var(--t); }
.go-final-btn.ready { background: var(--grad); color: var(--on-grad) !important; cursor: pointer; box-shadow: 0 14px 40px var(--glow); }
.go-final-btn.ready:hover { transform: translateY(-4px) scale(1.02); }
.go-final-btn.ready::before { content: ''; position: absolute; top: -50%; bottom: -50%; left: -60%; width: 40%; transform: skewX(-20deg); background: linear-gradient(115deg, transparent, rgba(255,255,255,.5), transparent); animation: goSweep 2.4s ease-in-out infinite; }
.go-final-icon { font-size: 1.3rem; }
.go-note { margin-top: 16px; color: var(--text-3); font-size: .86rem; }

.go-content { line-height: 2; color: var(--text-2); font-size: 1.02rem; }
.go-content h2 { margin-bottom: 14px; padding-right: 14px; border-right: 4px solid var(--cyan); color: var(--text); font-size: 1.32rem; font-weight: 900; }
.go-content h3 { margin: 20px 0 10px; color: var(--text); font-size: 1.14rem; font-weight: 800; }
.go-content p { margin-bottom: 14px; }
.go-content ul, .go-content ol { margin: 12px 0; padding-right: 24px; }
.go-content li { margin-bottom: 8px; list-style: disc; }
.go-content ol li { list-style: decimal; }
.go-content img { margin: 16px 0; border-radius: 16px; border: 1px solid var(--line); }
.go-content strong { color: var(--text); font-weight: 800; }
.go-content a { color: var(--mint); text-decoration: underline; }
.go-footer { padding: 26px 20px; text-align: center; color: var(--text-3); font-size: .86rem; border-top: 1px solid var(--line); }

.go-block { display: none; position: fixed; inset: 0; z-index: 99999; place-items: center; padding: 20px; background: var(--overlay); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.go-block.is-open { display: grid; }
.go-block-card { max-width: 430px; width: 100%; padding: 40px 30px; text-align: center; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 28px; }
.go-block-icon { font-size: 3.6rem; margin-bottom: 14px; }
.go-block-card h2 { margin-bottom: 12px; color: var(--mint); font-size: 1.4rem; font-weight: 900; }
.go-block-card p { margin-bottom: 22px; color: var(--text-2); line-height: 1.85; }

@media (max-width: 1200px) { .go-wrap { grid-template-columns: 140px minmax(0, 1fr) 140px; gap: 16px; } .go-ad-ph-tall { min-height: 500px; } }
@media (max-width: 980px) { .go-wrap { grid-template-columns: 1fr; } .go-side { display: none; } }
@media (max-width: 640px) {
  .go-card { padding: 20px 16px; border-radius: 22px; }
  .go-title { font-size: 1.32rem; }
  .go-timer { font-size: 2rem; }
  .go-next, .go-final-btn { width: 100%; min-width: 0; padding: 14px 20px; }
  .go-dot { width: 32px; height: 32px; }
  .go-dot-line { width: 26px; }
  .go-ad { padding: 0 14px; }
}

/* ============================================================
   14 الحركات + تفضيلات الوصول
   ============================================================ */
@keyframes drift { 0% { transform: translate3d(0,0,0) scale(1); opacity: .65; } 100% { transform: translate3d(2%,-1.5%,0) scale(1.05); opacity: .85; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes frameShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes weeklyPulse { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes stArrow { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-3px); } }
@keyframes goBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
@keyframes goShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes goPop { 0% { transform: scale(.6); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes goPulse { 0%, 100% { box-shadow: 0 10px 28px var(--glow); } 50% { box-shadow: 0 10px 40px var(--glow); } }
@keyframes goSweep { 0% { left: -60%; } 60%, 100% { left: 130%; } }

.animate-fade-in { animation: rise .55s var(--ease) both; }
.delay-1 { animation-delay: .08s; } .delay-2 { animation-delay: .16s; } .delay-3 { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* =====================================================
   Dark / Light Mode Toggle Button
   ===================================================== */

.theme-toggle-text {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border: 1px solid var(--line);
  border-radius: var(--full);

  background: var(--surface-soft);
  color: var(--text-2);

  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;

  cursor: pointer;
  transition: var(--t);
}

.theme-toggle-text:hover {
  background: var(--grad-soft);
  border-color: var(--line-strong);
  color: var(--mint-2);
  transform: translateY(-2px);
}

.theme-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle-label {
  line-height: 1;
}

/* أثناء السكرول كيصغر مع الهيدر */
html.is-scrolled .theme-toggle-text {
  min-height: 33px;
  padding-inline: 12px;
  font-size: 0.8rem;
}

/* =====================================================
   Apple-like Light Mode Colors
   ألوان فاتحة مريحة، ماشي أبيض صارخ
   ===================================================== */

html[data-theme="light"] {
  color-scheme: light;

  --bg-0: #f5f7fb;
  --bg-1: #eef3f8;
  --bg-2: #ffffff;
  --bg-3: #e3edf5;

  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-soft: rgba(2, 132, 199, 0.055);
  --input-bg: rgba(239, 247, 252, 0.92);

  --line: rgba(15, 82, 112, 0.14);
  --line-strong: rgba(8, 145, 178, 0.34);

  --text: #132235;
  --text-2: #445b70;
  --text-3: #75889a;

  --cyan: #0284c7;
  --mint: #0f9f8c;
  --mint-2: #087d70;
  --blue: #2563eb;

  --grad: linear-gradient(120deg, #37d5c0 0%, #38bdf8 100%);
  --grad-soft: linear-gradient(120deg, rgba(45, 212, 191, 0.13), rgba(56, 189, 248, 0.10));
  --grad-text: linear-gradient(100deg, #0f766e, #0f9f8c 45%, #0284c7);

  --shadow: 0 10px 28px rgba(15, 45, 70, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --shadow-lg: 0 20px 55px rgba(15, 45, 70, 0.16);
}

/* خلفية الوضع الفاتح */
html[data-theme="light"] body::before {
  background:
    radial-gradient(1000px 620px at 12% -8%, rgba(56, 189, 248, 0.17), transparent 62%),
    radial-gradient(880px 560px at 90% 5%, rgba(45, 212, 191, 0.13), transparent 62%),
    linear-gradient(175deg, #f5f7fb 0%, #eef3f8 52%, #f9fbfd 100%);
}

/* تحسين الهيدر في Light */
html[data-theme="light"] .header-top,
html[data-theme="light"] .nav-container,
html[data-theme="light"] .site-footer {
  background-color: rgba(255, 255, 255, 0.82);
}

/* البحث في Light */
html[data-theme="light"] .search-bar input,
html[data-theme="light"] .newsletter-form input,
html[data-theme="light"] .form-group input,
html[data-theme="light"] .form-group textarea,
html[data-theme="light"] .form-group select {
  background: rgba(239, 247, 252, 0.92);
  color: var(--text);
}

/* الكروت في Light */
html[data-theme="light"] .post-card,
html[data-theme="light"] .article-main,
html[data-theme="light"] .sidebar-posts,
html[data-theme="light"] .newsletter-box,
html[data-theme="light"] .social-panel,
html[data-theme="light"] .stats-grid,
html[data-theme="light"] .trending-box {
  background-color: rgba(255, 255, 255, 0.78);
}

/* زر الوضع في Light */
html[data-theme="light"] .theme-toggle-text {
  background: rgba(239, 247, 252, 0.9);
  color: var(--text-2);
}

html[data-theme="light"] .theme-toggle-text:hover {
  background: var(--grad);
  color: #0a0f1a;
}

/* =====================================================
   Fix Theme Toggle Button
   ===================================================== */

.theme-toggle.theme-toggle-text {
  width: auto !important;
  min-width: 132px;
  height: 38px !important;
  min-height: 38px !important;

  padding: 0 14px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;

  flex-shrink: 0;

  border-radius: 999px !important;
  border: 1px solid var(--line) !important;

  background: var(--surface-soft) !important;
  color: var(--text-2) !important;

  font-size: 0.84rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;

  cursor: pointer;
  transition: var(--t);
}

.theme-toggle.theme-toggle-text:hover {
  background: var(--grad) !important;
  color: #0a0f1a !important;
  border-color: transparent !important;
  transform: translateY(-2px);
}

.theme-toggle.theme-toggle-text .theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
}

.theme-toggle.theme-toggle-text .theme-toggle-label {
  display: inline-block;
  line-height: 1;
}

/* أثناء السكرول */
html.is-scrolled .theme-toggle.theme-toggle-text {
  height: 33px !important;
  min-height: 33px !important;
  min-width: 118px;
  padding: 0 12px !important;
  font-size: 0.78rem !important;
}

/* الوضع الفاتح */
html[data-theme="light"] .theme-toggle.theme-toggle-text {
  background: rgba(239, 247, 252, 0.92) !important;
  color: var(--text-2) !important;
  border-color: rgba(15, 82, 112, 0.16) !important;
}

html[data-theme="light"] .theme-toggle.theme-toggle-text:hover {
  background: var(--grad) !important;
  color: #0a0f1a !important;
}

/* الهاتف: خلي الزر صغير باش ما يخربقش الهيدر */
@media (max-width: 880px) {
  .theme-toggle.theme-toggle-text {
    min-width: auto !important;
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    border-radius: 12px !important;
  }

  .theme-toggle.theme-toggle-text .theme-toggle-label {
    display: none !important;
  }
}
/* =====================================================
   Fix Hero Slider CTA Button Width
   ===================================================== */

.hero-slider .slide-content .cta-button {
  width: auto !important;
  max-width: max-content !important;
  min-width: 190px;

  align-self: flex-start !important;

  padding: 14px 30px !important;
  border-radius: 999px !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;

  font-size: 0.98rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* فـ RTL نخليه جهة اليمين داخل السلايدر */
html[dir="rtl"] .hero-slider .slide-content .cta-button,
body[dir="rtl"] .hero-slider .slide-content .cta-button {
  align-self: flex-start !important;
}

/* إذا بغيتيه وسط السلايدر بدل اليمين، فعل هاد السطر فقط */
/*
.hero-slider .slide-content .cta-button {
  align-self: center !important;
}
*/

/* موبايل */
@media (max-width: 880px) {
  .hero-slider .slide-content .cta-button {
    min-width: 160px;
    padding: 12px 22px !important;
    font-size: 0.9rem !important;
  }
}
/* ===== توسيط زر اقرأ المقال كاملاً في السلايدر ===== */
.slide-content .cta-button {
  align-self: center !important;
  width: auto !important;
  max-width: max-content;
  margin-inline: auto !important;
  flex: 0 0 auto;
}
.static-layout {
  grid-template-columns: 1fr !important;
}
.static-page .article-main {
  max-width: 920px;
  margin: 0 auto;
}
/* ===== إخفاء عدد المشاهدات في قسم الأكثر مشاهدة ===== */

/* الكمبيوتر: القائمة الجانبية */
.weekly-item-meta span:last-child {
  display: none;
}

/* الهاتف: السلايدر */
.weekly-mini-meta span:first-child {
  display: none;
}

/* =====================================================
   Cookie Consent — Dark / Light compatible
   ===================================================== */

.cookie-consent {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 24px;
  z-index: 1300;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.cookie-consent[hidden] {
  display: none !important;
}

.cookie-consent-content {
  width: min(100%, 820px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;

  /* متغيرات تتبدل تلقائياً مع Light/Dark */
  background: #182336;
  border: 1px solid var(--line);
  color: var(--text);

  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);

  pointer-events: auto;
}

/* Light mode */
html[data-theme="light"] .cookie-consent-content {
  background: rgba(255, 255, 255, 0.94);
}

.cookie-consent-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--grad-soft);
  color: var(--mint);
  font-size: 1.5rem;
}

.cookie-consent-text strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
}

.cookie-consent-text p {
  color: var(--text-2);
  font-size: .88rem;
  line-height: 1.7;
}

.cookie-consent-text a {
  color: var(--mint);
  font-weight: 800;
}

.cookie-consent-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 10px 18px;
  border: 0;
  border-radius: 13px;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: var(--t);
}

.cookie-accept {
  background: var(--grad);
  color: #0a0f1a;
}

.cookie-decline {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text-2);
}

.cookie-btn:hover {
  transform: translateY(-2px);
}

@media (max-width: 700px) {
  .cookie-consent {
    left: 12px;
    right: 12px;
    bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .cookie-consent-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cookie-consent-icon {
    margin: 0 auto;
  }

  .cookie-consent-actions {
    justify-content: center;
  }

  .cookie-btn {
    flex: 1;
  }
}

.logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(56, 189, 248, 0.18));
}

@media (max-width: 880px) {
  .logo-img {
    width: 38px;
    height: 38px;
  }
}

.logo-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 2;
}


/* =====================================================
   404 Page
   ===================================================== */

.error-page {
  padding: 20px 0 70px;
}

.error-card {
  max-width: 760px;
  margin: 0 auto 40px;
  padding: 46px 28px;
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r4);
  box-shadow: var(--shadow);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.error-code {
  margin-bottom: 10px;
  font-size: clamp(4rem, 12vw, 9rem);
  line-height: 1;
  font-weight: 900;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.error-card h1 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.8rem;
  font-weight: 900;
}

.error-card p {
  max-width: 540px;
  margin: 0 auto 24px;
  color: var(--text-2);
  line-height: 1.8;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.error-suggestions {
  margin-top: 30px;
}