/* Custom styles for Trains & Things */

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

/* Floating card animations */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.floating-card:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* Card hover effect */
.card-hover {
    transition: transform 0.4s ease;
}

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

.card-hover img {
    transition: transform 0.7s ease;
}

/* Navbar scroll behavior */
.nav-scrolled {
    background-color: rgba(250, 248, 245, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(26, 58, 42, 0.08);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f5f0e8;
}

::-webkit-scrollbar-thumb {
    background: #bdd4be;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8fb88e;
}

/* Selection color */
::selection {
    background-color: #d4a574;
    color: #0f2319;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .card-hover,
    .card-hover img {
        transition: none;
    }
    
    .card-hover:hover {
        transform: none;
    }
}

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

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

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

/* Form focus transitions */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(94, 147, 94, 0.2);
}

/* Button press effect */
button:active {
    transform: scale(0.98);
}
