/* Enhanced Animations for TestCorp Website */

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(4px, 4px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--secondary-color),
                    0 0 10px var(--secondary-color);
    }
    50% {
        box-shadow: 0 0 10px var(--secondary-color),
                    0 0 20px var(--secondary-color),
                    0 0 30px var(--secondary-color);
    }
}

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

/* Hero Section Enhancements */
.hero::before {
    animation: gridMove 20s linear infinite;
}

.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Service Cards Animation */
.service-card {
    animation: fadeInUp 0.6s ease-out both;
    transition: all 0.3s ease;
}

.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; }

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.service-icon {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(5deg);
    animation: pulse 1s ease-in-out infinite;
}

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(100, 255, 218, 0.4);
}

/* Stats Counter Animation */
.stat-item {
    animation: fadeInUp 0.8s ease-out both;
}

.stat-item:nth-child(1) { animation-delay: 0.2s; }
.stat-item:nth-child(2) { animation-delay: 0.4s; }
.stat-item:nth-child(3) { animation-delay: 0.6s; }

.stat-number {
    transition: transform 0.3s ease;
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
    color: var(--secondary-color);
}

/* Feature Items Animation */
.feature-item {
    animation: slideInLeft 0.6s ease-out both;
    transition: all 0.3s ease;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }

.feature-item:hover {
    transform: translateX(10px);
    background-color: rgba(100, 255, 218, 0.05);
    padding-left: 1.5rem;
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    animation: pulse 0.6s ease-in-out;
}

/* Navigation Links */
.nav-menu a {
    position: relative;
    transition: all 0.3s ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Logo Animation */
.logo {
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    animation: float 2s ease-in-out infinite;
}

/* Contact Action Links */
.contact-action-link,
.map-link {
    position: relative;
    overflow: hidden;
}

.contact-action-link::before,
.map-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.contact-action-link:hover::before,
.map-link:hover::before {
    left: 100%;
}

/* Blog Cards */
.blog-card {
    animation: fadeInUp 0.6s ease-out both;
    transition: all 0.4s ease;
}

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

.blog-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.blog-image {
    transition: all 0.3s ease;
}

.blog-card:hover .blog-image {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Section Titles */
.section-title {
    animation: fadeInUp 0.8s ease-out both;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    animation: shimmer 2s infinite;
}

/* Scroll-triggered animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Loading Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Form Focus Effects */
input:focus,
textarea:focus,
select:focus {
    transform: scale(1.01);
    box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.2);
}

/* Smooth Transitions for All Interactive Elements */
a, button, input, textarea, select {
    transition: all 0.3s ease;
}

/* Parallax Effect Classes */
.parallax {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hover Effects for Cards */
.benefit-card,
.value-item {
    transition: all 0.3s ease;
}

.benefit-card:hover,
.value-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.2);
}

/* Enhanced Footer Animation */
.footer-section {
    animation: fadeInUp 0.6s ease-out both;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }

/* Mobile Menu Animation */
.nav-menu.active {
    animation: slideInRight 0.3s ease-out;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
