/* ============================================
   أنيميشن وحركات إبداعية متقدمة - عزم الإنجاز
   تصميم احترافي وإبداعي بالكامل ✨
   ============================================ */

/* ============ Keyframes ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes slideUp { from { transform: translateY(10px); opacity:.7 } to { transform:none; opacity:1 } }

/* ============ Hero Section Animations ============ */
.hero-section {
    position: relative;
    overflow: hidden;
}

/* خلفية متحركة */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
    opacity: 0.05;
    z-index: 0;
}

.hero-section > .container {
    position: relative;
    z-index: 1;
}

/* أنيميشن للعنوان */
.hero-section h1 {
    animation: fadeInUp 0.8s ease-out;
}

/* أنيميشن للوصف */
.hero-section .lead {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* أنيميشن للأزرار */
.hero-section .btn {
    animation: fadeInUp 0.8s ease-out 0.4s both;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.hero-section .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.hero-section .btn:hover::before {
    left: 100%;
}

.hero-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(79, 140, 203, 0.3);
}

/* أنيميشن للبطاقة */
.hero-card {
    animation: slideInFromRight 1s ease-out 0.6s both;
    transition: all 0.3s ease;
}

.hero-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* أنيميشن للقائمة */
.hero-card ul li {
    animation: fadeInLeft 0.6s ease-out both;
}

.hero-card ul li:nth-child(1) { animation-delay: 0.8s; }
.hero-card ul li:nth-child(2) { animation-delay: 0.9s; }
.hero-card ul li:nth-child(3) { animation-delay: 1s; }
.hero-card ul li:nth-child(4) { animation-delay: 1.1s; }

/* ============ Navigation Animations ============ */
.navbar {
    transition: all 0.3s ease;
    animation: fadeInDown 0.6s ease-out;
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.navbar-brand img {
    transition: all 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05) rotate(-2deg);
}

/* ============ FAQ Section Animations ============ */
#faq {
    position: relative;
}

#faq h3 {
    animation: fadeInUp 0.8s ease-out;
}

.accordion-item {
    animation: fadeInUp 0.6s ease-out both;
    transition: all 0.3s ease;
}

.accordion-item:nth-child(1) { animation-delay: 0.1s; }
.accordion-item:nth-child(2) { animation-delay: 0.2s; }
.accordion-item:nth-child(3) { animation-delay: 0.3s; }
.accordion-item:nth-child(4) { animation-delay: 0.4s; }
.accordion-item:nth-child(5) { animation-delay: 0.5s; }
.accordion-item:nth-child(6) { animation-delay: 0.6s; }

.accordion-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.accordion-button {
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    transform: scale(1.02);
}

/* ============ Links Section Animations ============ */
#links h3 {
    animation: fadeInUp 0.8s ease-out;
}

.soft-link {
    animation: scaleIn 0.6s ease-out both;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.soft-link:nth-child(1) { animation-delay: 0.2s; }
.soft-link:nth-child(2) { animation-delay: 0.4s; }
.soft-link:nth-child(3) { animation-delay: 0.6s; }

.soft-link:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* ============ Footer Animations ============ */
.footer {
    animation: fadeInUp 0.8s ease-out;
}

/* ============ Scroll Animations ============ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ Loading Animation ============ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-out 1s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--soft);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* ============ Particles Background ============ */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 10s infinite ease-in-out;
}

/* ============ Badge Animation ============ */
.soft-badge {
    animation: pulse 2s infinite;
    display: inline-block;
}

/* ============ Smooth Scroll ============ */
html {
    scroll-behavior: smooth;
}

/* ============ Button Ripple Effect ============ */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::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;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

/* ============ Text Glow Effect ============ */
.text-glow {
    text-shadow: 0 0 10px rgba(79, 140, 203, 0.5);
    animation: pulse 3s infinite;
}

/* ============ Card Hover Effects ============ */
.card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* ============ Mobile Optimizations ============ */
@media (max-width: 768px) {
    .hero-section::before {
        animation-duration: 20s;
    }
    
    .hero-card {
        animation: fadeInUp 0.8s ease-out 0.4s both;
    }
    
    .soft-link {
        animation-delay: 0s !important;
    }
}

/* ============ Reduced Motion ============ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

