/* ===== M&M Truck Center — Custom Styles ===== */

/* --- Scroll-behavior --- */
html {
    scroll-behavior: smooth;
}

/* --- Focus visible --- */
:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

/* --- Navbar glass effect (active state) --- */
#navbar.scrolled {
    background: rgba(254, 254, 247, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(20, 83, 45, 0.08), 0 4px 24px rgba(20, 83, 45, 0.06);
}

/* --- Nav link underline animation (desktop) --- */
.nav-link::after {
    content: '';
    display: block;
}

/* --- Hero image subtle parallax on scroll --- */
@media (prefers-reduced-motion: no-preference) {
    .hero-img {
        transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

/* --- Service card hover lift --- */
@media (prefers-reduced-motion: no-preference) {
    #services .group {
        transition: background-color 0.3s ease, transform 0.3s ease;
    }
    #services .group:hover {
        transform: translateY(-4px);
    }
}

/* --- Scroll reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

/* --- Selection color --- */
::selection {
    background: #166534;
    color: #fefef7;
}

/* --- Custom scrollbar --- */
@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
    }
    ::-webkit-scrollbar-track {
        background: #fdf9e8;
    }
    ::-webkit-scrollbar-thumb {
        background: #bbf7d0;
        border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: #86efac;
    }
}

/* --- Mobile menu transition --- */
#mobileMenu {
    animation: slideDown 0.25s ease forwards;
}

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

/* --- Print styles --- */
@media print {
    #navbar, #mobileMenu, button, iframe {
        display: none !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}
