/* Custom styles for Hester Transmission Products */

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

/* Prevent scroll-reveal flash for above-the-fold content */
@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    }
    
    .service-card:hover {
        transform: translateY(-4px);
    }
    
    /* Scroll reveal for below-fold sections */
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(10, 31, 63, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

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

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

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

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

/* Selection color */
::selection {
    background: #c8a44e;
    color: #0a1f3f;
}

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

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

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

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #c8a44e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #c8a44e 0%, #e0c676 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card hover shine effect */
.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(200, 164, 78, 0.05), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.service-card:hover::after {
    left: 100%;
}

.service-card {
    position: relative;
    overflow: hidden;
}

/* Ensure hero text is always visible */
#hero h1,
#hero p,
#hero .inline-flex,
#hero .flex {
    opacity: 1 !important;
    transform: none !important;
}
