body {
    scroll-behavior: smooth;
}

.dotted-background {
    /* background-color: #101010; */
    background-image: radial-gradient(circle, #1a1a1a 1px, transparent 1px);
    background-size: 15px 15px;
}

.service-card:hover .service-icon,
.service-card:hover .service-title,
.service-card:hover .service-description {
    color: white;
}

/* Scroll Animation Base Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Fade In Up Animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s ease-out;
}

.fade-in-up.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Left Animation */
.fade-in-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s ease-out;
}

.fade-in-left.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Fade In Right Animation */
.fade-in-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s ease-out;
}

.fade-in-right.animate-in {
    opacity: 1;
    transform: translateX(0);
}

/* Scale In Animation */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease-out;
}

.scale-in.animate-in {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Animation for Children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.stagger-children.animate-in > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.animate-in > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.animate-in > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.animate-in > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.animate-in > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.animate-in > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-children.animate-in > *:nth-child(7) { transition-delay: 0.7s; }
.stagger-children.animate-in > *:nth-child(8) { transition-delay: 0.8s; }
.stagger-children.animate-in > *:nth-child(9) { transition-delay: 0.9s; }
.stagger-children.animate-in > *:nth-child(10) { transition-delay: 1.0s; }
.stagger-children.animate-in > *:nth-child(11) { transition-delay: 1.1s; }
.stagger-children.animate-in > *:nth-child(12) { transition-delay: 1.2s; }

.stagger-children.animate-in > * {
    opacity: 1;
    transform: translateY(0);
}

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

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

/* Pulse Animation */
@keyframes pulse-soft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

/* Slide In Animations */
.slide-in-from-bottom {
    opacity: 0;
    transform: translateY(100px);
    transition: all 1s ease-out;
}

.slide-in-from-bottom.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-from-top {
    opacity: 0;
    transform: translateY(-100px);
    transition: all 1s ease-out;
}

.slide-in-from-top.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Rotate In Animation */
.rotate-in {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
    transition: all 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rotate-in.animate-in {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Bounce In Animation */
.bounce-in {
    opacity: 0;
    transform: scale(0.3);
    transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bounce-in.animate-in {
    opacity: 1;
    transform: scale(1);
}

/* Enhanced Stagger with different delays */
.stagger-slow > * {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.stagger-slow.animate-in > *:nth-child(1) { transition-delay: 0.2s; }
.stagger-slow.animate-in > *:nth-child(2) { transition-delay: 0.4s; }
.stagger-slow.animate-in > *:nth-child(3) { transition-delay: 0.6s; }
.stagger-slow.animate-in > *:nth-child(4) { transition-delay: 0.8s; }
.stagger-slow.animate-in > *:nth-child(5) { transition-delay: 1.0s; }

.stagger-slow.animate-in > * {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Wave Effect */
@keyframes wave {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.wave-animation {
    display: inline-block;
    animation: wave 2s ease-in-out infinite;
}

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

/* Gradient Text Animation */
@keyframes gradient-text {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-text {
    background: linear-gradient(-45deg, #f9004d, #ff6b6b, #f9004d, #ff1744);
    background-size: 400% 400%;
    animation: gradient-text 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typewriter Effect */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: #f9004d; }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid #f9004d;
    white-space: nowrap;
    animation: typewriter 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Section Title Reveal Animation */
.section-title-reveal {
    position: relative;
    overflow: hidden;
}

.section-title-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #232426;
    transform: translateX(-100%);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.section-title-reveal.animate-in::before {
    transform: translateX(100%);
}

/* Progressive Load Animation */
.progressive-load {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progressive-load.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Services Carousel Styles */
.carousel-indicator {
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.carousel-indicator:hover {
    transform: scale(1.2);
}

.carousel-indicator.active {
    background-color: #c3002d !important;
    transform: scale(1.2);
}

/* Carousel Navigation Buttons */
#prevBtn, #nextBtn {
    background: rgba(195, 0, 45, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(195, 0, 45, 0.3);
}

#prevBtn:hover, #nextBtn:hover {
    background: rgba(195, 0, 45, 1);
    box-shadow: 0 10px 30px rgba(195, 0, 45, 0.3);
}

/* Responsive Carousel */
@media (max-width: 768px) {
    #prevBtn, #nextBtn {
        padding: 8px;
        width: 40px;
        height: 40px;
    }
    
    #prevBtn svg, #nextBtn svg {
        width: 20px;
        height: 20px;
    }
    
    .carousel-indicator {
        width: 8px;
        height: 8px;
    }
}

/* Smooth carousel transitions */
#servicesTrack {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Service cards hover animation in carousel */
.service-card {
    transition: all 0.3s ease-in-out;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(195, 0, 45, 0.15);
}
