/* ========================================
   Cochran Health Care — Custom Styles
   ======================================== */

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

/* Base typography */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Navigation
   ======================================== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(124, 45, 18, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #7C2D12;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ========================================
   Hero Section
   ======================================== */
#hero {
    position: relative;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #FDF8F5, transparent);
    z-index: 1;
    pointer-events: none;
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ========================================
   Patient Experience Cards
   ======================================== */
.patient-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.patient-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Reveal Animations (progressive enhancement)
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), 
                    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    /* Staggered delays */
    .reveal:nth-child(1) { transition-delay: 0.05s; }
    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.15s; }
    .reveal:nth-child(4) { transition-delay: 0.2s; }
    .reveal:nth-child(5) { transition-delay: 0.25s; }
    .reveal:nth-child(6) { transition-delay: 0.3s; }
}

/* When JS is disabled, all reveals are visible */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-menu-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.mobile-menu-link:hover {
    border-bottom-color: rgba(124, 45, 18, 0.2);
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

/* ========================================
   Accessibility
   ======================================== */
@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;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #7C2D12;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 768px) {
    #hero::after {
        height: 60px;
    }

    .font-serif {
        line-height: 1.1;
    }
}

/* ========================================
   Selection color
   ======================================== */
::selection {
    background: rgba(124, 45, 18, 0.15);
    color: #4a180b;
}
