/* Custom styles for Realty Pilot */

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

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Navbar transitions */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0d9488;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Service cards */
.service-card {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.service-card:hover {
    transform: translateY(-4px);
}

/* Mobile nav links */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
.mobile-menu-open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}
.mobile-menu-open .mobile-nav-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-open .mobile-nav-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-nav-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-nav-link:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu-open .mobile-nav-link:nth-child(5) { transition-delay: 0.25s; }

/* Reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stats counter animation */
.stat-item {
    opacity: 1;
}

/* Hero text animation */
#hero h1 {
    animation: heroFadeIn 1s ease forwards;
}
#hero p {
    animation: heroFadeIn 1s ease 0.2s forwards;
    opacity: 0;
}
#hero > div > div:last-child > a:first-child {
    animation: heroFadeIn 1s ease 0.4s forwards;
    opacity: 0;
}
#hero > div > div:last-child > a:last-child {
    animation: heroFadeIn 1s ease 0.5s forwards;
    opacity: 0;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    #hero h1,
    #hero p,
    #hero > div > div:last-child > a {
        animation: none;
        opacity: 1;
    }
    .service-card:hover {
        transform: none;
    }
}
