/* ============================================
   Custom Styles for RE/MAX NY to NJ
   ============================================ */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f3ee;
}
::-webkit-scrollbar-thumb {
    background: #2a5e35;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1c3d23;
}

/* Navbar scroll effect */
nav.scrolled {
    background: rgba(250, 249, 246, 0.97) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(22, 46, 27, 0.08);
}

nav.scrolled .font-serif,
nav.scrolled .text-forest-900 {
    color: #162e1b !important;
}

nav.scrolled .text-forest-600 {
    color: #2a5e35 !important;
}

nav.scrolled .bg-forest-800 {
    background: #1c3d23 !important;
}

nav.scrolled .bg-forest-800:hover {
    background: #224b2a !important;
}

nav.scrolled a:not(.bg-forest-800) {
    color: #1c3d23 !important;
}

nav.scrolled a:not(.bg-forest-800):hover {
    color: #2a5e35 !important;
}

/* Floating cards animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    50% { transform: translateY(-8px) translateX(4px); }
}

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

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

.floating-card-1 {
    animation: float 6s ease-in-out infinite;
}
.floating-card-2 {
    animation: float2 7s ease-in-out infinite;
}
.floating-card-3 {
    animation: float3 5s ease-in-out infinite;
}

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

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal.hidden-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        animation: none;
    }
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2a5e35 !important;
    box-shadow: 0 0 0 3px rgba(42, 94, 53, 0.1);
}

/* Area card hover overlay */
.group:hover .absolute {
    background: linear-gradient(to top, rgba(10, 22, 12, 0.8) 0%, rgba(26, 46, 27, 0.4) 50%, transparent 100%);
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Selection color */
::selection {
    background: #2a5e35;
    color: #faf9f6;
}
