/* Custom styles for Valley Neurological Surgery PC */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0fdf7;
}
::-webkit-scrollbar-thumb {
    background: #34d4b6;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1fbfa3;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(15, 23, 42, 0.08);
}

/* Navigation links */
.nav-link {
    position: relative;
}

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

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

/* Floating animation for hero card */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Scroll reveal base styles — content is visible by default */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
}

/* These are enhanced by JS when prefers-reduced-motion is respected */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal-left {
        transform: translateX(-30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .reveal-right {
        transform: translateX(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal-up.visible,
    .reveal-left.visible,
    .reveal-right.visible {
        opacity: 1;
        transform: translate(0, 0);
    }

    /* Stagger children */
    .reveal-up:nth-child(2) { transition-delay: 100ms; }
    .reveal-up:nth-child(3) { transition-delay: 200ms; }
    .reveal-up:nth-child(4) { transition-delay: 300ms; }
    .reveal-up:nth-child(5) { transition-delay: 400ms; }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #34d4b6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background: #34d4b6;
    color: #0f172a;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .animate-float {
        animation: none;
    }
}

/* Print styles */
@media print {
    #navbar,
    #back-to-top,
    .animate-float {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
