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

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Up Animation */
@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Rotate In Animation */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.3);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

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

.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

/* Hero Animations */
.hero-text {
    animation: slideInLeft 1s ease forwards;
}

.hero-image {
    animation: slideInRight 1s ease forwards;
}

/* Service Icons Animation */
.service-icon {
    animation: rotateIn 0.8s ease forwards;
}

/* Stagger children animations */
.stagger-children > * {
    opacity: 0;
    animation: scaleUp 0.6s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.7s; }

/* Smooth scroll animation for anchor links */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Height of fixed header */
}

/* Header scroll animation */
.header {
    transition: transform 0.3s ease;
}

.header.scroll-up {
    transform: translateY(0);
}

.header.scroll-down {
    transform: translateY(-100%);
}

/* Hover animations */
.nav-list a {
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-list a:hover::after {
    width: 100%;
}

/* Button hover animation */
.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary::before, .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.btn-primary:hover::before, .btn-secondary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(112, 25, 66, 0.2);
}

/* Service card hover animation */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.service-card:hover .service-icon {
    animation: bounce 1s ease infinite;
}

/* Testimonial card hover animation */
.testimonial-card {
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: scale(1.02);
}

/* Contact form animations */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(112, 25, 66, 0.1);
    transition: all 0.3s ease;
}

/* Social icons hover animation */
.social-links a {
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Logo hover animation */
.logo-img {
    transition: transform 0.3s ease;
}

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

/* About features animation */
.about-features li {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.5s ease forwards;
}

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