/* Animations CSS */

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@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(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 500px;
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-out forwards;
    opacity: 0;
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

.fade-in-down {
    animation: fadeInDown 1s ease-out forwards;
    opacity: 0;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
    opacity: 0;
}

.slide-in-bottom {
    animation: slideInBottom 0.8s ease-out forwards;
    opacity: 0;
}

.zoom-in {
    animation: zoomIn 0.6s ease-out forwards;
    opacity: 0;
}

/* Animation Delays */
.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

.delay-5 {
    animation-delay: 1s;
}

/* Hover Animations */
.hover-float:hover {
    animation: float 1s ease-in-out infinite;
}

.hover-pulse:hover {
    animation: pulse 0.5s ease-in-out;
}

.hover-bounce:hover {
    animation: bounce 0.8s ease-in-out;
}

.hover-rotate:hover {
    animation: rotate 0.6s ease-in-out;
}

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

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-effect:active::after {
    width: 300px;
    height: 300px;
    opacity: 0;
    transition: 0s;
}

/* Shimmer Effect */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

.spinner {
    border: 4px solid rgba(0, 102, 255, 0.1);
    border-top: 4px solid #0066FF;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Typewriter Effect */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 3s steps(40) 1s forwards;
    width: 0;
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 102, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 102, 255, 0.8), 0 0 30px rgba(0, 102, 255, 0.6);
    }
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Slide Animation for Mobile Menu */
.slide-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.slide-menu.active {
    transform: translateX(0);
}

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

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    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;
}

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

/* Parallax Scroll Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

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

/* Progress Bar Animation */
@keyframes progressBar {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    animation: progressBar 2s ease-out forwards;
}

/* Entrance Animations for Different Elements */
.entrance-1 {
    animation: fadeInUp 0.6s ease-out 0.1s forwards;
    opacity: 0;
}

.entrance-2 {
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
    opacity: 0;
}

.entrance-3 {
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
    opacity: 0;
}

.entrance-4 {
    animation: fadeInUp 0.6s ease-out 0.4s forwards;
    opacity: 0;
}

.entrance-5 {
    animation: fadeInUp 0.6s ease-out 0.5s forwards;
    opacity: 0;
}

/* Micro-interactions */
.micro-bounce {
    transition: transform 0.2s ease;
}

.micro-bounce:active {
    transform: scale(0.95);
}

/* Smooth Transitions */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scale on Hover */
.scale-hover {
    transition: transform 0.3s ease;
}

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

/* Shadow Grow on Hover */
.shadow-grow {
    transition: box-shadow 0.3s ease;
}

.shadow-grow:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Underline Animation */
.underline-animate {
    position: relative;
}

.underline-animate::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0066FF;
    transition: width 0.3s ease;
}

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

/* Stagger Animation */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

.stagger-6 {
    animation-delay: 0.6s;
}
