/* Advanced Animation Effects */

/* Particle Background Animation */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float-particles 15s infinite linear;
}

@keyframes float-particles {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Glowing Button Effect */
.btn-glow {
    position: relative;
    overflow: hidden;
}

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

.btn-glow:hover::before {
    left: 100%;
}

/* Morphing Shapes */
.morphing-shape {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #1e3c72, #2a5298);
    border-radius: 50%;
    animation: morph 4s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% {
        border-radius: 50%;
        transform: rotate(0deg);
    }
    25% {
        border-radius: 25%;
        transform: rotate(90deg);
    }
    50% {
        border-radius: 10%;
        transform: rotate(180deg);
    }
    75% {
        border-radius: 25%;
        transform: rotate(270deg);
    }
}

/* Text Reveal Animation */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1e3c72;
    transform: translateX(-100%);
    animation: reveal 1.5s ease-out forwards;
}

@keyframes reveal {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

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

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Flip Animation */
.flip {
    animation: flip 0.6s ease-in-out;
}

@keyframes flip {
    0% {
        transform: rotateY(0);
    }
    50% {
        transform: rotateY(90deg);
    }
    100% {
        transform: rotateY(0);
    }
}

/* Zoom In Animation */
.zoom-in {
    animation: zoomIn 0.5s ease-out;
}

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

/* Slide Up Animation */
.slide-up {
    animation: slideUp 0.6s ease-out;
}

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

/* Rotate Animation */
.rotate {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Gradient Animation */
.gradient-animation {
    background: linear-gradient(-45deg, #1e3c72, #2a5298, #667eea, #764ba2);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 2px solid #1e3c72;
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

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

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #1e3c72;
    }
}

/* Wobble Animation */
.wobble {
    animation: wobble 1s ease-in-out;
}

@keyframes wobble {
    0% {
        transform: translateX(0%);
    }
    15% {
        transform: translateX(-25px) rotate(-5deg);
    }
    30% {
        transform: translateX(20px) rotate(3deg);
    }
    45% {
        transform: translateX(-15px) rotate(-3deg);
    }
    60% {
        transform: translateX(10px) rotate(2deg);
    }
    75% {
        transform: translateX(-5px) rotate(-1deg);
    }
    100% {
        transform: translateX(0%);
    }
}

/* Bounce In Animation */
.bounce-in {
    animation: bounceIn 1s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Elastic Animation */
.elastic {
    animation: elastic 1s ease-out;
}

@keyframes elastic {
    0% {
        transform: scale(0);
    }
    55% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.9);
    }
    80% {
        transform: scale(1.05);
    }
    90% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(30, 60, 114, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 20px rgba(30, 60, 114, 0.5);
    }
    to {
        box-shadow: 0 0 30px rgba(30, 60, 114, 0.8), 0 0 40px rgba(30, 60, 114, 0.6);
    }
}

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

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

.ripple:hover::before {
    width: 300px;
    height: 300px;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Heartbeat Animation */
.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 50%, 100% {
        transform: scale(1);
    }
    25%, 75% {
        transform: scale(1.1);
    }
}

/* Swing Animation */
.swing {
    transform-origin: top center;
    animation: swing 2s ease-in-out infinite;
}

@keyframes swing {
    20% {
        transform: rotate(15deg);
    }
    40% {
        transform: rotate(-10deg);
    }
    60% {
        transform: rotate(5deg);
    }
    80% {
        transform: rotate(-5deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* Fade In Stagger */
.fade-in-stagger {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInStagger 0.6s ease-out forwards;
}

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

@keyframes fadeInStagger {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Lift Effect */
.hover-lift {
    transition: all 0.3s ease;
}

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

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

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

/* Blur to Focus */
.blur-focus {
    filter: blur(2px);
    transition: filter 0.3s ease;
}

.blur-focus:hover {
    filter: blur(0);
}

/* Color Shift */
.color-shift {
    transition: all 0.3s ease;
}

.color-shift:hover {
    filter: hue-rotate(45deg);
}

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

.flip-card {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

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

.flip-front, .flip-back {
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

/* Utility Classes for Animation Delays */
.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; }

/* Utility Classes for Animation Durations */
.duration-fast { animation-duration: 0.3s; }
.duration-normal { animation-duration: 0.6s; }
.duration-slow { animation-duration: 1s; }
.duration-slower { animation-duration: 2s; }

