/* Custom styles for David Hayes Real Estate website */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f3f9;
}
::-webkit-scrollbar-thumb {
    background: #3d5896;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1c2a52;
}

/* Selection color */
::selection {
    background: #4fb87d;
    color: #ffffff;
}

/* Hero parallax effect */
#hero {
    background-attachment: fixed;
}

@media (max-width: 768px) {
    #hero {
        background-attachment: scroll;
    }
}

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

.nav-scrolled #nav-logo,
.nav-scrolled #nav-brand {
    color: #1c2a52 !important;
}

.nav-scrolled .nav-link {
    color: #263868 !important;
}

.nav-scrolled .nav-link:hover {
    color: #287a4c !important;
}

.nav-scrolled #mobile-toggle {
    color: #1c2a52 !important;
}

/* Fade-in animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

    .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; }
}

/* Decorative line animation */
.hero-line {
    animation: expandLine 1s ease forwards;
}

@keyframes expandLine {
    from { width: 0; }
    to { width: 48px; }
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.float-anim {
    animation: float 6s ease-in-out infinite;
}

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

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(15, 22, 46, 0.15);
}

/* Button ripple effect */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:active::after {
    width: 200px;
    height: 200px;
}

/* Image hover zoom */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.6s ease;
}

.img-zoom:hover img {
    transform: scale(1.05);
}

/* Stats counter animation */
.stat-number {
    display: inline-block;
}

/* Mobile menu transition */
#mobile-menu {
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

#mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    max-height: 400px;
    opacity: 1;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Print styles */
@media print {
    nav, #contact-form, #form-success {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
