/* ============================================
   St Nicholas Medical Group — Custom Styles
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #C8A44E;
    color: #0A1F3F;
}

/* --- Navigation --- */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(10, 31, 63, 0.08);
}

.navbar-scrolled .nav-text-color,
.navbar-scrolled .nav-link {
    color: #0A1F3F !important;
}

.navbar-scrolled .nav-subtext-color {
    color: #4465a8 !important;
}

.navbar-scrolled .nav-line-color {
    background-color: #0A1F3F !important;
}

.navbar-scrolled .nav-border-color {
    border-color: #dce6f5 !important;
}

.navbar-scrolled .hamburger-line {
    background-color: #0A1F3F !important;
}

/* --- Mobile Menu --- */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #C8A44E, #edc95e);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-hidden {
    opacity: 0;
    transform: translateY(30px);
}

/* Staggered delays for grid items */
.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; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal,
    .reveal-hidden {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .service-card::before {
        transition: none;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Responsive Tweaks --- */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* --- Focus Styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C8A44E;
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Smooth Image Loading --- */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
