
        :root {
            --primary-gold: #D4AF37;
            --dark-gold: #B8860B;
            --black: #1a1a1a;
            --white: #ffffff;
            --light-gray: #f8f9fa;
            --dark-gray: #6c757d;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: var(--black);
        }

        .navbar {
            background: linear-gradient(135deg, var(--black) 0%, #2c2c2c 100%);
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .navbar-brand img {
            height: 50px;
            transition: transform 0.3s ease;
        }

        .navbar-brand img:hover {
            transform: scale(1.05);
        }

        .nav-link {
            color: var(--white) !important;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        .nav-link:hover {
            color: var(--primary-gold) !important;
        }

        .hero-section {
            background: linear-gradient(135deg, var(--black) 0%, #2c2c2c 50%, var(--primary-gold) 100%);
            color: var(--white);
            min-height: 100vh;
            display: flex;
            align-items: center;
            position: relative;
            overflow: hidden;
        }

        .hero-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23D4AF37" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23D4AF37" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23D4AF37" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="%23D4AF37" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="%23D4AF37" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
            opacity: 0.3;
        }

        .hero-content {
            position: relative;
            z-index: 2;
        }

        .hero-title {
            font-size: 3.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
        }

        .hero-subtitle {
            font-size: 1.3rem;
            margin-bottom: 2rem;
            opacity: 0.9;
        }

        .btn-gold {
            background: linear-gradient(45deg, var(--primary-gold), var(--dark-gold));
            border: none;
            color: var(--white);
            padding: 12px 30px;
            font-weight: 600;
            border-radius: 50px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
        }

        .btn-gold:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
            color: var(--white);
        }

        .search-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 20px 0 100px 0;
        }

        .search-container .row {
            border-radius: 50px !important;
            overflow: visible;
            position: relative;
            z-index: 10;
        }

        .search-container .btn-group .btn {
            border-radius: 25px;
            padding: 10px 20px;
            font-weight: 600;
            transition: all 0.3s ease;
        }

        .search-container .btn-group .btn:last-child {
            border-radius: 0 25px 25px 0;
        }

        .btn-outline-gold {
            color: var(--primary-gold);
            border-color: var(--primary-gold);
            background-color: transparent;
        }

        .btn-outline-gold:hover {
            color: var(--white);
            background-color: var(--primary-gold);
            border-color: var(--primary-gold);
        }

        .search-container .btn-check:checked + .btn-outline-gold {
            background-color: var(--primary-gold);
            border-color: var(--primary-gold);
            color: var(--white);
        }


        .search-container .form-control {
            font-size: 0.95rem;
            padding: 10px 15px;
        }

        .search-container .form-control:focus {
            box-shadow: none;
            border-color: transparent;
        }

        .search-container .btn-outline-gold.active {
            background-color: var(--primary-gold);
            border-color: var(--primary-gold);
            color: var(--white);
        }

        .search-container .form-select:focus {
            border-color: var(--primary-gold);
            box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
        }

        .search-container .form-control:focus {
            border-color: var(--primary-gold);
            box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
        }

        .search-container .dropdown {
            position: static;
        }

        .search-container .dropdown-menu {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            z-index: 9999;
            max-height: none;
            overflow-y: visible;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            border: none;
            border-radius: 10px;
            margin-top: 5px;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 0;
            padding: 10px;
        }

        /* Desktop: layout orizzontale */
        @media (min-width: 769px) {
            .search-container .dropdown-menu {
                grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            }
        }

        .search-container .dropdown-item {
            padding: 8px 12px;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            white-space: nowrap;
            text-align: left;
            border-radius: 5px;
            margin: 2px;
        }

        .search-container .dropdown-item:hover {
            background-color: var(--primary-gold);
            color: var(--white);
        }


        @media (max-width: 768px) {
            .search-container .row {
                flex-direction: column;
                border-radius: 15px !important;
            }
            
            .search-container .col-auto,
            .search-container .col {
                width: 100%;
                margin-bottom: 10px;
            }
            
            .search-container .btn-group {
                width: 100%;
                justify-content: center;
            }
            
            .search-container .dropdown-menu {
                grid-template-columns: 1fr;
                max-height: 300px;
                overflow-y: auto;
            }
        }

        .section-title {
            color: var(--black);
            font-size: 2.5rem;
            font-weight: 700;
            margin-bottom: 3rem;
            position: relative;
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 4px;
            background: linear-gradient(45deg, var(--primary-gold), var(--dark-gold));
            border-radius: 2px;
        }

        .service-card {
            background: var(--white);
            border-radius: 15px;
            padding: 2rem;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            border: 1px solid #f0f0f0;
            height: 100%;
        }

        .service-card:hover {
            transform: translateY(-10px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.15);
        }

        .service-icon {
            font-size: 3rem;
            color: var(--primary-gold);
            margin-bottom: 1.5rem;
        }

        .service-title {
            color: var(--black);
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 1rem;
        }

        .property-card {
            background: var(--white);
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            height: 100%;
        }

        .property-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.15);
        }

        .property-image {
            height: 250px;
            background: linear-gradient(45deg, var(--light-gray), #e9ecef);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--dark-gray);
            font-size: 1.2rem;
            overflow: hidden;
            position: relative;
        }

        .property-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .property-card:hover .property-image img {
            transform: scale(1.05);
        }

        .property-info {
            padding: 1.5rem;
        }

        .property-price {
            margin-bottom: 0.25rem;
        }
        
        .property-price-new {
            color: var(--primary-gold);
            font-size: 1.2rem;
            font-weight: 700;
            margin-bottom: 0.1rem;
            line-height: 1;
            display: inline;
        }
        
        .property-price-line {
            margin-bottom: 0.1rem;
            display: inline;
        }
        
        .property-price-original {
            color: #ea580c;
            font-size: 0.9rem;
            text-decoration: line-through;
            display: inline;
            margin-left: 0.5rem;
        }
        
        .property-price-discount {
            color: #059669;
            font-size: 0.9rem;
            font-weight: 600;
            display: inline;
            margin-left: 0.25rem;
        }
        
        .property-price-single {
            color: var(--primary-gold);
            font-size: 1.4rem;
            font-weight: 700;
        }

        .property-title {
            color: var(--black);
            font-size: 1.2rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
        }

        .property-location {
            color: var(--dark-gray);
            font-size: 0.9rem;
            margin-bottom: 1rem;
        }

        .stats-section {
            background: linear-gradient(135deg, var(--black) 0%, #2c2c2c 100%);
            color: var(--white);
            padding: 80px 0;
        }

        .stat-item {
            text-align: center;
            padding: 2rem;
        }

        .stat-number {
            font-size: 3rem;
            font-weight: 700;
            color: var(--primary-gold);
            margin-bottom: 0.5rem;
        }

        .stat-label {
            font-size: 1.1rem;
            opacity: 0.9;
        }

        .footer {
            background: var(--black);
            color: var(--white);
            padding: 60px 0 30px;
        }

        .footer-logo {
            height: 60px;
            margin-bottom: 1rem;
        }

        .footer-title {
            color: var(--primary-gold);
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 1rem;
        }

        .footer-link {
            color: var(--white);
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .footer-link:hover {
            color: var(--primary-gold);
        }

        .contact-info {
            margin-bottom: 1rem;
        }

        .contact-info i {
            color: var(--primary-gold);
            margin-right: 0.5rem;
            width: 20px;
        }

        .social-links a {
            display: inline-block;
            width: 40px;
            height: 40px;
            background: var(--primary-gold);
            color: var(--white);
            text-align: center;
            line-height: 40px;
            border-radius: 50%;
            margin-right: 10px;
            transition: all 0.3s ease;
        }

        .social-links a:hover {
            background: var(--dark-gold);
            transform: translateY(-3px);
        }

        .copyright {
            border-top: 1px solid #333;
            padding-top: 2rem;
            margin-top: 2rem;
            text-align: center;
            opacity: 0.8;
        }

        @media (max-width: 768px) {
            .hero-title {
                font-size: 2.5rem;
            }
            
            .hero-subtitle {
                font-size: 1.1rem;
            }
            
            .section-title {
                font-size: 2rem;
            }
        }

        /* Spinner di caricamento */
        .spinner-border.text-gold {
            color: var(--primary-gold) !important;
        }

        /* Animazioni per le card dinamiche */
        .property-card {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.6s ease, transform 0.6s ease;
        }

        .property-card.loaded {
            opacity: 1;
            transform: translateY(0);
        }


        /* Overlay azioni immobile */
        .property-actions-overlay {
            position: absolute;
            top: 10px;
            right: 10px;
            display: flex;
            gap: 5px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .property-card:hover .property-actions-overlay {
            opacity: 1;
        }

        .property-actions-overlay .btn {
            width: 35px;
            height: 35px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(5px);
        }

        /* Contatore foto */
        .photo-count {
            position: absolute;
            bottom: 10px;
            right: 10px;
            background: rgba(0,0,0,0.7);
            color: white;
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 0.8rem;
            backdrop-filter: blur(5px);
        }

        .property-id-badge {
            position: absolute;
            top: 10px;
            left: 10px;
            background: rgba(212, 175, 55, 0.9);
            color: #1a1a1a;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 600;
            backdrop-filter: blur(5px);
            z-index: 10;
        }

        .property-id-badge i {
            font-size: 0.7rem;
        }

        /* Badges caratteristiche */
        .property-badges .badge {
            font-size: 0.75rem;
            padding: 4px 8px;
        }

        /* Descrizione immobile */
        .property-description {
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* Sidebar filtri */
        .filters-sidebar {
            max-height: calc(100vh - 120px);
            overflow-y: auto;
        }

        .filters-sidebar::-webkit-scrollbar {
            width: 6px;
        }

        .filters-sidebar::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 3px;
        }

        .filters-sidebar::-webkit-scrollbar-thumb {
            background: #c1c1c1;
            border-radius: 3px;
        }

        .filters-sidebar::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

        /* Responsive per filtri */
        @media (max-width: 991px) {
            .filters-sidebar {
                position: static !important;
                max-height: none;
            }
        }

        /* Card orizzontali */
        .property-card-horizontal {
            background: var(--white);
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            height: 225px;
            margin-bottom: 20px;
        }

        .property-card-horizontal:hover {
            transform: translateY(-2px);
            box-shadow: 0 15px 40px rgba(0,0,0,0.15);
        }
        
        a .property-card-horizontal {
            color: inherit;
            text-decoration: none;
        }
        
        a .property-card-horizontal:hover {
            color: inherit;
            text-decoration: none;
        }

        .property-image-horizontal {
            height: 225px;
            overflow: hidden;
            position: relative;
        }

        .property-image-horizontal img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            transition: transform 0.3s ease;
        }

        .property-card-horizontal:hover .property-image-horizontal img {
            transform: scale(1.05);
        }

        .property-info-horizontal {
            background: var(--white);
            height: 225px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .property-description-partial {
            line-height: 1.4;
            text-align: justify;
            flex: 1;
            margin-bottom: 0.5rem;
        }

        .property-details {
            background: #f8f9fa;
            padding: 0.5rem 0.75rem;
            border-radius: 8px;
            margin-top: 1rem;
            margin-bottom: 1px;
            border: 1px solid #e9ecef;
        }

        .property-details span {
            font-size: 0.9rem;
            white-space: nowrap;
            color: #333 !important;
            font-weight: 600;
        }

        .property-details i {
            color: var(--primary-gold);
            margin-right: 0.25rem;
        }

        /* Responsive per card orizzontali */
        @media (max-width: 767px) {
            .property-card-horizontal {
                height: auto;
                min-height: auto;
            }
            
            .property-image-horizontal {
                height: 250px;
            }
            
            .property-info-horizontal {
                padding: 1.5rem !important;
                min-height: auto;
            }

            /* Nasconde il badge classe energetica su mobile */
            .property-features-row span:last-child {
                display: none;
            }

            /* Layout mobile per info risultati e rilevanza */
            .search-info {
                flex-direction: column !important;
                align-items: flex-start !important;
            }

            .search-info .d-flex {
                margin-top: 1rem;
                width: 100%;
                justify-content: flex-start;
            }
        }

/* Preloader per ricerca */
#searchPreloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
}

.preloader-overlay {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.preloader-content {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.preloader-spinner {
    margin-bottom: 2rem;
}

.preloader-spinner .spinner-border {
    width: 4rem;
    height: 4rem;
    border-width: 0.3rem;
}

.preloader-text h4 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
    font-weight: 600;
}

.preloader-text p {
    color: #6c757d;
    margin-bottom: 2rem;
}

.preloader-progress {
    margin-top: 1.5rem;
}

.preloader-progress .progress {
    height: 8px;
    border-radius: 10px;
    background: #e9ecef;
}

.preloader-progress .progress-bar {
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* Badge stato immobile */
.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-badge.trattativa {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

        .status-badge i {
            font-size: 0.75rem;
        }