/* Animation Styles for C-DOT Website */

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

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

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

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

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

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(0.9);
    }
    20%, 40%, 60%, 80% {
        transform: scale(1.1);
    }
    50%, 70% {
        transform: scale(1.05);
    }
}

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

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

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

.fade-in-left {
    animation: fadeInLeft 1s ease-in-out;
}

.fade-in-right {
    animation: fadeInRight 1s ease-in-out;
}

.scale-in {
    animation: scaleIn 0.5s ease-in-out;
}

.bounce {
    animation: bounce 2s infinite;
}

.pulse {
    animation: pulse 2s infinite;
}

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

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

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

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

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Hover Animations */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.hover-scale {
    transition: transform 0.3s ease;
}

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

.hover-rotate {
    transition: transform 0.3s ease;
}

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

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(13, 138, 188, 0.5);
}

/* Loading Animation */
.loader {
    border: 5px solid var(--light);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: rotate 1s linear infinite;
}

/* Skeleton Loading */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Transition Classes */
.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.15s ease;
}

.transition-slow {
    transition: all 0.6s ease;
}

/* Delay Classes */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

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

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

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

/* Image Hover Effects */
.image-zoom-effect {
    overflow: hidden;
}

.image-zoom-effect img {
    transition: transform 0.5s ease;
}

.image-zoom-effect:hover img {
    transform: scale(1.1);
}

.image-rotate-effect {
    overflow: hidden;
}

.image-rotate-effect img {
    transition: transform 0.5s ease;
}

.image-rotate-effect:hover img {
    transform: rotate(3deg) scale(1.05);
}

/* Text Animations */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

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

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

.animated-gradient {
    background: linear-gradient(270deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 138, 188, 0.7);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(13, 138, 188, 0);
    }
}

.ripple-effect {
    animation: ripple 1.5s infinite;
}

/* Mobile Menu Animation */
.nav-menu.active {
    animation: slideInFromRight 0.3s ease-in-out;
}

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: rotate 0.8s linear infinite;
}

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

.success-checkmark {
    animation: checkmark 0.6s ease-in-out;
}

/* Error Shake */
.error-shake {
    animation: shake 0.5s ease-in-out;
}

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

/* Counter Animation Enhancement */
.counter {
    display: inline-block;
}

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

.progress-bar {
    animation: progressBar 2s ease-in-out forwards;
}
