/* Custom styles for Washington State Realtor */

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

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 20px rgba(10, 22, 40, 0.08);
}

#navbar.scrolled .logo-text {
    color: #0a1628;
}

#navbar.scrolled .menu-line {
    background-color: #0a1628;
}

/* Mobile menu transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Hamburger animation */
.menu-line {
    transition: all 0.3s ease;
}

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

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* Service card hover */
.service-card {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                border-color 0.5s ease, 
                box-shadow 0.5s ease;
}

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

/* Listing card */
.listing-card {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.5s ease;
}

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

/* Testimonial card */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(10, 22, 40, 0.1);
}

/* Scroll reveal animations (below the fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .service-card,
    .listing-card,
    .testimonial-card {
        transition: none;
    }
    
    .listing-card img {
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Custom selection color */
::selection {
    background-color: #c8a45e;
    color: #0a1628;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Subtle pattern overlay for dark sections */
.pattern-overlay {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c8a45e' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
