/* Custom styles for Fremont Family Dentistry */

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

/* Navbar transition states */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 30px rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .text-slate-800 {
    color: #1e293b;
}

/* Mobile menu transitions */
#mobileMenu {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenu.open {
    transform: translateX(0);
}

#mobileMenu.closed {
    transform: translateX(100%);
}

/* Hero parallax-like subtle effect */
#hero img {
    transition: transform 0.3s ease;
}

/* Service card hover effects */
.group:hover .group-hover\:bg-teal-100 {
    transition: background-color 0.3s ease;
}

/* Custom focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Button press effect */
button:active,
a:active {
    transform: scale(0.98) !important;
}

/* Animation for scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile link hover */
.mobile-link {
    transition: color 0.3s ease, transform 0.3s ease;
}

.mobile-link:hover {
    transform: scale(1.05);
}

/* Subtle gradient shift on hero */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* Pulse animation for the dot */
@keyframes softPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Selection color */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: #1e293b;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Reduce motion for accessibility */
@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;
    }
    
    .reveal,
    .stagger-children > * {
        opacity: 1;
        transform: none;
    }
}
