/* ── Custom styles for Quest Diagnostics Norwood ── */

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* ── Service card stagger animation (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    }
}

/* ── Navbar scroll state ── */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

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

#mobileMenu.open {
    max-height: 400px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* ── Floating card animations ── */
@media (prefers-reduced-motion: no-preference) {
    .float-slow {
        animation: float 6s ease-in-out infinite;
    }
    .float-medium {
        animation: float 4.5s ease-in-out infinite;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ── Focus visible for accessibility ── */
*:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* ── Print styles ── */
@media print {
    nav, #contact, footer, .service-card {
        break-inside: avoid;
    }
}
