
/* Reset e variabili globali */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #202020;
    --primary-light: #404040;
    --accent: #202020;
    --accent-light: #404040;
    --background: #F2F1EF;
    --surface: #F2F1EF;
    --text-primary: #202020;
    --text-secondary: #606060;
    --text-light: #808080;
    --border: #D0D0D0;
    --shadow-sm: 0 2px 4px rgba(32, 32, 32, 0.1);
    --shadow-md: 0 4px 12px rgba(32, 32, 32, 0.15);
    --shadow-lg: 0 8px 32px rgba(32, 32, 32, 0.2);
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;
}

body, html {
    font-family: 'Marcellus', serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
    height: 100%;
    overflow: hidden;
}


/* Mappa full-screen */
#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 0;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-overlay p {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

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

/* Popup eleganti personalizzati */
.custom-popup {
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--primary);
    overflow: hidden;
    min-width: 320px;
    max-width: 400px;
}

.popup-header {
    background: var(--primary);
    color: white;
    padding: 20px;
    text-align: center;
}

.popup-header h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}


.popup-body {
    padding: 20px;
}

.popup-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.detail-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.detail-value {
    font-family: 'Marcellus', serif;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 400;
}

.detail-value a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.detail-value a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

/* Personalizzazione controlli Leaflet */
.leaflet-popup-content-wrapper {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.leaflet-popup-tip-container {
    display: none;
}


/* Responsive design */
@media (max-width: 768px) {
    .map-header {
        padding: 12px 16px;
    }
    
    .header-content {
        gap: 8px;
    }
    
    .logo {
        width: 32px;
        height: 32px;
    }
    
    .header-text h1 {
        font-size: 18px;
    }
    
    .header-text p {
        font-size: 12px;
    }
    
    .custom-popup {
        min-width: 280px;
        max-width: 320px;
    }
    
    .popup-header {
        padding: 16px;
    }
    
    .popup-body {
        padding: 16px;
    }
}
