/* 
CorporatePro - Animation Styles
Subtle animations for enhanced user experience
*/

/* ===========================================
   Scroll Animations
=========================================== */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays for multiple elements */
.animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.4s; }
.animate-on-scroll:nth-child(5) { transition-delay: 0.5s; }

/* ===========================================
   Hover Animations
=========================================== */

/* Button hover effects */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:hover::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Card hover lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Icon hover effects */
.icon-hover {
    transition: all 0.3s ease;
}

.icon-hover:hover {
    transform: scale(1.1) rotate(5deg);
    color: var(--accent-color);
}

/* ===========================================
   Loading Animations
=========================================== */

/* Page loading animation */
.page-load {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Pulse animation for CTAs */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ===========================================
   Text Animations
=========================================== */

/* Typewriter effect for hero text */
.typewriter {
    overflow: hidden;
    border-right: .15em solid var(--accent-color);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-color) }
}

/* Fade in up for section headers */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================================
   Navigation Animations
=========================================== */

/* Mobile menu animation */
.navbar-collapse {
    transition: max-height 0.3s ease;
}

.navbar-collapse.collapsing {
    max-height: 0;
    overflow: hidden;
}

/* Sticky header animation */
.navbar {
    transition: all 0.3s ease;
}

/* ===========================================
   Progress Bar Animation
=========================================== */

.progress-bar {
    transition: width 1.5s ease-in-out;
}

/* ===========================================
   Counter Animation
=========================================== */

.counter {
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================================
   Background Gradient Animation
=========================================== */

.gradient-bg {
    background: linear-gradient(-45deg, #2c3e50, #34495e, #3498db, #1abc9c);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ===========================================
   Scroll Indicator
=========================================== */

.scroll-indicator {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ===========================================
   Form Field Focus Animation
=========================================== */

.form-control {
    transition: all 0.3s ease;
}

.form-control:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.1);
}

/* ===========================================
   Service Icon Animation
=========================================== */

.service-icon {
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background-color: var(--accent-color);
}

.service-card:hover .service-icon i {
    color: white;
}

/* ===========================================
   Team Member Hover Animation
=========================================== */

.team-member-card {
    position: relative;
    overflow: hidden;
}

.team-member-info {
    transition: transform 0.3s ease;
}

.team-member-card:hover .team-member-info {
    transform: translateY(-5px);
}

/* ===========================================
   Smooth Scroll Behavior
=========================================== */

html {
    scroll-behavior: smooth;
}

@media screen and (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .btn::after {
        display: none;
    }
}