/* 
 * Additional Animations & Visual Effects
 * Fun, professional animations for enhanced UX
 */

/* Glowing effect for CTA buttons */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* Gradient text animation */
.highlight {
    background: linear-gradient(90deg, var(--accent-blue), #64B5F6, var(--accent-blue));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* Hover lift effect for all cards */
.card,
.pricing-card,
.testimonial-card {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Smooth scale on hover */
.card img,
.testimonial-photo img {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover img,
.testimonial-photo:hover img {
    transform: scale(1.08);
}

/* Icon bounce on page load */
.hero .fas.fa-dumbbell {
    animation: float 4s ease-in-out infinite;
}

/* Pricing price pop effect */
.pricing-price {
    display: inline-block;
    transition: all 0.3s ease;
}

.pricing-card:hover .pricing-price {
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(33, 150, 243, 0.5);
}

/* Badge pulse */
@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(33, 150, 243, 0.6);
    }
}

.pricing-badge {
    animation: badgePulse 2s ease-in-out infinite;
}

/* Form focus glow */
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(33, 150, 243, 0.25),
                0 0 20px rgba(33, 150, 243, 0.3);
    transition: all 0.3s ease;
}

/* Testimonial card entrance from sides */
.testimonial-card:nth-child(odd) {
    animation: fadeInLeft 0.8s ease-out both;
}

.testimonial-card:nth-child(even) {
    animation: fadeInRight 0.8s ease-out both;
}

/* Nav link active indicator */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Footer links slide effect */
.footer-links a {
    position: relative;
    padding-left: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-links a:hover::before {
    left: -15px;
    opacity: 1;
}

/* Accordion smooth expand */
.accordion-collapse {
    transition: height 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Loading spinner for buttons */
.spinner-border-sm {
    animation: spin 0.8s linear infinite;
}

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

/* Smooth image load */
img {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img.loaded,
img[src] {
    opacity: 1;
}

/* Back to top entrance */
.back-to-top {
    animation: fadeInUp 0.4s ease-out;
}

/* Pricing features subtle slide */
.pricing-features li {
    transition: all 0.3s ease;
}

.pricing-card:hover .pricing-features li {
    transform: translateX(5px);
    color: var(--text-light);
}

/* Flash message entrance */
.flash-messages .alert {
    animation: slideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Success checkmark animation */
@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
    }
    50% {
        transform: scale(1.2) rotate(-45deg);
    }
    100% {
        transform: scale(1) rotate(-45deg);
    }
}

/* Social icon rotation */
.social-links a {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.social-links a:hover {
    transform: translateY(-5px) rotate(360deg);
}
