/* Custom styles for Arthroscopy & Orthopaedic Surgery */

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

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Scroll reveal base - content is visible by default */
.scroll-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Only apply hidden state when JS is active and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
    .scroll-section.reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    .scroll-section.reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(55, 57, 64, 0.08);
}

.navbar-scrolled .nav-link {
    color: #373940 !important;
}

.navbar-scrolled .nav-link:hover {
    color: #f97066 !important;
}

/* Mobile menu transitions */
#mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Menu button animation */
.menu-line.active:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-line.active:nth-child(2) {
    opacity: 0;
}

.menu-line.active:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 20px;
}

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

#mobile-menu.closed .mobile-nav-link {
    opacity: 0;
    transform: translateY(8px);
}

/* Form focus styles */
input:focus, textarea:focus {
    outline: none;
}

/* Subtle hover lift for cards */
.group:hover {
    transform: translateY(-2px);
}

/* Custom selection color */
::selection {
    background: #f97066;
    color: #fff;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-line {
        animation: none;
    }
    .scroll-section.reveal {
        opacity: 1;
        transform: none;
    }
    .scroll-section.reveal.revealed {
        opacity: 1;
        transform: none;
    }
    * {
        transition-duration: 0.01ms !important;
    }
}
