/* Animations for DASPR website */

/* Scroll animation base styles */
.scroll-animation {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animation.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for feature cards */
.features-grid .feature-card:nth-child(1) {
    transition-delay: 0.1s;
}

.features-grid .feature-card:nth-child(2) {
    transition-delay: 0.2s;
}

.features-grid .feature-card:nth-child(3) {
    transition-delay: 0.3s;
}

/* Pulse animation enhancement */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

.feature-icon {
    animation: pulse 3s infinite;
}

/* Float animation for app preview */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Button hover animations */
.app-store-btn, .learn-more-btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.app-store-btn:hover, .learn-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(41, 121, 255, 0.3);
}

/* Table row hover effect */
.comparison-table tr:not(:first-child):hover {
    background-color: rgba(41, 121, 255, 0.05);
    transition: background-color 0.3s ease;
}

/* Feature image hover effect */
.feature-image img {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.feature-content:hover .feature-image img {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Quote hover effect */
.feature-quote {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-quote:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(41, 121, 255, 0.1);
}

/* Navigation hover effects */
nav ul li a::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--pulse-blue);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a.active::after {
    width: 100%;
}

/* Logo hover animation */
.logo a:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Pulse dot animation */
@keyframes pulse-dot-move {
    0% {
        left: 0;
        background-color: var(--pulse-blue);
    }
    50% {
        background-color: var(--health-green);
    }
    100% {
        left: calc(100% - 12px);
        background-color: var(--pulse-blue);
    }
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background-color: var(--pulse-blue);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    box-shadow: 0 0 10px rgba(41, 121, 255, 0.5);
}

/* Animation for page elements */
@keyframes fadeInUp {
    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 slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Approach page animations */
.daily-benefits li, .privacy-features li, .science-list li {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.daily-benefits li:nth-child(1), .privacy-features li:nth-child(1), .science-list li:nth-child(1) {
    animation-delay: 0.1s;
}

.daily-benefits li:nth-child(2), .privacy-features li:nth-child(2), .science-list li:nth-child(2) {
    animation-delay: 0.2s;
}

.daily-benefits li:nth-child(3), .privacy-features li:nth-child(3), .science-list li:nth-child(3) {
    animation-delay: 0.3s;
}

.daily-benefits li:nth-child(4), .privacy-features li:nth-child(4), .science-list li:nth-child(4) {
    animation-delay: 0.4s;
}

.daily-text h3, .privacy-text h3, .science-text h3 {
    opacity: 0;
    animation: fadeInLeft 0.6s ease forwards;
}

.daily-text > p, .privacy-text > p, .science-text > p {
    opacity: 0;
    animation: fadeInLeft 0.6s ease forwards;
    animation-delay: 0.2s;
}

.daily-image, .privacy-image, .science-image {
    opacity: 0;
    animation: fadeInRight 0.6s ease forwards;
    animation-delay: 0.3s;
}

/* Why Different Page Animations */
.comparison-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.comparison-item:first-child {
    animation-delay: 0.1s;
}

.comparison-item:last-child {
    animation-delay: 0.3s;
}

.difference-text h3 {
    opacity: 0;
    animation: fadeInLeft 0.6s ease forwards;
}

.difference-text > p {
    opacity: 0;
    animation: fadeInLeft 0.6s ease forwards;
    animation-delay: 0.2s;
}

.difference-quote {
    opacity: 0;
    animation: slideIn 0.6s ease forwards;
    animation-delay: 0.4s;
}

.difference-image {
    opacity: 0;
    animation: fadeInRight 0.6s ease forwards;
    animation-delay: 0.3s;
}

.complementary-text {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: 0.3s;
}