/* Custom styles for Albany Family Practice */

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

/* Prevent flash of unstyled content on nav */
nav {
    will-change: transform;
}

/* Selection color */
::selection {
    background-color: rgba(74, 222, 128, 0.2);
    color: #102a43;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9fb3c8;
}

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

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* Fade-in animation for scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
    
    .fade-in-delay-1 { transition-delay: 0.1s; }
    .fade-in-delay-2 { transition-delay: 0.2s; }
    .fade-in-delay-3 { transition-delay: 0.3s; }
}

/* Mobile menu transition */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

#mobileMenu.open {
    max-height: 400px;
    padding-top: 0;
}

/* Navbar scroll state */
nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Image loading placeholder */
img {
    background-color: #d9e2ec;
}

/* Print styles */
@media print {
    nav, #contactForm, .scroll-indicator {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
