/* Custom styles for Swain County Hospital */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8B5A70;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-bounce {
        animation: none;
    }
    
    .animate-pulse {
        animation: none;
    }
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(249, 245, 247, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Service card hover effect */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* Floating animation for hero badge */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #704658 0%, #A67087 50%, #D6BBC8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover lift effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(112, 70, 88, 0.15);
}

/* Image reveal animation */
.image-reveal {
    position: relative;
    overflow: hidden;
}

.image-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(112, 70, 88, 0.1) 0%, rgba(214, 187, 200, 0.1) 100%);
    transition: opacity 0.5s ease;
}

.image-reveal:hover::after {
    opacity: 0;
}

/* Custom focus styles */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(252, 211, 77, 0.3);
}

/* Button press effect */
button:active {
    transform: scale(0.98);
}

/* Section fade-in on scroll (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .fade-in-section {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .fade-in-section.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure all text is readable */
.text-plum-900 {
    color: #4A2E3B;
}

.text-plum-800 {
    color: #5C3A49;
}

.text-plum-700 {
    color: #704658;
}

.text-plum-600 {
    color: #8B5A70;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.open {
    max-height: 500px;
}

/* Ensure hero content is always visible */
.hero-content {
    opacity: 1 !important;
    transform: none !important;
}

/* Accessibility: focus visible */
*:focus-visible {
    outline: 2px solid #FCD34D;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .bg-plum-800 {
        background-color: ButtonText;
    }
    
    .text-plum-900 {
        color: ButtonText;
    }
}
