/* Custom styles for Nikiel Taylor Real Estate */

html {
    scroll-behavior: smooth;
}

/* Service card hover effects */
.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);
}

/* Neighborhood card overlay transition */
.neighborhood-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 29, 35, 0.8) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.neighborhood-card:hover::after {
    opacity: 1;
}

.neighborhood-card > img {
    transition: transform 0.5s ease;
}

.neighborhood-card:hover > img {
    transform: scale(1.05);
}

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

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

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

#mobile-menu.open {
    max-height: 400px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Scroll to top button animation */
#scroll-top.visible {
    opacity: 1;
    translate: 0 0;
    pointer-events: auto;
}

#scroll-top:not(.visible) {
    opacity: 0;
    translate: 0 8px;
    pointer-events: none;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #ff6b2b;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .service-card,
    .testimonial-card,
    .neighborhood-card > img,
    #scroll-top,
    .service-card > div {
        transition: none;
    }
    .service-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
    .neighborhood-card:hover > img {
        transform: none;
    }
}

/* Header scroll state */
.header-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Selection color */
::selection {
    background-color: #ff6b2b;
    color: white;
}
