/* Save as css/animations.css */

/* Additional Animation Classes */

/* Water Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.ripple:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(50, 50);
        opacity: 0;
    }
}

/* Gradient Animation */
.animated-gradient {
    background: linear-gradient(-45deg, #00c6ff, #0072ff, #1e90ff, #00c6ff);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% { left: 100%; }
}

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

.bounce {
    animation: bounce 2s infinite;
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation-name: fadeInUp;
}

/* Rotate Animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotate {
    animation: rotate 2s linear infinite;
}

/* Slide In */
@keyframes slideInLeft {
    from {
        transform: translate3d(-100%, 0, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

.slide-in-left {
    animation: slideInLeft 1s ease-out;
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: .15em solid var(--primary-aqua);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-aqua) }
}

/* Hover Glow */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 198, 255, 0.5);
}

/* Neon Pulse */
@keyframes neonPulse {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-aqua),
                    0 0 10px var(--primary-aqua),
                    0 0 15px var(--primary-aqua);
    }
    50% {
        box-shadow: 0 0 10px var(--primary-aqua),
                    0 0 20px var(--primary-aqua),
                    0 0 30px var(--primary-aqua);
    }
}

.neon-pulse {
    animation: neonPulse 2s infinite;
}

/* Card Flip */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
}

.flip-card-back {
    background: linear-gradient(135deg, var(--primary-aqua), var(--secondary-aqua));
    color: white;
    transform: rotateY(180deg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Zoom In */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    50% {
        opacity: 1;
    }
}

.zoom-in {
    animation: zoomIn 0.5s ease-out;
}

/* Staggered Animation */
.stagger-item {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }

/* Loading Bar */
.loading-bar {
    height: 4px;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: var(--light-aqua);
}

.loading-bar:before {
    content: '';
    position: absolute;
    left: -50%;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, var(--primary-aqua), transparent);
    animation: loading 2s infinite;
}

@keyframes loading {
    0% { left: -40%; }
    100% { left: 100%; }
}

/* Hover Shine */
.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.hover-shine:hover::before {
    left: 100%;
}

/* News Ticker Animation */
@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Wave Animation for Servicom */
.service-wave {
    position: relative;
    overflow: hidden;
}

.service-wave::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%23e6f7ff'/%3E%3C/svg%3E");
    background-size: 600px 100%;
    animation: serviceWave 20s linear infinite;
    opacity: 0.3;
}

@keyframes serviceWave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-600px); }
}

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

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

/* Pulse for Important Elements */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Fade In for Page Load */
@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-load {
    animation: pageLoad 0.8s ease-out;
}

/* Scroll Indicator */
@keyframes scrollDown {
    0% { transform: translateY(0); opacity: 0.7; }
    50% { transform: translateY(10px); opacity: 1; }
    100% { transform: translateY(0); opacity: 0.7; }
}

.scroll-indicator {
    animation: scrollDown 2s infinite;
}

/* Success Check Animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
        opacity: 0;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

.checkmark {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: checkmark 0.5s ease-in-out forwards;
}

/* Button Press Effect */
@keyframes buttonPress {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.button-press {
    animation: buttonPress 0.2s ease;
}

/* Spinner Loading */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    border: 3px solid var(--light-aqua);
    border-top: 3px solid var(--primary-aqua);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Text Glitch Effect */
@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                     -0.05em -0.025em 0 rgba(0, 255, 0, 0.75),
                     -0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    }
    14% {
        text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75),
                     -0.05em -0.025em 0 rgba(0, 255, 0, 0.75),
                     -0.025em 0.05em 0 rgba(0, 0, 255, 0.75);
    }
    15% {
        text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
                     0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
                     -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    49% {
        text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
                     0.025em 0.025em 0 rgba(0, 255, 0, 0.75),
                     -0.05em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    50% {
        text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
                     0.05em 0 0 rgba(0, 255, 0, 0.75),
                     0 -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    99% {
        text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75),
                     0.05em 0 0 rgba(0, 255, 0, 0.75),
                     0 -0.05em 0 rgba(0, 0, 255, 0.75);
    }
    100% {
        text-shadow: -0.025em 0 0 rgba(255, 0, 0, 0.75),
                     -0.025em -0.025em 0 rgba(0, 255, 0, 0.75),
                     -0.025em -0.05em 0 rgba(0, 0, 255, 0.75);
    }
}

.glitch-text {
    animation: glitch 2s infinite;
}

/* Background Pattern Animation */
@keyframes patternMove {
    0% { background-position: 0 0; }
    100% { background-position: 100px 100px; }
}

.pattern-bg {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(0, 114, 255, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(0, 198, 255, 0.1) 2px, transparent 2px);
    background-size: 100px 100px;
    animation: patternMove 20s linear infinite;
}

/* Breathing Effect */
@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

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

/* Marquee Effect */
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.marquee {
    animation: marquee 15s linear infinite;
}

/* Color Cycle */
@keyframes colorCycle {
    0% { color: #00c6ff; }
    25% { color: #0072ff; }
    50% { color: #1e90ff; }
    75% { color: #00bfff; }
    100% { color: #00c6ff; }
}

.color-cycle {
    animation: colorCycle 5s infinite;
}

/* Attention Seeker */
@keyframes attention {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(0.9); }
    20%, 40%, 60%, 80% { transform: scale(1.1); }
    50%, 70% { transform: scale(1.1) rotate(5deg); }
}

.attention {
    animation: attention 2s ease infinite;
}

/* Responsive Animation Controls */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Mode Animation Disable */
@media print {
    * {
        animation: none !important;
        transition: none !important;
    }
}