/* ===== Custom Styles for Wilderness Road Health Services ===== */

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

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(2, 6, 23, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

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

/* Scroll indicator animation */
.scroll-indicator {
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(8px);
    }
    60% {
        transform: translateY(4px);
    }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Print styles */
@media print {
    nav, #back-to-top, .scroll-indicator {
        display: none !important;
    }
    
    body {
        color: #0f172a;
        background: white;
    }
    
    section {
        page-break-inside: avoid;
    }
}

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

/* Mobile menu open state */
#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

#mobile-menu.closed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

/* Service card hover effects */
.group:hover .group-hover\\:bg-teal-500 {
    background-color: #0d9488;
}

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

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

/* Ensure all text is readable */
.text-slate-900 {
    color: #0f172a;
}

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

.text-slate-700 {
    color: #334155;
}

.text-slate-600 {
    color: #475569;
}

.text-slate-500 {
    color: #64748b;
}

.text-slate-400 {
    color: #94a3b8;
}

/* Hero text readability */
#hero h1,
#hero p,
#hero .bg-white\\/10,
#hero .bg-white\\/20 {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Ensure CTA buttons have good contrast */
.bg-teal-500 {
    background-color: #14b8a6;
}

.bg-teal-600 {
    background-color: #0d9488;
}

.bg-teal-700 {
    background-color: #0f766e;
}

/* Smooth image loading */
img {
    background-color: #e2e8f0;
}

/* Loading state for images */
img[src] {
    transition: opacity 0.3s ease;
}

img[src]:not([complete]) {
    opacity: 0;
}

img[src][complete] {
    opacity: 1;
}
