/* Custom styles for Melissa Real Estate & Tax Service */

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

/* Custom selection color */
::selection {
    background-color: #d97706;
    color: white;
}

/* Navbar styles */
#navbar {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
    border-bottom-color: #f5d0d8;
    box-shadow: 0 1px 0 rgba(116, 37, 59, 0.06);
}

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

/* Menu line animation */
.menu-line {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
    transform: translateY(-5px) rotate(-45deg);
    opacity: 0;
}

/* Service card transitions */
.service-card {
    transition: background-color 0.5s ease, transform 0.3s ease;
}

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

/* Form input focus styles */
input:focus,
textarea:focus,
select:focus {
    border-bottom-color: #f59e0b !important;
}

/* Subtle hover underline for links */
a:not(.service-card):not(button):not([class*="bg-"]):not([class*="border-"]):not(.mobile-link) {
    position: relative;
}

/* Scroll indicator animation */
.scroll-indicator {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(8px);
    }
    60% {
        transform: translateY(4px);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .service-card {
        transition: none;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .scroll-indicator {
        animation: none;
    }
}

/* Image lazy loading fade-in for below-fold images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.6s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

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

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

::-webkit-scrollbar-thumb {
    background: #eababb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #db778f;
}
