/* رنتراكت - تحسينات CSS متقدمة وتأثيرات إبداعية */

/* تأثيرات الجسيمات في الخلفية */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(255,255,255,0.2), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: float-particles 20s infinite linear;
    pointer-events: none;
}

@keyframes float-particles {
    0% { transform: translateY(0px) translateX(0px); }
    33% { transform: translateY(-10px) translateX(10px); }
    66% { transform: translateY(10px) translateX(-5px); }
    100% { transform: translateY(0px) translateX(0px); }
}

/* تأثيرات الهولوجرام للشعار */
.logo i {
    position: relative;
    overflow: hidden;
}

.logo i::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 70%);
    transform: rotate(45deg) translateX(-100%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

/* تأثيرات الهوفر المتقدمة للبطاقات */
.service-card {
    position: relative;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    border-radius: var(--border-radius-lg);
    transition: var(--transition-slow);
    z-index: -1;
}

.service-card:hover::after {
    opacity: 0.03;
}

.service-card:hover {
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 
        0 20px 40px -12px rgba(37, 99, 235, 0.15),
        0 0 0 1px rgba(37, 99, 235, 0.1);
}

/* تأثيرات الموجة للأزرار */
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transition: var(--transition-slow);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: -1;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* تأثيرات الإضاءة للأيقونات */
.service-icon,
.feature-icon {
    position: relative;
}

.service-icon::after,
.feature-icon::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    z-index: -1;
    opacity: 0;
    filter: blur(8px);
    transition: var(--transition-normal);
}

.service-card:hover .service-icon::after,
.feature-item:hover .feature-icon::after {
    opacity: 0.7;
}

/* تأثيرات النيون للنصوص */
.title-main {
    position: relative;
    text-shadow: 
        0 0 10px rgba(255,255,255,0.5),
        0 0 20px rgba(255,255,255,0.3),
        0 0 30px rgba(255,255,255,0.2);
}

/* تحريك الخلفية التفاعلية */
.hero-background {
    background: 
        radial-gradient(ellipse at 25% 25%, rgba(37, 99, 235, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 75%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 25%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 25% 75%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: gradient-shift 15s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { 
        background-position: 0% 50%, 100% 50%, 100% 0%, 0% 100%; 
    }
    50% { 
        background-position: 100% 50%, 0% 50%, 0% 100%, 100% 0%; 
    }
}

/* تأثيرات الزجاج المضبب */
.dashboard-screen {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* تحريك الرسوم البيانية */
.chart-bars {
    animation: chart-appear 2s ease-out;
}

@keyframes chart-appear {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.bar {
    position: relative;
    background: var(--gradient-primary);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
    border-radius: 2px 2px 0 0;
}

/* تأثيرات التحميل */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* تحسينات للوضع المظلم */
@media (prefers-color-scheme: dark) {
    .service-card {
        background: linear-gradient(145deg, #1f2937 0%, #111827 100%);
        border-color: rgba(255, 255, 255, 0.1);
        color: #f9fafb;
    }
    
    .dashboard-screen {
        background: rgba(31, 41, 55, 0.8);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .screen-header {
        background: #374151;
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* تأثيرات المغناطيس للعناصر التفاعلية */
.magnetic-element {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* تحسينات الأداء */
.service-card,
.feature-item,
.showcase-item {
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* تأثيرات الإيقاع للتحريك */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(37, 99, 235, 0.6);
    }
}

.service-icon:hover,
.feature-icon:hover {
    animation: pulse-glow 2s infinite;
}

/* تأثيرات الانتشار للنقر */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-effect:active::after {
    width: 300px;
    height: 300px;
}

/* تحسينات للتصميم المتجاوب */
@media (max-width: 1024px) {
    .hero-background {
        background-size: 150% 150%;
    }
    
    .cloud {
        transform: scale(0.8);
    }
}

@media (max-width: 768px) {
    .hero::before {
        background-size: 150px 75px;
    }
    
    .title-main {
        text-shadow: 
            0 0 5px rgba(255,255,255,0.5),
            0 0 10px rgba(255,255,255,0.3);
    }
}

/* تأثيرات السكرول المتقدمة */
.parallax-element {
    transform: translateZ(0);
    will-change: transform;
}

/* تحسينات الإنترفيس */
.smooth-corners {
    border-radius: var(--border-radius-lg);
    clip-path: inset(0 round var(--border-radius-lg));
}

/* تأثيرات الانتقال السلسة */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* تحسينات للأداء على الأجهزة المحمولة */
@media (max-width: 480px) {
    .hero-background {
        animation: none; /* توفير البطارية */
    }
    
    .cloud-animation {
        display: none; /* تقليل استهلاك الموارد */
    }
}

/* تأثيرات الإضاءة المحيطة */
.ambient-light {
    position: relative;
}

.ambient-light::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: -1;
}

.ambient-light:hover::before {
    opacity: 1;
}

/* تحسينات للطباعة */
@media print {
    .hero-background,
    .cloud-animation,
    .floating-elements {
        display: none !important;
    }
    
    .service-card,
    .feature-item {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}
