/*
Theme Name: oBasim.Tech
Theme URI: https://obasim.tech
Author: oBasim
Description: ثيم مخصص لموقع oBasim.Tech — تصميم ذهبي بأسلوب Liquid Glass، بار علوي زجاجي، خلاصة أدوات قابلة للفلترة بالتصنيفات. RTL.
Version: 3.4.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: obasim-tech
*/

:root {
  --bg: #08080b;
  --card: rgba(255, 255, 255, 0.025);
  --card-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  --text: #f3f4f8;
  --text-dim: rgba(243, 244, 248, 0.55);
  --accent: #e7b84d;
  --grad: linear-gradient(135deg, #f5d77e 0%, #c8911a 100%);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Tajawal', system-ui, sans-serif;
  color: var(--text); background: var(--bg); min-height: 100vh; overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 40% at 50% -5%, rgba(231,184,77,0.12), transparent 60%),
    radial-gradient(60% 40% at 15% 105%, rgba(200,145,26,0.08), transparent 60%);
}
.latin { font-family: 'Space Grotesk', sans-serif; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ===== بار علوي زجاجي (Liquid Glass) ===== */
.topbar {
  position: sticky; top: 14px; z-index: 50;
  margin: 14px auto 0; max-width: 1120px;
  display: flex; align-items: center; gap: 20px;
  padding: 11px 18px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.35s ease, opacity 0.3s ease;
}
/* إخفاء البار العلوي بسلاسة عند النزول (جوال) */
body.nav-hidden .topbar { transform: translateY(-145%); opacity: 0; pointer-events: none; }
.lang-btn {
  display: flex; align-items: center; gap: 8px; cursor: pointer; font-family: inherit;
  padding: 6px 14px 6px 7px; border-radius: 100px; color: var(--text);
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); transition: 0.2s; flex-shrink: 0;
}
.lang-btn:hover { background: rgba(255,255,255,0.13); border-color: var(--border-hover); }
.lang-btn img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; display: block; }
.lang-label { font-size: 0.86rem; font-weight: 600; }
.brand-group { display: flex; align-items: center; gap: 13px; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; position: relative; overflow: hidden; flex-shrink: 0;
  background: radial-gradient(120% 120% at 30% 20%, #2a2150, #0e0c1c 70%);
  box-shadow: 0 0 0 2px rgba(231,184,77,0.45), 0 6px 18px rgba(0,0,0,0.5);
}
.avatar img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: center 92%; }
.avatar .mono { position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; font-weight: 700;
  background: linear-gradient(135deg,#fff,#f0cd84); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand { font-family: 'Space Grotesk', sans-serif; font-size: 1.4rem; font-weight: 700; letter-spacing: -0.5px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.slogan { font-size: 0.74rem; font-weight: 500; color: var(--text-dim); margin-top: 3px; direction: ltr; opacity: 0.75; }
.socials { display: flex; gap: 9px; margin-inline-start: auto; }
.soc { width: 42px; height: 42px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border); transition: 0.2s; }
.soc svg { width: 19px; height: 19px; fill: var(--text); transition: 0.2s; }
.soc:hover { border-color: var(--accent); transform: translateY(-3px); }
.soc:hover svg { fill: var(--accent); }

/* ===== شريط التصنيفات (أعلى الصفحة / دك سفلي بالجوال) ===== */
.cat-nav {
  flex: 1; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center;
}
.cat-link {
  padding: 7px 14px; border-radius: 100px; font-size: 0.85rem; color: var(--text-dim);
  border: 1px solid transparent; transition: 0.2s; white-space: nowrap;
}
.cat-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.cat-link.active { color: #2a1e02; background: var(--grad); font-weight: 600; }

/* ===== المحتوى ===== */
.main { max-width: 1120px; margin: 0 auto; padding: 36px 24px 56px; }
.main-head { margin-bottom: 24px; }
.main-head h1, .main-head h2 { font-size: 1.95rem; font-weight: 700; letter-spacing: -0.5px; }
.main-head p { color: var(--text-dim); margin-top: 8px; font-size: 1rem; line-height: 1.7; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
  padding: 9px 18px; border-radius: 100px; cursor: pointer; font-family: inherit; font-size: 0.9rem;
  color: var(--text-dim); background: var(--card); border: 1px solid var(--border); transition: 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--border-hover); }
.chip.active { color: #2a1e02; background: var(--grad); border-color: transparent; font-weight: 600; }

.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px; overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, background 0.3s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-hover); background: var(--card-hover); }
.card a.card-link { display: flex; flex-direction: column; height: 100%; }
.card-img { height: 150px; background-size: cover; background-position: center; position: relative; background-color: #14141c; }
.card-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,8,11,0.6), transparent 55%); }
.card-cat {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
  padding: 5px 12px; border-radius: 100px; font-size: 0.74rem; font-weight: 600;
  background: rgba(8,8,11,0.7); backdrop-filter: blur(6px); color: var(--accent); border: 1px solid rgba(231,184,77,0.3);
}
.card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.12rem; font-weight: 600; line-height: 1.45; }
.card-body p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.7; margin-top: 9px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 9px; margin-top: 16px; font-size: 0.8rem; color: var(--text-dim); }
.card-meta .go { margin-inline-start: auto; color: var(--accent); font-weight: 600; }
.empty { color: var(--text-dim); padding: 40px; text-align: center; grid-column: 1 / -1; display: none; }

/* مساحة إعلانية (Adsterra / AdSense) */
.ad-slot {
  grid-column: 1 / -1; min-height: 120px; border-radius: 16px;
  border: 1px dashed var(--border); background: rgba(255,255,255,0.012);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; overflow: hidden;
}
.ad-slot .ad-label { font-size: 0.68rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-dim); opacity: 0.55; }
.ad-slot ins, .ad-slot .ad-unit { display: block; width: 100%; text-align: center; }

/* ترقيم الصفحات */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 9px 15px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: var(--text-dim); font-size: 0.9rem;
}
.pagination .current { color: #2a1e02; background: var(--grad); border-color: transparent; font-weight: 600; }
.pagination a:hover { color: var(--text); border-color: var(--border-hover); }

/* ===== المقال المفرد ===== */
.single-wrap { max-width: 820px; margin: 0 auto; padding: 36px 24px 60px; }
.single-cat { display: inline-block; padding: 6px 14px; border-radius: 100px; font-size: 0.8rem; font-weight: 600;
  color: var(--accent); border: 1px solid rgba(231,184,77,0.3); background: rgba(231,184,77,0.08); margin-bottom: 18px; }
.single-title { font-size: 2.1rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.5px; }
.single-meta { color: var(--text-dim); font-size: 0.88rem; margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.single-feat { margin: 28px 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); }
.single-feat img { width: 100%; display: block; }
.entry-content { font-size: 1.05rem; line-height: 1.95; color: rgba(243,244,248,0.85); }
.entry-content > * { margin-bottom: 1.1em; }
.entry-content h2 { font-size: 1.5rem; font-weight: 700; margin: 1.4em 0 0.5em; color: var(--text); }
.entry-content h3 { font-size: 1.25rem; font-weight: 600; margin: 1.2em 0 0.4em; color: var(--text); }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: 14px; border: 1px solid var(--border); }
.entry-content blockquote { border-inline-start: 3px solid var(--accent); padding: 6px 18px; background: var(--card); border-radius: 10px; color: var(--text-dim); }
.entry-content code { background: rgba(255,255,255,0.07); padding: 2px 7px; border-radius: 6px; font-size: 0.92em; }
.entry-content pre { background: #111118; border: 1px solid var(--border); border-radius: 14px; padding: 18px; overflow-x: auto; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4em; }
.entry-content li { margin-bottom: 0.5em; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; color: var(--text-dim); transition: 0.2s; }
.back-link:hover { color: var(--accent); }

/* ===== الفوتر ===== */
.site-footer { max-width: 1120px; margin: 0 auto; padding: 26px 24px 40px; text-align: center;
  color: var(--text-dim); font-size: 0.85rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.site-footer a { color: var(--text-dim); transition: color 0.2s; }
.site-footer a:hover { color: var(--accent); }
.foot-sep { opacity: 0.4; }

@media (max-width: 680px) {
  body { padding-bottom: 86px; }
  .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 14px; top: 8px; margin: 8px 8px 0; }
  .socials { order: 1; width: 100%; justify-content: center; margin: 0; }
  .brand-group { order: 2; width: 100%; justify-content: center; }
  .main { padding: 24px 16px 40px; }
  .main-head h1, .main-head h2 { font-size: 1.55rem; }
  .feed { grid-template-columns: 1fr; }
  .single-title { font-size: 1.6rem; }

  /* شريط التصنيفات يصير دك عائم سفلي أنيق */
  .cat-nav {
    position: fixed; top: auto; inset: auto 10px 10px 10px; margin: 0; max-width: none;
    border-radius: 20px; flex-wrap: nowrap; overflow-x: auto; gap: 6px;
    justify-content: flex-start;
    padding: 8px 10px; padding-bottom: calc(8px + env(safe-area-inset-bottom));
    background: rgba(18, 18, 26, 0.82);
    backdrop-filter: blur(26px) saturate(175%);
    -webkit-backdrop-filter: blur(26px) saturate(175%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55); z-index: 60;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .cat-nav::-webkit-scrollbar { display: none; }
  .cat-link { font-size: 0.82rem; padding: 9px 15px; flex-shrink: 0; }
  .cat-link.active { box-shadow: 0 4px 14px rgba(231, 184, 77, 0.35); }
}

/* ============================================================
   PREMIUM LAYER v2.0 — تدقيق إنتاجي شامل
   ============================================================ */

/* --- وصولية وأساسيات --- */
:root { --text-dim: rgba(243, 244, 248, 0.62); --radius-lg: 22px; }
::selection { background: rgba(231, 184, 77, 0.28); color: #fff; }
html { -webkit-text-size-adjust: 100%; }
:where(a, button, .cat-link, .soc, .card-link, input):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px;
}
:where(a, button):focus:not(:focus-visible) { outline: none; }

/* رابط تخطٍ لذوي الإعاقة */
.skip-link {
  position: fixed; top: -60px; inset-inline-start: 12px; z-index: 200;
  padding: 10px 18px; border-radius: 0 0 12px 12px; background: var(--accent); color: #2a1e02;
  font-weight: 600; transition: top 0.25s ease;
}
.skip-link:focus { top: 0; }

/* شريط تمرير أنيق */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.28); background-clip: content-box; }

/* ظهور ناعم عند التحميل */
@keyframes obFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.main, .single-wrap { animation: obFadeUp 0.5s ease both; }
.card { animation: obFadeUp 0.45s ease both; }
.feed .card:nth-child(2) { animation-delay: 0.04s; }
.feed .card:nth-child(3) { animation-delay: 0.08s; }
.feed .card:nth-child(4) { animation-delay: 0.12s; }
.feed .card:nth-child(n+5) { animation-delay: 0.16s; }

/* --- البطاقات: عمق وزجاج مكرّر --- */
.card {
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 10px 28px rgba(0,0,0,0.28);
  transition: transform 0.35s cubic-bezier(.2,.7,.3,1), box-shadow 0.35s, border-color 0.35s, background 0.35s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(231,184,77,0.32);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 22px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(231,184,77,0.12);
}
.card-img { transition: filter 0.4s ease; }
.card:hover .card-img { filter: saturate(1.1) brightness(1.04); }
.card-body h3 { letter-spacing: -0.3px; transition: color 0.25s; }
.card:hover .card-body h3 { color: #fff; }
.card-cat { box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
.card-meta .go { transition: transform 0.25s; }
.card:hover .card-meta .go { transform: translateX(-4px); }

/* --- البار العلوي: لمسات زجاج أرقى --- */
.topbar { -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); }
.brand-group { transition: opacity 0.2s; border-radius: 16px; }
.brand-group:hover { opacity: 0.92; }
.cat-link { font-weight: 500; }
.cat-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.cat-link.active:hover { color: #2a1e02; }

/* --- استجابة الشاشات المتوسطة: شريط التصنيفات ينزل سطر مستقل --- */
@media (max-width: 1000px) and (min-width: 681px) {
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .brand-group { order: 1; }
  .socials { order: 2; margin-inline-start: auto; }
  .cat-nav { order: 3; flex-basis: 100%; justify-content: center; padding-top: 10px; border-top: 1px solid var(--border); }
}

/* --- شاشات كبيرة جداً --- */
@media (min-width: 1500px) {
  .topbar, .main, .site-footer { max-width: 1280px; }
  .main-head h1, .main-head h2 { font-size: 2.15rem; }
  .feed { gap: 24px; }
}

/* --- صفحة المقال: تايبوغرافي بريميوم --- */
.single-wrap { max-width: 760px; }
.single-title { letter-spacing: -0.8px; line-height: 1.25; }
.single-feat { box-shadow: 0 20px 50px rgba(0,0,0,0.45); }
.single-feat img { transition: transform 0.6s ease; }
.single-feat:hover img { transform: scale(1.02); }
.entry-content { font-size: 1.08rem; line-height: 2; }
.entry-content > p:first-of-type { font-size: 1.18rem; color: var(--text); line-height: 1.9; }
.entry-content a { text-decoration-color: rgba(231,184,77,0.45); transition: text-decoration-color 0.2s; }
.entry-content a:hover { text-decoration-color: var(--accent); }
.entry-content img { box-shadow: 0 14px 36px rgba(0,0,0,0.4); }
.entry-content blockquote { box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); }
.entry-content pre { box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 10px 30px rgba(0,0,0,0.35); }
.single-cat { transition: 0.2s; }
.single-cat:hover { background: rgba(231,184,77,0.16); border-color: var(--accent); }
.back-link:hover { transform: translateX(4px); }

/* --- ترقيم الصفحات والفوتر --- */
.pagination a, .pagination span { transition: 0.2s; }
.site-footer { gap: 12px; }

/* --- زر ذهبي عام --- */
.btn-gold {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 100px;
  font-weight: 700; color: #2a1e02; background: var(--grad); transition: transform 0.2s, box-shadow 0.2s;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(200,150,40,0.4); }

/* --- صفحة 404 --- */
.error-404 { text-align: center; padding: 70px 20px 90px; max-width: 560px; margin: 0 auto; }
.error-code {
  font-size: clamp(5rem, 18vw, 9rem); font-weight: 700; line-height: 1; letter-spacing: -4px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0.9;
}
.error-404 h1 { font-size: 1.7rem; font-weight: 700; margin: 10px 0 14px; }
.error-404 p { color: var(--text-dim); line-height: 1.9; margin-bottom: 30px; }

/* --- فوتر + بحث --- */
.site-footer { flex-direction: column; gap: 18px; padding-top: 34px; }
.foot-meta { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.site-search {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 440px;
  padding: 11px 18px; border-radius: 100px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: 0.2s;
}
.site-search:focus-within { border-color: rgba(231,184,77,0.4); background: rgba(255,255,255,0.07); }
.site-search svg { width: 18px; height: 18px; color: var(--text-dim); flex-shrink: 0; }
.site-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-family: inherit; font-size: 0.95rem; }
.site-search input::placeholder { color: var(--text-dim); }

/* --- تنقّل المقالات (السابق/التالي) --- */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 46px; padding-top: 28px; border-top: 1px solid var(--border); }
.post-nav-link { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--border); transition: transform 0.25s, border-color 0.25s, background 0.25s;
  align-items: flex-start; text-align: start; }
.post-nav-link.next { align-items: flex-end; text-align: end; }
.post-nav-link:hover { border-color: var(--border-hover); background: var(--card-hover); transform: translateY(-3px); }
.pn-label { font-size: 0.78rem; color: var(--accent); font-weight: 600; }
.pn-title { font-size: 0.98rem; font-weight: 500; line-height: 1.5; color: var(--text); }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } }

/* --- خلفية بديلة أنيقة للبطاقات بدون صورة بارزة --- */
.card-img.card-ph { display: flex; align-items: center; justify-content: center; background: #101018; }
.card-img.card-ph::before {
  content: 'oBasim.Tech'; font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 1.05rem; letter-spacing: 1px; color: rgba(231,184,77,0.30); position: relative; z-index: 1;
}
.card-img.card-ph[data-cat="pc"] { background: radial-gradient(120% 120% at 70% 10%, rgba(110,168,255,0.16), transparent 55%), #0e1018; }
.card-img.card-ph[data-cat="phone"] { background: radial-gradient(120% 120% at 70% 10%, rgba(125,255,168,0.14), transparent 55%), #0e1512; }
.card-img.card-ph[data-cat="tv"] { background: radial-gradient(120% 120% at 70% 10%, rgba(200,80,192,0.16), transparent 55%), #150f18; }
.card-img.card-ph[data-cat="cinema"] { background: radial-gradient(120% 120% at 70% 10%, rgba(231,184,77,0.18), transparent 55%), #15110a; }
.card-img.card-ph[data-cat="personal"] { background: radial-gradient(120% 120% at 70% 10%, rgba(255,255,255,0.10), transparent 55%), #121216; }

/* ============================================================
   v2.2 — بطاقات زجاجية + دك جوال محسّن
   ============================================================ */
/* بطاقات زجاجية (Glassmorphism) مثل البار العلوي */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)) !important;
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 12px 30px rgba(0,0,0,0.32);
}
.card:hover {
  transform: translateY(-7px);
  border-color: rgba(231,184,77,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.24), 0 26px 56px rgba(0,0,0,0.55), 0 0 38px rgba(231,184,77,0.14) !important;
}
.card-body { background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent); }
.post-nav-link, .site-search { background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

/* === بنية الهيدر الجديدة: التصنيفات خارج البار (يصلح دك الجوال) === */
.site-top { position: sticky; top: 0; z-index: 50; }
.topbar { position: relative; top: auto; }
.dock-toggle { display: none; }

/* كمبيوتر: التصنيفات وسط البار (overlay فوق المنطقة الفارغة) */
@media (min-width: 1001px) {
  .site-top .cat-nav {
    position: absolute; top: 14px; height: 74px; left: 0; right: 0;
    margin-inline: auto; max-width: 1120px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 0 236px; pointer-events: none; z-index: 51; flex: none; background: none; border: none;
  }
  .site-top .cat-nav .cat-link { pointer-events: auto; }
}

/* متوسط: التصنيفات سطر مستقل تحت البار */
@media (min-width: 681px) and (max-width: 1000px) {
  .site-top .cat-nav {
    position: static; max-width: 1120px; margin: 10px auto 0; flex: none;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px; border-radius: 16px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
}

/* جوال: دك عائم سفلي + سهم إخفاء */
@media (max-width: 680px) {
  body { padding-bottom: 92px; }
  .site-top .cat-nav {
    position: fixed; top: auto; bottom: 12px; inset-inline-start: 12px; inset-inline-end: 64px;
    margin: 0; max-width: none; z-index: 60; flex: none;
    display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; justify-content: flex-start;
    border-radius: 18px; padding: 8px 12px; padding-bottom: calc(8px + env(safe-area-inset-bottom));
    background: rgba(18,18,26,0.9); border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%);
    box-shadow: 0 16px 38px rgba(0,0,0,0.55); scrollbar-width: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .site-top .cat-nav::-webkit-scrollbar { display: none; }
  .cat-link { font-size: 0.82rem; padding: 9px 15px; flex-shrink: 0; }
  .dock-toggle {
    display: flex; align-items: center; justify-content: center;
    position: fixed; bottom: 12px; inset-inline-end: 12px; z-index: 61;
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer; padding: 0;
    background: rgba(18,18,26,0.92); border: 1px solid rgba(255,255,255,0.14); color: var(--accent);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 10px 26px rgba(0,0,0,0.5); transition: transform 0.25s ease;
  }
  .dock-toggle svg { width: 20px; height: 20px; transition: transform 0.3s ease; }
  .dock-toggle:active { transform: scale(0.92); }
  body.dock-collapsed .site-top .cat-nav { transform: translateY(170%); opacity: 0; pointer-events: none; }
  body.dock-collapsed .dock-toggle svg { transform: rotate(180deg); }
}

/* --- إيموجي ووردبريس تبقى صغيرة inline بدون إطار --- */
.entry-content img.emoji, .entry-content img.wp-smiley {
  display: inline !important; width: 1.1em !important; height: 1.1em !important; margin: 0 0.05em !important;
  vertical-align: -0.15em; border: none !important; border-radius: 0 !important; box-shadow: none !important; background: none !important;
}

/* --- تقليل الحركة لمن يفضّلها --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}


/* Post language switcher */
.post-lang-switcher { margin: 20px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.post-lang-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
  background: rgba(231,184,77,0.15); border: 1px solid rgba(231,184,77,0.4); color: var(--text);
  font-weight: 600; font-size: 0.95rem; transition: 0.2s; text-decoration: none; }
.post-lang-link:hover { background: rgba(231,184,77,0.25); border-color: rgba(231,184,77,0.7); transform: translateY(-2px); }
.post-lang-link span { font-size: 1.3rem; }

/* ============================================================
   Bilingual RTL/LTR overrides — English (dir=ltr)
   ============================================================ */
[dir="ltr"] body { font-family: 'Space Grotesk', system-ui, sans-serif; }
[dir="ltr"] .brand-text, [dir="ltr"] .slogan { direction: ltr; }
[dir="ltr"] .socials { margin-inline-start: auto; margin-inline-end: 0; }
[dir="ltr"] .card-meta { direction: ltr; }
[dir="ltr"] .go::after { content: ' →'; }
[dir="ltr"] .go { /* arrow already baked into PHP for EN, just ensure no RTL flip */ }
[dir="ltr"] .search-box input { direction: ltr; text-align: left; }
[dir="ltr"] .cat-nav { direction: ltr; }
[dir="ltr"] .pagination { direction: ltr; }
[dir="ltr"] .entry-content { direction: ltr; text-align: left; }
[dir="ltr"] .entry-content h1,[dir="ltr"] .entry-content h2,[dir="ltr"] .entry-content h3 { text-align: left; }
[dir="ltr"] .post-header { direction: ltr; text-align: left; }
[dir="ltr"] .post-cats { direction: ltr; }
/* Keep .latin always LTR regardless */
.latin { direction: ltr; unicode-bidi: embed; }

/* v2.3 — رجوع عمق البطاقات + خط أنظف */
.card { background: rgba(255,255,255,0.03) !important; backdrop-filter: blur(7px) !important; -webkit-backdrop-filter: blur(7px) !important; border: 1px solid rgba(255,255,255,0.08); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 14px 34px rgba(0,0,0,0.42) !important; }
.card-body { background: none !important; }
.card:hover { transform: translateY(-7px); border-color: rgba(231,184,77,0.42); box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 26px 56px rgba(0,0,0,0.58), 0 0 36px rgba(231,184,77,0.13) !important; }
.post-nav-link, .site-search { background: rgba(255,255,255,0.03) !important; }


/* v2.4 polish */
.card-img { position: relative; overflow: hidden; background: linear-gradient(135deg, #16161f, #0e0e15); }
.card-img:not(.card-ph)::before { content: ''; position: absolute; inset: 0; z-index: 0; background: linear-gradient(135deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01)); }
.card-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; transition: opacity 0.55s ease, transform 0.7s cubic-bezier(.2,.7,.3,1); z-index: 1; }
.card-photo.is-loaded { opacity: 1; }
.card:hover .card-photo { transform: scale(1.07); }
.card-img::after { z-index: 2; background: linear-gradient(to top, rgba(8,8,11,0.72), rgba(8,8,11,0.12) 45%, transparent 70%) !important; }
.card-cat { z-index: 3; letter-spacing: 0.2px; }
.card-body { padding: 16px 18px 18px; }
.card-body h3 { font-size: 1.08rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.2em; }
.card-body p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 8px; }
.card-meta { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.card-meta .go { display: inline-flex; align-items: center; gap: 5px; }
.cat-link.active { box-shadow: 0 4px 14px rgba(231,184,77,0.28); }
.soc:active { transform: translateY(-1px) scale(0.96); }
@media (max-width: 680px) { .cat-link { padding: 11px 16px; font-size: 0.86rem; } .soc { width: 46px; height: 46px; } }


/* ============ v3.0 — desktop polish ============ */
.feed { grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) and (min-width: 681px) { .feed { grid-template-columns: repeat(2, 1fr); } }
.card-img { height: 188px; }
.card { background: rgba(255,255,255,0.045) !important; backdrop-filter: blur(16px) saturate(140%) !important; -webkit-backdrop-filter: blur(16px) saturate(140%) !important; border: 1px solid rgba(255,255,255,0.1) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 12px 30px rgba(0,0,0,0.3) !important; }
.card-body { background: none !important; }
.card:hover { transform: translateY(-6px); border-color: rgba(255,255,255,0.2) !important; background: rgba(255,255,255,0.07) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 24px 50px rgba(0,0,0,0.45), 0 0 30px rgba(231,184,77,0.1) !important; }
@media (min-width: 1001px) { .site-top .cat-nav { transform: translateY(-13px); } }
.search-toggle { cursor: pointer; }
.search-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding-top: 16vh; background: rgba(5,5,8,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s; }
body.search-open .search-overlay { opacity: 1; visibility: visible; }
.search-box { display: flex; align-items: center; gap: 12px; width: min(620px, 90vw); padding: 15px 20px; border-radius: 18px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%); box-shadow: 0 30px 70px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.2); transform: translateY(-12px); transition: transform 0.25s ease; }
body.search-open .search-box { transform: translateY(0); }
.search-box svg { width: 22px; height: 22px; color: var(--accent); flex-shrink: 0; }
.search-box input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-family: inherit; font-size: 1.12rem; }
.search-box input::placeholder { color: var(--text-dim); }
.search-box button[type=submit] { background: var(--grad); color: #2a1e02; border: none; width: 40px; height: 40px; border-radius: 12px; cursor: pointer; font-size: 1.1rem; font-weight: 700; flex-shrink: 0; transition: 0.2s; }
.search-box button[type=submit]:hover { transform: translateY(-1px); }

/* ============ v3.1 — وسوم (Tags) داخل البطاقات — مع الحفاظ على التصميم ============ */
/* رابط الصورة صار يلفّ الصورة فقط، فلا يحتاج ارتفاعًا كاملًا */
.card > a.card-link { height: auto; display: block; }
/* رابط جسم البطاقة (العنوان + المقتطف) يملأ المساحة ويبقي الميتا في الأسفل */
.card-body-link { display: flex; flex-direction: column; flex: 1; color: inherit; }
/* صف الوسوم: chips صغيرة زجاجية */
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.card-tag {
  font-size: 0.66rem; line-height: 1; padding: 4px 9px; border-radius: 100px;
  color: var(--accent);
  background: rgba(231, 184, 77, 0.07);
  border: 1px solid rgba(231, 184, 77, 0.22);
  /* بدون backdrop-filter: تأثيره غير مرئي فوق سطح البطاقة وتكلفته على الـ GPU عالية أثناء التمرير */
  white-space: nowrap; transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.card-tag:hover { background: rgba(231, 184, 77, 0.16); border-color: rgba(231, 184, 77, 0.5); }
.card-tag-more { color: var(--accent); cursor: default; }
[dir="ltr"] .card-tags { direction: ltr; }

/* ============ v3.2 — جدول المحتويات (TOC) ============ */
.toc-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px; padding: 20px 24px; margin-bottom: 32px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.toc-title { display: block; color: var(--accent); font-size: 0.88rem; font-weight: 700; margin-bottom: 12px; }
.toc-list { padding-inline-start: 20px; margin: 0; }
.toc-list li { margin-bottom: 7px; color: var(--text-dim); font-size: 0.92rem; }
.toc-list li a { color: inherit; transition: color 0.2s; }
.toc-list li a:hover { color: var(--accent); text-decoration: none; }
.toc-list li.toc-h3 { padding-inline-start: 14px; font-size: 0.86rem; }
[dir="ltr"] .toc-list { text-align: left; }

/* ============ v3.2 — مقالات مشابهة (Related Posts) ============ */
.related-posts { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.related-title { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 680px) { .related-grid { grid-template-columns: 1fr; } }
@media (min-width: 681px) and (max-width: 900px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
.rel-card {
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  transition: transform 0.3s, border-color 0.3s, background 0.3s; color: inherit;
}
.rel-card:hover { transform: translateY(-4px); border-color: rgba(231,184,77,0.35); background: rgba(255,255,255,0.07); }
.rel-img { height: 120px; position: relative; background: #101018; overflow: hidden; }
.rel-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rel-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,8,11,0.55), transparent 60%); }
.rel-img.card-ph { display: flex; align-items: center; justify-content: center; }
.rel-img.card-ph::before { content: 'oBasim.Tech'; font-family: 'Space Grotesk', sans-serif; font-size: 0.85rem; font-weight: 700; color: rgba(231,184,77,0.28); position: relative; z-index: 1; }
.rel-body { padding: 12px 14px 14px; }
.rel-body h3 { font-size: 0.9rem; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rel-time { font-size: 0.76rem; color: var(--text-dim); margin-top: 6px; display: block; }

/* ============ v3.2 — صفحة 404 مع مقالات حديثة ============ */
.error-recent { margin-top: 48px; }
.error-recent .related-title { text-align: center; margin-bottom: 24px; }

/* ============================================================
   v3.5 — صفحة التواصل: شارات الحسابات + نموذج WPForms بنمط الثيم
   ============================================================ */
.contact-socials { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 12px; }
.entry-content .contact-socials a {
  display: inline-flex; align-items: center; padding: 11px 22px; border-radius: 100px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.entry-content .contact-socials a:hover {
  border-color: rgba(231, 184, 77, 0.5); color: var(--accent); transform: translateY(-2px);
}
.entry-content .contact-privacy { font-size: 0.85rem; color: var(--text-dim); margin-top: 14px; }

/* نموذج WPForms — نفس زجاجية الثيم */
.entry-content .wpforms-form .wpforms-field { margin-bottom: 16px; padding: 0; }
.entry-content .wpforms-form .wpforms-field-label {
  color: var(--text); font-size: 0.9rem; font-weight: 600; margin-bottom: 7px; display: block;
}
.entry-content .wpforms-form input[type="text"],
.entry-content .wpforms-form input[type="email"],
.entry-content .wpforms-form textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text); font-family: inherit; font-size: 0.98rem; padding: 12px 16px; outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.entry-content .wpforms-form input[type="text"]:focus,
.entry-content .wpforms-form input[type="email"]:focus,
.entry-content .wpforms-form textarea:focus {
  border-color: rgba(231, 184, 77, 0.5); background: rgba(255, 255, 255, 0.07);
}
.entry-content .wpforms-form textarea { min-height: 150px; resize: vertical; }
.entry-content .wpforms-form button[type="submit"] {
  background: var(--grad); color: #2a1e02; border: none; padding: 13px 32px; border-radius: 100px;
  font-family: inherit; font-weight: 700; font-size: 0.98rem; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.entry-content .wpforms-form button[type="submit"]:hover {
  transform: translateY(-2px); box-shadow: 0 12px 30px rgba(200, 150, 40, 0.4);
}
/* حقل مصيدة السبام يبقى مخفياً حتى لو تعطلت أنماط WPForms */
.entry-content .wpforms-form .wpforms-field-hp { display: none !important; position: absolute !important; }
.entry-content .wpforms-confirmation-container-full {
  background: rgba(231, 184, 77, 0.09); border: 1px solid rgba(231, 184, 77, 0.35);
  border-radius: 14px; padding: 18px 22px; color: var(--text);
}
.entry-content .wpforms-error { color: #ff9d9d; font-size: 0.82rem; }

/* ============================================================
   Card Polish v3.3.1 — بطاقات أهدأ وأخف بصرياً
   CSS فقط — لا تغيير في الهوية أو الـ Layout أو الـ PHP
   ============================================================ */

/* 1 — صورة أكبر: 188px → 218px (+16%) */
.card-img { height: 218px; }

/* 2 — Category Badge: أصغر وأناعم */
.card-cat {
  font-size: 0.68rem !important;
  padding: 3px 9px !important;
  background: rgba(8,8,11,0.62) !important;
  border-color: rgba(231,184,77,0.20) !important;
  letter-spacing: 0.1px;
}

/* 3 — Tags: أصغر، glass خفيف، بدون border ثقيل */
.card-tag {
  font-size: 0.61rem !important;
  padding: 3px 7px !important;
  background: rgba(231,184,77,0.05) !important;
  border: 1px solid rgba(231,184,77,0.14) !important;
}
.card-tags { gap: 5px; margin-bottom: 7px; }

/* 4 — عنوان: سطران فقط، بدون min-height مفروض */
.card-body h3 {
  min-height: 0 !important;
  -webkit-line-clamp: 2;
  font-size: 1.04rem;
  line-height: 1.48;
}

/* 5 — وصف: سطران، أقل مساحة */
.card-body p { margin-top: 5px !important; }

/* 6 — Meta row: أخف + لا يُكسر السطر */
.card-meta {
  margin-top: 10px !important;
  padding-top: 10px !important;
  font-size: 0.75rem !important;
  color: rgba(243,244,248,0.46) !important;
  flex-wrap: nowrap !important;
}
.card-meta .go {
  color: rgba(243,244,248,0.55) !important;
  font-weight: 500 !important;
}

/* 7 — البطاقة: أفتح قليلاً، أكثر تمييزاً عن الخلفية */
.card {
  background: linear-gradient(160deg, rgba(255,255,255,0.11), rgba(255,255,255,0.05)) !important;
  border-color: rgba(255,255,255,0.13) !important;
}

/* 8 — Hover: خفيف — 2px فقط، shadow ناعم بدون glow */
.card:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(231,184,77,0.38) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 10px 28px rgba(0,0,0,0.30) !important;
  background: linear-gradient(160deg, rgba(255,255,255,0.13), rgba(255,255,255,0.06)) !important;
}

/* ============================================================
   Card Polish v3.3.2 — نظيف وهادئ، أقل ضجيج بصري
   CSS فقط — لا شيء خارج هذا القسم
   ============================================================ */

/* 1 — الخلفية: أفتح بـ ~5% — يكسر السواد الخانق */
:root { --bg: #141420; }
body  { background: var(--bg); }

/* 2 — إخفاء الوصف: الأولوية للصورة والعنوان فقط */
.card-body p { display: none !important; }

/* 3 — الصورة: +7px لتكون العنصر البصري الأول */
.card-img { height: 225px; }

/* 4 — padding البطاقة: أفسح أفقياً، أخف عمودياً */
.card-body { padding: 12px 20px 16px !important; }

/* 5 — Tags row: مسافة أقل — بدون الوصف أصبحت مناسبة */
.card-tags { margin-bottom: 6px; }

/* 6 — Meta: أقرب للعنوان بعد حذف الوصف */
.card-meta {
  margin-top: 8px !important;
  padding-top: 8px !important;
}

/* 7 — البطاقة: أفتح وأوضح عن الخلفية الجديدة */
.card {
  background: linear-gradient(160deg, rgba(255,255,255,0.13), rgba(255,255,255,0.06)) !important;
  border-color: rgba(255,255,255,0.15) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.09),
    0 6px 18px rgba(0,0,0,0.22) !important;
}

/* 8 — Hover: 2px translate، shadow ناعم — لا glow */
.card:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(231,184,77,0.36) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 10px 24px rgba(0,0,0,0.26) !important;
  background: linear-gradient(160deg, rgba(255,255,255,0.15), rgba(255,255,255,0.07)) !important;
}

/* ============================================================
   Visual Polish v3.3 — Premium refinements (CSS-only)
   10 targeted overrides — no layout, no logic, no identity change.
   ============================================================ */

/* 1 — Background: off-black instead of near-pure black */
:root { --bg: #0f0f15; }
body  { background: var(--bg); }

/* 2 — Secondary text: slightly higher contrast */
:root { --text-dim: rgba(243, 244, 248, 0.68); }

/* 3 — Borders: one notch more visible */
:root {
  --border:       rgba(255, 255, 255, 0.12);
  --border-hover: rgba(255, 255, 255, 0.28);
}

/* 4 — Ambient glow: richer top & bottom bleed */
body::before {
  background:
    radial-gradient(70% 46% at 50% -4%, rgba(231,184,77,0.17), transparent 60%),
    radial-gradient(60% 42% at 15% 110%, rgba(200,145,26,0.12), transparent 60%);
}

/* 5 — Cards: more distinct from the slightly lighter bg */
.card {
  background: linear-gradient(160deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04)) !important;
  border-color: rgba(255,255,255,0.14) !important;
}

/* 6 — Card hover: subtle extra glow */
.card:hover {
  border-color: rgba(231,184,77,0.55) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 26px 56px rgba(0,0,0,0.50),
    0 0 42px rgba(231,184,77,0.17) !important;
}

/* 7 — Header: stronger glass & separation
   (blur يبقى 24px — رفعه إلى 30px كان يثقل التمرير بدون فرق بصري يُذكر) */
.topbar {
  background: rgba(255, 255, 255, 0.085) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-color: rgba(255,255,255,0.17) !important;
}

/* 8 — Footer: faint surface so it doesn't read as a void */
.site-footer {
  background: rgba(255, 255, 255, 0.018);
  border-top-color: rgba(255,255,255,0.13);
}

/* 9 — Hero Section: whisper-soft radial glow behind the title */
.main-head { position: relative; isolation: isolate; }
.main-head::before {
  content: '';
  position: absolute;
  inset: -60px 0; z-index: -1; pointer-events: none; /* طبقة رسم أصغر = تمرير أخف */
  background: radial-gradient(ellipse 90% 130% at 50% 40%, rgba(231,184,77,0.07), transparent 70%);
}

/* 10 — Single-article wrap: same ambient glow treatment */
.single-wrap { isolation: isolate; }

/* ============================================================
   v3.6 — نظام Hover حديث وموحّد (يجب أن يبقى آخر الملف ليتغلب
   على كل قواعد الـ hover السابقة)
   المبدأ: transform + opacity فقط (GPU) — لا تحريك ظلال أو خلفيات
   أو فلاتر. 200ms مع منحنى واحد لكل الموقع.
   ============================================================ */
:root {
  --hov-time: 200ms;
  --hov-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* --- تعطيل التأثيرات الثقيلة القديمة (كل الأجهزة) --- */
/* لا زوم لصورة البطاقة: تبقى حادة تماماً */
.card:hover .card-photo { transform: none !important; }
.card-photo { transition: opacity 0.45s ease !important; }
/* لا فلاتر سطوع/تشبع على الصورة */
.card-img, .card:hover .card-img { filter: none !important; transition: none !important; }
/* لا زوم لصورة المقال البارزة */
.single-feat img, .single-feat:hover img { transform: none !important; transition: none !important; }
/* الظل والخلفية ثابتان عند الـ hover — صفر إعادة رسم */
.card:hover {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.09), 0 6px 18px rgba(0,0,0,0.22) !important;
  background: linear-gradient(160deg, rgba(255,255,255,0.13), rgba(255,255,255,0.06)) !important;
}
.btn-gold:hover { box-shadow: none; transform: translate3d(0,-2px,0) scale(1.02); }

/* --- طبقة الإضاءة الزجاجية: جاهزة مسبقاً وتظهر بالـ opacity فقط --- */
.card { position: relative; }
.card::after {
  content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02) 60%);
  opacity: 0; transition: opacity var(--hov-time) var(--hov-ease);
}

/* --- التفاعل الحديث (أجهزة المؤشر فقط — اللمس لا يحتاج hover) --- */
@media (hover: hover) and (pointer: fine) {
  .card {
    transition: transform var(--hov-time) var(--hov-ease), border-color var(--hov-time) var(--hov-ease) !important;
    will-change: transform;
  }
  .card:hover {
    transform: translate3d(0, -6px, 0) scale(1.02) !important;
    border-color: rgba(231, 184, 77, 0.45) !important;
  }
  .card:hover::after { opacity: 1; }

  /* بطاقات المقالات المشابهة وتنقّل السابق/التالي — نفس اللغة الحركية */
  .rel-card, .post-nav-link {
    transition: transform var(--hov-time) var(--hov-ease), border-color var(--hov-time) var(--hov-ease);
  }
  .rel-card:hover, .post-nav-link:hover {
    transform: translate3d(0, -3px, 0);
    border-color: rgba(231, 184, 77, 0.4);
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); /* = الأساس: لا قفزة */
  }
  .rel-card:hover { background: rgba(255, 255, 255, 0.04); } /* = الأساس */

  /* أيقونات التواصل */
  .soc { transition: transform var(--hov-time) var(--hov-ease), border-color var(--hov-time) var(--hov-ease); }
  .soc:hover { transform: translate3d(0, -2px, 0); }

  /* توحيد توقيت العناصر النصية الصغيرة (رخيصة الرسم أصلاً) */
  .card-tag, .cat-link, .chip, .pagination a, .single-cat, .lang-btn,
  .toc-list li a, .site-footer a, .pn-label, .card-body h3 {
    transition-duration: 180ms;
    transition-timing-function: var(--hov-ease);
  }
  .back-link { transition: transform var(--hov-time) var(--hov-ease), color 180ms var(--hov-ease); }
  .card-meta .go { transition: transform var(--hov-time) var(--hov-ease); }
}
