/* =====================================================================
   OZ.tn — style.css  (ملف واحد، مصدر واحد للحقيقة)

   • كل ما يسبق علامة  critical-end  ينسخه  gen_critical.py  داخل <style>
     في <head> كل صفحة (CSS الحرج: ما يظهر فوق الطية).
   • ما بعد العلامة يُحمَّل بشكل غير حاجب من هذا الملف نفسه.
   • للتعديل: عدّل هنا فقط ثم شغّل:  python3 gen_critical.py <مجلد-الموقع> --write
   • قاعدة تؤثر على شيء يُرى عند فتح الصفحة (شريط التنقل، الهيرو، العنوان،
     أول بطاقات/فقرات، الشريط الجانبي) → ضعها قبل العلامة. غير ذلك → بعدها.
   • حافظ على حجم ما قبل العلامة أقل من ~14KB بعد التصغير.
   ===================================================================== */

@font-face {
  font-family: "Tajawal";
  src: url("/fonts/tajawal/Tajawal-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tajawal";
  src: url("/fonts/tajawal/Tajawal-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tajawal";
  src: url("/fonts/tajawal/Tajawal-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tajawal";
  src: url("/fonts/tajawal/Tajawal-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary:      #fe2b6e;
  --secondary:    #a1ca0a;
  --primary-dark: #d4175a;
  --secondary-dark:#84a808;
  --dark:         #111111;
  --dark-2:       #1e1e1e;
  --mid:          #444444;
  --light:        #f5f5f5;
  --white:        #ffffff;
  --border:       #e0e0e0;
  --text:         #222222;
  --text-light:   #666666;
  --radius:       8px;
  --radius-lg:    16px;
  --shadow:       0 2px 12px rgba(0,0,0,.08);
  --shadow-md:    0 4px 24px rgba(0,0,0,.13);
  --font-body:    'Tajawal', sans-serif;
  --nav-h:        68px;
  --transition:   .22s ease;
  /* متغيرات كانت مستعملة بلا تعريف */
  --muted:        var(--text-light);
  --ink:          var(--text);
  --font-ar:      var(--font-body);
  --sand-dark:    #ececec;
  --shadow-sm:    0 1px 6px rgba(0,0,0,.10);
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;

}

img { max-width: 100%; height: auto;  }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

h1,h2,h3,h4 {
  font-weight: 800;
  line-height: 1.35;
  color: var(--dark);
}

h1 { font-size: clamp(1.65rem, 4vw, 2.4rem); }

h2 { font-size: clamp(1.25rem, 3vw, 1.7rem); }

h3 { font-size: clamp(1.05rem, 2.5vw, 1.3rem); }

p { margin-bottom: 1.1rem; }

p:last-child { margin-bottom: 0; }

.container {
  width: min(1200px, 94%);
  margin-inline: auto;
}

.section { padding: 60px 0; }

.section-sm { padding: 36px 0; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  height: var(--nav-h);
  box-shadow: 0 2px 16px rgba(0,0,0,.3);
}

.nav-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  width: min(1200px, 94%);
  margin-inline: auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -.01em;
  flex-shrink: 0;
  justify-self: start;  
}

.nav-logo span {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 2px 10px 3px;
  border-radius: 4px;
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: center;  
}

.nav-menu > li { position: relative; }

.nav-menu > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
  background: rgba(255,255,255,.08);
  color: var(--white);
}

.nav-menu > li.has-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-2px);
  transition: transform var(--transition);
}

.nav-menu > li.has-dropdown:hover > a::after {
  transform: rotate(135deg) translateY(2px);
}

.nav-cta {
  background: var(--primary) !important;
  color: var(--white) !important;
  border-radius: var(--radius) !important;
  font-weight: 700 !important;
  padding: 8px 20px !important;
  transition: background var(--transition) !important;
}

.nav-cta:hover { background: var(--primary-dark) !important; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 3px);
  right: 0;
  min-width: 290px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
  border-top: 3px solid var(--primary);
}

.nav-menu > li.has-dropdown:hover .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 9px 20px;
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
  border-right: 3px solid transparent;
}

.nav-dropdown a:hover {
  background: var(--light);
  color: var(--primary);
  border-right-color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 42px; height: 42px;
  border-radius: var(--radius);
  transition: background var(--transition);
  justify-self: end;    
}

.nav-toggle:hover { background: rgba(255,255,255,.1); }

.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .3s ease, opacity .3s ease, width .3s ease;
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }

.nav-toggle.open span:nth-child(2) { opacity: 0; width: 0; }

.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero {
  background: var(--dark);
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 10% 50%, rgba(254,43,110,.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 90% 20%, rgba(161,202,10,.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { position: relative; text-align: center; }

.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 18px;
  max-width: 700px;
  margin-inline: auto;
}

.hero p {
  color: rgba(255,255,255,.65);
  font-size: 1.05rem;
  max-width: 580px;
  margin-inline: auto;
  margin-bottom: 0;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.section-head h2 { font-size: 1.4rem; }

.section-head-line {
  flex: 1;
  height: 2px;
  background: var(--border);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(254,43,110,.25);
}

.card-cat-bar { height: 4px; background: var(--primary); }

.cat-tech .card-cat-bar { background: var(--primary); }

.cat-store .card-cat-bar { background: var(--secondary); }

.cat-sport .card-cat-bar { background: #0bb4e0; }

.cat-count .card-cat-bar { background: #008000; }

.cat-edarat .card-cat-bar { background: #F527BE; }

.cat-farm .card-cat-bar { background: #F527BE; }

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-category {
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.cat-store .card-category { color: var(--secondary-dark); }

.cat-sport .card-category { color: #0990ba; }

.cat-count .card-category { color: #008000; }

.cat-edarat .card-category { color: #F527BE; }

.cat-farm .card-category { color: #F527BE; }

.card-title {
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--dark);
  margin-bottom: 10px;
  transition: color var(--transition);
  flex: 1;
}

.article-card:hover .card-title { color: var(--primary); }

.category-section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.category-section:last-child { border-bottom: none; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  font-size: .82rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.breadcrumbs a {
  color: var(--primary);
  font-weight: 600;
  transition: opacity var(--transition);
}

.breadcrumbs a:hover { opacity: .75; }

.breadcrumbs .sep {
  color: var(--border);
  user-select: none;
  transform: scaleX(-1);
  display: inline-block;
}

.article-page { padding: 48px 0 72px; }

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
  min-width: 0;
}

.article-layout > article {
  min-width: 0;         
}

.article-header { margin-bottom: 32px; }

.article-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--dark);
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: .85rem;
  color: var(--text-light);
  padding: 14px 18px;
  background: var(--light);
  border-radius: var(--radius);
  border-right: 4px solid var(--secondary);
  margin-bottom: 24px;
}

.article-meta-bar strong { color: var(--text); }

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-content h2 {
  font-size: 1.45rem;
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light);
  position: relative;
}

.article-content h2::before {
  content: '';
  position: absolute;
  bottom: -2px; right: 0;
  width: 60px; height: 2px;
  background: var(--primary);
}

.article-content h3 {
  font-size: 1.15rem;
  margin: 26px 0 10px;
  color: var(--dark);
}

.article-content p {
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.article-content ul,
.article-content ol {
  padding-right: 24px;
  margin-bottom: 1.2rem;
}

.article-content ul { list-style: none; }

.article-content ul li {
  position: relative;
  padding-right: 20px;
  margin-bottom: .6rem;
  font-size: 1.02rem;
  line-height: 1.8;
}

.article-content ol { list-style: decimal; }

.article-content ol li { margin-bottom: .6rem; font-size: 1.02rem; }

.article-figure {
  margin: 28px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.article-figure .img-placeholder {
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 300px;
  color: var(--text-light);
  font-size: .9rem;
}

.article-figure .img-placeholder svg { opacity: .35; }

.sidebar { position: sticky; top: calc(var(--nav-h) + 20px); }

.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.widget-head {
  padding: 14px 20px;
  background: var(--dark);
  color: var(--white);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .02em;
  border-bottom: 3px solid var(--primary);
}

.widget-body { padding: 16px 20px; }

.related-list { display: flex; flex-direction: column; }

.related-item {
  display: block;
  padding: 11px 0;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition), padding-right var(--transition);
}

.related-item:last-child { border-bottom: none; }

.related-item:hover { color: var(--primary); padding-right: 4px; }

@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .sidebar-widget { margin-bottom: 0; }
}

@media (max-width: 768px) {
  .nav-container {
    grid-template-columns: 1fr auto;
  }

  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    right: 0; left: 0;
    background: var(--dark-2);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;                              
    height: 0;                               
    overflow: hidden;
    overflow-y: auto;                        
    transition: height .35s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    justify-self: unset;
  }

  .nav-menu.open {
    height: min(420px, calc(100dvh - var(--nav-h)));
    padding: 12px 0 20px;
  }

  .nav-menu > li > a {
    padding: 13px 20px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
  }

  .nav-menu > li:last-child > a { border-bottom: none; }

  .nav-menu > li.has-dropdown > a::after { display: none; }

  .nav-dropdown {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border-radius: 0;
    border-top: none;
    padding: 0;
    background: rgba(255,255,255,.04);
    border-right: 3px solid var(--primary);
    margin: 0 20px;
    display: none;
  }

  .nav-dropdown.open { display: block; }

  .nav-dropdown a {
    color: rgba(255,255,255,.7);
    border-bottom: 1px solid rgba(255,255,255,.04);
    padding: 10px 16px;
  }

  .nav-dropdown a:hover {
    background: rgba(255,255,255,.06);
    color: var(--white);
  }

  .nav-cta {
    margin: 8px 20px 0 !important;
    text-align: center;
    display: block;
  }

  .section { padding: 40px 0; }

  .category-section { padding: 32px 0; }

  .articles-grid { grid-template-columns: 1fr; }

  .article-meta-bar { gap: 10px; }

  .sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { padding: 56px 0 52px; }

  h1 { font-size: 1.55rem; }

  .article-title { font-size: 1.5rem; }

  .article-content h2 { font-size: 1.2rem; }
}

/* ── أدوات عامة ── */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -60px; right: 12px; z-index: 200;
  background: var(--primary); color: var(--white);
  padding: 8px 16px; border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
}

.skip-link:focus { top: 0; }

.nav-logo img { display: block; }

/* القائمة المنسدلة القديمة (للصفحات التي لم تُحدَّث بعد) تعمل بلوحة المفاتيح */

.nav-menu > li.has-dropdown:focus-within .nav-dropdown {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}

/* ── صور المقالات: حجز المساحة لتقليل CLS ── */

.article-figure img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 11 / 7; object-fit: cover;
}

.article-figure .img-placeholder:has(img) { min-height: 0; }

/* ── الهيرو: فقرة تعريفية + روابط الأقسام ── */

.hero-chips {
  position: relative;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px; margin-top: 28px;
}

.hero-chips a {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.88);
  font-size: .9rem; font-weight: 700;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.hero-chips a:hover { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* ── أقسام الصفحة الرئيسية ── */

.home .category-section { scroll-margin-top: var(--nav-h); }

.home .category-section:nth-of-type(odd) { background: var(--light); }

/* الأقسام تحت الطية لا تُرسم حتى يقترب منها المستخدم */

.home .category-section:not(:first-child) {
  content-visibility: auto;
  contain-intrinsic-size: auto 520px;
}

.sec-prices { --accent: var(--primary); --accent-text: var(--primary-dark); }

.sec-cost { --accent: #0bb4e0;        --accent-text: #0a7fa3; }

.sec-equipment { --accent: #d11fa6;        --accent-text: #b01a8c; }

.sec-store { --accent: var(--secondary); --accent-text: #5f7a00; }

.sec-farm { --accent: #008000;        --accent-text: #006600; }

.sec-budget { --accent: #f59e0b;        --accent-text: #a14a07; }

.home .section-head { margin-bottom: 14px; }

.section-desc {
  margin: 0 0 26px;
  color: var(--text-light);
  font-size: .95rem;
}

.section-link {
  font-size: .85rem; font-weight: 700;
  color: var(--accent-text, var(--primary));
  white-space: nowrap; flex-shrink: 0;
}

.section-link:hover { text-decoration: underline; }

/* البطاقة كلها قابلة للنقر (مساحة لمس أكبر على الجوال) */

.article-card { position: relative; }

.card-title a::after { content: ''; position: absolute; inset: 0; }

.article-card:focus-within { outline: 2px solid var(--accent, var(--primary)); outline-offset: 2px; }

.sec-prices .card-cat-bar, .sec-cost .card-cat-bar, .sec-equipment .card-cat-bar,
.sec-store .card-cat-bar, .sec-farm .card-cat-bar, .sec-budget .card-cat-bar { background: var(--accent); }


/* ── معلومات سريعة في أعلى المقال ── */
.quick-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0 0 28px;
}
.quick-facts > div {
  background: var(--light);
  border: 1px solid var(--border);
  border-right: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.quick-facts dt {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 2px;
}
.quick-facts dd {
  font-size: 1rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.5;
}
@media (min-width: 640px) {
  .quick-facts { grid-template-columns: repeat(4, 1fr); }
}


/* ── العد التنازلي (صفحات count/: ظاهر فوق الطية) ── */

.countdown-wrap {
  margin: 28px 0;
  padding: 28px 24px;
  background: var(--dark);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid rgba(254,43,110,.25);
  position: relative;
  overflow: hidden;
}

.countdown-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 0% 50%, rgba(254,43,110,.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 70% at 100% 50%, rgba(161,202,10,.08) 0%, transparent 70%);
  pointer-events: none;
}

.countdown-label {
  font-size: .88rem;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  letter-spacing: .04em;
  margin-bottom: 20px;
  position: relative;
}

.countdown {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  position: relative;
  direction: rtl;
}

.countdown .part {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  flex: 1;
  max-width: 110px;
  position: relative;
}

.countdown .part + .part::before {
  content: ':';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-60%);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.countdown .number {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1;
  min-width: 2ch;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 12px 10px 10px;
  width: 100%;
  text-align: center;
  transition: color .3s ease;
  font-variant-numeric: tabular-nums;
}

.countdown .الثواني .number {
  color: var(--primary);
  border-color: rgba(254,43,110,.25);
  background: rgba(254,43,110,.08);
}

.countdown .text {
  font-size: .75rem;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  letter-spacing: .05em;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .countdown .part {
    padding: 12px 8px;
    max-width: unset;
  }

  .countdown .number {
    font-size: 1.5rem;
    padding: 8px 6px;
  }

  .countdown .part + .part::before {
    font-size: 1.2rem;
  }
}


/* critical-end */

/* ── ما بعد العلامة: يُحمَّل بدون حجب الرسم ── */

.hero-label {
  display: inline-block;
  background: rgba(254,43,110,.15);
  color: var(--primary);
  font-size: .82rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid rgba(254,43,110,.3);
  margin-bottom: 20px;
  letter-spacing: .03em;
}

.section-tag {
  display: inline-block;
  background: var(--secondary);
  color: var(--dark);
  font-size: .78rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: .02em;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  color: var(--text-light);
}

.card-meta svg { flex-shrink: 0; }

.card-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary);
  transition: gap var(--transition);
}

.article-card:hover .card-read-more { gap: 10px; }

.article-cat-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: .78rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.article-content ul li::before {
  content: '';
  position: absolute;
  right: 0; top: .7em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.article-figure figcaption {
  padding: 10px 16px;
  font-size: .82rem;
  color: var(--text-light);
  background: var(--light);
  border-top: 1px solid var(--border);
  text-align: center;
}

.article-content .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-width: 100%;
}

.article-content table {
  width: 100%;
  min-width: 540px;     
  border-collapse: collapse;
  font-size: .93rem;
  display: table;   
}

.article-content thead th {
  background: var(--dark);
  color: var(--white);
  padding: 12px 18px;
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
}

.article-content tbody tr:nth-child(even) { background: #fafafa; }

.article-content tbody td {
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.article-content tbody tr:last-child td { border-bottom: none; }

.highlight-box {
  background: rgba(161,202,10,.08);
  border-right: 4px solid var(--secondary);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0;
  font-size: .98rem;
}

.highlight-box strong { color: var(--secondary-dark); }

/* ── Share buttons ── */

.share-section {
  padding: 1.5rem 0;
  border-top: 1.5px solid var(--border);
  border-bottom: 1.5px solid var(--border);
  margin: 2rem 0;
}

.share-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .75rem;
}

.share-btns {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-ar);
}

.share-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.share-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.share-btn.fb { border-color: #1877f2; color: #1877f2; }

.share-btn.fb:hover { background: #1877f2; color: #fff; }

.share-btn.tw { border-color: #000; color: #000; }

.share-btn.tw:hover { background: #000; color: #fff; }

.share-btn.wa { border-color: #25d366; color: #25d366; }

.share-btn.wa:hover { background: #25d366; color: #fff; }

.share-btn.cp { border-color: var(--border); }

.share-btn.cp:hover { background: var(--sand-dark); }

.author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 36px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.author-avatar {
  flex-shrink: 0;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--white);
}

.author-info { flex: 1; }

.author-name { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }

.author-role { font-size: .8rem; color: var(--primary); font-weight: 700; margin-bottom: 8px; }

.author-bio { font-size: .88rem; color: var(--text-light); line-height: 1.7; margin: 0; }

.footer {
  background: var(--dark);
  color: rgba(255,255,255,.75);
  padding: 56px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: clamp(24px, 3vw, 40px);
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .nav-logo { display: inline-flex; margin-bottom: 14px; }

.footer-brand p {
  font-size: .88rem;
  line-height: 1.75;
  color: rgba(255,255,255,.5);
  margin-bottom: 20px;
}

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: .88rem;
}

.footer-contact-info a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.65);
  transition: color var(--transition);
}

.footer-contact-info a:hover { color: var(--primary); }

.footer-col-title {
  font-size: .85rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 30px; height: 2px;
  background: var(--primary);
}

.footer-links { display: flex; flex-direction: column; gap: 0; }

.footer-links a {
  display: block;
  padding: 7px 0;
  font-size: .88rem;
  color: rgba(255,255,255,.55);
  transition: color var(--transition), padding-right var(--transition);
}

.footer-links a:hover { color: var(--white); padding-right: 4px; }

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.7);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.social-btn:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
}

.footer-bottom {
  padding: 20px 0 26px;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.55);
}

.footer-note {
  max-width: 760px;
  margin: 0 auto 8px;
  line-height: 1.8;
}

.footer-copy { margin: 0; color: rgba(255,255,255,.4); }

.footer a:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

.footer-bottom a { color: rgba(255,255,255,.5); transition: color var(--transition); }

.footer-bottom a:hover { color: var(--white); }

@media (max-width: 768px) {
  .author-box { flex-direction: column; }

  .share-section { flex-direction: column; align-items: flex-start; }

  /* نفس نقطة انتقال القائمة: أعلى من 768px يبقى الفوتر بصف واحد */
  .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 28px 20px; }

  .footer-brand { grid-column: 1 / -1; }

  .footer-contact-info { flex-direction: row; flex-wrap: wrap; gap: 6px 22px; }
}

@media (max-width: 479px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

.pagenotfound {
  align-items: center;
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: center;
  text-align: center;
}

.pagenotfound h1 {
  color: #1D9589;
  font-size: 12.5rem;
  letter-spacing: 0.1em;
  margin: 0.025em 0;
  text-shadow: 0.05em 0.05em 0 rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

@media (max-width: 30rem) {
  .pagenotfound h1 {
    font-size: 5.5rem;
  }
}

.pagenotfound h1 > span {
  -webkit-animation: spooky 2s alternate infinite linear;
          animation: spooky 2s alternate infinite linear;
  color: #1D9589;
  display: inline-block;
}

.pagenotfound h2 {
  color: #1D9589;
  margin-bottom: 0.4em;
  font-size: 3.5rem;
  line-height: 0.5rem;
}

.pagenotfound p {
  color: #000;
  margin-top: 0;
  font-size: 4em;
}

@-webkit-keyframes spooky {
  from {
    transform: translatey(0.15em) scaley(0.95);
  }
  to {
    transform: translatey(-0.15em);
  }
}

@keyframes spooky {
  from {
    transform: translatey(0.15em) scaley(0.95);
  }
  to {
    transform: translatey(-0.15em);
  }
}

.buttonnotfound {
      display:inline-block;
      text-align:center;
      padding:10px 15px;
      margin:30px;
      font-size:4rem;
      background-color:#efefef;
      border-radius:3px;
      box-shadow:0 1px 2px rgba(0,0,0,.3);
      cursor:pointer;
      &:hover {
        background:#1D9589;
       }
}

.buttonnotfound a {
    color: #1D9589;
}

.nav-menu a:focus-visible,
.share-btn:focus-visible,
.nav-toggle:focus-visible,
.hero-chips a:focus-visible,
.section-link:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* ── أرقام الهواتف داخل صفحة RTL ── */

td a[href^="tel:"] { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ── مواضيع أخرى ── */

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px 24px;
}

.topic-block h3 {
  font-size: 1rem;
  margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.topic-block h3 a:hover { color: var(--primary); }

.topic-block li a {
  display: block; padding: 6px 0;
  font-size: .92rem; font-weight: 600; color: var(--text);
  transition: color var(--transition), padding-right var(--transition);
}

.topic-block li a:hover { color: var(--primary); padding-right: 4px; }

/* ── احترام تفضيل تقليل الحركة ── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ── جدول أسعار صغير: لا يحتاج تمريرا أفقيا على الجوال ── */
.article-content table.price-table { min-width: 0; }
.price-table td:last-child { white-space: nowrap; font-weight: 800; color: var(--dark); }
.price-table tbody th { text-align: right; font-weight: 700; padding: 11px 18px; border-bottom: 1px solid var(--border); }
.price-table tbody tr:last-child th { border-bottom: none; }
.table-note { margin: -8px 0 1.4rem; font-size: .85rem; color: var(--text-light); }

/* ── أسئلة شائعة ── */
.article-content .faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.article-content .faq-item h3 { margin: 0 0 6px; font-size: 1.05rem; }
.article-content .faq-item p { margin: 0; font-size: .98rem; line-height: 1.85; }
