/* Custom styles for Lillington Medical Services */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f2fbf8;
}
::-webkit-scrollbar-thumb {
    background: #8fd4b5;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5bbd91;
}

/* Floating card animations */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

@keyframes float-fast {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}

.floating-card-1 {
    animation: float-slow 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-medium 3.5s ease-in-out infinite;
}

.floating-card-3 {
    animation: float-fast 3s ease-in-out infinite;
}

/* Scroll reveal animations - progressive enhancement */
.scroll-reveal {
    /* Default: visible (no JS) */
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Staggered delays for grid items */
    .scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
    .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(17, 28, 44, 0.08);
}

.nav-scrolled .nav-link {
    color: #1a2a42 !important;
}

.nav-scrolled .nav-link:hover {
    background: rgba(143, 212, 181, 0.15) !important;
    color: #1a2a42 !important;
}

.nav-scrolled .font-serif {
    color: #1a2a42 !important;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Subtle hover lift for cards */
.group {
    transform: translateZ(0);
}

.group:hover {
    transform: translateY(-2px);
}

/* Hero gradient text fallback */
.text-transparent {
    background-clip: text;
    -webkit-background-clip: text;
}

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

/* Print styles */
@media print {
    nav, #mobile-menu-btn, button, .scroll-reveal {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
