/* Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

/* 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; }

/* Slide In */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease forwards;
}

/* Zoom In */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.zoom-in {
    animation: zoomIn 0.5s ease forwards;
}

/* Rotate */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 10s linear infinite;
}

/* Pulse */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s ease infinite;
}

/* Bounce */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 2s ease infinite;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    background-size: 1000px 100%;
    animation: shimmer 3s infinite;
}



@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects */
.hover-glow:hover {
    box-shadow: 0 0 20px rgba(196, 49, 70, 0.3);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Typing Animation */
.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--medium-green);
    animation: typing 3s steps(40) 1s 1 normal both,
               blink 1s steps(1) infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float {
    animation: float 4s ease infinite;
}

/* Global AOS tuning so pages never feel empty while scrolling */
body:not([data-aos-easing]) [data-aos] {
    opacity: 1 !important;
    transform: none !important;
}

[data-aos] {
    will-change: opacity, transform;
}

[data-aos][data-aos-delay] {
    transition-delay: 80ms !important;
}

[data-aos="fade-up"],
[data-aos="fade-down"],
[data-aos="fade-left"],
[data-aos="fade-right"],
[data-aos="zoom-in"],
[data-aos="flip-left"],
[data-aos="flip-right"] {
    transition-duration: 0.55s !important;
}

@media (max-width: 768px) {
    [data-aos] {
        transition-delay: 0ms !important;
        transition-duration: 0.4s !important;
    }
}

/* Counter Animation */
.counter {
    display: inline-block;
    animation: count 2s ease-out;
}

@keyframes count {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Particle Animation */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--medium-green);
    border-radius: 50%;
    opacity: 0.3;
    animation: particle 10s linear infinite;
}

@keyframes particle {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--medium-green);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--light-green);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0%, 100% { clip: rect(12px, 9999px, 34px, 0); }
    20% { clip: rect(85px, 9999px, 96px, 0); }
    40% { clip: rect(27px, 9999px, 61px, 0); }
    60% { clip: rect(92px, 9999px, 45px, 0); }
    80% { clip: rect(54px, 9999px, 23px, 0); }
}

@keyframes glitch-anim-2 {
    0%, 100% { clip: rect(34px, 9999px, 67px, 0); }
    20% { clip: rect(13px, 9999px, 88px, 0); }
    40% { clip: rect(79px, 9999px, 42px, 0); }
    60% { clip: rect(51px, 9999px, 74px, 0); }
    80% { clip: rect(32px, 9999px, 19px, 0); }
}

/* Text Gradient Animation */
.text-gradient {
    background: linear-gradient(
        90deg,
        var(--dark-green),
        var(--medium-green),
        var(--light-green),
        var(--medium-green),
        var(--dark-green)
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 5s ease infinite;
}

@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Card Flip Animation */
.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
    position: relative;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.card-back {
    transform: rotateY(180deg);
}

/* Progress Bar Animation */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 0;
    transition: width 1s ease;
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background: radial-gradient(circle, var(--white) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    width: 20px;
    height: 20px;
    border-left: 2px solid var(--gray-400);
    border-bottom: 2px solid var(--gray-400);
    transform: rotate(-45deg);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--medium-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-200) 25%,
        var(--gray-100) 50%,
        var(--gray-200) 75%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Modal Animation */
.modal-enter {
    animation: modalEnter 0.3s ease;
}

.modal-exit {
    animation: modalExit 0.3s ease;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalExit {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}
