/* 
 * B CUBE Consulting Website Animations
 * Adds premium animations and transitions to enhance the luxury feel
 */

/* Base Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Staggered Animation Delays */
.service-card:nth-child(1),
.case-study-card:nth-child(1),
.team-member:nth-child(1) {
    transition-delay: 0.1s;
}

.service-card:nth-child(2),
.case-study-card:nth-child(2),
.team-member:nth-child(2) {
    transition-delay: 0.3s;
}

.service-card:nth-child(3),
.case-study-card:nth-child(3),
.team-member:nth-child(3) {
    transition-delay: 0.5s;
}

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

.fade-in {
    animation: fadeIn 1s ease forwards;
}

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

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

.slide-in-left {
    animation: slideInLeft 1s ease forwards;
}

.slide-in-right {
    animation: slideInRight 1s ease forwards;
}

/* Hero Content Animation */
.hero-content .tagline {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 1s ease 0.3s forwards;
}

.hero-content .subtitle {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 1s ease 0.6s forwards;
}

.hero-content .cta-button {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 1s ease 0.9s forwards;
}

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

/* Separator Animation */
.separator {
    width: 0;
    animation: expandWidth 1.5s ease 0.5s forwards;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 80px;
    }
}

/* Service Icon Animation */
.service-icon i {
    transition: transform 0.5s ease;
}


/* Button Hover Animation */
.cta-button, .submit-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before, .submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
    z-index: 0;
}

.cta-button:hover::before, .submit-button:hover::before {
    left: 100%;
}

/* Testimonial Slide Animation */
@keyframes testimonialFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.testimonial-slide {
    animation: testimonialFadeIn 0.5s ease forwards;
}

/* Logo Hover Animation */
.logo-slide img {
    transition: all 0.5s ease;
}

.logo-slide:hover img {
    transform: scale(1.1);
}

/* Team Member Social Icons Animation */
.team-member-social a {
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.team-member-social a:hover {
    transform: translateY(-5px);
}

/* Case Study Link Animation */
.case-study-link {
    position: relative;
}

.case-study-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.case-study-link:hover::after {
    width: 100%;
}

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

/* Page Load Animation */
.page-load-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeOut 1s ease 1.5s forwards;
}

.page-load-animation .logo {
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}
