body,
html {
  box-sizing: border-box;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

/* شريط التمرير */
::-webkit-scrollbar {
  width: 12px;
}

.reel-card {
  transform-origin: bottom center;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* عند المرور بالماوس يستقيم الريل ويكبر قليلاً */
.reel-card:hover {
  transform: rotate(0deg) scale(1.03) !important;
  z-index: 5;
}


::-webkit-scrollbar-track {
  background: rgba(2, 6, 23, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #22d3ee 0%, #38bdf8 100%);
  border-radius: 10px;
  border: 2px solid rgba(2, 6, 23, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #38bdf8 0%, #22d3ee 100%);
}

/* خلفية التطبيق */
.app-root {
  background: linear-gradient(135deg, #020617 0%, #0b3c88 50%, #020617 100%);
  min-height: 100%;
}

body {
  background: linear-gradient(135deg, #020617 0%, #0b3c88 50%, #020617 100%);
  background-attachment: fixed;
}

/* نص متدرج */
.gradient-text {
  background-image: linear-gradient(120deg, #38bdf8, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* أيقونات المينيو */
.menu-icon {
  transition: all 280ms ease-out;
  color: #ffffff;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.08);
}

.menu-icon:hover {
  color: #ffffff;
  text-shadow: 0 0 25px rgba(34, 211, 238, 0.95), 0 0 35px rgba(56, 189, 248, 0.8);
  transform: translateY(-1px);
}

/* برجر مينو */
.burger-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.burger-line {
  width: 25px;
  height: 3px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.burger-menu.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
  background: #22d3ee;
}

.burger-menu.active .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
  background: #22d3ee;
}

/* قائمة الموبايل */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100%;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.98) 0%, rgba(11, 60, 136, 0.95) 100%);
  backdrop-filter: blur(20px);
  transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1000;
  padding: 80px 20px 20px;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-item {
  display: block;
  padding: 15px 20px;
  margin-bottom: 8px;
  color: #ffffff;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.mobile-menu-item:hover {
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.3);
  color: #22d3ee;
  transform: translateX(-5px);
}

/* ريلز */
/* ريلز - التعديلات الجديدة */
/* --- تعديلات الريلز العكسية مع الأسهم --- */

/* --- ريلز: مظهر التوهج والمروحة --- */

.reel-stack {
  position: relative;
  height: 580px;
  padding: 40px 60px 80px 60px;
  display: flex;
  align-items: center; /* توسيط لضمان عمل المحور بشكل صحيح */
  justify-content: center;
  perspective: 2500px; /* منظور عميق للثلاثية الأبعاد */
  overflow-x: auto;
  overflow-y: visible;
  scroll-behavior: smooth;
  gap: -20px; /* تداخل سلبي لتقريب الكروت من بعضها */
  scrollbar-width: none;
}

.reel-stack::-webkit-scrollbar {
  display: none;
}

/* الكارت الأساسي */
.reel-card {
  position: relative;
  width: 220px;
  height: 380px;
  border-radius: 24px;
  background: #020617;
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  flex-shrink: 0;
  
  /* الوضع الافتراضي: ضبابي وداكن */
  opacity: 0.7;
  filter: blur(2px) brightness(0.6) grayscale(0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  
  /* محور الدوران: أسفل المنتصف تماماً */
  transform-origin: bottom center;
}

.reel-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  display: block;
}

/* --- منطق الشفافية بين الكروت --- */
/* عند مرور الماوس على الحاوية، اجعل الجميع أكثر شفافية */
.reel-stack:hover .reel-card {
  opacity: 0.4;
  filter: blur(3px) brightness(0.4) grayscale(0.8);
  transform: scale(0.95); /* تصغير بسيط للغير محدد */
}

/* استثناء الكارت الذي نقف عليه حالياً */
.reel-card:hover {
  opacity: 1 !important;
  filter: blur(0) brightness(1.1) grayscale(0) !important;
  z-index: 50 !important;
  
  /* التوهج الخارجي */
  box-shadow: 
    0 0 20px rgba(34, 211, 238, 0.4),
    0 0 40px rgba(34, 211, 238, 0.2),
    0 20px 50px rgba(0, 0, 0, 0.9);
  border-color: rgba(34, 211, 238, 0.6);
  
  /* الحركة: يكبر ويستقيم */
  transform: rotate(0deg) scale(1.15) translateY(-20px) !important;
}

/* --- توزيع الزوايا (مروحة ارتكاز سفلي - 3 كروت فقط) --- */

/* الكارت الأول (اليمين) */
.reel-card:nth-child(1) {
  transform: rotate(-8deg) translateY(10px);
  z-index: 2;
}

/* الكارت الثاني (الوسط) */
.reel-card:nth-child(2) {
  transform: rotate(0deg) translateY(-5px);
  z-index: 3;
  opacity: 0.9; /* تمييز الوسط */
  filter: blur(0px) brightness(0.9);
}

/* الكارت الثالث (اليسار) */
.reel-card:nth-child(3) {
  transform: rotate(8deg) translateY(10px);
  z-index: 2;
}
/* زر الشات بوت */
.chatbot-button {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%);
  border: 3px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 8px 32px rgba(34, 211, 238, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 998;
  transition: all 0.3s ease;
  padding: 0;
}

.chatbot-button:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(34, 211, 238, 0.6);
}

.chatbot-button svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* نافذة الشات بوت */
.chatbot-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.chatbot-overlay.active {
  opacity: 1;
  visibility: visible;
}

.chatbot-window {
  position: fixed;
  bottom: 120px;
  left: 30px;
  width: 420px;
  height: 600px;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.98) 0%, rgba(11, 60, 136, 0.95) 100%);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px) scale(0.9);
  transition: all 0.4s ease;
}

.chatbot-window.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chatbot-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1) 0%, rgba(56, 189, 248, 0.05) 100%);
  border-radius: 24px 24px 0 0;
}

.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.3);
}

.chatbot-avatar img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.chatbot-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chatbot-name {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.chatbot-online {
  font-size: 12px;
  color: #22d3ee;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chatbot-online::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
}

.chatbot-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #94a3b8;
}

.chatbot-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
  transform: rotate(90deg);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: rgba(2, 6, 23, 0.5);
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #22d3ee 0%, #38bdf8 100%);
  border-radius: 10px;
}

.chat-message {
  display: flex;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.chat-message.bot .chat-avatar {
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%);
  border: 2px solid rgba(34, 211, 238, 0.3);
}

.chat-message.user .chat-avatar {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  border: 2px solid rgba(100, 116, 139, 0.3);
}

.chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-message.bot .chat-bubble {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15) 0%, rgba(56, 189, 248, 0.1) 100%);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: #e2e8f0;
  border-radius: 16px 16px 16px 4px;
}

.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.3) 0%, rgba(71, 85, 105, 0.2) 100%);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: #f1f5f9;
  border-radius: 16px 16px 4px 16px;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}

.chat-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d3ee;
  animation: typing 1.4s infinite;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

/* إدخال الشات بوت */
.chatbot-input-area {
  padding: 20px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.5);
  border-radius: 0 0 24px 24px;
}

.chatbot-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 4px 4px 4px 16px;
  transition: all 0.3s ease;
}

.chatbot-input-wrapper:focus-within {
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.chatbot-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-size: 14px;
  padding: 10px 0;
}

.chatbot-input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.chatbot-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #22d3ee 0%, #38bdf8 100%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #020617;
}

.chatbot-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(34, 211, 238, 0.4);
}

.chatbot-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* أنيميشنات */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* ريل فيور */
#reel-viewer img {
  display: block;
}

/* =============================================
   حركات دخول الصفحة الرئيسية
   ============================================= */

/* 1. Keyframes أساسية */
@keyframes fadeUpIn {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideDownIn {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 2. Hero — تتابع عند تحميل الصفحة */
.hero-anim-nav    { animation: slideDownIn 0.55s cubic-bezier(.22,.68,0,1.2) both; }
.hero-anim-search { animation: fadeUpIn   0.65s cubic-bezier(.22,.68,0,1.1) 0.12s both; }
.hero-anim-title  { animation: fadeUpIn   0.70s cubic-bezier(.22,.68,0,1.1) 0.28s both; }
.hero-anim-sub    { animation: fadeUpIn   0.65s cubic-bezier(.22,.68,0,1.1) 0.44s both; }
.hero-anim-cta    { animation: fadeInScale 0.55s cubic-bezier(.34,1.56,.64,1) 0.60s both; }

/* 3. كلاسات reveal — تُفعَّل بالـ JS عند الدخول للشاشة */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.65s cubic-bezier(.22,.68,0,1.1),
              transform 0.65s cubic-bezier(.22,.68,0,1.1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* تأخير متسلسل للكروت */
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* reveal خاص بالكروت — scale أصغر */
.reveal-card {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.55s cubic-bezier(.22,.68,0,1.1),
              transform 0.55s cubic-bezier(.22,.68,0,1.1);
}

.reveal-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* reveal للعناصر الكبيرة (المشغل، البنر) */
.reveal-block {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.75s cubic-bezier(.22,.68,0,1.05),
              transform 0.75s cubic-bezier(.22,.68,0,1.05);
}

.reveal-block.visible {
  opacity: 1;
  transform: translateY(0);
}

/* فاصل الأقسام — يظهر كخط يمتد */
.reveal-divider {
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: opacity 0.5s ease 0.1s, transform 0.6s cubic-bezier(.22,.68,0,1.1) 0.1s;
}

.reveal-divider.visible {
  opacity: 1;
  transform: scaleX(1);
}

/* ميديا كويري */
@media (max-width: 768px) {
  .desktop-menu {
    display: none !important;
  }

  .burger-menu {
    display: flex;
  }

  .mobile-menu {
    width: 80%;
    max-width: 300px;
  }

  /* روابط المينيو الجوال — حجم أكبر للمس */
  .mobile-menu-item {
    padding: 14px 18px;
    font-size: 15px;
    margin-bottom: 4px;
  }

  .reel-stack {
    height: 400px;
    padding: 0 30px;
  }

  /* ريلز: تصغير الكروت على الجوال */
  .reel-card {
    width: 160px;
    height: 280px;
    border-radius: 18px;
  }

  /* شات بوت: نافذة كاملة الشاشة على الجوال */
  .chatbot-window {
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
  }

  .chatbot-header {
    border-radius: 0;
    padding: 16px 20px;
  }

  .chatbot-input-area {
    border-radius: 0;
    /* رفع منطقة الإدخال فوق لوحة المفاتيح */
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  /* زر الشات بوت — أبعد عن حواف الشاشة */
  .chatbot-button {
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    left: 20px;
    width: 54px;
    height: 54px;
  }

  /* فقاعات الرسائل — عرض أوسع على الجوال */
  .chat-bubble {
    max-width: 85%;
    font-size: 13px;
  }
}

/* أجهزة صغيرة جداً (أقل من 390px) */
@media (max-width: 390px) {
  .reel-card {
    width: 140px;
    height: 250px;
  }

  .reel-stack {
    height: 360px;
    padding: 0 20px;
  }
}

/* ========================================= */
/* --- Light Mode Styling (التصميم الفاتح) --- */
/* ========================================= */

/* 1. خلفية بيضاء نقية للموقع بالكامل */
body.light-mode,
body.light-mode .app-root,
body.light-mode footer {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* 2. تحويل نصوص الشعار (Logo) إلى اللون الأسود */
body.light-mode header a span {
  color: #1e293b !important;
}

/* 3. تحويل باقي النصوص الفاتحة في الموقع إلى داكنة */
body.light-mode .text-slate-100,
body.light-mode .text-slate-200,
body.light-mode .text-slate-300,
body.light-mode .text-slate-400,
body.light-mode .text-slate-500 {
  color: #334155 !important;
}

/* 4. تحسين خلفية الناف بار */
body.light-mode #main-nav {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

/* 5. ضبط ألوان أيقونات القائمة والبحث */
body.light-mode .menu-icon {
  color: #475569 !important;
  text-shadow: none !important;
}
body.light-mode .menu-icon:hover {
  color: #0284c7 !important;
}

/* 6. تحسين خلفيات البطاقات وحقول البحث */
body.light-mode .bg-slate-900\/60,
body.light-mode .bg-slate-950\/50,
body.light-mode .bg-slate-950\/40, 
body.light-mode .bg-slate-950\/70, 
body.light-mode .search-container input,
body.light-mode .chatbot-window {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

/* نصوص داخل الحقول */
body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
  color: #64748b !important;
}

/* 7. العناوين المتدرجة تصبح داكنة */
body.light-mode .gradient-text {
  background: none !important;
  -webkit-text-fill-color: #0f172a !important;
  color: #0f172a !important;
  text-shadow: none !important;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* --- تنسيق بطاقات الأعمال (Latest Works) --- */

.work-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* جعل النسبة الطولية مثل البوسترات */
  aspect-ratio: 3/4; 
}

.work-image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.work-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

/* تأثير التراكب (Overlay) */
.work-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.6) 40%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.work-cat {
  font-size: 10px;
  color: #22d3ee;
  margin-bottom: 4px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease 0.1s;
}

.work-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  transform: translateY(5px);
  transition: all 0.3s ease;
}

.work-btn {
  font-size: 11px;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease 0.2s;
}

/* تأثيرات الهوفر (Hover Effects) */
/* --- تنسيق بطاقات الأعمال (Latest Works) - نسخة التوهج --- */

.work-card {
  position: relative;
  border-radius: 20px; /* زوايا أكثر نعومة مثل قسم الصوت */
  overflow: hidden;
  cursor: pointer;
  background: #020617; /* خلفية داكنة جداً */
  border: 1px solid rgba(255, 255, 255, 0.08); /* حدود خفيفة جداً في الوضع العادي */
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  aspect-ratio: 3/4;
  
  /* الوضع الافتراضي: داكن قليلاً لإبراز التوهج لاحقاً */
  filter: brightness(0.9);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5); 
}

.work-image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.work-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
  opacity: 0.85; /* شفافية بسيطة للصورة */
}

/* التراكب اللوني (Overlay) */
.work-overlay {
  position: absolute;
  inset: 0;
  /* تدرج لوني أزرق غامق في الأسفل للنصوص */
  background: linear-gradient(to top, rgba(2, 6, 23, 0.95) 0%, rgba(8, 145, 178, 0.1) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 1; /* يظهر دائماً لكن النصوص تتحرك */
}

/* النصوص داخل الكارت */
.work-cat {
  font-size: 11px;
  color: #22d3ee; /* لون السيان */
  font-weight: 600;
  margin-bottom: 6px;
  transform: translateY(0);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.work-title {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0;
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.work-btn {
  height: 0;
  overflow: hidden;
  font-size: 12px;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  margin-top: 0;
}

/* --- تأثيرات الهوفر (التوهج الحقيقي) --- */
.work-card:hover {
  /* رفع الكارت وتكبيره */
  transform: translateY(-10px) scale(1.02);
  
  /* التوهج القوي (شبه قسم الصوتيات) */
  box-shadow: 
    0 0 20px rgba(34, 211, 238, 0.4), /* توهج داخلي مركز */
    0 0 40px rgba(34, 211, 238, 0.2), /* توهج متوسط */
    0 25px 50px rgba(0, 0, 0, 0.9);   /* ظل عميق للأسفل */
    
  /* حدود مضيئة */
  border-color: rgba(34, 211, 238, 0.6);
  
  /* سطوع كامل */
  filter: brightness(1.1);
  z-index: 10;
}

.work-card:hover img {
  transform: scale(1.1);
  opacity: 1; /* الصورة تصبح واضحة تماماً */
}

/* تحريك النصوص عند الهوفر */
.work-card:hover .work-title {
  color: #22d3ee; /* العنوان يضيء */
  margin-bottom: 8px; /* إفساح مجال للزر */
}

.work-card:hover .work-btn {
  height: auto;
  opacity: 1;
  transform: translateY(0);
  margin-top: 4px;
}
/* ========================================= */
/* --- Search Panel                       --- */
/* ========================================= */

/* سكرول مخصص داخل نتائج البحث */
.custom-scroll::-webkit-scrollbar { width: 4px; }
.custom-scroll::-webkit-scrollbar-track { background: transparent; }
.custom-scroll::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: #22d3ee; }

/* ضبط ألوان البحث في الوضع الفاتح */
body.light-mode #search-panel > div {
  background: rgba(255, 255, 255, 0.97) !important;
  border-color: #e2e8f0 !important;
}
body.light-mode #smart-search {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
body.light-mode #results-container a {
  color: #0f172a !important;
}
body.light-mode #results-container a:hover {
  background: rgba(2, 132, 199, 0.08) !important;
}
