/* Cary Endoscopy Center — Custom Styles */

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

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* Scroll reveal base — content is visible by default (progressive enhancement) */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply animation when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }

    .js-enabled .scroll-reveal.revealed {
        opacity: 1;
        transform: none;
    }

    .js-enabled .scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
    .js-enabled .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .js-enabled .scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
    .js-enabled .scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
    .js-enabled .scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
    .js-enabled .scroll-reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(255, 253, 249, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

.nav-scrolled .nav-link {
    color: #5c1f2b;
}

.nav-scrolled .nav-link:hover {
    color: #7B2D3B;
}

.nav-scrolled .logo-text {
    color: #5c1f2b;
}

/* Mobile nav link hover */
.mobile-nav-link {
    border-radius: 0.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.mobile-nav-link:hover {
    background-color: rgb(253 242 244);
}

/* Subtle gradient border on cards */
.gradient-border {
    position: relative;
    background: white;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0.875rem;
    padding: 1px;
    background: linear-gradient(135deg, rgb(244 178 195 / 0.5), rgb(123 45 59 / 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgb(255, 253, 249) inset !important;
    -webkit-text-fill-color: #3d141a !important;
}

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

::-webkit-scrollbar-track {
    background: rgb(255, 253, 249);
}

::-webkit-scrollbar-thumb {
    background: rgb(243 167 184);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(212 69 94);
}

/* Print styles */
@media print {
    nav, footer, .scroll-reveal {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
    }
}
