/* Custom styles for Nancy R Patel DDS website */

/* Smooth font rendering */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: rgba(5, 150, 105, 0.2);
    color: #064E3B;
}

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

/* Navbar transition */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(4, 120, 87, 0.08);
}

#navbar.scrolled .font-serif {
    color: #064E3B;
}

/* Mobile menu transitions */
#mobileMenu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Mobile link transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Service card hover effects */
.group:hover .group-hover\:translate-y-1 {
    transform: translateY(-4px);
}

/* Button ripple effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Image hover zoom */
img {
    transition: transform 0.6s ease;
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    appearance: none;
    -webkit-appearance: none;
}

/* Animation keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

/* Reduced motion */
@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;
    }
}

/* Print styles */
@media print {
    #navbar, #contactForm, button {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .font-serif {
        color: #000;
    }
}

/* High contrast mode */
@media (forced-colors: active) {
    .bg-emerald-700 {
        background-color: ButtonText;
    }
    
    .text-emerald-700 {
        color: ButtonText;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .font-serif {
        font-size: clamp(2rem, 5vw, 3rem);
    }
}

/* Small phone adjustments */
@media (max-width: 374px) {
    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .font-serif {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}
