/* Custom Styles for John Fung Real Estate */

/* Gold animated bar for stats */
@keyframes goldBarShimmer {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.gold-bar {
    animation: goldBarShimmer 2s ease-in-out infinite;
}

/* Floating card animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

/* Apply floating animations to hero cards */
.hero-card-1 { animation: float1 4s ease-in-out infinite; }
.hero-card-2 { animation: float2 5s ease-in-out infinite; }
.hero-card-3 { animation: float3 3.5s ease-in-out infinite; }
.hero-card-4 { animation: float1 4.5s ease-in-out infinite; }

/* Scroll reveal base state */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Mobile menu transitions */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu:not(.active) {
    opacity: 0;
    pointer-events: none;
}

/* Menu line animations */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

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

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

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

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

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

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

::-webkit-scrollbar-track {
    background: #04120C;
}

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

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

/* Selection color */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #FDFCF8;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
