/* Custom styles for APEX TRUCK Driving School */

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

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

/* Scroll reveal for animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.animated {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .scroll-reveal.animated.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

#navbar.scrolled #nav-logo-text {
    color: #ffffff;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu.open {
    max-height: 400px;
}

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

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

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

/* Selection color */
::selection {
    background: #d4a843;
    color: #0a1628;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a2d52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Image hover effects */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Gold glow effect */
.shadow-gold-500\\/25 {
    box-shadow: 0 20px 40px rgba(212, 168, 67, 0.25);
}

.shadow-gold-500\\/30 {
    box-shadow: 0 25px 50px rgba(212, 168, 67, 0.3);
}

/* Nav link hover underline */
a.text-white\\/80::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #d4a843;
    transition: width 0.3s ease;
}

a.text-white\\/80:hover::after {
    width: 100%;
}

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

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

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

/* Reduce motion preference */
@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;
    }
}
