/* Animations for TCRC-Ezzey Partnership Website */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide In Left Animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Slide In Right Animation */
@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scale Up Animation */
@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-30px) translateX(-50%);
    }
    60% {
        transform: translateY(-15px) translateX(-50%);
    }
}

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

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Apply Animations to Elements */
.animate {
    opacity: 0;
    transition: all 0.6s ease;
}

.animate.active {
    opacity: 1;
}

/* Hero Content Animation */
.hero-content {
    animation: fadeIn 1s ease forwards;
}

.hero h1 {
    animation: slideUp 1s ease 0.2s forwards;
    opacity: 0;
}

.hero p {
    animation: slideUp 1s ease 0.4s forwards;
    opacity: 0;
}

.hero-buttons {
    animation: slideUp 1s ease 0.6s forwards;
    opacity: 0;
}

/* Scroll Down Animation */
.scroll-down {
    animation: bounce 2s infinite;
}

/* Section Title Animation */
.section-title h2 {
    position: relative;
    overflow: hidden;
}

.section-title h2::after {
    animation: shimmer 3s infinite linear;
    background: linear-gradient(90deg, 
        rgba(14, 94, 111, 0.2), 
        rgba(14, 94, 111, 0.8), 
        rgba(0, 160, 227, 0.8), 
        rgba(0, 160, 227, 0.2));
    background-size: 200% 100%;
}

/* Card Hover Animations */
.situation-card:hover,
.approach-step:hover,
.pricing-table:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Button Hover Animation */
.btn {
    position: relative;
    overflow: hidden;
}

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

.btn:hover::after {
    width: 300%;
    height: 300%;
}

/* Timeline Animations */
.timeline-item.left.active {
    animation: slideInLeft 0.8s ease forwards;
}

.timeline-item.right.active {
    animation: slideInRight 0.8s ease forwards;
}

/* Synergy Tab Animation */
.synergy-tab {
    position: relative;
    overflow: hidden;
}

.synergy-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--tcrc-primary), var(--ezzey-primary));
    transition: width 0.3s ease;
}

.synergy-tab:hover::after {
    width: 100%;
}

.synergy-tab.active::after {
    width: 100%;
}

/* Form Input Focus Animation */
.form-control {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--ezzey-primary);
    box-shadow: 0 0 0 3px rgba(0, 160, 227, 0.2);
}

/* Social Link Animation */
.social-link {
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--ezzey-primary);
    transform: translateY(-5px);
}

/* Staggered Animation for Cards */
.situation-cards .situation-card:nth-child(1).active {
    animation: slideUp 0.6s ease 0.1s forwards;
}

.situation-cards .situation-card:nth-child(2).active {
    animation: slideUp 0.6s ease 0.2s forwards;
}

.situation-cards .situation-card:nth-child(3).active {
    animation: slideUp 0.6s ease 0.3s forwards;
}

.situation-cards .situation-card:nth-child(4).active {
    animation: slideUp 0.6s ease 0.4s forwards;
}

/* Staggered Animation for Approach Steps */
.approach-steps .approach-step:nth-child(1).active {
    animation: scaleUp 0.6s ease 0.1s forwards;
}

.approach-steps .approach-step:nth-child(2).active {
    animation: scaleUp 0.6s ease 0.2s forwards;
}

.approach-steps .approach-step:nth-child(3).active {
    animation: scaleUp 0.6s ease 0.3s forwards;
}

.approach-steps .approach-step:nth-child(4).active {
    animation: scaleUp 0.6s ease 0.4s forwards;
}

/* Pricing Table Animation */
.pricing-tables .pricing-table:nth-child(1).active {
    animation: slideUp 0.6s ease 0.1s forwards;
}

.pricing-tables .pricing-table:nth-child(2).active {
    animation: slideUp 0.6s ease 0.2s forwards;
}

.pricing-tables .pricing-table:nth-child(3).active {
    animation: slideUp 0.6s ease 0.3s forwards;
}

/* Step Number Animation */
.step-number {
    animation: pulse 2s infinite;
}

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

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

/* Preloader Animation */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--medium-gray);
    border-top: 5px solid var(--ezzey-primary);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

