/* N2H Consult Limited Custom Animations */
:root {
    --n2h-primary: #f5ad33;
    --n2h-secondary: #7fd7f2;
    --n2h-accent: #e67e22;
    --n2h-dark: #1a1a2e;
    --n2h-light: #fffaf6;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(5deg); 
    }
}

@keyframes float-slow {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

/* Pulse Glow Animation */
@keyframes pulse-glow {
    0% { 
        box-shadow: 0 0 20px rgba(245, 173, 51, 0.4); 
    }
    50% { 
        box-shadow: 0 0 30px rgba(245, 173, 51, 0.8), 0 0 40px rgba(245, 173, 51, 0.6); 
    }
    100% { 
        box-shadow: 0 0 20px rgba(245, 173, 51, 0.4); 
    }
}

@keyframes text-glow {
    0%, 100% { 
        text-shadow: 0 0 20px rgba(245, 173, 51, 0.5); 
    }
    50% { 
        text-shadow: 0 0 30px rgba(127, 215, 242, 0.8), 0 0 40px rgba(127, 215, 242, 0.6); 
    }
}

/* Gradient Shift Animation */
@keyframes gradient-shift {
    0% { 
        background-position: 0% 50%; 
    }
    50% { 
        background-position: 100% 50%; 
    }
    100% { 
        background-position: 0% 50%; 
    }
}

/* Slide In Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rotate and Scale */
@keyframes rotateScale {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Typewriter Effect */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCursor {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--n2h-primary);
    }
}

/* Morphing Background */
@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40%/50% 60% 30% 60%;
    }
    100% {
        border-radius: 60% 40% 30% 70%/60% 30% 70% 40%;
    }
}

/* Staggered Children Animation */
.stagger-animate > * {
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.6s ease forwards;
}

.stagger-animate > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animate > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animate > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animate > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animate > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animate > *:nth-child(6) { animation-delay: 0.6s; }

/* Hover Effects */
.hover-lift {
    transition: var(--transition-medium);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-glow:hover {
    animation: pulse-glow 1s ease-in-out;
}

.hover-rotate:hover {
    transform: rotate(5deg) scale(1.05);
}

/* Animation Classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-text-glow {
    animation: text-glow 2s ease-in-out infinite alternate;
}

.animate-gradient {
    background: linear-gradient(-45deg, var(--n2h-primary), var(--n2h-secondary), var(--n2h-accent), var(--n2h-dark));
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

.animate-slide-left {
    animation: slideInLeft 1s ease-out forwards;
}

.animate-slide-right {
    animation: slideInRight 1s ease-out forwards;
}

.animate-slide-up {
    animation: slideInUp 1s ease-out forwards;
}

.animate-slide-down {
    animation: slideInDown 1s ease-out forwards;
}

.animate-bounce-in {
    animation: bounceIn 1s ease-out forwards;
}

.animate-rotate-scale {
    animation: rotateScale 3s linear infinite;
}

.animate-morph {
    animation: morph 8s ease-in-out infinite;
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--n2h-primary);
    white-space: nowrap;
    margin: 0 auto;
    animation: typewriter 3.5s steps(40, end), blinkCursor 0.75s step-end infinite;
}

/* Scroll Triggered Animations */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-left-scroll {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 0.8s ease;
}

.slide-left-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-right-scroll {
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.8s ease;
}

.slide-right-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Counter Animation */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Loading Spinner */
.n2h-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(245, 173, 51, 0.3);
    border-top: 4px solid var(--n2h-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Particle Effect */
.particle {
    position: absolute;
    background: var(--n2h-primary);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(245, 173, 51, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Consultation Form Animations */
.form-group {
    position: relative;
    overflow: hidden;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    transform: translateY(-25px) scale(0.8);
    color: var(--n2h-primary);
}

.form-label {
    position: absolute;
    top: 15px;
    left: 20px;
    transition: all 0.3s ease;
    pointer-events: none;
    background: var(--n2h-light);
    padding: 0 5px;
}

/* Service Card Flip */
.service-card {
    perspective: 1000px;
    height: 300px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.service-card:hover .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.service-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--n2h-primary), var(--n2h-secondary));
    color: white;
}

/* Progress Bar Animation */
.progress-bar {
    width: 0;
    transition: width 2s ease-in-out;
}

.progress-bar.animated {
    width: var(--progress-width);
}