/* Custom styles for NJT Rail Operations Center */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F9F0F8;
}
::-webkit-scrollbar-thumb {
    background: #D79FD5;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C073C0;
}

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in:nth-child(2) { animation-delay: 0.15s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.45s; }
.fade-in:nth-child(5) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Staggered reveal for service cards */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar glass effect */
#navbar.scrolled {
    background: rgba(249, 240, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 40px rgba(74, 25, 66, 0.08);
}

#navbar.scrolled .nav-link {
    color: #4A1942;
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}

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

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

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

/* Input focus animations */
input:focus,
textarea:focus {
    border-color: #D4A843 !important;
    box-shadow: 0 0 0 4px rgba(212, 168, 67, 0.15) !important;
}

/* Print styles */
@media print {
    #navbar,
    .animate-bounce {
        display: none !important;
    }
    
    body {
        color: #1a1a1a;
        background: white;
    }
}

/* 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;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .group:hover h3 {
        text-decoration: underline;
    }
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #D4A843;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background: #D79FD5;
    color: #2A0E28;
}
