/* Custom styles for Jane Mitchell Real Estate */

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(250, 251, 251, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(10, 22, 40, 0.06);
}

.nav-scrolled .nav-text {
    color: #0A1628 !important;
}

.nav-scrolled .nav-subtext {
    color: #0A1628 !important;
}

/* Mobile menu animation */
#mobile-menu {
    will-change: transform, opacity;
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235A6B7E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    appearance: none;
    -webkit-appearance: none;
}

/* Subtle hover transitions on cards */
.service-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

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

/* Image lazy load fade-in */
img {
    opacity: 1;
    transition: opacity 0.6s ease;
}

img[src=""] {
    opacity: 0;
}

/* Selection color */
::selection {
    background: #7EC8B8;
    color: #0A1628;
}

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

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

::-webkit-scrollbar-thumb {
    background: #7EC8B8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5BB5A3;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .service-card {
        border: 1px solid ButtonText;
    }
}

/* Print styles */
@media print {
    nav,
    #mobile-menu,
    .reveal,
    iframe {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
    }
}
