/* Modern Animations for GreenHealers */

/* ============================================
   FADE & SLIDE ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* ============================================
   HOVER ANIMATIONS
   ============================================ */

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(40, 167, 69, 0.8), 0 0 30px rgba(40, 167, 69, 0.6);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-scale {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-rotate {
    animation: rotateIn 0.8s ease-out forwards;
}

/* Staggered animations */
.animate-stagger-1 {
    animation-delay: 0.1s;
}

.animate-stagger-2 {
    animation-delay: 0.2s;
}

.animate-stagger-3 {
    animation-delay: 0.3s;
}

.animate-stagger-4 {
    animation-delay: 0.4s;
}

.animate-stagger-5 {
    animation-delay: 0.5s;
}

.animate-stagger-6 {
    animation-delay: 0.6s;
}

/* ============================================
   CARD ANIMATIONS
   ============================================ */

.card-hover-lift {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover-lift:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 60px rgba(40, 167, 69, 0.25);
}

.card-hover-scale {
    transition: all 0.3s ease;
}

.card-hover-scale:hover {
    transform: scale(1.05);
}

.card-hover-rotate {
    transition: all 0.4s ease;
}

.card-hover-rotate:hover {
    transform: rotate(2deg) scale(1.03);
}

/* ============================================
   BUTTON ANIMATIONS
   ============================================ */

.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated::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;
}

.btn-animated:hover::before {
    width: 300px;
    height: 300px;
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   ICON ANIMATIONS
   ============================================ */

.icon-rotate {
    transition: transform 0.3s ease;
}

.icon-rotate:hover {
    transform: rotate(360deg);
}

.icon-bounce {
    animation: bounce 2s ease-in-out infinite;
}

.icon-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.icon-float {
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* ============================================
   GRADIENT ANIMATIONS
   ============================================ */

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* ============================================
   TEXT ANIMATIONS
   ============================================ */

@keyframes text-shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.text-shimmer {
    background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #28a745 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-shimmer 3s linear infinite;
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */

.page-enter {
    animation: fadeInUp 0.6s ease-out;
}

.page-exit {
    animation: fadeInDown 0.4s ease-in;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.animation-delay-100 {
    animation-delay: 0.1s;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

.animation-delay-400 {
    animation-delay: 0.4s;
}

.animation-delay-500 {
    animation-delay: 0.5s;
}

.animation-duration-fast {
    animation-duration: 0.3s;
}

.animation-duration-normal {
    animation-duration: 0.6s;
}

.animation-duration-slow {
    animation-duration: 1s;
}

/* ============================================
   ANIMATED HERO BACKGROUND
   ============================================ */

.animated-hero-background {
    position: relative;
    overflow: hidden;
    background: 
        linear-gradient(135deg, #1a5f3f 0%, #28a745 25%, #20c997 50%, #17a2b8 75%, #1a5f3f 100%),
        url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.2)"/></svg>'),
        url('data:image/svg+xml,<svg width="80" height="80" xmlns="http://www.w3.org/2000/svg"><circle cx="40" cy="40" r="1.5" fill="rgba(255,255,255,0.15)"/></svg>'),
        url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 400% 400%, 60px 60px, 80px 80px, 100px 100px;
    background-position: 0% 50%, 0 0, 30px 30px, 50px 50px;
    animation: 
        gradient-shift 15s ease infinite,
        particle-float 20s linear infinite;
}

.animated-hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    animation: background-pulse 8s ease-in-out infinite;
    z-index: 1;
}

.animated-hero-background::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-circle 12s ease-in-out infinite;
    z-index: 1;
}

@keyframes background-pulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.1);
    }
}

@keyframes float-circle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(-20px, -30px) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translate(20px, -60px) scale(0.9);
        opacity: 0.45;
    }
    75% {
        transform: translate(-30px, -40px) scale(1.05);
        opacity: 0.5;
    }
}

@keyframes particle-float {
    0% {
        background-position: 0% 50%, 0 0, 30px 30px, 50px 50px;
    }
    100% {
        background-position: 100% 50%, 60px 60px, 90px 90px, 150px 150px;
    }
}

/* Floating shapes inside hero */
.animated-hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.animated-hero-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    animation: shape-float 15s ease-in-out infinite;
}

.animated-hero-shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.animated-hero-shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.animated-hero-shape-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

.animated-hero-shape-4 {
    width: 250px;
    height: 250px;
    top: 30%;
    right: 20%;
    animation-delay: 6s;
}

@keyframes shape-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translate(30px, -40px) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-20px, -60px) scale(0.9);
        opacity: 0.45;
    }
    75% {
        transform: translate(40px, -30px) scale(1.05);
        opacity: 0.5;
    }
}

/* Ensure content is above background */
.animated-hero-background > * {
    position: relative;
    z-index: 2;
}

/* ============================================
   RESPONSIVE ANIMATIONS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animated-hero-background {
        animation: none !important;
        background-size: 100% 100% !important;
    }
}

