/* Custom styles for Mh St Joseph Warren Hospital */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8ef;
}
::-webkit-scrollbar-thumb {
    background: #C4725A;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a85a45;
}

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

/* Hero animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

/* Service card hover glow */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: linear-gradient(135deg, rgba(196, 114, 90, 0.05), rgba(223, 154, 74, 0.05));
}

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card:hover::before {
    opacity: 1;
}

/* Navbar glass effect */
.nav-scrolled {
    background: rgba(254, 253, 252, 0.9) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(196, 114, 90, 0.08);
}

.nav-transparent {
    background: transparent !important;
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Staggered reveal delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* Feature row hover */
.feature-row {
    border: 1px solid transparent;
}

.feature-row:hover {
    border-color: rgba(196, 114, 90, 0.15);
}

/* Testimonial card shimmer */
.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    transform: rotate(30deg);
    transition: transform 0.6s ease;
}

.testimonial-card:hover::after {
    transform: rotate(30deg) translate(10%, 10%);
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(196, 114, 90, 0.15);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .floating-card {
        animation: none;
    }
    .service-card,
    .feature-row,
    .testimonial-card {
        transition: none;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}

/* Print styles */
@media print {
    nav, #contact, .cta-section, footer {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}
