/* Animation Styles for GSAP and CSS Animations */

/* 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 scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

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

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Loader Animations */
.loader-svg circle {
    animation: rotate 2s linear infinite;
    transform-origin: center;
}

.loader-text {
    animation: pulse 2s ease-in-out infinite;
}

.loader-subtitle {
    animation: fadeInUp 1s ease-out 0.5s both;
}

/* Header Animations */
.header {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
    animation: fadeInDown 0.3s ease-out;
}

.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transition: left 0.3s ease;
}

.nav-link:hover::before {
    left: 0;
}

/* Mobile Menu Animations */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-nav {
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-list li {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.mobile-nav.active .mobile-nav-list li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-nav.active .mobile-nav-list li:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.active .mobile-nav-list li:nth-child(2) { transition-delay: 0.2s; }
.mobile-nav.active .mobile-nav-list li:nth-child(3) { transition-delay: 0.3s; }
.mobile-nav.active .mobile-nav-list li:nth-child(4) { transition-delay: 0.4s; }
.mobile-nav.active .mobile-nav-list li:nth-child(5) { transition-delay: 0.5s; }
.mobile-nav.active .mobile-nav-list li:nth-child(6) { transition-delay: 0.6s; }

/* Hero Section Animations */
.hero-title {
    animation: fadeInUp 1s ease-out 0.5s both;
}

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

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

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

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* Card Animations */
.feature-card,
.industry-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.industry-card:hover {
    transform: translateY(-5px) scale(1.05);
}

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

.feature-card:hover .feature-icon,
.industry-card:hover .industry-icon {
    transform: scale(1.1) rotate(5deg);
    color: var(--primary-color);
}

/* Floating Buttons Animations */
.floating-btn {
    animation: float 3s ease-in-out infinite;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-btn:nth-child(1) {
    animation-delay: 0s;
}

.floating-btn:nth-child(2) {
    animation-delay: 1s;
}

.floating-btn:hover {
    animation-play-state: paused;
    transform: scale(1.15) translateY(-5px);
}

/* Dropdown Animations */
.dropdown-menu {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-section {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown:hover .dropdown-section {
    opacity: 1;
    transform: translateY(0);
}

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

/* Map Pin Animations */
.pin {
    animation: bounceIn 0.6s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.pin:hover {
    animation: pulse 0.5s ease-in-out;
}

/* Scroll Animations Classes for GSAP */
.gsap-fade-in {
    opacity: 0;
    transform: translateY(50px);
}

.gsap-fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
}

.gsap-fade-in-right {
    opacity: 0;
    transform: translateX(50px);
}

.gsap-scale-in {
    opacity: 0;
    transform: scale(0.8);
}

.gsap-slide-up {
    transform: translateY(100px);
}

.gsap-slide-down {
    transform: translateY(-100px);
}

/* Stagger Animation Classes */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

/* Text Animations */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--accent-color);
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink 0.75s step-end infinite;
}

.text-reveal {
    position: relative;
    overflow: hidden;
}

.text-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal.active::before {
    transform: translateX(100%);
}

/* Parallax Elements */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Smooth Scroll Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Page Transition */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.active {
    transform: translateX(0);
}

/* Intersection Observer Classes */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

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

.slide-in-left-on-scroll {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.slide-in-left-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right-on-scroll {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.slide-in-right-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in-on-scroll {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

.scale-in-on-scroll.visible {
    opacity: 1;
    transform: scale(1);
}

/* Counter Animation */
.counter {
    font-weight: 700;
    color: var(--accent-color);
}

/* Progress Bar Animation */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    width: 0;
    transition: width 1s ease;
    border-radius: 2px;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
}

/* 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;
    }
    
    .parallax {
        transform: none !important;
    }
    
    .floating-btn {
        animation: none;
    }
    
    .loader-svg circle {
        animation: none;
    }
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}