/* ==========================================================================
   Animations & Effects CSS
   ========================================================================== */

/* Animation Timing Variables - SUBTLE & REFINED */
:root {
    --animation-duration-fast: 0.2s;
    --animation-duration-normal: 0.3s;
    --animation-duration-slow: 0.6s;
    --animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   1. Gallery Image Hover Effects - SUBTLE (no layout changes)
   ========================================================================== */

/* Removed .gallery-image-container to prevent layout issues */
/* Images use simple transform directly */

.image-gallery img,
.fishery-images img {
    transition: transform var(--animation-duration-normal) var(--animation-easing);
    will-change: auto; /* Changed from transform to reduce GPU usage */
}

.image-gallery img:hover,
.fishery-images img:hover {
    transform: scale(1.05); /* Reduced from 1.1 for subtlety */
}

/* ==========================================================================
   2. Button Ripple Effect
   ========================================================================== */

.btn {
    position: relative;
    overflow: hidden;
}

.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Subtle button transitions - keep existing styles mostly */
.btn {
    transition: all var(--animation-duration-fast) var(--animation-easing);
}

/* Remove aggressive hover effects - keep original design */
.btn:hover {
    /* Only subtle effects, don't override existing button styles */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.btn:active {
    transform: translateY(1px);
}

/* ==========================================================================
   3. Form Field Focus Effects
   ========================================================================== */

input[type="text"],
input[type="email"],
textarea {
    transition: all var(--animation-duration-fast) var(--animation-easing);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    border-color: var(--accent-teal);
    box-shadow: 0 0 0 3px rgba(21, 152, 149, 0.1);
    outline: none;
}

/* ==========================================================================
   4. Partner Logo Hover Effects
   ========================================================================== */

.partner-logo,
.partners-grid img {
    transition: all var(--animation-duration-fast) var(--animation-easing);
    will-change: transform, box-shadow;
}

.partner-logo:hover,
.partners-grid img:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   5. Column Hover Effects (Why Menhaden Matter) - REMOVED FOR SUBTLE DESIGN
   ========================================================================== */

/* Removed hover effects that change layout/colors */
/* Keeping original design clean and professional */

/* ==========================================================================
   6. Hero Parallax Background
   ========================================================================== */

.hero {
    background-size: cover;
    background-position: 50% 0;
    will-change: background-position;
}

/* ==========================================================================
   7. Newsletter Illustration Animation
   ========================================================================== */

.newsletter-illustration {
    will-change: transform;
}

/* ==========================================================================
   8. Loading States
   ========================================================================== */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spinner-rotation 0.8s linear infinite;
}

@keyframes spinner-rotation {
    to {
        transform: rotate(360deg);
    }
}

/* Button loading state */
.btn.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spinner-rotation 0.6s linear infinite;
}

/* ==========================================================================
   9. Event Cards Animation
   ========================================================================== */

.event-card {
    transition: all var(--animation-duration-fast) var(--animation-easing);
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   10. Donation Method Cards
   ========================================================================== */

.donation-method {
    transition: all var(--animation-duration-fast) var(--animation-easing);
}

.donation-method:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-teal);
}

/* ==========================================================================
   11. Will-Change Optimization (GPU Acceleration)
   ========================================================================== */

.image-gallery img,
.fishery-images img,
.partner-logo,
.partners-grid img,
.btn,
.column {
    will-change: transform;
}

/* Remove will-change after animation completes to free up resources */
.animation-complete {
    will-change: auto;
}

/* ==========================================================================
   12. Scroll Indicator (optional, for hero section)
   ========================================================================== */

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    opacity: 0.7;
    transition: opacity var(--animation-duration-fast);
}

.scroll-indicator:hover {
    opacity: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ==========================================================================
   13. Reduced Motion Override
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero {
        background-attachment: scroll !important;
    }

    .gallery-image-container:hover img {
        transform: none !important;
    }

    .btn:hover {
        transform: none !important;
    }

    .partner-logo:hover,
    .partners-grid img:hover {
        transform: none !important;
    }

    .column:hover {
        transform: none !important;
    }

    .loading-spinner {
        animation: none !important;
        border-top-color: transparent !important;
    }
}

/* ==========================================================================
   14. Mobile Optimizations
   ========================================================================== */

@media (max-width: 768px) {
    /* Disable complex animations on mobile */
    .image-gallery img,
    .fishery-images img,
    .hero,
    .newsletter-illustration {
        will-change: auto;
    }

    /* Simplify hover effects (tap effects instead) */
    .gallery-image-container:active img {
        transform: scale(1.05);
    }

    /* Reduce animation durations for faster feel */
    :root {
        --animation-duration-fast: 0.2s;
        --animation-duration-normal: 0.3s;
        --animation-duration-slow: 0.5s;
    }
}

/* ==========================================================================
   15. Video Background Styles
   ========================================================================== */

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.51);
    z-index: 0;
}

/* Hide video on mobile */
@media (max-width: 768px) {
    .hero-video {
        display: none;
    }
}
