/* Custom styles for Morgan Physical Therapy */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero animations - only for below-fold or with reduced-motion gate */
@media (prefers-reduced-motion: no-preference) {
    .hero-anim {
        opacity: 0;
        transform: translateY(20px);
        animation: heroFadeIn 0.8s ease forwards;
    }
    
    .hero-anim:nth-child(1) { animation-delay: 0.1s; }
    .hero-anim:nth-child(2) { animation-delay: 0.3s; }
    .hero-anim:nth-child(3) { animation-delay: 0.5s; }
    .hero-anim:nth-child(4) { animation-delay: 0.7s; }
    
    .hero-img-anim {
        opacity: 0;
        transform: translateX(30px);
        animation: heroImgIn 1s ease forwards;
        animation-delay: 0.4s;
    }
    
    @keyframes heroFadeIn {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes heroImgIn {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* Scroll reveal - progressive enhancement, only with JS */
.scroll-reveal {
    /* Default state: visible, no animation */
    opacity: 1;
    transform: none;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.08);
}

/* Mobile menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* Subtle hover effects on cards */
.group:hover .group-hover\:bg-emerald-100 {
    transition: background-color 0.3s ease;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: #16a34a;
    color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #fdf9f0;
}

::-webkit-scrollbar-thumb {
    background: #bbf7d0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #86efac;
}

/* Print styles */
@media print {
    nav, #contactForm, .scroll-reveal {
        display: none !important;
    }
    
    body {
        color: #052e16;
        background: white;
    }
}
