/* Custom Styles for Saint Joseph's Hospital */

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

/* Navbar Styles */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(131, 21, 53, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .text-burgundy-800 {
    color: #831535;
}

#navbar.scrolled .text-burgundy-600 {
    color: #a0153a;
}

#navbar.scrolled a:not(.px-5):not(.font-sans) {
    color: #831535;
}

#navbar.scrolled a:not(.px-5):not(.font-sans):hover {
    color: #c7204e;
}

/* Mobile Menu Animation */
#mobileMenu {
    animation: slideDown 0.3s ease-out;
}

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

/* Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
    .reveal.hidden {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal-left.hidden {
        opacity: 0;
        transform: translateX(-30px);
    }
    
    .reveal-right.hidden {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* Service Cards */
.service-card {
    transition: transform 0.4s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Community Cards */
.community-card {
    transition: transform 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

.community-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Form Inputs */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(131, 21, 53, 0.1);
}

/* Button Hover Effects */
button[type="submit"]:hover {
    transform: translateY(-1px);
}

/* Back to Top */
#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Image Hover */
img {
    transition: transform 0.5s ease;
}

/* Custom Selection Color */
::selection {
    background: rgba(131, 21, 53, 0.2);
    color: #3b0712;
}

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

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

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

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

/* Focus Visible */
*:focus-visible {
    outline: 2px solid #831535;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav, #backToTop, #mobileMenu {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: #1a1a1a !important;
    }
    
    .bg-burgundy-900, .bg-burgundy-950 {
        background: #f5f5f5 !important;
        color: #1a1a1a !important;
    }
}
