/* Stili personalizzati per la mappa delle proprietà */

/* Marker personalizzati dorati - COLORE ESATTO #BDA76E */
.custom-gold-marker {
    background-color: #BDA76E !important;
    border: 3px solid white !important;
    border-radius: 50% !important;
    width: 25px !important;
    height: 25px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: bold !important;
    color: white !important;
    pointer-events: auto !important;
}

/* Marker personalizzati - Versione stabile */
.custom-marker {
    background: linear-gradient(135deg, #BDA76E, #A0956B) !important;
    border: 3px solid white !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    cursor: pointer !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 14px !important;
    /* Rimuovo tutte le transizioni per evitare movimenti */
}

/* Popup personalizzati migliorati */
.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
    border: none !important;
    min-width: 320px !important;
    max-width: 400px !important;
}

.custom-popup .leaflet-popup-content {
    margin: 16px !important;
    font-family: 'Inter', sans-serif !important;
    line-height: 1.5 !important;
    width: auto !important;
}

.custom-popup .price-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
}

.custom-popup .price-badge {
    font-weight: bold !important;
    font-size: 18px !important;
    color: #BDA76E !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.custom-popup .type-badge {
    flex-shrink: 0 !important;
}

/* Popup legacy */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
    border: none !important;
}

.leaflet-popup-content {
    margin: 16px !important;
    font-family: 'Inter', sans-serif !important;
    line-height: 1.5 !important;
}

.leaflet-popup-tip {
    background: white !important;
    box-shadow: 0 3px 14px rgba(0,0,0,0.1) !important;
}

/* Controlli mappa */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.leaflet-control-zoom a {
    background: white !important;
    color: #374151 !important;
    border: none !important;
    border-radius: 8px !important;
    margin: 2px !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    transition: all 0.2s ease !important;
}

.leaflet-control-zoom a:hover {
    background: #f3f4f6 !important;
    color: #1f2937 !important;
}

/* Fullscreen control */
.leaflet-control-fullscreen a {
    background: white !important;
    color: #374151 !important;
    border: none !important;
    border-radius: 8px !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 16px !important;
}

/* Stili per la mappa container */
#properties-map {
    z-index: 1 !important;
}

/* Assicura che gli overlay non interferiscano */
.leaflet-overlay-pane {
    pointer-events: auto !important;
}

.leaflet-marker-pane {
    pointer-events: auto !important;
}

/* Assicura che i marker siano cliccabili */
.leaflet-marker-pane .leaflet-marker-icon {
    pointer-events: auto !important;
}

/* Stili per popup custom */
.custom-popup .leaflet-popup-content-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.custom-popup .leaflet-popup-content {
    margin: 16px;
    font-family: 'Inter', sans-serif;
}

/* Assicura che la mappa non interferisca con il layout */
.leaflet-container {
    background: #e5e7eb;
}

/* Controlli personalizzati */
.map-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-control-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    border: none;
    border-radius: 8px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-control-btn:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* Animazioni per le card */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.property-card {
    animation: fadeInUp 0.6s ease forwards;
}

.property-card:nth-child(1) { animation-delay: 0s; }
.property-card:nth-child(2) { animation-delay: 0.1s; }
.property-card:nth-child(3) { animation-delay: 0.2s; }
.property-card:nth-child(4) { animation-delay: 0.3s; }
.property-card:nth-child(5) { animation-delay: 0.4s; }
.property-card:nth-child(6) { animation-delay: 0.5s; }
.property-card:nth-child(7) { animation-delay: 0.6s; }
.property-card:nth-child(8) { animation-delay: 0.7s; }
.property-card:nth-child(9) { animation-delay: 0.8s; }

/* Hover effects per le card */
.property-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15) !important;
}

.property-card:hover .property-image {
    transform: scale(1.1) !important;
}

/* Stili per il toggle vista */
.view-toggle-btn {
    transition: all 0.2s ease !important;
}

.view-toggle-btn:hover {
    transform: scale(1.05) !important;
}

/* Responsive map */
@media (max-width: 768px) {
    .custom-marker {
        width: 35px !important;
        height: 35px !important;
    }
    
    .leaflet-popup-content {
        margin: 12px !important;
    }
}

/* Stili per i filtri */
.filter-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-top: 4px solid #BDA76E;
}

.filter-input:focus {
    border-color: #BDA76E !important;
    ring-color: #BDA76E !important;
    box-shadow: 0 0 0 3px rgba(189, 167, 110, 0.1) !important;
}

/* Loading animation per la mappa */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.map-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #BDA76E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: block;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Miglioramenti per i badge */
.property-badge {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Stili per il prezzo */
.price-badge {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Overlay hover per le immagini */
.property-image-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
}

/* Effetti di transizione fluidi */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stili per la paginazione */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination a:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
} 