/* Custom styles for Allen & Allen Family Dentistry */

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF9F3;
}
::-webkit-scrollbar-thumb {
    background: #047857;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #065F46;
}

/* Selection color */
::selection {
    background: #059669;
    color: #FDF9F3;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}
#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(253, 249, 243, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(4, 120, 87, 0.1);
}
.navbar-scrolled .text-emerald-900 {
    color: #064E3B !important;
}
.navbar-scrolled .text-emerald-800 {
    color: #065F46 !important;
}
.navbar-scrolled .text-emerald-600 {
    color: #047857 !important;
}

/* Stat card float animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}
.floating-card-1 { animation: float 6s ease-in-out infinite; }
.floating-card-2 { animation: float 6s ease-in-out infinite 1.5s; }
.floating-card-3 { animation: float 6s ease-in-out infinite 3s; }
.floating-card-4 { animation: float 6s ease-in-out infinite 4.5s; }

/* Image hover zoom */
img {
    transition: transform 0.6s ease;
}
.group:hover img {
    transform: scale(1.03);
}

/* Fade-in for scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}
