/**
 * Animations for Piermont Bank theme
 */

/* Featured logos scroll animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-900px); /* Adjust based on total width */
    }
}

.featured-logos-container {
    display: flex;
    animation: scroll 20s linear infinite;
}

/* Feature items animation */
.feature {
    /*transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;*/
    transition: transform 0.3s ease, opacity 0.5s ease;
}

.feature:not(.animated) {
    transform: translateY(30px);
    opacity: 0.7;
}

.feature.animated {
    transform: translateY(0);
    /*box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);*/
    opacity: 1;
}

/* Banking/Lending tab hover effects */
.banking-nav button:hover:not(.active),
.lending-options button:hover:not(.active) {
    background-color: #f0f4ff;
    transform: translateY(-2px);
}

.banking-nav button.active,
.lending-options button.active {
    animation: button-pulse 2s infinite;
}

@keyframes button-pulse {
    0% {
        box-shadow: 0 2px 8px rgba(0, 65, 194, 0.3);
    }
    50% {
        box-shadow: 0 2px 12px rgba(0, 65, 194, 0.5);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0, 65, 194, 0.3);
    }
}

/* Banking and Lending images hover effect */
.banking-image img,
.lending-image img {
    transition: transform 0.5s ease;
}

.banking-image:hover img,
.lending-image:hover img {
    transform: scale(1.05);
}

/* Insight cards animation */
.insight-card {
    /*transition: transform 0.3s ease, box-shadow 0.3s ease;*/
    transition: transform 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-5px);
    /*box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);*/
}

.insight-image img {
    transition: transform 0.5s ease;
}

.insight-card:hover .insight-image img {
    transform: scale(1.1);
}

/* Testimonials carousel animations */
.testimonial {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.testimonial.active {
    opacity: 1;
    transform: scale(1.05);
}

.testimonials-container {
    transition: transform 0.5s ease;
}

/* Hamburger menu animation */
.menu-toggle span,
.mobile-menu-toggle span {
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1),
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

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

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

/* CTA button hover animation */
.cta-button {
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Page load animations */
.hero-content {
    animation: fadeInUp 1s ease-out;
}

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

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

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

/* Section reveal animations */
.features-section .container,
.banking-section .container,
.embedded-section .container,
.lending-section .container,
.insights-section .container,
.testimonials-section .container {
    /*opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    */
    opacity: 1;
}

.features-section .container.revealed,
.banking-section .container.revealed,
.embedded-section .container.revealed,
.lending-section .container.revealed,
.insights-section .container.revealed,
.testimonials-section .container.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Carousel arrow hover effect */
.carousel-arrow {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.carousel-arrow:hover {
    background-color: white;
    color: var(--dark-blue);
}