/* Animation styles for Mentally website */

:root {
    --primary-color: #4a6bdf;
    --secondary-color: #6dc993;
    --accent-color: #8a4bdf;
    --gradient-start: #4a6bdf;
    --gradient-end: #8a4bdf;
}

/* Animated Background */
.animated-background {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    opacity: 0.4;
}

.wave {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    background: linear-gradient(
        35deg, 
        var(--gradient-start), 
        var(--gradient-end)
    );
    z-index: -1;
}

.wave1 {
    animation: waveAnimation 20s infinite linear;
}

.wave2 {
    opacity: 0.2;
    animation: waveAnimation 15s infinite linear reverse;
}

@keyframes waveAnimation {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

/* Hero Section Animations */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), #8a4bdf);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
        rgba(255, 255, 255, 0.2) 0%, 
        transparent 50%
    );
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
    transform: rotate(180deg);
}

/* Text animation */
.animate-text {
    animation: fadeInUp 1s ease-out;
}

.animate-text-delay {
    animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button animations */
.btn.primary.pulse {
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 rgba(74, 107, 223, 0.4);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(74, 107, 223, 0.4);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(74, 107, 223, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(74, 107, 223, 0);
    }
}

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

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Feature Icon animations */
.feature-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.feature-icon-wrapper::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature:hover .feature-icon-wrapper::before {
    opacity: 1;
    animation: spin 10s linear infinite;
}

.feature-icon {
    width: 60px;
    height: 60px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.feature:hover .feature-icon {
    transform: scale(1.1);
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Floating icons animation */
.floating-icons {
    position: relative;
    height: 300px;
    width: 300px;
    margin: 0 auto;
}

.icon-bubble {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.icon-bubble img {
    width: 50px;
    height: 50px;
}

.icon1 {
    top: 50px;
    left: 40px;
    animation: float-icon 4s ease-in-out infinite;
}

.icon2 {
    top: 150px;
    right: 40px;
    animation: float-icon 4s ease-in-out 1s infinite;
}

.icon3 {
    bottom: 30px;
    left: 100px;
    animation: float-icon 4s ease-in-out 2s infinite;
}

@keyframes float-icon {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Glass effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 4rem 0;
}

/* Card hover effects */
.resource-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    z-index: 1;
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.resource-card:hover::before {
    opacity: 0.1;
}

/* Card icons */
.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 24px;
}

.icon-marker::before {
    content: "📍";
}

.icon-activity::before {
    content: "🎯";
}

.icon-mindfulness::before {
    content: "🧘";
}

/* Logo animation */
.logo {
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Link animation */
.link-arrow {
    position: relative;
    transition: all 0.3s ease;
}

.link-arrow:after {
    content: " →";
    position: relative;
    opacity: 0;
    right: -10px;
    transition: all 0.3s ease;
}

.link-arrow:hover:after {
    opacity: 1;
    right: 0;
}
