﻿/* Animation CSS for RetaPos Website */

/* AOS Library CSS */
@import url('https://cdnjs.cloudflare.com/ajax/libs/aos/2.3.4/aos.css');

/* Custom Keyframe Animations */
@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 zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }

    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }

    70% {
        transform: translate3d(0, -15px, 0);
    }

    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-200deg);
    }

    to {
        opacity: 1;
        transform: rotate(0deg);
    }
}

/* Animation Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fadeInDown {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-zoomIn {
    animation: zoomIn 0.6s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-rotateIn {
    animation: rotateIn 0.8s ease-out forwards;
}

/* Hover Animations */
.animate-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .animate-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }

    .animate-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s;
    }

    .animate-button:hover::before {
        left: 100%;
    }

/* Card Animations */
.category-card,
.feature-card,
.testimonial-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

    .category-card:hover,
    .feature-card:hover,
    .testimonial-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        border-color: #007bff;
    }

.category-icon,
.feature-icon {
    transition: all 0.3s ease;
}

.category-card:hover .category-icon,
.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Text Animations */
.animate-text {
    background: linear-gradient(45deg, #007bff, #0056b3, #007bff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Loading Animations */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Scroll Animations */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Parallax Effect */
.parallax-element {
    transition: transform 0.1s ease-out;
}

/* Image Hover Effects */
.image-hover-effect {
    overflow: hidden;
    border-radius: 15px;
}

    .image-hover-effect img {
        transition: transform 0.5s ease;
    }

    .image-hover-effect:hover img {
        transform: scale(1.1);
    }

/* Icon Animations */
.social-links a {
    transition: all 0.3s ease;
    display: inline-block;
}

    .social-links a:hover {
        transform: translateY(-3px) scale(1.1);
        color: #007bff !important;
    }

/* Progress Bar Animation */
.progress-bar-animated {
    animation: progressAnimation 2s ease-in-out;
}

@keyframes progressAnimation {
    from {
        width: 0%;
    }

    to {
        width: var(--progress-width);
    }
}

/* Typing Animation */
.typing-animation::after {
    content: '|';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }

    51%, 100% {
        opacity: 0;
    }
}

/* Stagger Animation Delays */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

.stagger-6 {
    animation-delay: 0.6s;
}

/* Responsive Animation Adjustments */
@media (max-width: 768px) {
    .animate-float {
        animation-duration: 2s;
    }

    .category-card:hover,
    .feature-card:hover,
    .testimonial-card:hover {
        transform: translateY(-5px);
    }

    .animate-button:hover {
        transform: translateY(-1px);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Animation Support */
@media (prefers-color-scheme: dark) {
    .category-card,
    .feature-card,
    .testimonial-card {
        background: #2d3748;
        border-color: #4a5568;
    }

    .navbar-scrolled {
        background-color: rgba(45, 55, 72, 0.95) !important;
    }
}
