/* Animations */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

/* Stagger Animation Delays */
.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.animate-delay-4 {
    animation-delay: 0.4s;
}

.animate-delay-5 {
    animation-delay: 0.5s;
}

/* Hero Animations */
.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    animation: fadeInDown 1s ease-out 0.2s both;
}

.hero-subtitle {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-cta {
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Feature Card Hover Effects - Enhanced */
.feature-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.01);
}

/* Button Hover Animations - Enhanced */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

.btn-secondary::before {
    background: rgba(255, 255, 255, 0.2);
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Parallax Effect */
.parallax {
    transition: transform 0.3s ease-out;
}

/* Image Lazy Load Animation */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Form Input Focus Animation */
.form-group input:focus,
.form-group textarea:focus {
    animation: inputFocus 0.3s ease-out;
}

@keyframes inputFocus {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Mobile Menu Animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-list {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Stagger Children Animation - Enhanced */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.animated > *:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-children.animated > *:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-children.animated > *:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-children.animated > *:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-children.animated > *:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-children.animated > *:nth-child(6) {
    transition-delay: 0.6s;
}

.stagger-children.animated > * {
    opacity: 1;
    transform: translateY(0);
}

