/* ================================================================
   TAWSEAA — ADVANCED ANIMATIONS & LIGHT THEME
   animations.css v3.0
   ================================================================ */

/* ---------------------------------------------------------------
   1. SCROLL REVEAL — حركات الظهور عند التمرير
--------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-reveal="left"] {
  transform: translateX(40px);
}
[data-reveal="right"] {
  transform: translateX(-40px);
}
[data-reveal="scale"] {
  transform: scale(0.88);
  opacity: 0;
}
[data-reveal="fade"] {
  transform: none;
  opacity: 0;
}
[data-reveal].revealed {
  opacity: 1 !important;
  transform: none !important;
}

/* تأخيرات متدرجة للعناصر المتتالية */
[data-reveal][data-delay="1"] { transition-delay: 0.1s; }
[data-reveal][data-delay="2"] { transition-delay: 0.2s; }
[data-reveal][data-delay="3"] { transition-delay: 0.3s; }
[data-reveal][data-delay="4"] { transition-delay: 0.4s; }
[data-reveal][data-delay="5"] { transition-delay: 0.5s; }
[data-reveal][data-delay="6"] { transition-delay: 0.6s; }

/* ---------------------------------------------------------------
   2. SECTION ENTRANCE — ظهور الأقسام بالكامل
--------------------------------------------------------------- */
.section-enter {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.section-enter.in-view {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------
   3. STAGGER CHILDREN — ظهور متتالي للأبناء
--------------------------------------------------------------- */
.stagger-children > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.stagger-children.in-view > *:nth-child(1) { opacity:1; transform:none; transition-delay:0.05s; }
.stagger-children.in-view > *:nth-child(2) { opacity:1; transform:none; transition-delay:0.15s; }
.stagger-children.in-view > *:nth-child(3) { opacity:1; transform:none; transition-delay:0.25s; }
.stagger-children.in-view > *:nth-child(4) { opacity:1; transform:none; transition-delay:0.35s; }
.stagger-children.in-view > *:nth-child(5) { opacity:1; transform:none; transition-delay:0.45s; }
.stagger-children.in-view > *:nth-child(6) { opacity:1; transform:none; transition-delay:0.55s; }

/* ---------------------------------------------------------------
   4. PARALLAX SCROLL — تأثير العمق عند التمرير
--------------------------------------------------------------- */
.parallax-bg {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ---------------------------------------------------------------
   5. HOVER EFFECTS — تأثيرات التحويم
--------------------------------------------------------------- */

/* بطاقات الخدمات — تأثير 3D مع توهج */
.service-card {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.4s ease !important;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(200, 150, 62, 0.12) 0%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}
.service-card:hover::before { opacity: 1; }
.service-card > * { position: relative; z-index: 1; }

/* بطاقات الباقات — ضوء ديناميكي */
.pkg-card, .pkg {
  position: relative;
  overflow: hidden;
}
.pkg-card::after, .pkg::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,150,62,0.1) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  left: var(--mx, 50%);
  top: var(--my, 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.pkg-card:hover::after, .pkg:hover::after { opacity: 1; }

/* بطاقات الأعمال — overlay سلس */
.portfolio-card {
  overflow: hidden;
}
.portfolio-card .portfolio-visual {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.portfolio-card:hover .portfolio-visual {
  transform: scale(1.04);
}

/* بطاقات المدونة — حدود متحركة */
.blog-card {
  position: relative;
  overflow: hidden;
}
.blog-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(
    var(--border-angle, 0deg),
    transparent 50%,
    rgba(200,150,62,0.6) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.blog-card:hover::before { opacity: 1; }

/* قسم الخدمات في صفحة الخدمات */
.service-block .service-visual {
  transition: transform 0.4s ease, box-shadow 0.4s ease !important;
}
.service-block:hover .service-visual {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}

/* أيقونات الخدمة — نبضة */
.service-icon {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease !important;
}
.service-card:hover .service-icon {
  transform: scale(1.18) rotate(-5deg);
  background: var(--gold-pale);
  border-color: var(--gold);
}

/* الأزرار — موجة */
.btn {
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.12);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s ease;
}
.btn:hover::after { transform: scaleX(1); transform-origin: left; }

/* روابط التنقل — خط منزلق */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 14px;
  left: 14px;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* social buttons — ارتداد */
.social-btn {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.25s ease,
              background 0.25s ease !important;
}
.social-btn:hover {
  transform: translateY(-5px) scale(1.1) !important;
  background: var(--gold-pale) !important;
}

/* روابط الفوتر */
.footer-col ul li a {
  position: relative;
  padding-right: 0;
  transition: color 0.25s ease, padding-right 0.25s ease !important;
}
.footer-col ul li a::before {
  content: '←';
  position: absolute;
  right: -16px;
  opacity: 0;
  transition: opacity 0.25s ease, right 0.25s ease;
  color: var(--gold);
  font-size: 12px;
}
.footer-col ul li a:hover {
  padding-right: 16px;
}
.footer-col ul li a:hover::before {
  opacity: 1;
  right: 0;
}

/* info cards في صفحة التواصل */
.info-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease !important;
}
.info-card:hover {
  box-shadow: 0 10px 40px rgba(200,150,62,0.15) !important;
}

/* شهادات العملاء */
.testimonial {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.4s ease !important;
}
.testimonial:hover {
  box-shadow: 0 20px 60px rgba(200,150,62,0.12) !important;
}

/* عناصر القطاعات */
.sector-card {
  position: relative;
  overflow: hidden;
}
.sector-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,150,62,0.06) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}
.sector-card:hover::before { opacity: 1; }

/* ---------------------------------------------------------------
   6. FLOATING ELEMENTS — عناصر عائمة
--------------------------------------------------------------- */
@keyframes tawFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
@keyframes tawFloatAlt {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}
.why-logo, .hero-icon, [class*="float-el"] {
  animation: tawFloat 4s ease-in-out infinite;
}

/* ---------------------------------------------------------------
   7. SCROLL PROGRESS BAR — شريط التقدم
--------------------------------------------------------------- */
#taw-progress {
  position: fixed;
  top: 0; right: 0; left: 0;
  height: 3px;
  background: linear-gradient(to left, var(--gold), var(--gold-light), #F7C55F);
  transform-origin: right;
  transform: scaleX(0);
  z-index: 9999;
  pointer-events: none;
  transition: transform 0.05s linear;
}

/* ---------------------------------------------------------------
   8. PAGE TRANSITIONS — انتقال بين الصفحات
--------------------------------------------------------------- */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 99999;
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}
.page-transition-overlay.entering {
  transform: scaleY(1);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom;
}
.page-transition-overlay.leaving {
  transform: scaleY(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top;
}

/* ---------------------------------------------------------------
   9. CURSOR CUSTOM — مؤشر مخصص (ديسكتوب فقط)
--------------------------------------------------------------- */
@media (pointer: fine) {
  body { cursor: none; }

  .taw-cursor {
    width: 10px; height: 10px;
    background: var(--gold);
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: transform 0.08s ease, background 0.2s ease, width 0.2s ease, height 0.2s ease;
    will-change: transform;
  }
  .taw-cursor-ring {
    width: 36px; height: 36px;
    border: 1.5px solid rgba(200, 150, 62, 0.5);
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 99997;
    transform: translate(-50%, -50%);
    transition: transform 0.18s ease, border-color 0.2s ease, width 0.2s ease, height 0.2s ease;
    will-change: transform;
  }
  .taw-cursor.hovering {
    width: 16px; height: 16px;
    background: var(--gold-light);
    mix-blend-mode: difference;
  }
  .taw-cursor-ring.hovering {
    width: 54px; height: 54px;
    border-color: rgba(200, 150, 62, 0.8);
  }

  a, button, [role="button"], .btn, .service-card, .portfolio-card,
  .blog-card, .sector-card, .pkg-card, .pkg, .filter-btn, .social-btn {
    cursor: none;
  }
}

/* ---------------------------------------------------------------
   10. MORPHING SHAPES — أشكال حيوية في الخلفية
--------------------------------------------------------------- */
.hero-morph {
  position: absolute;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  opacity: 0.04;
  pointer-events: none;
  animation: morphShape 12s ease-in-out infinite;
}
.hero-morph:nth-child(1) {
  width: 500px; height: 500px;
  background: var(--gold);
  top: -100px; right: -150px;
  animation-duration: 14s;
}
.hero-morph:nth-child(2) {
  width: 350px; height: 350px;
  background: var(--blue);
  bottom: -50px; left: -100px;
  animation-duration: 10s;
  animation-direction: reverse;
}
@keyframes morphShape {
  0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
  50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
  75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
}

/* ---------------------------------------------------------------
   11. TYPING EFFECT LINE — خط توهج أسفل العنوان
--------------------------------------------------------------- */
.hero-title-line {
  position: relative;
  display: inline-block;
}
.hero-title-line::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(to left, var(--gold), var(--gold-light));
  border-radius: 2px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}
.hero-title-line.line-reveal::after {
  width: 100%;
}

/* ---------------------------------------------------------------
   12. COUNT-UP ANIMATION — عداد الأرقام
--------------------------------------------------------------- */
[data-count] {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------
   13. SKELETON LOADING — تحميل هيكلي
--------------------------------------------------------------- */
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ---------------------------------------------------------------
   14. SCROLL SNAP — تثبيت عند التمرير (اختياري)
--------------------------------------------------------------- */
.snap-container {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
}
.snap-section {
  scroll-snap-align: start;
}

/* ---------------------------------------------------------------
   15. ANIMATED GRADIENT BORDER — حدود متحركة
--------------------------------------------------------------- */
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes rotateBorder {
  to { --border-angle: 360deg; }
}
.animated-border {
  --border-angle: 0deg;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    conic-gradient(from var(--border-angle), var(--gold), var(--gold-light), transparent, var(--gold)) border-box;
  animation: rotateBorder 4s linear infinite;
}

/* ---------------------------------------------------------------
   16. GLOW TEXT — نص متوهج
--------------------------------------------------------------- */
.glow-text {
  text-shadow: 0 0 20px rgba(200,150,62,0.5), 0 0 40px rgba(200,150,62,0.3);
}
.glow-text-animate {
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 20px rgba(200,150,62,0.4); }
  50% { text-shadow: 0 0 40px rgba(200,150,62,0.8), 0 0 80px rgba(200,150,62,0.3); }
}

/* ================================================================
   17. LIGHT THEME — الثيم الفاتح
   استخدام: <body class="theme-light"> أو data-theme="light"
================================================================ */
body.theme-light,
[data-theme="light"] {

  /* ألوان الثيم الفاتح */
  --black:       #FAFAF9;
  --dark:        #F4F3F0;
  --card:        #FFFFFF;
  --card2:       #F8F7F4;
  --white:       #1A1814;
  --muted:       rgba(26, 24, 20, 0.55);
  --muted2:      rgba(26, 24, 20, 0.3);
  --gold-pale:   rgba(200, 150, 62, 0.10);
  --gold-border: rgba(200, 150, 62, 0.20);

  background: var(--black);
  color: var(--white);
}

/* خلفية الجسم في الثيم الفاتح */
[data-theme="light"] body::before {
  background-image:
    radial-gradient(ellipse 70% 40% at 80% 10%, rgba(200,150,62,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 20% 80%, rgba(74,144,217,0.04) 0%, transparent 60%),
    linear-gradient(rgba(200,150,62,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,150,62,0.03) 1px, transparent 1px);
}

/* Navbar في الثيم الفاتح */
[data-theme="light"] .navbar {
  background: rgba(250, 250, 249, 0.92);
  border-bottom-color: rgba(200, 150, 62, 0.18);
  box-shadow: 0 1px 20px rgba(0,0,0,0.06);
}
[data-theme="light"] .navbar.scrolled {
  background: rgba(250, 250, 249, 0.98);
}

/* Mobile menu في الثيم الفاتح */
[data-theme="light"] .mobile-menu {
  background: rgba(250, 250, 249, 0.98);
  border-bottom-color: var(--gold-border);
}
[data-theme="light"] .mobile-menu a {
  color: var(--white);
}

/* البطاقات */
[data-theme="light"] .card,
[data-theme="light"] .service-card,
[data-theme="light"] .pkg-card,
[data-theme="light"] .pkg,
[data-theme="light"] .testimonial,
[data-theme="light"] .portfolio-card,
[data-theme="light"] .blog-card,
[data-theme="light"] .method-card,
[data-theme="light"] .sector-card,
[data-theme="light"] .why-list li,
[data-theme="light"] .info-card,
[data-theme="light"] .sidebar-widget,
[data-theme="light"] .contact-form-wrap {
  background: #FFFFFF;
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
[data-theme="light"] .card:hover,
[data-theme="light"] .service-card:hover,
[data-theme="light"] .portfolio-card:hover,
[data-theme="light"] .blog-card:hover,
[data-theme="light"] .method-card:hover,
[data-theme="light"] .sector-card:hover,
[data-theme="light"] .testimonial:hover {
  box-shadow: 0 20px 60px rgba(0,0,0,0.12) !important;
}

/* الأزرار */
[data-theme="light"] .btn-ghost {
  background: rgba(0,0,0,0.05);
  color: var(--white);
  border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .btn-ghost:hover {
  background: rgba(0,0,0,0.08);
}

/* النصوص */
[data-theme="light"] .section-title,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4 {
  color: #1A1814;
}
[data-theme="light"] .service-card h3,
[data-theme="light"] .service-card p,
[data-theme="light"] .method-card h3,
[data-theme="light"] .method-card p,
[data-theme="light"] .sector-card h4,
[data-theme="light"] .t-text,
[data-theme="light"] .blog-excerpt,
[data-theme="light"] .footer-brand p {
  color: rgba(26, 24, 20, 0.65);
}

/* الإدخالات */
[data-theme="light"] .input-group input,
[data-theme="light"] .input-group textarea,
[data-theme="light"] .input-group select,
[data-theme="light"] .newsletter-form input {
  background: rgba(0,0,0,0.04);
  border-color: rgba(200,150,62,0.2);
  color: #1A1814;
}
[data-theme="light"] .input-group input:focus,
[data-theme="light"] .input-group textarea:focus {
  background: rgba(200,150,62,0.04);
}

/* الفوتر */
[data-theme="light"] footer {
  background: #F0EDE8;
  border-top-color: rgba(200,150,62,0.2);
}
[data-theme="light"] .footer-col ul li a {
  color: rgba(26,24,20,0.6);
}
[data-theme="light"] .footer-bottom {
  color: rgba(26,24,20,0.4);
}

/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-track {
  background: #F0EDE8;
}

/* Hero خلفية */
[data-theme="light"] .hero-bg,
[data-theme="light"] .hero-grid-lines {
  opacity: 0.5;
}

/* CTA Section */
[data-theme="light"] .cta-section {
  background: linear-gradient(135deg, #F5F0E8, #EDE8E0);
  border-color: rgba(200,150,62,0.3);
}

/* page hero */
[data-theme="light"] .page-hero { background: transparent; }

/* sidebar */
[data-theme="light"] .blog-cat {
  background: rgba(200,150,62,0.12);
}

/* Audit section */
[data-theme="light"] .free-audit-section {
  background: linear-gradient(135deg, #F5F0E8, #EDE8E0, #F5F0E8);
}
[data-theme="light"] .free-audit-form {
  background: rgba(0,0,0,0.03);
}

/* Pkg */
[data-theme="light"] .pkg-card.featured,
[data-theme="light"] .pkg.popular {
  background: linear-gradient(160deg, #FFF8EE, #FFF3E0);
}
[data-theme="light"] .price-box {
  background: rgba(0,0,0,0.03);
}

/* Compare table */
[data-theme="light"] .compare-table th {
  background: #F5F0E8;
  color: var(--gold);
}
[data-theme="light"] .compare-table tr:hover td {
  background: rgba(0,0,0,0.02);
}

/* body bg خلفية الشبكة */
[data-theme="light"] body::before {
  opacity: 0.6;
}

/* ---------------------------------------------------------------
   18. THEME TOGGLE BUTTON — زر تبديل الثيم
--------------------------------------------------------------- */
#theme-toggle {
  position: fixed;
  bottom: 160px;
  left: 28px;
  z-index: 888;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  line-height: 1;
}
#theme-toggle:hover {
  transform: scale(1.15) rotate(20deg);
  border-color: var(--gold);
  box-shadow: 0 8px 30px rgba(200,150,62,0.3);
}
@media (max-width: 768px) {
  #theme-toggle {
    width: 38px;
    height: 38px;
    bottom: 136px;
    left: 16px;
    font-size: 17px;
  }
}

/* ---------------------------------------------------------------
   19. BLOG CARDS MOBILE — بطاقات المدونة على الجوال
--------------------------------------------------------------- */
@media (max-width: 768px) {

  /* بطاقات المدونة كاملة العرض */
  .blog-card {
    display: flex !important;
    flex-direction: column !important;
    border-radius: 16px !important;
    overflow: hidden;
    margin-bottom: 0;
  }
  .blog-thumb {
    height: 190px !important;
    width: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px !important;
    background: linear-gradient(135deg, var(--card2), var(--dark));
  }
  .blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .blog-body {
    padding: 20px 18px !important;
  }
  .blog-card h2 {
    font-size: 16px !important;
    line-height: 1.5 !important;
    margin-bottom: 8px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .blog-excerpt {
    font-size: 13px !important;
    line-height: 1.75 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px !important;
  }
  .blog-meta {
    gap: 8px !important;
    margin-bottom: 8px !important;
  }
  .blog-author {
    font-size: 12px !important;
    border-top: 1px solid var(--gold-border);
    padding-top: 12px;
    margin-top: 4px;
  }
  .blog-grid {
    gap: 16px !important;
  }
  /* شبكة المدونة على الجوال — تحسين  */
  .blog-layout {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .blog-sidebar {
    order: -1;
  }
  .sidebar-widget {
    margin-bottom: 16px !important;
  }
}

/* تابلت — عمودين للبطاقات */
@media (min-width: 769px) and (max-width: 1024px) {
  .blog-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }
  .blog-card {
    flex-direction: column !important;
    grid-column: span 1;
  }
  .blog-card:first-child {
    grid-column: span 2;
    flex-direction: row !important;
  }
  .blog-card:first-child .blog-thumb {
    width: 220px !important;
    height: auto !important;
    flex-shrink: 0;
  }
  .blog-thumb {
    height: 160px !important;
    width: 100% !important;
  }
}

/* ---------------------------------------------------------------
   20. SINGLE POST ENHANCEMENTS — تحسينات صفحة المقالة
--------------------------------------------------------------- */

/* شريط التقدم للمقالة */
#post-reading-bar {
  position: fixed;
  top: 72px;
  right: 0; left: 0;
  height: 3px;
  background: linear-gradient(to left, var(--gold), var(--gold-light));
  transform-origin: right;
  transform: scaleX(0);
  z-index: 998;
  pointer-events: none;
  transition: transform 0.1s linear;
}

/* TOC عائم */
.post-toc {
  position: sticky;
  top: 100px;
  background: var(--card);
  border: 1px solid var(--gold-border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 24px;
  font-size: 14px;
}
.post-toc h4 {
  font-family: 'Tajawal', sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gold-border);
}
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toc-list a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s, padding-right 0.2s;
  display: block;
}
.toc-list a:hover,
.toc-list a.active {
  color: var(--gold);
  padding-right: 8px;
}

/* محتوى المقالة — تحسين */
.post-content {
  font-size: 16px !important;
  line-height: 1.95 !important;
}
.post-content h2 {
  position: relative;
  padding-right: 16px;
}
.post-content h2::before {
  content: '';
  position: absolute;
  right: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: linear-gradient(to bottom, var(--gold), var(--gold-light));
  border-radius: 2px;
}

/* ---------------------------------------------------------------
   21. NAVBAR SCROLL EFFECTS — تأثيرات التنقل عند الـ scroll
--------------------------------------------------------------- */
.navbar {
  transition: background 0.4s ease,
              border-color 0.4s ease,
              box-shadow 0.4s ease,
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.navbar.nav-hidden {
  transform: translateY(-100%) !important;
  pointer-events: none;
}
.navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

/* ---------------------------------------------------------------
   22. PARTICLES — جسيمات متحركة في الخلفية
--------------------------------------------------------------- */
.hero-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  pointer-events: none;
  animation: particleFly linear infinite;
}
@keyframes particleFly {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0);
  }
  10% { opacity: 0.6; }
  90% { opacity: 0.2; }
  100% {
    opacity: 0;
    transform: translateY(-120px) scale(0.3);
  }
}

/* ---------------------------------------------------------------
   23. REDUCED MOTION — احترام تفضيل تقليل الحركة
--------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------------------------------------------------------------
   EXTRA — slideIn for toast notification
--------------------------------------------------------------- */
@keyframes slideIn {
  from { transform: translateX(60px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* nav-hidden helper */
.navbar.nav-hidden {
  transform: translateY(-100%) !important;
  pointer-events: none;
}

/* ---------------------------------------------------------------
   CRITICAL — post-content must always be visible
   (data-reveal should never be applied to main article content)
--------------------------------------------------------------- */
.post-content,
.entry-content,
article .content,
.single-content {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    transition: none !important;
}

/* mobile-menu critical fix */
.mobile-menu.open {
    display: flex !important;
    z-index: 1100 !important;
}
