/* Parallax smooth scroll effect for hero background */
.parallax-bg {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optional: slightly slower background scroll illusion using background-attachment fixed + oversize height already set via Tailwind */
@media (prefers-reduced-motion: no-preference) {
    .parallax-bg {
        background-attachment: fixed;
    }
}

/* iOS Safari fallback: fixed is unreliable; keep smoothness */
@supports (-webkit-overflow-scrolling: touch) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* Back to Top & Scroll to Hero buttons */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#scroll-to-hero {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 6px 12px rgba(74, 222, 128, 0.4);
    }
}

/* Mobile: adjust positioning for scroll-to-hero on smaller screens if needed */
@media (max-width: 768px) {
    #scroll-to-hero {
        right: 1rem;
    }
}
