/* Custom Styles for Friday Harbor Family Clinic */

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

/* Base styles */
body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff6b6b;
}

/* Selection color */
::selection {
    background: #ff6b6b;
    color: white;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 1) inset !important;
    -webkit-text-fill-color: #1e293b !important;
}

/* Form focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {
    nav,
    .scroll-reveal,
    #contact-form,
    iframe {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service card hover effects */
.bg-white.rounded-2xl {
    will-change: transform, box-shadow;
}

/* Button hover effects */
button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* Navbar scroll effect */
nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Testimonial card hover */
.relative.z-10:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* CTA section gradient animation */
.bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Subtle pulse for decorative elements */
.animate-pulse {
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}
