/* Custom styles for Donna A. Iadarola Real Estate website */

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

/* Navbar scroll state */
.nav-scrolled .nav-logo-color,
.nav-scrolled .nav-logo-sub,
.nav-scrolled .nav-link {
    color: #1a1a1a !important;
}

.nav-scrolled #navbar {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Mobile menu */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

#mobileMenu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-nav-link:nth-child(6) { transition-delay: 0.35s; }

/* Menu animation */
.menu-line:nth-child(3) {
    width: 1.5rem;
}

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

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

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

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal-state="hidden"] {
    opacity: 0;
    transform: translateY(40px);
}

.reveal[data-reveal-state="animating"] {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.stagger-children .reveal[data-reveal-state="hidden"]:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .reveal[data-reveal-state="hidden"]:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal[data-reveal-state="hidden"]:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .reveal[data-reveal-state="hidden"]:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .reveal[data-reveal-state="hidden"]:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .reveal[data-reveal-state="hidden"]:nth-child(6) { transition-delay: 0.3s; }

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .reveal[data-reveal-state="hidden"] {
        opacity: 1;
        transform: none;
    }
    .reveal[data-reveal-state="animating"] {
        opacity: 1;
        transform: none;
    }
    #mobileMenu .mobile-nav-link {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8f1534;
}

/* Selection color */
::selection {
    background: #d0244a;
    color: #fff;
}
