/* Custom styles for Capital Bus real estate website */

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

/* Floating card animations */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1.3s;
}

.floating-card:nth-child(3) {
    animation-delay: -2.6s;
}

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

/* Service card hover effects */
.service-card {
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Neighborhood card hover */
.neighborhood-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.neighborhood-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(140, 48, 48, 0.2);
}

/* Navbar scroll behavior */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(140, 48, 48, 0.08);
}

/* 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(24px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Menu toggle animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Testimonial card hover */
.testimonial-card {
    transition: transform 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Subtle line decorations */
.section-line {
    position: relative;
}

.section-line::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    width: 48px;
    height: 1px;
    background: linear-gradient(to right, rgba(140, 48, 48, 0.3), transparent);
}

/* Input focus styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #a83d3d;
    box-shadow: 0 0 0 3px rgba(168, 61, 61, 0.1);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #a83d3d;
    outline-offset: 2px;
}

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

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

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

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

/* Selection color */
::selection {
    background: rgba(140, 48, 48, 0.15);
    color: #632121;
}

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