/* Abrevia Template Animations */

/* Keyframe Animations */
@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 fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

@keyframes floatDelayed {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(-2deg);
    }
}

@keyframes pulseSlow {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes organicMove {
    0% {
        transform: translate(-15%, -10%) rotate(25deg) scale(1);
    }
    12.5% {
        transform: translate(-5%, -20%) rotate(35deg) scale(1.1);
    }
    25% {
        transform: translate(10%, -15%) rotate(45deg) scale(0.9);
    }
    37.5% {
        transform: translate(20%, -5%) rotate(30deg) scale(1.2);
    }
    50% {
        transform: translate(15%, 10%) rotate(40deg) scale(0.8);
    }
    62.5% {
        transform: translate(5%, 20%) rotate(20deg) scale(1.15);
    }
    75% {
        transform: translate(-10%, 15%) rotate(50deg) scale(0.95);
    }
    87.5% {
        transform: translate(-20%, 5%) rotate(25deg) scale(1.05);
    }
    100% {
        transform: translate(-15%, -10%) rotate(25deg) scale(1);
    }
}

@keyframes hoverScale {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* Animation Classes - Scroll Triggered */
.animate-slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-slide-in-left.in-view {
    opacity: 1;
    transform: translateX(0);
}

.animate-slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-slide-in-right.in-view {
    opacity: 1;
    transform: translateX(0);
}

.animate-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-fade-in.in-view {
    opacity: 1;
    transform: translateY(0);
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-delayed {
    animation: floatDelayed 3s ease-in-out infinite;
    animation-delay: 1s;
}

.animate-pulse-slow {
    animation: pulseSlow 4s ease-in-out infinite;
}

.animate-twinkle {
    animation: twinkle 1.5s ease-in-out infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
}

.animate-organic-move {
    animation: organicMove 20s ease-in-out infinite;
}

/* Hover Effects */
.hover-scale {
    transition: transform 0.2s ease-in-out;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Stagger Animations - Scroll Triggered */
.animate-stagger-1 {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: 0s;
}

.animate-stagger-1.in-view {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.animate-stagger-2 {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: 0s;
}

.animate-stagger-2.in-view {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.animate-stagger-3 {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: 0s;
}

.animate-stagger-3.in-view {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.animate-stagger-4 {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: 0s;
}

.animate-stagger-4.in-view {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

/* Responsive Animations */
@media (prefers-reduced-motion: reduce) {
    .animate-slide-in-left,
    .animate-slide-in-right,
    .animate-fade-in,
    .animate-fade-up,
    .animate-scale-in,
    .animate-text-reveal,
    .section-entrance,
    .image-reveal,
    .price-card-reveal,
    .price-highlight,
    .animate-float,
    .animate-float-delayed,
    .animate-pulse-slow,
    .animate-twinkle,
    .animate-gradient,
    .animate-organic-move,
    .animate-stagger-1,
    .animate-stagger-2,
    .animate-stagger-3,
    .animate-stagger-4,
    .stagger-children > *,
    .rich-text-animate h1,
    .rich-text-animate h2,
    .rich-text-animate h3,
    .rich-text-animate h4,
    .rich-text-animate h5,
    .rich-text-animate h6,
    .rich-text-animate p,
    .rich-text-animate li {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .price-highlight::before {
        display: none !important;
    }
    
    .hover-scale:hover {
        transform: none;
    }
}

/* Additional scroll-triggered animations */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-fade-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

.animate-scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-scale-in.in-view {
    opacity: 1;
    transform: scale(1);
}

.animate-text-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-text-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.section-entrance {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.section-entrance.in-view {
    opacity: 1;
    transform: translateY(0);
}

.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-children.in-view > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.in-view > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.in-view > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.in-view > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.in-view > *:nth-child(5) { transition-delay: 0.5s; }

.stagger-children.in-view > * {
    opacity: 1;
    transform: translateY(0);
}

.image-reveal {
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.image-reveal.in-view {
    opacity: 1;
    transform: scale(1);
}

.rich-text-animate h1,
.rich-text-animate h2,
.rich-text-animate h3,
.rich-text-animate h4,
.rich-text-animate h5,
.rich-text-animate h6,
.rich-text-animate p,
.rich-text-animate li {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Price card specific animations */
.price-card-reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.price-card-reveal.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Enhanced hover effects for price cards */
.hover-scale:hover {
    transform: scale(1.02);
}

/* Price highlight animation */
.price-highlight {
    position: relative;
    overflow: hidden;
}

.price-highlight::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.6s ease-in-out;
}

.price-highlight.in-view::before {
    left: 100%;
}

/* Performance optimizations */
.animate-float,
.animate-float-delayed,
.animate-organic-move,
.animate-pulse-slow,
.animate-twinkle {
    will-change: transform, opacity;
}

.hover-scale {
    will-change: transform;
}

.price-card-reveal,
.price-highlight {
    will-change: transform, opacity;
}

/* Blog Posts Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-article-0 {
    animation-delay: 0s;
    animation-fill-mode: forwards;
}

.blog-article-1 {
    animation-delay: 0.1s;
    animation-fill-mode: forwards;
}

.blog-article-2 {
    animation-delay: 0.2s;
    animation-fill-mode: forwards;
}

.blog-article-3 {
    animation-delay: 0.3s;
    animation-fill-mode: forwards;
}

.blog-article-4 {
    animation-delay: 0.4s;
    animation-fill-mode: forwards;
}

.blog-article-5 {
    animation-delay: 0.5s;
    animation-fill-mode: forwards;
}

/* Blog post hover effects - only for link icons and images */