/* Animations.css - ملف الأنيميشنات المتقدمة */

/* الأنيميشن الأساسية */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(-5deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 30px rgba(212, 175, 55, 0.6);
    }
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes textReveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes lineDraw {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes wave {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-1000px);
    }
}

/* تطبيق الأنيميشنات */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* الأنيميشنات للعناصر المحددة */
.animate-badge {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.animate-title {
    overflow: hidden;
}

.animate-title .title-line {
    display: block;
    animation: textReveal 1.2s ease 0.5s both;
    clip-path: inset(0 100% 0 0);
}

.animate-title .title-line:nth-child(2) {
    animation-delay: 0.8s;
}

.animate-text {
    animation: fadeIn 1s ease 1.2s both;
}

.animate-buttons {
    animation: fadeInUp 1s ease 1.5s both;
}

.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card.card-1 {
    animation-delay: 0s;
}

.floating-card.card-2 {
    animation: float2 7s ease-in-out infinite;
    animation-delay: 1s;
}

.floating-card.card-3 {
    animation-delay: 2s;
}

.visual-icon {
    animation: pulse 2s infinite;
}

.service-card {
    animation: fadeInUp 0.6s ease both;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

.feature-card {
    animation: scaleIn 0.6s ease both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

.testimonial-card {
    animation: fadeIn 0.6s ease both;
}

.testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonial-card:nth-child(2) { animation-delay: 0.2s; }
.testimonial-card:nth-child(3) { animation-delay: 0.3s; }

/* أنيميشنات الأشكال العائمة */
.shape {
    animation: float 20s ease-in-out infinite;
}

.shape-1 {
    animation-delay: 0s;
    animation-duration: 25s;
}

.shape-2 {
    animation-delay: 5s;
    animation-duration: 30s;
}

.shape-3 {
    animation-delay: 10s;
    animation-duration: 20s;
}

.shape-4 {
    animation-delay: 15s;
    animation-duration: 35s;
}

.shape-5 {
    animation-delay: 20s;
    animation-duration: 25s;
}

/* أنيميشنات الجسيمات */
.particle {
    position: absolute;
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat linear infinite;
}

/* أنيميشنات الأرقام في الإحصائيات */
.stat-number.animated {
    animation: countUp 2s ease-out forwards;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* أنيميشنات الأزرار */
.btn-primary:hover i {
    animation: bounce 0.5s;
}

.service-link:hover i {
    animation: slideInLeft 0.3s ease;
}

/* أنيميشنات التحميل */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* أنيميشنات القائمة */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* أنيميشنات بطاقات الخدمات عند التمرير */
.service-card:hover .service-icon i {
    animation: bounce 0.5s;
}

.service-card:hover .service-icon .icon-bg {
    animation: pulse 2s infinite;
}

/* أنيميشنات النجوم في التقييم */
.fa-star {
    animation: glow 2s infinite;
}

.fa-star:nth-child(1) { animation-delay: 0s; }
.fa-star:nth-child(2) { animation-delay: 0.2s; }
.fa-star:nth-child(3) { animation-delay: 0.4s; }
.fa-star:nth-child(4) { animation-delay: 0.6s; }
.fa-star:nth-child(5) { animation-delay: 0.8s; }

/* أنيميشنات الخطوط في العناوين */
.section-title {
    position: relative;
    overflow: hidden;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
    animation: lineDraw 1.5s ease 0.5s forwards;
}

/* أنيميشنات الأمواج */
.wave-container {
    position: relative;
    overflow: hidden;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" fill="%23D4AF37"></path></svg>');
    background-size: 600px 100px;
    animation: wave 20s linear infinite;
}

.wave:nth-child(2) {
    opacity: 0.5;
    animation-delay: -5s;
    animation-duration: 25s;
}

.wave:nth-child(3) {
    opacity: 0.3;
    animation-delay: -10s;
    animation-duration: 30s;
}

/* أنيميشنات توهج الأزرار */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition-normal);
}

.btn-primary:hover::before {
    right: 100%;
}

/* أنيميشنات الظلال المتحركة */
.shadow-animate {
    animation: shadowMove 3s ease-in-out infinite alternate;
}

@keyframes shadowMove {
    from {
        box-shadow: var(--shadow-lg);
    }
    to {
        box-shadow: var(--shadow-xl);
    }
}

/* أنيميشنات الإخفاء التدريجي */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* أنيميشنات الأرقام الدوارة */
.spinning-number {
    display: inline-block;
    animation: rotate 2s linear infinite;
}

/* أنيميشنات النصوص المضيئة */
.glowing-text {
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light), var(--color-gold));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 3s linear infinite;
}

/* أنيميشنات الاهتزاز */
.vibrate {
    animation: vibrate 0.3s linear infinite both;
}

@keyframes vibrate {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

/* أنيميشنات التكبير التدريجي */
.zoom-in {
    animation: zoomIn 0.5s ease both;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* أنيميشنات الوميض */
.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.5;
    }
}