    /* Custom Styles for La Palma Real Estate */

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

    /* Selection color */
    ::selection {
        background-color: #7B2D3B;
        color: #fff;
    }

    /* Custom scrollbar */
    ::-webkit-scrollbar {
        width: 8px;
    }
    ::-webkit-scrollbar-track {
        background: #f5f5f5;
    }
    ::-webkit-scrollbar-thumb {
        background: #7B2D3B;
        border-radius: 4px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: #662533;
    }

    /* Navbar scroll state */
    #navbar.scrolled {
        background: rgba(15, 15, 15, 0.95);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    }

    /* Hero badge animation */
    .hero-badge {
        animation: fadeInUp 0.8s ease-out both;
    }

    /* Hero text animation */
    #hero h1 {
        animation: fadeInUp 0.8s ease-out 0.2s both;
    }

    #hero p {
        animation: fadeInUp 0.8s ease-out 0.4s both;
    }

    #hero a {
        animation: fadeInUp 0.8s ease-out 0.6s both;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Scroll-down animation */
    @keyframes scrollDown {
        0% { transform: translateY(-100%); }
        100% { transform: translateY(400%); }
    }
    .animate-scroll-down {
        animation: scrollDown 1.5s ease-in-out infinite;
    }

    /* Service card hover */
    .service-card {
        will-change: transform;
    }

    /* Intersection Observer animations */
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger delays for service cards */
    .service-card:nth-child(1) { transition-delay: 0.05s; }
    .service-card:nth-child(2) { transition-delay: 0.1s; }
    .service-card:nth-child(3) { transition-delay: 0.15s; }
    .service-card:nth-child(4) { transition-delay: 0.2s; }
    .service-card:nth-child(5) { transition-delay: 0.25s; }
    .service-card:nth-child(6) { transition-delay: 0.3s; }

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

    /* Hamburger animation */
    #menu-btn.active #bar1 {
        transform: translateY(4px) rotate(45deg);
    }
    #menu-btn.active #bar2 {
        opacity: 0;
    }
    #menu-btn.active #bar3 {
        transform: translateY(-4px) rotate(-45deg);
    }

    /* Back to top */
    #back-to-top.visible {
        opacity: 1;
        transform: translatey(0);
        pointer-events: all;
    }

    /* Mobile link animation */
    .mobile-link {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
    }
    #mobile-menu.open .mobile-link {
        opacity: 1;
        transform: translateY(0);
    }
    #mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
    #mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
    #mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
    #mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

    /* Nav link underline animation */
    .nav-link {
        position: relative;
    }
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 1.5px;
        background: linear-gradient(90deg, #F2D0D4, #e8b5a0);
        transition: width 0.3s ease;
    }
    .nav-link:hover::after {
        width: 100%;
    }

    /* Focus styles for accessibility */
    a:focus-visible,
    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
        outline: 2px solid #7B2D3B;
        outline-offset: 2px;
    }

    /* Reduce motion for accessibility */
    @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;
        }
        .reveal {
            opacity: 1;
            transform: none;
        }
    }
