/* Custom styles for Gold Rush Traffic School */

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

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

/* Only apply animation when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.animated {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .scroll-reveal.animated.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transitions */
.nav-text {
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.3s ease;
}

nav.scrolled {
    background: rgba(61, 7, 23, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

nav.scrolled .nav-text {
    color: rgba(255, 255, 255, 0.9);
}

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

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

/* Mobile menu active state */
#mobile-menu.open {
    display: block;
}

#mobile-menu.hidden {
    display: none;
}

/* Hamburger animation */
#mobile-menu-btn.active #menu-line-1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active #menu-line-2 {
    opacity: 0;
}

#mobile-menu-btn.active #menu-line-3 {
    width: 100%;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #a11640;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #841639;
}

/* Selection color */
::selection {
    background: #fbbf24;
    color: #3d0717;
}

/* Button hover effects */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

/* Geometric shape animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
}

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

.float-1 {
    animation: float 6s ease-in-out infinite;
}

.float-2 {
    animation: float-reverse 8s ease-in-out infinite;
}

/* Subtle pattern overlay */
.pattern-overlay {
    background-image: radial-gradient(circle at 1px 1px, rgba(132, 22, 57, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #841639 0%, #db3a6a 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card tilt effect on hover */
.group:hover .group-hover\:rotate-6 {
    transform: rotate(6deg);
}

/* Loading state for buttons */
button:active {
    transform: scale(0.98);
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, #mobile-menu-btn, .scroll-reveal {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
