/* Custom styles for Judy Warrick Wellness and Recovery Center */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf9f8;
}
::-webkit-scrollbar-thumb {
    background: #d1cec9;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a39c;
}

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

/* Reveal animations - progressive enhancement via JS */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.navbar-scrolled .font-serif {
    color: #1a1714 !important;
}

.navbar-scrolled .text-neutral-600 {
    color: #57524b !important;
}

/* Hero gradient overlay refinement */
#hero {
    background-image: linear-gradient(135deg, rgba(26, 23, 20, 0.92) 0%, rgba(123, 45, 59, 0.75) 50%, rgba(77, 24, 32, 0.85) 100%);
}

/* Card hover effects */
.group:hover .group-hover\:bg-burgundy-600 {
    transition: background-color 0.5s ease;
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(123, 45, 59, 0.1);
}

/* Testimonial card hover */
.reveal:hover {
    transform: translateY(-2px);
}

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

/* Loading state for form */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Image lazy loading placeholder */
img {
    background: linear-gradient(110deg, #e8e6e3 8%, #f5f4f3 18%, #e8e6e3 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

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

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

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:not(.visible) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
}

/* Print styles */
@media print {
    nav, #back-to-top, .reveal {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
