/* Custom styles for Real Estate King 2.0 */

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

/* Base font settings */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar transition */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* Nav link underline on hover */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #0d9488;
    transition: width 0.3s ease;
}

.nav-link {
    position: relative;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu transitions */
#mobileMenu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

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

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

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

.card-float-1 {
    animation: float1 4s ease-in-out infinite;
}

.card-float-2 {
    animation: float2 5s ease-in-out infinite;
    animation-delay: 1s;
}

.card-float-3 {
    animation: float3 4.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

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

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

/* Scroll-reveal for below-fold content - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .scroll-reveal[data-reveal].revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Default state: visible for all scroll-reveal elements */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection color */
::selection {
    background: #ccfbf1;
    color: #134e4a;
}

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

/* Property card hover */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* Ensure all interactive elements have good contrast */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-float-1,
    .card-float-2,
    .card-float-3 {
        animation: none;
        position: relative;
        margin: 1rem 0;
    }
}

/* 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;
    }
}

/* Print styles */
@media print {
    #navbar,
    #backToTop,
    .scroll-reveal {
        display: none;
    }
}
