/* الأنماط الأساسية */
body {
    font-family: 'Cairo', sans-serif;
    scroll-behavior: smooth;
    background-color: #080310;
    color: #ffffff;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.glass {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

/* تأثير النقر على البطاقات (الارتداد) */
.glass:active, .social-card:active, .quick-bar-card div:active {
    transform: scale(0.95);
}

.gradient-text {
    background: linear-gradient(90deg, #a855f7, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary {
    background: linear-gradient(45deg, #7c3aed, #ea580c);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden; /* ضروري لتأثير التموج */
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3);
}

.btn-primary:active {
    transform: scale(0.92);
}

/* تأثير التموج (Ripple Effect) */
.ripple-span {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

#sidebar {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(100%);
    background: rgba(15, 10, 25, 0.9);
    backdrop-filter: blur(25px);
    border-left: 1px solid rgba(168, 85, 247, 0.2);
}

#sidebar.open { transform: translateX(0); }

.sidebar-overlay { 
    display: none; 
    background: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(4px); 
}

.sidebar-overlay.active { display: block; }

/* التحريك عند الظهور */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-animate { animation: fadeInUp 1.2s ease-out forwards; }

.reveal { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1); 
}

.reveal.active { 
    opacity: 1; 
    transform: translateY(0); 
}

.brand-logo { height: 32px; width: auto; object-fit: contain; }

.quick-bar-wrapper {
    position: relative;
    z-index: 50;
    height: 0;
}

.quick-bar-card {
    background: rgba(15, 10, 25, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.5rem; 
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: translateY(-50%);
}

.hide-scroll::-webkit-scrollbar { display: none; }
.hide-scroll { -ms-overflow-style: none; scrollbar-width: none; }

/* أنيميشن تدفق الألوان */
@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-gradient-flow {
    background-size: 200% auto;
    animation: gradient-flow 6s ease infinite;
}

/* أنيميشن نبض الألوان في الخلفية */
@keyframes pulse-slow {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.animate-pulse-slow {
    animation: pulse-slow 8s infinite ease-in-out;
}

/* الزر البرتقالي الزجاجي */
.whatsapp-glass-btn {
    position: fixed; bottom: 30px; left: 30px; width: 65px; height: 65px;
    background: rgba(249, 115, 22, 0.2); /* برتقالي شفاف */
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(249, 115, 22, 0.5); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #f97316; font-size: 32px; cursor: pointer; z-index: 10000;
}

.pulse-ring-orange {
    position: absolute; width: 100%; height: 100%; border-radius: 50%;
    border: 3px solid #f97316; animation: pulse-orange 2s infinite;
}

@keyframes pulse-orange {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* فقاعة المساعدة */
.help-bubble {
    position: absolute; left: 80px; background: #f97316; color: white;
    padding: 8px 15px; border-radius: 12px; font-size: 13px; font-weight: bold;
    width: max-content; opacity: 0; visibility: hidden; transition: 0.5s;
}
.help-bubble.show { opacity: 1; visibility: visible; }

/* النافذة المنبثقة */
.contact-popup {
    position: fixed; bottom: 110px; left: 30px; width: 280px;
    background: rgba(15, 10, 25, 0.95); backdrop-filter: blur(15px);
    border-radius: 24px; border: 1px solid rgba(255,255,255,0.1);
    display: none; flex-direction: column; z-index: 10001;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.popup-header { background: linear-gradient(90deg, #a855f7, #f97316); padding: 15px; border-radius: 24px 24px 0 0; display: flex; justify-content: space-between; align-items: center; font-weight: bold; }

.popup-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }

.pop-btn {
    display: flex; align-items: center; gap: 12px; padding: 12px;
    background: rgba(255,255,255,0.05); border-radius: 12px; color: white;
    text-decoration: none; border: 1px solid rgba(255,255,255,0.1);
    font-size: 14px; transition: 0.3s; cursor: pointer;
}
.pop-btn:hover { background: #f97316; color: white; transform: translateX(5px); }

/* تنسيق الحاوية الرئيسية */
.brands__logo-section {
    padding: 10px 0; /* تم تقليل المسافة العلوية والسفلية جداً */
    background-color: #080310; 
    overflow: hidden;
    direction: ltr;
}

/* تنسيق شعار العنوان العلوي وكلمة شركاءنا */
.flex-col.items-center.text-center.w-full {
    padding: 10px 20px; /* تقليل الهامش حول العنوان */
    background: #080310;
    margin-bottom: 0; /* إلغاء أي مسافة تحت العنوان */
}

/* تلوين كلمة شركاءنا بالبرتقالي */
.flex-col.items-center.text-center.w-full h1 {
    color: #f97316 !important;
    font-family: 'Ping AR + LT', sans-serif;
    font-size: 32px;
    font-weight: 800;
    margin: 0; /* إزالة الهوامش الافتراضية للعنوان */
}

/* إذا كان العنوان SVG يتم تلوينه أيضاً */
h1 svg path {
    fill: #f97316 !important;
}

h1 svg {
    max-width: 150px; /* تصغير بسيط للـ SVG لتقليل المساحة */
    height: auto;
    filter: drop-shadow(0px 4px 10px rgba(249, 115, 22, 0.2));
}

/* تنسيق الصفوف */
.brands__row {
    display: flex;
    margin-bottom: 20px; /* تقليل المسافة بين صفوف الشعارات */
    white-space: nowrap;
}

/* إلغاء المسافة في آخر صف */
.brands__row:last-child {
    margin-bottom: 10px;
}

.brands-rows-wrap {
    display: flex;
    align-items: center;
    gap: 40px; /* تقليل المسافة بين الشعارات قليلاً */
    animation: scroll 30s linear infinite;
}

/* عكس اتجاه الصف الأوسط */
.brands__row.middle .brands-rows-wrap {
    animation-direction: reverse;
}

/* توحيد حجم الشعارات مع إضافة الحواف الزجاجية */
.logo-wrap {
    flex: 0 0 auto;
    width: 160px; /* عرض ثابت لضمان الوضوح */
    height: 90px; /* ارتفاع متناسق */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    
    background: rgba(249, 115, 22, 0.05); 
    border: 1px solid rgba(249, 115, 22, 0.2); 
    border-radius: 12px; 
    backdrop-filter: blur(8px);
    margin: 0 5px;
}

.brand-img {
    max-width: 85%; /* تكبير الصورة داخل الكرت */
    max-height: 75%;
    object-fit: contain;
    filter: none; 
    opacity: 0.9; /* زيادة الوضوح */
    transition: all 0.4s ease;
}

/* تأثير عند تمرير الماوس */
.logo-wrap:hover {
    background: rgba(249, 115, 22, 0.15);
    border-color: #f97316;
    transform: translateY(-3px);
}

.logo-wrap:hover .brand-img {
    opacity: 1;
    transform: scale(1.05);
}

/* تأثير الحركة اللانهائية */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    .logo-wrap {
        width: 130px;
        height: 70px;
    }
    .brands-rows-wrap {
        gap: 20px;
    }
    .brands__logo-section {
        padding: 5px 0;
    }
    .flex-col.items-center.text-center.w-full h1 {
        font-size: 24px;
    }
}
/* 1. إعدادات الشريط الجانبي الافتراضية (مخفي جهة اليسار) */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    background-color: #0c051a; /* لون الخلفية الداكن */
    z-index: 100; /* يجب أن يكون أعلى من كل شيء */
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    
    /* التحريك: إزاحة كاملة لليسار خارج الشاشة */
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

/* 2. الحالة عند الفتح (يتم تفعيلها عبر JavaScript) */
#sidebar.open {
    transform: translateX(0);
}

/* 3. طبقة التظليل الخلفية (Overlay) */
#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 99; /* أقل من الشريط الجانبي بدرجة واحدة */
    
    /* الإخفاء الافتراضي */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 4. تفعيل طبقة التظليل */
#sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* 5. تحسينات إضافية للنصوص داخل الشريط */
#sidebar nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: #9ca3af; /* text-gray-400 */
    text-decoration: none;
    transition: all 0.2s;
}

#sidebar nav a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
}