/* ===== Custom Styles for San Joaquin General Hospital Dialysis Center ===== */

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

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdfcf7;
}
::-webkit-scrollbar-thumb {
    background: #064e3b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* ===== Navbar ===== */
#navbar.scrolled {
    background: rgba(253, 252, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled .text-emerald-800 {
    color: #064e3b;
}

#navbar.scrolled .menu-line {
    background: #064e3b;
}

/* ===== Hero ===== */
.hero-section {
    position: relative;
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #064e3b, #10b981);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== Approach Steps ===== */
.approach-step {
    position: relative;
}

.approach-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    right: -1.5rem;
    width: 3rem;
    height: 2px;
    background: linear-gradient(90deg, #064e3b, transparent);
    display: none;
}

@media (min-width: 768px) {
    .approach-step:not(:last-child)::after {
        display: block;
    }
}

/* ===== Testimonials ===== */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.02), rgba(16, 185, 129, 0.05));
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

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

/* ===== Mobile Menu ===== */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open {
    transform: translateX(0);
}

#mobileMenu.closed {
    transform: translateX(100%);
}

/* ===== Mobile Menu Button ===== */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(0.25rem, 0.25rem);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(0.15rem, -0.15rem);
    width: 1.25rem;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .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.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Selection ===== */
::selection {
    background: rgba(6, 78, 59, 0.15);
    color: #064e3b;
}

/* ===== Print ===== */
@media print {
    #navbar, #mobileMenu, .service-card::after {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
