/* Custom styles for Wan Guo Zhi Acupuncture Clinic */

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

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Only apply reveal animations when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal-hidden.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar glass effect */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-transparent {
    background: transparent !important;
    backdrop-filter: none;
    box-shadow: none;
}

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

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

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

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

/* Selection color */
::selection {
    background: #ffcdd2;
    color: #18181b;
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Hero parallax-like subtle effect */
#hero img {
    will-change: transform;
}

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

/* Button hover lift effect */
a[href="#contact"],
button[type="submit"] {
    will-change: transform;
}

a[href="#contact"]:hover,
button[type="submit"]:hover {
    transform: translateY(-1px);
}

/* Image hover zoom */
.group img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .reveal-hidden {
        opacity: 1;
        transform: none;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    nav, #hero, .scroll-reveal {
        display: block !important;
        opacity: 1 !important;
    }
    
    footer {
        background: #18181b !important;
        color: white !important;
    }
}
