/* Custom styles for Lucia Brooks Real Estate */

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

/* Navbar scroll effect */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(16, 42, 67, 0.06);
}

#navbar.scrolled .nav-link {
    color: #102a43;
}

/* Mobile menu animation */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* Hamburger animation */
#menuBtn.active #bar1 {
    transform: translateY(4px) rotate(45deg);
}

#menuBtn.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}

#menuBtn.active #bar3 {
    transform: translateY(-4px) rotate(-45deg);
}

/* Mobile link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #d49a1a;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.mobile-link:hover::after {
    width: 60%;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid children */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.3s; }

/* 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'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%23627d98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Gold underline animation on hover for links */
a.nav-link::after,
footer a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #d49a1a;
    transition: width 0.3s ease;
}

a.nav-link:hover::after,
footer a:hover::after {
    width: 100%;
}

a.nav-link,
footer a {
    position: relative;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(212, 154, 26, 0.1);
}

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

/* Selection color */
::selection {
    background: rgba(212, 154, 26, 0.2);
    color: #102a43;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9fb3cc;
}
