/* Custom styles for J D Construction Co. */

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

/* Prevent scroll-reveal flash: content is visible by default */
/* JS adds animation classes progressively */

/* Service card hover lift */
.service-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

/* Project card image transition is handled inline */

/* Navigation active state */
.nav-link.active {
    color: #1ec791;
    background-color: #e0f7ef;
}

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

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Scroll reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Scroll-triggered reveal - applied via JS only */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .reveal-on-scroll.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Selection color */
::selection {
    background-color: #1ec791;
    color: #102a43;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #627d98;
}

/* Navbar shadow on scroll */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(16, 42, 67, 0.1);
}

/* Testimonial card subtle hover */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

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

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