/* ========================================
   A's Auto Sales — Custom Styles
   ======================================== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050c16;
}
::-webkit-scrollbar-thumb {
    background: #1d3750;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2b4d6b;
}

/* Selection color */
::selection {
    background: rgba(56, 163, 125, 0.3);
    color: #f0f4f8;
}

/* Navbar transition for scroll state */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(5, 12, 22, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 24px rgba(0, 0, 0, 0.4);
}

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

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

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

/* Reduced motion: skip animations */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .group:hover img {
        transform: none;
    }
}

/* Mobile link hover */
.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(45, 77, 107, 0.3);
}
.mobile-link:last-child {
    border-bottom: none;
}

/* Subtle card hover glow */
.group:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Hero text rendering */
h1, h2 {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

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

/* Button ripple-like active state */
button:active,
a:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Map container responsive */
iframe {
    border-radius: 1.25rem;
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}
