/* ============================================
   ADVANCED DESIGN ENHANCEMENTS
   تحسينات التصميم المتقدمة
============================================ */

/* 1. Glassmorphism Effects */
.glass-card {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1) !important;
}

/* 2. Neumorphism Cards */
.neuro-card {
    background: #FAFAFA !important;
    border-radius: 20px !important;
    box-shadow: 
        8px 8px 16px rgba(0, 0, 0, 0.1),
        -8px -8px 16px rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease !important;
}

.neuro-card:hover {
    box-shadow: 
        12px 12px 24px rgba(0, 0, 0, 0.15),
        -12px -12px 24px rgba(255, 255, 255, 1) !important;
    transform: translateY(-4px) !important;
}

/* 3. Gradient Animations */
.gradient-animate {
    background: linear-gradient(
        45deg,
        #76AD3F,
        #5C8B2F,
        #4A7025,
        #76AD3F
    ) !important;
    background-size: 400% 400% !important;
    animation: gradientFlow 10s ease infinite !important;
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 50%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 50%; }
    100% { background-position: 0% 50%; }
}

/* 4. Text Gradient Effects */
.text-gradient {
    background: linear-gradient(135deg, #76AD3F, #5C8B2F, #4A7025) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    font-weight: bold !important;
}

/* 5. Advanced Hover Effects */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.hover-lift:hover {
    transform: translateY(-12px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(118, 173, 63, 0.25) !important;
}

/* 6. Ripple Effect */
.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;
}

/* 7. Magnetic Button Effect */
.btn-magnetic {
    transition: transform 0.2s ease !important;
}

/* 8. Parallax Layers */
.parallax-layer {
    transition: transform 0.3s ease-out !important;
}

/* 9. Glow Effects */
.glow-green {
    box-shadow: 0 0 20px rgba(118, 173, 63, 0.5),
                0 0 40px rgba(118, 173, 63, 0.3),
                0 0 60px rgba(118, 173, 63, 0.1) !important;
}

.glow-green:hover {
    box-shadow: 0 0 30px rgba(118, 173, 63, 0.7),
                0 0 60px rgba(118, 173, 63, 0.5),
                0 0 90px rgba(118, 173, 63, 0.3) !important;
}

/* 10. Animated Underlines */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #76AD3F, #5C8B2F);
    transition: width 0.3s ease;
}

.animated-underline:hover::after {
    width: 100%;
}

/* 11. Card Flip Effect */
.flip-card {
    perspective: 1000px;
    width: 100%;
    height: 300px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #76AD3F, #5C8B2F);
}

/* 12. Floating Animation */
.float-animation {
    animation: floating 3s ease-in-out infinite !important;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* 13. Pulse Animation */
.pulse-animation {
    animation: pulse 2s ease-in-out infinite !important;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

/* 14. Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 15. Morphing Shapes */
.morph-shape {
    animation: morph 8s ease-in-out infinite !important;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 40% 60% / 40% 70% 60% 50%; }
    75% { border-radius: 40% 50% 60% 50% / 70% 50% 50% 60%; }
}

/* 16. 3D Card Tilt */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* 17. Neon Text Effect */
.neon-text {
    color: #76AD3F !important;
    text-shadow: 
        0 0 5px #76AD3F,
        0 0 10px #76AD3F,
        0 0 20px #76AD3F,
        0 0 40px #76AD3F,
        0 0 80px #76AD3F !important;
    animation: neonFlicker 2s infinite alternate !important;
}

@keyframes neonFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            0 0 5px #76AD3F,
            0 0 10px #76AD3F,
            0 0 20px #76AD3F,
            0 0 40px #76AD3F,
            0 0 80px #76AD3F;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* 18. Animated Gradient Border */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 2px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #76AD3F, #5C8B2F, #4A7025, #76AD3F);
    background-size: 400% 400%;
    border-radius: 16px;
    z-index: -1;
    animation: gradientBorder 3s ease infinite;
}

@keyframes gradientBorder {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 19. Split Text Animation */
.split-text {
    display: inline-block;
}

.split-text span {
    display: inline-block;
    animation: splitFade 0.8s ease forwards;
    opacity: 0;
}

.split-text span:nth-child(1) { animation-delay: 0.1s; }
.split-text span:nth-child(2) { animation-delay: 0.2s; }
.split-text span:nth-child(3) { animation-delay: 0.3s; }
.split-text span:nth-child(4) { animation-delay: 0.4s; }
.split-text span:nth-child(5) { animation-delay: 0.5s; }

@keyframes splitFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 20. Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 3px solid #76AD3F;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: #76AD3F; }
}

/* 21. Particle Background */
.particle-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #76AD3F;
    border-radius: 50%;
    opacity: 0.5;
    animation: particleFloat 10s infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* 22. Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #76AD3F, #5C8B2F);
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(118, 173, 63, 0.5);
}

/* 23. Parallax Sections */
.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 24. Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #76AD3F, #5C8B2F);
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5C8B2F, #4A7025);
}

/* 25. Image Zoom on Hover */
.image-zoom {
    overflow: hidden;
    border-radius: 16px;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* 26. Staggered Animation */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    animation: staggerFadeIn 0.6s ease forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 27. Blur to Focus Animation */
.blur-focus {
    filter: blur(5px);
    opacity: 0;
    animation: blurToFocus 1s ease forwards;
}

@keyframes blurToFocus {
    to {
        filter: blur(0);
        opacity: 1;
    }
}

/* 28. Card Hover Border Animation */
.animated-border {
    position: relative;
}

.animated-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: 16px;
    background: linear-gradient(45deg, #76AD3F, #5C8B2F) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.animated-border:hover::before {
    opacity: 1;
}

/* 29. Breathing Animation */
.breathing {
    animation: breathing 3s ease-in-out infinite !important;
}

@keyframes breathing {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* 30. Loading Dots Animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #76AD3F;
    border-radius: 50%;
    animation: dotPulse 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}
