/* BIG MOTION ANIMATIONS - BBMC */

/* Animated Hero Background */
.hero {
    position: relative;
    background: linear-gradient(-45deg, var(--navy-dark), var(--navy), var(--teal), var(--navy-dark));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating badges animation */
.hero-badges {
    position: relative;
}

.badge {
    animation: float 3s ease-in-out infinite;
}

.badge:nth-child(1) { animation-delay: 0s; }
.badge:nth-child(2) { animation-delay: 0.5s; }
.badge:nth-child(3) { animation-delay: 1s; }
.badge:nth-child(4) { animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Stats Counter Section */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--teal) 0%, var(--navy) 100%);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveGrid 20s linear infinite;
}

@keyframes moveGrid {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    position: relative;
    z-index: 1;
}

.stat-card {
    text-align: center;
    color: white;
    padding: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    transform: translateY(50px);
    opacity: 0;
    animation: statReveal 0.8s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.2s; }
.stat-card:nth-child(2) { animation-delay: 0.4s; }
.stat-card:nth-child(3) { animation-delay: 0.6s; }
.stat-card:nth-child(4) { animation-delay: 0.8s; }

@keyframes statReveal {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stat-number {
    font-size: 64px;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff, #a8edea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 500;
}

/* Auto-Scrolling Testimonials */
.testimonial-scroller {
    padding: 80px 0;
    background: var(--gray-bg);
    overflow: hidden;
}

.scroller-track {
    display: flex;
    gap: 30px;
    animation: scrollTestimonials 30s linear infinite;
    width: max-content;
}

.scroller-track:hover {
    animation-play-state: paused;
}

@keyframes scrollTestimonials {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.scroller-card {
    flex: 0 0 400px;
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--teal);
}

.scroller-card .stars {
    color: #fbbf24;
    font-size: 24px;
    margin-bottom: 16px;
}

.scroller-card p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-text);
    font-style: italic;
}

.scroller-card .testimonial-author {
    margin-top: 20px;
    font-weight: 600;
    color: var(--navy);
    font-style: normal;
}

/* Pulsing CTA Button */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
    opacity: 0;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Service Cards - Auto Animation */
.services-grid {
    perspective: 1000px;
}

.service-card {
    transform-style: preserve-3d;
    transition: all 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 60px rgba(45, 140, 140, 0.3);
}

.service-icon-wrap {
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.service-card:hover .service-icon-wrap {
    animation: iconSpin 0.6s ease;
}

@keyframes iconSpin {
    from { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    to { transform: rotate(360deg) scale(1); }
}

/* Motion Showcase - Enhanced */
.motion-showcase {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    overflow: hidden;
}

.motion-showcase .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.motion-showcase .section-label {
    color: var(--teal-light);
}

.motion-showcase h2 {
    color: white;
}

.motion-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.motion-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transform: translateY(30px);
    opacity: 0;
    animation: motionReveal 0.8s ease forwards;
}

.motion-card:nth-child(1) { animation-delay: 0.1s; }
.motion-card:nth-child(2) { animation-delay: 0.2s; }
.motion-card:nth-child(3) { animation-delay: 0.3s; }
.motion-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes motionReveal {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.motion-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.motion-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,41,66,0.95) 0%, rgba(15,41,66,0.4) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

.motion-overlay h3 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.4s ease 0.2s;
}

.motion-overlay p {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.4s ease 0.3s;
}

.motion-card:hover .motion-overlay h3,
.motion-card:hover .motion-overlay p {
    transform: translateY(0);
    opacity: 1;
}

.motion-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(45, 140, 140, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: transform 0.4s ease;
}

.motion-card:hover .motion-icon {
    transform: scale(1);
    animation: pulse 1.5s ease infinite;
}

.motion-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

/* Responsive */
@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .motion-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .scroller-card {
        flex: 0 0 300px;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .motion-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 48px;
    }
}
