/**
 * Walker's Auto Services - Scroll Animations & Parallax
 * Premium scroll-triggered animations + parallax backgrounds
 */

/* ============================================
   Scroll Animation Base Classes
   ============================================ */

/* Elements start hidden, animate when .animate-in is added */
.scroll-animate {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.scroll-animate.animate-in {
    opacity: 1;
    transform: none !important;
}

/* Fade Up */
.fade-up {
    transform: translateY(60px);
}

/* Fade Down */
.fade-down {
    transform: translateY(-60px);
}

/* Fade Left */
.fade-left {
    transform: translateX(-60px);
}

/* Fade Right */
.fade-right {
    transform: translateX(60px);
}

/* Scale In */
.scale-in {
    transform: scale(0.85);
}

/* Rotate In */
.rotate-in {
    transform: rotate(-5deg) scale(0.9);
}

/* Blur In */
.blur-in {
    filter: blur(10px);
    transform: translateY(20px);
}

.blur-in.animate-in {
    filter: blur(0);
}

/* ============================================
   Staggered Animation Delays
   ============================================ */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

.delay-6 {
    transition-delay: 0.6s;
}

.delay-7 {
    transition-delay: 0.7s;
}

.delay-8 {
    transition-delay: 0.8s;
}

/* ============================================
   Parallax Background Sections
   ============================================ */
.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Dark overlay for readability */
.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.parallax-section>* {
    position: relative;
    z-index: 2;
}

/* --- Parallax: Mechanic Workshop --- */
.parallax-workshop {
    background-image: url('https://images.unsplash.com/photo-1619642751034-765dfdf7c58e?w=1920&q=80');
}

.parallax-workshop::before {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(30, 30, 30, 0.75) 100%);
}

/* --- Parallax: Engine Close-up --- */
.parallax-engine {
    background-image: url('https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?w=1920&q=80');
}

.parallax-engine::before {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(40, 0, 0, 0.7) 100%);
}

/* --- Parallax: Dark Garage --- */
.parallax-garage {
    background-image: url('https://images.unsplash.com/photo-1580273916550-e323be2ae537?w=1920&q=80');
}

.parallax-garage::before {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.88) 0%, rgba(20, 10, 0, 0.82) 100%);
}

/* --- Parallax: Tools --- */
.parallax-tools {
    background-image: url('https://images.unsplash.com/photo-1530124566582-a45a7c82d820?w=1920&q=80');
}

.parallax-tools::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(30, 20, 0, 0.8) 100%);
}

/* --- Parallax: Car Underside --- */
.parallax-undercar {
    background-image: url('https://images.unsplash.com/photo-1487754180451-c456f719a1fc?w=1920&q=80');
}

.parallax-undercar::before {
    background: linear-gradient(135deg, rgba(180, 20, 20, 0.85) 0%, rgba(20, 20, 20, 0.9) 100%);
}

/* Mobile: disable fixed attachment (iOS doesn't support it) */
@media (max-width: 991px) {
    .parallax-section {
        background-attachment: scroll;
    }
}

/* ============================================
   Counter Animation
   ============================================ */
.counter-value {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Oswald', sans-serif;
    color: var(--primary-yellow, #ffc107);
    display: block;
    line-height: 1;
}

.counter-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

/* ============================================
   Section Dividers (Animated)
   ============================================ */
.section-divider {
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-yellow, #ffc107), var(--primary-red, #dc3545));
    margin: 0 auto;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-divider.animate-in {
    width: 80px;
}

/* ============================================
   Card Hover Micro-Animations
   ============================================ */
.service-card-modern {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
}

.service-card-modern:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(255, 193, 7, 0.15);
    border-color: var(--primary-yellow, #ffc107) !important;
}

.service-card-modern:hover .service-icon-wrapper {
    transform: scale(1.15) rotate(5deg);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card-modern:hover .service-link {
    letter-spacing: 1px;
}

/* ============================================
   Pulse Animation for Phone CTA Buttons
   ============================================ */
@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.5);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 193, 7, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.gtm-phone-click {
    animation: pulse-ring 2s ease-out infinite;
}

.gtm-phone-click:hover {
    animation: none;
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ============================================
   Text Reveal Animation
   ============================================ */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal.animate-in span {
    transform: translateY(0);
}

/* ============================================
   Floating Elements (Subtle)
   ============================================ */
@keyframes float-subtle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float-element {
    animation: float-subtle 4s ease-in-out infinite;
}

/* ============================================
   Gradient Shimmer (for section headers)
   ============================================ */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.shimmer-text {
    background: linear-gradient(90deg, #ffc107 0%, #ffffff 25%, #ffc107 50%, #ffffff 75%, #ffc107 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* ============================================
   Feature Box Enhanced (Why Choose Us)
   ============================================ */
.feature-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-box:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 193, 7, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.feature-box:hover .fa-3x {
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

/* ============================================
   Smooth Section Transitions
   ============================================ */
section {
    position: relative;
}

/* Diagonal separator between sections */
.diagonal-top::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 80px;
    background: inherit;
    transform: skewY(-2deg);
    z-index: -1;
}

/* ============================================
   Loading / Entrance Animations
   ============================================ */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   Responsive Animations
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    .scroll-animate,
    .service-card-modern,
    .feature-box,
    .gtm-phone-click,
    .float-element,
    .shimmer-text {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}