/**
 * Health & Wellness Effects CSS
 * Animations and visual effects
 *
 * @package Health_Wellness
 * @since 1.0.0
 */

/* =========================================
   Gradient Backgrounds
   ========================================= */
.gradient-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
}

.gradient-calm {
    background: linear-gradient(135deg, #ECFDF5 0%, #EFF6FF 50%, #F5F3FF 100%);
}

/* =========================================
   Hover Effects
   ========================================= */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* =========================================
   Entrance Animations
   ========================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.5s ease forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.5s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease forwards;
}

/* Stagger animations */
.stagger>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger>*:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger>*:nth-child(6) {
    animation-delay: 0.6s;
}

/* =========================================
   Pulse Animation
   ========================================= */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* =========================================
   Breathing Animation (for relaxation)
   ========================================= */
@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.breathing-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-secondary-light) 100%);
    animation: breathe 4s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: var(--font-size-lg);
    font-weight: 600;
}

/* =========================================
   Progress Animation
   ========================================= */
@keyframes progressFill {
    from {
        width: 0;
    }
}

.animate-progress {
    animation: progressFill 1s ease forwards;
}

/* =========================================
   Floating Elements
   ========================================= */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* =========================================
   Glow Effects
   ========================================= */
.glow-green {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.glow-blue {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.glow-purple {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

/* =========================================
   Text Effects
   ========================================= */
.text-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   Card Decorations
   ========================================= */
.card-decorated {
    position: relative;
    overflow: hidden;
}

.card-decorated::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* =========================================
   Subtle Background Patterns
   ========================================= */
.pattern-dots {
    background-image: radial-gradient(var(--color-border) 1px, transparent 1px);
    background-size: 20px 20px;
}

.pattern-grid {
    background-image:
        linear-gradient(var(--color-border-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--color-border-light) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* =========================================
   Icon Animations
   ========================================= */
.icon-bounce {
    display: inline-block;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.icon-spin {
    display: inline-block;
    animation: spin 2s linear infinite;
}

/* =========================================
   Transition Utilities
   ========================================= */
.transition-fast {
    transition: all var(--transition-fast);
}

.transition-base {
    transition: all var(--transition-base);
}

.transition-slow {
    transition: all var(--transition-slow);
}

/* =========================================
   Focus Ring
   ========================================= */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* =========================================
   Smooth Scroll Indicator
   ========================================= */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    transform-origin: left;
    z-index: 9999;
}

/* =========================================
   Reduced Motion
   ========================================= */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .breathing-circle,
    .floating,
    .icon-bounce,
    .icon-spin,
    .animate-pulse {
        animation: none !important;
    }
}