/* Custom styles for Johnson Realty */

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

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

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

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

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

/* Selection color */
::selection {
    background-color: #ef4444;
    color: white;
}

/* Animation for mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* Navbar scroll effect */
.navbar-scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Button hover effects */
button:hover,
a:hover {
    transition: all 0.2s ease-in-out;
}

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

/* Custom underline animation */
.underline-animation {
    position: relative;
}

.underline-animation::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #ef4444;
    transition: width 0.3s ease;
}

.underline-animation:hover::after {
    width: 100%;
}

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

/* Print styles */
@media print {
    nav,
    button,
    form {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
