/* ===========================
   ANIMATIONS
   =========================== */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

/* Fade On Scroll */
.fade-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Scale Up */
@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-up {
    animation: scaleUp 0.5s ease-out;
}

/* Bounce */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 0.6s ease-in-out infinite;
}

/* Hover Lift */
@keyframes hoverLift {
    to {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }
}

/* Pulse */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

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

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

/* Glow */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 93, 170, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 93, 170, 0.8);
    }
}

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

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

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

/* Slide Animation for Carousel */
@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

/* Counter Animation */
@keyframes countUp {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.count-up {
    animation: countUp 0.5s ease-out;
}

/* Underline Animation */
@keyframes underline {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.underline-animation {
    position: relative;
    display: inline-block;
}

.underline-animation::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    animation: underline 0.6s ease-out forwards;
}

/* Button Ripple Effect */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out;
}

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

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

/* Swing Animation */
@keyframes swing {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

.swing {
    animation: swing 1s ease-in-out infinite;
    transform-origin: top center;
}

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

.slide-down {
    animation: slideDown 0.4s ease-out;
}

/* Background Color Transition */
@keyframes bgTransition {
    0% {
        background-color: rgba(0, 93, 170, 0.1);
    }
    50% {
        background-color: rgba(0, 168, 168, 0.2);
    }
    100% {
        background-color: rgba(0, 93, 170, 0.1);
    }
}

.bg-transition {
    animation: bgTransition 3s ease-in-out infinite;
}

/* Text Shadow Animation */
@keyframes textShadowAnimation {
    0% {
        text-shadow: 0 0 0 rgba(0, 93, 170, 0);
    }
    50% {
        text-shadow: 0 0 10px rgba(0, 93, 170, 0.5);
    }
    100% {
        text-shadow: 0 0 0 rgba(0, 93, 170, 0);
    }
}

.text-shadow-animation {
    animation: textShadowAnimation 2s ease-in-out infinite;
}

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

.transition-color {
    transition: color 0.3s ease;
}

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

.transition-opacity {
    transition: opacity 0.3s ease;
}

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

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

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

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

/* Delay Animations */
.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;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
    animation: rotateLine1 0.3s ease-out forwards;
}

.hamburger.active span:nth-child(3) {
    animation: rotateLine2 0.3s ease-out forwards;
}

@keyframes rotateLine1 {
    from {
        transform: rotate(0deg) translate(0, 0);
    }
    to {
        transform: rotate(45deg) translate(8px, 8px);
    }
}

@keyframes rotateLine2 {
    from {
        transform: rotate(0deg) translate(0, 0);
    }
    to {
        transform: rotate(-45deg) translate(8px, -8px);
    }
}

/* Stagger Animation */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }
.stagger-9 { animation-delay: 0.45s; }
.stagger-10 { animation-delay: 0.5s; }

/* Form Input Animation */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    animation: inputFocus 0.3s ease-out;
}

@keyframes inputFocus {
    from {
        box-shadow: 0 0 0 0 rgba(0, 93, 170, 0.1);
    }
    to {
        box-shadow: 0 0 0 3px rgba(0, 93, 170, 0.1);
    }
}

/* Button Hover Shine */
@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Modal Animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-slide-in {
    animation: modalSlideIn 0.4s ease-out;
}

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

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

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

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

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

.checkmark {
    animation: checkmark 0.5s ease-out forwards;
}
