/* Custom styles for Keller Williams Hudson Valley Realty */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f2f7f4;
}
::-webkit-scrollbar-thumb {
    background: #9bbd9b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #729e72;
}

/* Selection color */
::selection {
    background: #c6d9c7;
    color: #1e2f1e;
}

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

/* Navbar scroll state */
.navbar-scrolled {
    box-shadow: 0 1px 20px rgba(30, 47, 30, 0.08);
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

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

/* 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;
    }
}

/* Fade-in animations for below-fold content */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 240ms; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 320ms; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 400ms; }
.fade-in-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Button hover glow */
.btn-glow:hover {
    box-shadow: 0 0 30px rgba(77, 128, 77, 0.3);
}
