/* ===================================
   Bharat Packers & Movers - Animations
   =================================== */

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

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

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

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* 3D Transform Effects */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-3d:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(5deg);
}

/* Parallax Effect */
.parallax {
    transform: translateZ(0);
    transition: transform 0.5s ease-out;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hover-scale {
    transition: transform 0.3s ease;
}

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

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Loading Animations */
.loading-spinner {
    animation: rotate 1s linear infinite;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Text Animations */
.text-gradient {
    background: linear-gradient(135deg, #ff6b35, #f77f00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shimmer {
    background: linear-gradient(90deg, #333 0%, #ff6b35 50%, #333 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* Gallery Specific Animations */
.gallery-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    display: none;
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
    display: block;
}

.gallery-overlay {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Service Card Animations */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.service-card:hover::before {
    left: 100%;
}

/* Testimonial Card Animations */
.testimonial-card {
    transition: all 0.4s ease;
    position: relative;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
    transition: box-shadow 0.4s ease;
}

.testimonial-card:hover::after {
    box-shadow: 0 0 0 8px rgba(255, 107, 53, 0);
}

/* Button Ripple Effect */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 1s ease-out;
}

/* Timeline Animation */
.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #ff6b35, #f77f00);
    transform: translateX(-50%) scaleY(0);
    transform-origin: top;
    transition: transform 0.6s ease;
}

.timeline-item.animated::before {
    transform: translateX(-50%) scaleY(1);
}

/* Stagger Animation */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

/* Navbar Scroll Animation */
.navbar {
    transform: translateY(0);
    transition: transform 0.3s ease, background 0.3s ease;
}

.navbar.hide {
    transform: translateY(-100%);
}

/* Page Transition */
.page-transition {
    animation: fadeIn 0.5s ease;
}

/* Icon Animations */
.icon-bounce {
    animation: float 3s ease-in-out infinite;
}

.icon-spin {
    animation: rotate 2s linear infinite;
}

/* Form Input Animations */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    animation: pulse 0.5s ease;
}

/* Rating Stars Animation */
.stars i {
    display: inline-block;
    animation: scaleIn 0.3s ease forwards;
    opacity: 0;
}

.stars i:nth-child(1) { animation-delay: 0.1s; }
.stars i:nth-child(2) { animation-delay: 0.2s; }
.stars i:nth-child(3) { animation-delay: 0.3s; }
.stars i:nth-child(4) { animation-delay: 0.4s; }
.stars i:nth-child(5) { animation-delay: 0.5s; }

/* Progress Bar Animation */
.rating-fill {
    animation: expandWidth 1s ease forwards;
    transform-origin: left;
}

@keyframes expandWidth {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile Specific Animations */
@media (max-width: 768px) {
    .animate-on-scroll {
        transform: translateY(30px);
    }
    
    .card-3d:hover {
        transform: none;
    }
}

/* Network Page Animations */
.region-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.region-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.route-card {
    position: relative;
    overflow: hidden;
}

.route-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
    transition: left 0.5s ease;
}

.route-card:hover::before {
    left: 100%;
}

/* Feature Box Animation */
.feature-box {
    transition: all 0.4s ease;
}

.feature-box:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Video Placeholder Hover */
.video-placeholder {
    transition: all 0.3s ease;
}

.video-placeholder:hover {
    transform: scale(1.05);
}

.video-placeholder i {
    transition: all 0.3s ease;
}

.video-placeholder:hover i {
    transform: scale(1.2);
    color: #ff6b35;
}

/* Social Links Animation */
.social-links a {
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 107, 53, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.social-links a:hover::before {
    width: 100%;
    height: 100%;
}

/* Filter Button Animation */
.filter-btn {
    position: relative;
    overflow: hidden;
}

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

.filter-btn:hover::after,
.filter-btn.active::after {
    width: 200%;
    height: 200%;
}

/* Infra Card Hover Effect */
.infra-card {
    transition: all 0.4s ease;
    position: relative;
}

.infra-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b35, #f77f00);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.infra-card:hover::before {
    transform: scaleX(1);
}

.infra-card:hover {
    transform: translateY(-8px);
}

/* Benefit Item Animation */
.benefit-item {
    transition: all 0.3s ease;
}

.benefit-item:hover {
    transform: translateX(10px);
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Timeline Specific */
.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #ff6b35, #f77f00);
    transform: translateX(-50%);
}

.timeline-item {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.timeline-item:nth-child(even) {
    transform: translateX(50px);
}

.timeline-item.animated {
    opacity: 1;
    transform: translateX(0);
}

.timeline-icon {
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-icon {
    transform: scale(1.2) rotate(360deg);
}

/* Certificate Badge Pulse */
.cert-item {
    transition: all 0.3s ease;
}

.cert-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
}

.cert-item:hover i {
    animation: pulse 1s ease infinite;
}

/* Trust Badge Animation */
.badge-item {
    transition: all 0.3s ease;
}

.badge-item:hover {
    transform: translateY(-10px);
}

.badge-item i {
    transition: all 0.3s ease;
}

.badge-item:hover i {
    transform: scale(1.2);
    color: #ff6b35;
}
