/* Animation Styles */

/* Scroll Reveal Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Continuous Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes rotate3d {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

/* Loading Animations */
.loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 102, 204, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-dots {
    display: flex;
    gap: 8px;
}

.loader-dots span {
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.loader-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Button Animations */
.btn-hover-effect {
    position: relative;
    overflow: hidden;
}

.btn-hover-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-hover-effect:hover::before {
    width: 300px;
    height: 300px;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Icon Animations */
.icon-hover {
    transition: transform 0.3s ease;
}

.icon-hover:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Link Underline Animation */
.link-underline {
    position: relative;
    display: inline-block;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

/* Image Parallax */
.parallax-container {
    overflow: hidden;
    position: relative;
}

.parallax-bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 140%;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

/* Typing Animation */
.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--primary);
    white-space: nowrap;
    animation: typing 3s steps(30) forwards, blink 0.8s step-end infinite;
}

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

@keyframes blink {
    50% { border-color: transparent; }
}

/* Counter Animation */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 1001;
    transition: width 0.1s ease;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Intersection Observer Based Animations */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="left"] {
    transform: translateX(-30px);
}

[data-animate="left"].animated {
    transform: translateX(0);
}

[data-animate="right"] {
    transform: translateX(30px);
}

[data-animate="right"].animated {
    transform: translateX(0);
}

[data-animate="scale"] {
    transform: scale(0.9);
}

[data-animate="scale"].animated {
    transform: scale(1);
}

/* Stagger Animation */
[data-stagger] {
    display: contents;
}

[data-stagger] > * {
    opacity: 0;
    transform: translateY(20px);
}

[data-stagger].animated > * {
    animation: fadeInUp 0.5s ease forwards;
}

[data-stagger].animated > *:nth-child(1) { animation-delay: 0.1s; }
[data-stagger].animated > *:nth-child(2) { animation-delay: 0.2s; }
[data-stagger].animated > *:nth-child(3) { animation-delay: 0.3s; }
[data-stagger].animated > *:nth-child(4) { animation-delay: 0.4s; }
[data-stagger].animated > *:nth-child(5) { animation-delay: 0.5s; }
[data-stagger].animated > *:nth-child(6) { animation-delay: 0.6s; }
[data-stagger].animated > *:nth-child(7) { animation-delay: 0.7s; }
[data-stagger].animated > *:nth-child(8) { animation-delay: 0.8s; }
[data-stagger].animated > *:nth-child(9) { animation-delay: 0.9s; }
[data-stagger].animated > *:nth-child(10) { animation-delay: 1s; }

/* Hero Section Specific */
.hero-bg-animation {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(255, 102, 0, 0.05));
    animation: float 15s ease-in-out infinite;
}

.floating-shape:nth-child(1) {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.floating-shape:nth-child(2) {
    width: 300px;
    height: 300px;
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.floating-shape:nth-child(3) {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 30%;
    animation-delay: -10s;
}

/* Gradient Text Animation */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

/* Glow Effect */
.glow-effect {
    position: relative;
}

.glow-effect::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(10px);
}

.glow-effect:hover::before {
    opacity: 0.5;
}

/* Page Transition */
.page-transition {
    animation: fadeIn 0.5s ease;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    inset: 0;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Mouse Follower */
.mouse-follower {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
    transition: transform 0.1s ease;
}

/* Hover Tilt Effect */
.tilt-effect {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

/* Preloader Animation */
.preloader {
    width: 100px;
    height: 100px;
    position: relative;
}

.preloader::before,
.preloader::after {
    content: '';
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
}

.preloader::before {
    inset: 0;
    border-top-color: var(--primary);
    animation: spin 2s linear infinite;
}

.preloader::after {
    inset: 10px;
    border-top-color: var(--secondary);
    animation: spin 1.5s linear infinite reverse;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}
